One of the blessings in WordPress is the vast array of plugins available. However, it is also one of the curses….because it makes us lazy. While this doesn’t seem to be problematic in the short term, in the longer term, large numbers of plugins can cause blogs to slow down, and even worse, the various plugins could start interfering with each other. So, whenever I can, I like to write my own code – the two advantages are that
1 – I can control exactly what goes in to the code, making it do what I need and no more
and
2 – I’ve written the code so if things start to clash, it’s going to be easier to debug.

The Dictionary object in C# is pretty neat. It’s fast and light because it’s essentially a hash table and it really is nice to enumerate through. The gotcha is, it relies on unique values in the key. And herein lies the problem with the code above. In the application I was troubleshooting, the dates that were stored were not guaranteed to be unique. This is really a simple case of not understanding the data structure properly and making false assumptions. Continue reading C# Dictionary object – know your database structure and I won’t have to hack like this