A programmer parable: A broken clothes dryer
It's pretty obvious that the principles behind good software engineering are not domain specific, but today I was reminded that they aren't even specific to programming itself. They're engineering principles, and beyond that, they're principles of problem solving that we observe in daily life. For example, let's say your clothes drier stops working, like mine did, oh...several months ago. The lessons are in italics, and though they are obvious, it's the obvious things that need re-iteration. At least for me :)
The plot
Many moons ago our clothes dryer began to do a steadily poorer job drying clothes. Very gradually, clothes ended up damper and damper. The support staff (my family) reported this to me, but I ignored it for a little while, focusing on new features (the treehouse.) Eventually the problem was escalated (my wife became less patient.) So today (all day) I tried to debug my dryer.
Lesson One
As background...a few years ago my house burned in a fire, and was pretty much completely destroyed. I spent 18 months with my wife, friends, and neighbors rebuilding it by hand. As part of this process, I completely redesigned it, including adding a second story. It was a great experience that taught me a lot. Part of the redesign involved creating a tiny utlity room (we had none before) in which a stackable washer and dryer is cozily nestled. When I say "cozily" I mean "with the minimum legal clearance on all sides, and a sliding pocket door." This was dumb. It's an efficient use of space, but this particular stacked appliance is heavy, and the room is too small to get behind it. Three times now I have needed to pull it out of its cave to do maintenance, a ridiculous twenty minute excercise that once crushed my gold wedding band (though that saved my finger.) Bad design hurts you later, and it often keeps hurting.
Lesson Two
To me, "not drying enough" immediately signified "not enough heat." So as I disassembled this beast, my mind was already focused on what I thought the problem was: the heating element. This turned out to not be the case, but my premature conclusion predisposed me to being misled in that direction. Don't reach conclusions too quickly.
Lessons Three and Four
The service manual (which doesn't ship with the washer, but which I was able to download from an obscure site selling parts) had a series of tests to run. Armed with my ohmmeter, I followed them verbatim. Sure enough, there were three tests for the heating element, which can operate at half power or full, and one of these showed the wrong resistance. The manual's flowchart said "replace the heater." Just as I suspected! Ten minutes later it was ordered and I was $100 poorer.
Since I knew I was getting a new heater, I decided to take the existing one apart to see how it was made. In doing so, I was puzzled, because the expected resistence the manual specified for the terminals didn't make sense once I saw how the device was constructed internally. Based on my calculations, the heater's resistance should be reading exactly what it was at the terminals. The heater was fine. Documentation is not always 100% accurate -and- it pays to be curious.
Lesson Five
Going back to the problem, I realized that if the drum was turning (it was) that meant the blower was blowing, as there is only one motor for both tasks. The heater was working, and the moisture sensor (this is a fancy dryer) was also fine. So maybe the blower was blowing but not enough air was actually moving out of the device. Lint! I had rejected this idea earlier because I had checked the exhaust path up to the point it left the room, and it was clear. But just on the other side of the wall was my exhaust outlet, a fancy device with a door on a spring (to keep the birds out) and a wire screen. The latter was completely caked with lint. My dryer was fine, but it had a dependency problem. Dependencies in a system are just as important as the main components.
Lesson Six
What's really sad about this entire ordeal is that my wife told me so. When she first complained, she told me that the lint screen wasn't filling up with lint like it used to do, and that she thought maybe there was lint collecting somewhere else. That's what prompted me to check the exhaust path, but once that was clear, I simply ignored her bug report. In retrospect, the only way that less lint could be collecting on the screen, given the same set of clothes being dried for comparable lengths of time, is if less air was moving through the system. The users are often your best source of information, if you can develop the processes to gather their feedback, and if you pay attention to it once you have it.
So after several hours of work, a 5 minute job with tin snips removed the screen (YAGNI!) in my exhaust vent, and things are drying beautifully. Similar bug-hunting scenarios have occured at work for twenty years now, but never leaving me covered in so much lint.
Why don't they make lint for lint?
- cpopetz's blog
- Login or register to post comments