Saturday, April 12, 2008

Debugging Plumbing

A short while ago I found myself with a standard home-owner dilemma. A clogged drain. But not just any drain. This was the kitchen sink drain with the insinkerator in it. As I was getting my blue-collar on (in a linguistic idiom from The Todd) I was struck by how nicely a career in programming had prepared me for this sort of problem.

I was essentially dealing with a bug here. And it started off as wonderfully well specified and specific as most bug reports do. "The sink doesn't work". After some quick digging with the user (i.e. the part of my brain that just wanted to empty the damn sink) I got a slightly better bug report. "The sink is slowly draining and I may have tossed some bad data into the system". So now I could investigate.

I did the binary search on the U-joint and the removable piece connecting the insinkerator to the wall. Both of these turned up clean. And here I lost me cool for a second. I started blaming select and went to a bad (and very damp) place for a while filled with frustration.

I ended up running some draining tests now (well once I cooled off a bit). And left the U Joint off and poured a cup of water down the sink and timed both entry and exit to the system. It took 5 seconds to put the cup of water in the sink, and 6 seconds for it to collect on the other side. AHA!. Apparently there's some friction in the insinkerator and that's causing my slow leak. Well no, but there were another few hours wasted on that theory. Eventually I realize that every time there's a huge blockage it drains pretty damn fast through where the u joint was when I take it out and move along with the next theory.

OK. Well now there's only one place left. And it's frustrating to think about because it's in the wall. And that means calling a plumber. So I do nothing for a few days and don't use the sink. Well the problem is kinda in select now and so may as well wait for the next version of the software to come out. Right?

And then I get a nice email from the HOA. It informs me that several tenants have had
had similar problems and that the plumber isolated it to the walls and that it's now better. Woot! I'm glad I waited for the patch. And the email brings to light

a) I throw too much crap down the sink
2) I'm not the only one in the building that does it

Well I leave the problem alone now and wait for the next guy to come along. Though I'm pretty sure future-Keith is going to be pretty mad at me. Ah well. It's not like he can do anything about it.

No comments: