Sunday, November 29, 2009

Good enough?

So I guess the object of the game here is to post content every once in a while. There have been lengthy periods during which I simply didn't have the inclination for whatever reason. There have been others when I didn't have the means. And there have been times when I was incapable of thought that extends beyond the basic food and shelter kinds of issues. (That's not about poverty, though my means are modest, to say the least. No, it's been more along the lines of: “Oh, yeah. Fork. How do you make it work again?”) Even on my best days now, I have more trouble than I really want to admit putting words together, let alone distilling them into glyphs for the perusal and enjoyment of others.

It may seem a little bit odd, then, for me to say that I've been a little bit busy playing with things webby lately. By default, I've become the designer, administrator and moderator for a small organisation to which I'm not allowed to publicly declare my attachment. I really can't wait to hand off those responsibilities—what would be a half-hour-a-day pain in the butt to most people is more or less a full-time unpaid job for me. Despite the difficulty, though, I am the only member with any expertise at all in the area, so until I can teach somebody else everything they need to know, my time is booked. To put the task into perspective, imagine doing all of your day-to-day computing tasks as text messages on a garden variety cell phone that won't let you turn off a predictive text feature, and that the predictive text can't be trained. Characters are pseudo-random, may be repeated, and are capitalised at random, and my hands are as likely to type a word that is almost, but not quite, entirely unlike the word I want simply because it starts with the same two or three characters. The backspace and delete keys on my keyboard no longer carry legends. I'm glad I don't actually do this for a living anymore—I'd need to put in so much of my own time on a project that I doubt I'd make “real” minimum wage.

Well, that's enough griping about typing. It's time to gripe about other things. Like, say, the English-made Stanley #9½ block plane I have. I'll be able to keep the body casting and the nosepiece (a part of the sole of the plane that slides, letting one control the size of the throat, or the opening in front of the blade). Everything else needs to be replaced: lever cap, lateral adjustment lever, blade follower, depth screw, and the blade itself. The blade, at least, is available in a couple of different genuine tool steels quite unlike the plasticine the Stanley blade is made from. Everything else needs to be fabricated. Even the body needs to be modified, but at least there's nothing involved that can't be done with a drill, a couple of taps, set screws, some epoxy, a file and a lapping plate.

Now, I'm well aware that the intricacies of the block plane are not a subject of concern to the historical audience for this blog. The plane qua plane itself really isn't that important, but it is an excellent illustration of the decline and fall of the empire. It's a simple device, just a couple of iron castings with minimal machining, a few sheet metal stampings and a couple of screws. It should be unimaginably easy to get it right, particularly when one takes into account that the device itself hasn't really changed in a century. It's the small corners cut along the way that make my #9½ different from the one my grandfather had. The sheet metal is thinner and softer, the pawls are simply stamped rather than stamped and machined, the edges of stampings are raw where they used to be chased (finished by filing), and everything fits looser so small variations in the parts don't require hand work to make things fit together. That looseness, though, also means that the blade can't stay where you put it, that any adjustments mean a half-dozen back-and-forth operations to eliminate backlash (the “give” in the screw mechanism) and that the lever cap, which also acts as the handle, will adjust the angle of the blade during normal use. And since the standard blade needs to be sharpened every fifty cuts or so, the whole finicky adjustment process never seems to end.

None of the changes to the production of this simple machine are, by themselves, fatal to the functioning of the machine. Taken together, though, they mark a triumph of the bottom line over the product and the consumer. A nickel saved here, a penny there, and before too long something that is conceptually foolproof is defeated by genetically-enhanced fools the original designer could not have imagined. I never thought I'd be a grumpy old fart wandering the streets saying “they don't make 'em like they used to”—but here we are.

“Good enough” almost never is. There is little difference between my little block plane and a lot of the code I have seen over the years. The basics are there, there are vestiges of well-thought-out features, but every corner that could be cut has been cut. An occasional user who never encounters a pin knot or difficult grain might never notice the problems, but that doesn't mean they're not there. Guard clauses, type checking, error trapping and correction and logging are as essential to code as tight threads, shims and smooth surfaces are to the functioning of a machine. As coders, we are not making widgets as much as we are making tools to help other people make widgets. Their craftsmanship depends on ours, so let's make it right.


Spanky said...

You sir, are an artist. Regardless of the medium (source code, wood, or words) you always manage to craft a fine piece of work.

Excellent post my friend.

Stan Rogers said...

Thank you, sir. When the Big Guy takes your beer privileges away, you learn to compensate...