Sam Buchanan's weblog.

Life Lessons

When you want peanut butter toast and you're all out of crunchy peanut butter, but you do have that very, very large container of creamy PB, which is quite disappointing because you really don't like creamy, but hey you've got that bag of walnuts so you chop up a half-handful and sprinkle it on the creamy peanut butter you decided to put on your toast anyway, cuz hey why not, don't be all that surprised when it isn't as satisfying as the real thing.

Still, better than creamy peanut butter. Ugh.

Web Standards: a Three-Legged Stool.

I've been working with a student intern lately, sort of showing him the ropes while at the same time picking his brain about what's covered in his curriculum. It's interesting (and somewhat disheartening) to see the disconnect between what I consider essential and what's actually being taught; although to be fair, I think that his is not strictly speaking a web development curriculum. More on this later.

At one point early on, we had a long chat in which I tried to convey my strong conviction that any web developer or designer worth their salt should be more than passingly familiar with basic web standards like XHTML and CSS, and of course accessibility.

Considering how often I've been having this conversation lately, I started putting together a list of resources I consider essential, to serve as both introductory material and a handy reference. Working on the list has been a valuable experience: it's really driven home how important it is to have a solid foundation in these basic, core competencies, and how often I mistakenly assume that everyone shares this common base. (It's also helped me clean out my bookmarks.)

No sooner had I begun work than Mark Newhouse started writing about these very things in his blog, then combined the separate posts into a tidy little article on Real World Style: A Three-Legged Stool.

So there it is. Couldn't have said it better myself.

My faith in the postal service restored.

Well, almost. Neil Gaiman writes that a "young lady named Anneli in Sweden" wrote him a fan letter:

The address she wrote on the front of the envelope was "The author Neil Gaiman. Lives in a big house of uncertain location in Minnesota USA". On the 20th of November the United States Postal Service delivered that letter to me, care of DreamHaven Books, 912 W Lake St, Minneapolis MN 55408.

The bit in italics is from one of Gaiman's books. Dreamhaven is a local science fiction/fantasy/comic book store that deals quite a bit with Mr. Gaiman, including creating a rather ugly online store dedicated to his books 'n' such. For someone at the post office to have made this connection is quite remarkable.

Either that, or Neil Gaiman is indeed Santa Claus.

Books24x7 not so hot.

A sales rep at convinced someone at work to do a free trial of their online book service, and somehow I ended up in the test group. Since I already subscribe to Safari and am familiar with this type of service, I figured I'd have something to say. And sure enough... My informal evaluation follows:

Books24x7 is a good idea, something that I would probably use were it not for the fact that it doesn't include the books that I consider the standard references in the technologies that I work with now or am likely to work with soon. Looking through those areas, I'm generally disheartened by the selection. As a quick glace at my bookshelf will attest, most of the definitive books in the areas in which I work are published by O'Reilly. They are completely absent from Books24x7, as are some other important publishers.

New Riders is thankfully included in both services.

Before you settle on this service, I suggest that you at least take a look at a competing online book service: Safari. Created by O'Reilly, it obviously includes their books, but also offers a wide selection from publishers — including many also offered through Books24x7.

I've been subscribing to Safari for a while now and am happy with it. I use it for reference while working, to review a book to decide whether to buy a print edition, and to learn new things — often in a hurry.

Safari's service is basically the same as Books24x7: complete text and images, bookmarks, annotations, full-text search, etc., and have a similar interface. Two major differences:

  1. In Safari there is a limit to the number of books you can access at any one time. For instance, I subscribe at the 5-book level. When I put a book in my bookshelf, it has to stay there for at least a month. Once I've reached the maximum number of books in my collection, that's it until the month is over or I buy a higher-level subscription (which I can do on a temporary basis). From what I can tell, Books24x7 doesn't have this limit, which is pretty nice. On the other hand, so far the limit has not been a problem for me: I subscribe at the 5-book level because that's all I ever need.

    Then again, I spend a hell of a lot of money on books.
  2. The quality of books offered by Safari is much, much better.

Whether Safari is a better fit for ITS, I don't know. It's at least worth looking at before making a decision. Would I use Books24x7? No: I already have something that's a better fit for me.

On the other hand, I will use it to read Microsoft ASP.NET Step by Step. Because I confess to having seen some things that make me curious.

AOL patents Instant Messaging.

Hm, this could be a problem. The US Patent and Trademark Office granted AOL a patent in instant messaging.

So maybe AOL will go after MSN and Yahoo! for licensing fees. Bad news, lousy for interoperability (which, granted, has always been far from AOL's goals), and especially bad for Jabber, who have a site set up to track the issue. (via ex machina)

Update: possible prior art?

Santa uses Perl.

Or at least his crew does. It's amazing to read just how integrated Perl has become throughout the whole Santa organization. I always figured Perl would make sense for Santa, who's got to have some serious need for flexibility, power, and speed in his IT infrastructure — not to mention fun — but I guess I didn't give enough credit to his staff and assumed they'd gone the Java route. Good for them!

ElcomSoft found not guilty

Hah!. And hah!

Why JSP Sucks So Hard

Marc Hedlund writes about Why JSP Sucks So Hard. In a nutshell, separating Java code from HTML is on the right track but incomplete: you're still left with a bunch of stuff that makes sense neither to HTML jockies or their standard tools.

I've been thinking this with my early forays into Smarty. I certainly prefer working with Smarty to mixing up all my PHP code with the markup, but it's still way too easy to build business logic into the template, something that I'm trying to avoid by using a template system in the first place. Not just on general principle, but because of the confusion faced by the designer or whoever's now dealing with this little mini-language.

Microsoft's made some steps forward with ASP.NET, in which the template is a valid XML file (reminiscent of taglibs, if my incomplete understanding of both technologies serves me right), but the non-HTML <asp:...> tags in the are still going to throw off standard tools. Conveniently, Microsoft's got plenty of tools to use.

Zope's Template Attribute Language uses attributes instead of tags, but it is still a language, embedding logic into the template. Maybe I'm being too purist about that, but that really is the point of the rant, so bear with me.

Marc suggests something akin to what was done with CSS:

Give me a "code" attribute that I can add to any HTML tag, and overload the "id" attribute. Have the value of the code attribute be an opaque string referring to a codesheet, linked to the HTML document by a a '<link type="text/ccs" rel="codesheet" href="code.ccs">' tag. Have the codesheet use a CSS-style rules specification for indicating which Java (or whatever) class should consume tags with that code or id attribute. Then tell the HTMLer to add the "code" and "id" attributes to the right place in their existing documents, and they're done.

I think he's on to something. We'd need to work around some namespace issues (the code attribute has a specific purpose and place; this ain't it.), but things like TAL have already pointed the way. What I really like about his idea is that, as he points out, it doesn't bind the HTML language to any particular programming language. This would be a huge boon to development, especially if you use something like Perl or PHP for quick prototyping but have to use Java in production to assuage someone's concerns about stability or speed. :-) Just switch out the code in the back end.

MySQL Persisent Connections

Persistent database connections are a great idea, but in my experience often used where they don't belong. The result: reduced performance. I can understand the appeal of a perceived free performance enhancement, but there are trade-offs to keep in mind.

MySQL AB has published a little article about using persistent connections with MySQL, discussing some of the things to consider before implementing persistent connections. MySQL's connection handling is often fast enough that they're not necessary.

Are there any drawbacks of persistent connections? Unfortunately there are. At first each connections takes up resources. This includes MySQL internal resources (memory, table cache elements, connections) as well as OS level resources - threads, open files and sockets. Some operating systems are quite OK with this, while others may show performance degradation. MySQL resources are often more important. By having the same amount of memory that would be used for persistent connections, you usually can configure MySQL to use larger buffers, which often gives extra performance. Will this outweigh the benefit from persistent connections? It completely depends on the application.

The lesson: benchmark your application and make optimizations only when necessary and appropriate.

Slashdot Interviews Joe Clark

In case you missed it (I nearly did), Joe Clark gives a good interview for the Slashdot crowd.

He has such a straightforward, no-bullshit approach that can be grating in some circumstances but that really adds to the interview. All his writing, really. His book on web accessibility is still hands-down the best one out there. If you build web sites, read it.

Internet Filtering is Bad For You

Okay, you already know that Internet filters block useful sites that they shouldn't be blocking. It keeps getting worse. A recent study has shown that health information sites are being blocked, including The Journal of the American Medical Association's site for women's health.

Great. Just frelling great. Are you convinced now?

Martin Fowler interview

Just noticed a great series of interviews with Martin Fowler, in which he discusses such topics as refactoring, design, test-driven development. After reading these, for the first time I'm finding myself giving serious consideration to Extreme Programming, or at least agile software development methodologies.

MFA in Software

Richard Gabriel advocates establishing a program for Master of Fine Arts in Software, asserting that writing software should be treated as a creative activity instead of solely within the province of engineering.

[W]hat do people do when they're being trained, for example, to get a Master of Fine Arts in poetry? They study great works of poetry. Do we do that in our software engineering disciplines? No. You don't look at the source code for great pieces of software. Or look at the architecture of great pieces of software. You don't look at their design. You don't study the lives of great software designers. So, you don't study the literature of the thing you're trying to build.

Second, MFA programs create a context in which you're creating while reflecting on it. For example, you write poetry while reading and critiquing other poetry, and while working with mentors who are looking at what you're doing, helping you think about what you're doing and working with you on your revisions. Then you go into writers' workshops and continue the whole process, and write many, many poems under supervision in a critical context, and with mentorship. We don't do that with software.

See, too, Mr. Gabriel's proposal for an MFA in Software.

This idea resonates strongly with me. In my work and reading, I've observed that programming's creative side is inadequately recognized or addressed, certainly in academic programs.

Every few months, a "programmers vs. designers" debate erupts on one of the lists to which I subscribe. The contention is usually that designers and their work are creative, while programmers operate strictly within a left-brained, ordered, logical realm —never the twain shall meet.


"The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination." So wrote Fred Brooks in the Mythical Man Month. Yes, the nature of writing software — which must after all run on ever-logical computers — implies a certain logic and order to the work to achieve an effective end result. But working through a problem and inventing a solution, then working and reworking the solution to make it more efficient or elegant or both, is an inherently creative activity.

This process — an aspect of the craft, to use the argot — is where the benefit of working toward an MFA lies. Kiara's working on her Masters in creative writing. The quality of her writing has noticeably improved as a direct result of the writing, rewriting, reading, critiquing, and revising that is emphasized in her program. The code I write has been improved by a similar process: working with and revising others' code, and having others read mine. Knowing that others will be seeing my code forces me to write better, to think through a problem more clearly, to revise and improve the code until it is something I'm proud of instead of ashamed. I have learned a lot about programming and software design by reading code from well-established open source projects. From what I've seen, and from what Gabriel describes, this is missing or de-emphasized in most software engineering programs.

None of this is to dismiss the engineering side of software design and development. I've never been through a traditional computer science program and sometimes keenly feel the absence of that background in my work. For the most part I make up for it by being a pretty smart guy and by reading and writing a lot of code. And fixing a lot of bad code and poor designs written by comp sci grads with no practical experience in doing quality work. An MFA program that emphasizes the creative processes of software creation calls out to me. I really look forward to seeing this happen.

My TiVo Thinks I'm Gay.

This is hilarious: If TiVo Thinks You Are Gay,
Here's How to Set It Straight

Not just TiVo, but any of the technologies out there that guess at your preferences. It's amusing to see what people will do to convince a machine that no, they're not [fill-in-the-blank]. personally, I'm interested in what recommends to me based on my purchases. Netflix's recommendations kinda wigged my out sometimes, but I don't think I ever would have got to a point where I felt compelled to change my browsing or rating behavior so it didn't think I was some kind of nature documentary freak.

Then again, if this is the sort of thing that the Information Awareness Office might be doing, I should be concerned.

PGP 8.0 available

PGP Corporation, which has rescued PGP from the ashes, has released PGP 8.0 (i.e., this is a final version: it's out of beta). At least for Windows and Mac OS X. A freeware version is available. but the holiday promotional price for the personal version isn't half bad.

I've been happy with the beta version of PGP 8. To my surprise, it integrates nicely with Apple's, which I've started using again as my default mail client. Now, if only I could convince people that using PGP is worthwhile...

My brother-in-law the falconer.

I've always thought that it was so cool that my brother-in-law is a falconer, and even cooler that he's managed to turn it into a way to make a living, doing wildlife education (send email to if you're interested and are in or around Indiana).

Here's a good article in the Indianapolis Star about falconry, featuring Mark. It even includes video. Damn cool.

XML Pretty Printing in Mozilla

Among its new features, Mozilla 1.2.1 now does "pretty printing" on files served up as text/xml, much like IE has done by default for a while now. Good deal.

So if you have an unstyled XML file, instead of displaying a huge block of text in the browser window so you have to view source to see the XML itself, it displays the XML itself, nicely formatted for easy reading. Even has a collapsing/expanding document tree.

Doesn't work for files served as application/rss+xml, though. So far as I can tell, just text/xml (not that I've done extensive testing). 'Sokay.

And oh yes, if you downloaded Mozilla 1.2, be sure to get 1.2.1, which fixes a DHTML bug.