This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Programming, thirty years later
Feed Title: Richard Demers Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rademers-rss.xml
Feed Description: Richard Demers on Smalltalk
I recently completed an update of the BottomFeeder 3.8 Users Guide and the BottomFeeder 3.8 Tutorial. Looking back through my files, I see that these are the 14th versions of these documents over a roughly two year period. It's been a lot of work trying to keep up with Jim Robertson's upgrades to the program.
I get very little feedback -- but heck, that's the life of a writer, so no complaint. However, last week I got an email from Rowan Bunning, one of the
WithStyle crew,
to the effect that my documents really weren't very good at being XHTML. He suggested I run them through a
XHTML validator.
I had been trying to follow basic XML rules, as applied to HTML -- things like terminating and nesting elements properly -- but I wasn't too concerned about this. The Internet Explorer browser formatted them OK, and that's all I was really concerned about.
How bad could they be as XHTML? They were awful! The validator spit out hundreds and hundreds of error messages. What a mess. It turns out that XHTML is about a lot more than just making HTML XML-conformant; it's all about separating content from layout, and about modularization for extensibility. All this introduced a lot of rules I hadn't been aware of. (Isn't ignorance so blissful?)
The thing to know about the validator is that it is a batch process that takes in a file that claims to contain valid XHTML, checks if it is correct according to some set of rules, and spits out messages for all the errors it finds. The process reminded me of the way I worked when I programmed in PL/I on mainframes thirty years ago, compiling a source file time after time until the compiler was happy, and then doing test after test until the application worked. The first error found by the compiler was often the source of many of the errors subsequently found; the compiler being a rather stupid beast. Only occasionally was it able to recognize a point in the code it could identify as a syntactic restart point. Today, the XHTML validator works the same way.
After two arduous days, my BottomFeeder documents are now valid according to the rules of Transitional XHTML. I'll try to be more careful with them henceforth; not wanting to go through that process again. I'm not sure what value this adds to my BottomFeeder documents, but what the heck, I've learned a bit about using CSS for document layout by doing this.
All this got me thinking about the fact that this is still the way most programmers work. I'm spoiled; I program exclusively in Smalltalk, with its powerful interactive development environment that includes incremental compilation, a refactoring browser, and really useful inspectors, debuggers, profilers, and lots more. Yes there are development environments for some other languages, but I've learned that most programmers don't use them. They prefer to stick with their "tried and true" file-oriented editors and compilers. To a large extent this is the result of the limitations of the obsolete languages they use (C++, Java, etc.), but to an even greater extent, it is the result of the limitations of their own minds. What a shame.
P.S. I'll ask Jim to update the online BottomFeeder document when he has time.