Wednesday, August 28, 2013

Engineering Case Study: Fixing a Bathroom Sink

Fixing a bathroom sink has never been a straightforward endeavor for me.  Invariably, there's more wrong under the counter than it appeared, and a quick morning task consumes the entire day, and sometimes the whole weekend.  Add in that the space I have to work in is usually the size of a breadbox, and 'happy' isn't going to be used to describe me.  Any number of synonyms for 'wet' will fit, though.

Fixing bugs can often be just like that.  What initially appears very simple quickly turns into a mess of rusty pipes, improper connections, and general unpleasantness.  All constrained, of course, by the space I have to work in, because I just want to fix the sink, not remodel the whole bathroom.

So, there I am fixing the simple bug of saving the wrong data to the database.  I'm pretty sure there's a rule that if your database column is called 'invoice_id' it should contain an invoice's id, and not a bill's id, or a customer's id, or anything except an invoice's id.  A simple fix, we'll just make sure when we save this record we put the invoice_id in there.  Problem solved, and amazingly, I have my afternoon wide open.

Hey, what's that dripping water over there?

And so began a multi-day slog to fix this particular sink while constrained by all the stuff that has been built around it.  The end result is cleaner, clearer, and easier to maintain (but I might be biased).

Now, I just have to turn the water back on.  Glad I remembered my towel.


Written by David Glass, Project Manager & Server Engineer at MerusCase

No comments:

Post a Comment