Thursday, December 03, 2009

This stylesheet is maxed out now.

Yes, folks, there are limits to what I will do. Adding three more images to the stylesheet has made it as large as I can let it be and still sleep at night. I hope none of you are on dial-up, 'cuz this page has just transitioned into “sometime next month” ETA territory for the fourteen-four crowd.

Obviously, I need to find a place to put the images where they can load (as binaries) in a reasonable amount of time. I've tried Picassa Web Albums and Flickr, and they're both way too slow for me—my browser won't load them nine times out of ten. Oh, they'd load just fine as <img> elements (eventually), but they're just decorations, not content, and I've gotten pretty hard-line about semantic purity ever since accessibility has become an issue. So for now the images will remain Base64-encoded on the stylesheet. Sorry about the page size.

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.