I recently starting looking at the subreddit for PowerShell, and I’ve seen a lot of people using hashtables for just about everything. I’ve even seen a few people using them over at PowerShell.com and in both cases the usage was dubious at best. Here are my thoughts on it, and why hashtables are usually not the right choice.
My daughter has really been working on her multiplication tables this year and normally she comes home with a study sheet for each number, all the way up to 12. This week we’re working on 8’s, so 8×0, 8×1, all the way up to 8×12. Unfortunately she didn’t get a worksheet so she decided to make her own. If I can take a moment of fatherly pride, she does this kind of thing all the time without us making her. What a gal! Well, one of the ways I motivate her is to race her. So it was on. Can I write a PowerShell script and get the multiplication table out before she could write it out?!