Uneventful   Leave a comment

Quite a lot can happen during nothing happening.

Yesterday wasn’t an eventful day, which – along with not having to wake up until my nice, normal 9:30 rather than the loopy time of 7:30 – was good after all the excitement last week. A couple of vaguely notable things happened, neither of which are going to set the world on fire but I feel like writing about them anyway.

Firstly was a work thing. Sometimes you have to do something to a system, and you look at what’s there and wonder: What on earth was the person who wrote this thinking? (Sometimes not in those exact words.)

Quite often I think this about the guy who wrote the preceeding software with which I had to maintain compatibility for the first year or so of my software’s life (and, by then, it was far too late to change). But yesterday the curious stupidity was by my own hand.
One bit of the software has to store an address layout in five columns and eight rows. For some crazy reason – and it’s still crazy even if you know that when I first wrote it it was three columns and maybe fewer rows – I decided to put all those fields in a single record (already containing plenty of other stuff) rather than creating a new table of (column, row, text) and linking them all to the original record’s ID. I have no idea why. I could see some reason for putting them all in the same record, but I didn’t even name them “AddressLayout-1-2” and so on, there’s “AddressLayout2Centre” and “AddressLayout4Right” in there, which is even crazier when you realise there’s now two columns to the right of “Right”. Madness.

This came to mind because my boss has done his favourite trick of asking for something that seems quick and simple but that’s actually pretty awkward. And it prompts the question – do I just work around my previous stupidity, as it’s not *that* awkward in this case, or do I risk spending ages and breaking stuff to rebuild the system and convert everything that went before to the new way of doing it?

Probably I “should” do the latter, but I suspect I will do the former.

Might rename the fields though. At least then I can loop through them sensibly.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s