These past few days, I’ve been pairing on a rather large refactoring. We’ve been at it for a week now, and the data model is still rather confusing to me for some reason.
Our task is to represent a 2-dimensional graph of pareto data. The axes change because we can click on a bar and drill into a particular column of data. Nifty yes, annoying to code though. So, we decided to use a hashtable of hashtables so that we can easily store and retrieve the different buckets of data along each axis according to its value. That is, the hash of hashs allows us to retrieve a point in the coordinate system using a string name on each axis.
There came a point in our problem where we realized that we needed to be able to sort this data according to the y-value of each group of data (the second level hash was a sigle group). I’m still not too sure about the whole thing, luckily my pair wasn’t as confused on this as I, and coded up a solution that we will now start writing some automated tests around. (I’ll post a pseduo-algorithm later).
As I was pondering this, I couldn’t help but wonder what is wrong with me lately. I’ve solved problems much more complicated than this 2-dimensional data sort. I think I’ve reached a point where what I have what is essentially writers block. I’ve got a lot of distractions going on at home that are taking away valuable brain cells from my code.