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.

Sunday, November 22, 2009

With a new life comes a new blog design

And it only took me three weeks to make the template work! Which is, I suppose, the point I was trying to make in the last posting. It's not completely finished -- there are a few bits of workbench clutter I'd like to work into the mix -- but I'm still kinda juiced about the result.

Oh, don't get me wrong -- I'd be happy(ish) with the result even when I was up to the task. What makes this different is that I've managed to get it done without being able to reliably link to images. That's right: there isn't a single link to a picture anywhere. If you aren't using a reasonably up-to-date browser, you won't see any pictures at all, and will probably wonder why I'm all excited about some mediocre typography.

If you can see the images, it's because your browser understands the data url in CSS. The images are Base64-encoded on the stylesheet, and the stylesheet is on the page, so there are not extra requests. (Well, except for the ads and the navbar.) There is no real advantage here, since the stylesheet has to download with every page request, but if the stylesheet is cached, you can more than make up for the extra weight of the Base64-encoded images by cutting the server requests for background images to zilch.

Something to keep in mind if you can ever drop support for last year's browser. (Works in current versions of IE8, Firefox and Safari. I haven't tested in Chrome or Opera, but both have a good record for CSS support. Older versions of IE must die, and maybe this trick will help kill 'em.)

Oh -- the theme is woodworking and design for a reason.

Monday, November 16, 2009

When what you are changes...

As someone pointed out, I'm a little overdue for my "I'm not dead yet" posting. Part of that has been simply that I haven't felt like I've had much useful to say, and part has been because using the computer has been a frustrating and futile venture at best. Well, at least a part of that has changed over the last few weeks -- I am now in sufficient control of my hands often enough and for long enough to take the odd stab at life online. Some things, though, haven't changed much at all.

The monster that ate my brain isn't exactly Parkinson's disease, but it's related. Dementia is the primary symptom; the shaking is just incidental. There are drugs to control the shaking, but as with anything that messes with brain chemistry, it takes some trial and error to find the right mix, and it's only been recently that I've regained the ability to type -- or to walk without having to think through the mechanics of each step, for that matter. There's not a lot anybody can do about the dementia, though.

I still know enough about Notes, Java, PHP, JS and HTML that I ought to be able to make a living at it, but my "scratchpad" memory is so thoroughly shot that I can get lost in a ten-line function. That continues to get worse as time passes, so my life as a programmer (or as an answer man on the developerWorks fora) has effectively been over for quite a while now. It was a blast while it lasted, but now even the most trivial work is a source of anger and frustration. I don't need that, nor would I want to expose anyone I worked with to it. And since I have no way of predicting when or if I'm going to have a good day (that is, a day when my body and mind both show up, and when I'm not comatose), normal employment at something less intellectually demanding is also a pipe dream.

Merely accepting my life as it is today, though, seems to have made me something of a local inspirational character, particularly within the recovery community. I sometimes wish there was a way to monetize un-unhappiness (although I have to admit to a steep decline in my own spending on coffee, since that nectar seems to be the traditional offering when the troubled seek solace from the guru). It's not that I enjoy having ever more restrictive limits imposed on me, but when life offers you a choice of laughing or crying one finds that the crying gets really old really fast.

One thing I've found I have been able to do adequately is work with wood. By adequately, I mean I'm only scarring my fingers up badly -- I haven't actually removed any. It's all hand tools (except for the drill, since making a small hole that is actually round with a hand-cranked drill or a brace and bit is almost impossible). And I have to say that I'm enjoying the hell out of it, even when I'm screwing up. It's a quiet and solitary pursuit, which frees me from the anxiety that comes from having all of my perceptual filters turned off. The smell is intoxicating. I know by the sound that I have planed a perfect shaving half a cell thick without having to look (and when the grain has reversed on me and there has been a terrible tear-out). There's the mirror shine of wood that has been pared by a chisel that's been sharpened keener that the average razor. And don't get me started on the miracle that is the Japanese saw.

So Stan is now a fine cabinetmaker. With any luck at all, I may actually make enough money to pay for the tools. For those of you who may be unaware, the good toolmakers of the past have all gone the way of the dodo. There are still tools sold under venerable names like Stanley, Record and Marples, but they're, well, crap. Worse than crap, really. Power tools are doing much better -- but a fellow in my condition can't afford to be playing with anything where a small slip can result in a big injury. So I'm stuck paying three hundred bucks to a small but excellent toolmaker for something I would have been able to buy for fifty bucks (or, rather, yesterday's equivalent of today's fifty bucks) when I was a kid. Used? The ones that survived have become collectors' items and sit in places of honour on shelves. Kinda like what happened to those antiquated Leica cameras.

In any case, I'm having fun turning big sticks into sawdust, shavings and custom convertible multifunction furniture for small spaces. And I'm pretty good at convincing people that setbacks are only defeats if they surrender. But I am not, and will never again be, a techie.