November 16th, 2006
The Xerces XML parser recently localized its error messages, which seems like a nice thing to do. However sometimes good actions have unintended consequences. It turns out the localized error messages are a lot harder to find with Google than the English ones. Paste an English exception message into Google, and you’ll probably find 10 people who have already had and solved your problem. But the same message in Greek or Croatian? Maybe not.
Read the rest of this entry »
Posted in Programming, User Interface | 6 Comments »
November 13th, 2006
Old Fortran weenies like me still remember with fondness (or loathing) RatFor. For those who don’t remember Fortran, you have to understand that it was the first compiled programming language. Consequently it made a lot of mistakes and had major design flaws. For instance, you couldn’t put anything except a line number or a comment marker in the first six characters of each line. That was a relic of its design for punched cards. (Remember those? Probably not if you’re under 40.) These design flaws weren’t trivial or academic problems. Spaceships could crash when you replaced a comma with a period, though the program would still compile.
RatFor was a 1970s era effort to clean up the language. It was an alternate syntax designed around the then hot-idea of structured programming. (OOP hadn’t escaped academia yet.) For instance, it added while loops and got rid of GOTO. It cleaned up the syntax by letting you write >=
instead of .GE.
. (Some of the early computers that Fortran ran on didn’t have lower case letters, much less angle brackets in their native character sets.) However, RatFor was compiled (more accurately preprocessed) to standard Fortran code, after which it used the same optimizers and libraries that standard Fortran did. That meant it was fully interoperable and could play in a world where not everyone was rational.
Fortran’s not the only language where this happens. For instance, JRuby is a way of writing Java code the Java VM in Ruby. That’s great if you like Ruby, but what if you actually like Java and just want to make it a little more rational? Well, as it so happens I just got an invitation to a Sun event on Monday where I expect Sun to finally pull the trigger and open source Java. Great. Let’s fork!
Read the rest of this entry »
Posted in Blogroll | 43 Comments »
October 31st, 2006
Over long distances, airplanes are the fastest way to travel (at least until we invent teleportation) but over short distances that isn’t true. If you want to get from La Guardia Airport to O’Hare, take a plane; but if you want to go from La Guardia to JFK, take a cab. Over shorter distances still, a bicycle may beat a car; and over the shortest distances, the fastest way to get somewhere is usually walking. Terry Pratchett explained it well in Interesting Times:
Of the three things that most people know about the horse, the third is that over a short distance, it can’t run as fast as a man. As Rincewind had learned to his advantage, it has more legs to sort out.
You naturally choose your mode of transport according to the distance you plan to travel. A few hundred meters or less, walk. A kilometer or two, take a horse (or more likely these days, a bicycle). 10K to a few hundred kilometers, take a car. And beyond a few hundred kilometers, airplane is the fastest choice; and the longer the journey the better a choice it becomes.
Programming is much the same. Read the rest of this entry »
Posted in Programming | 18 Comments »
October 29th, 2006
The W3C is finally waking up and realizing they’ve got a problem with HTML. The browser vendors are once again abandoning them and going their own way (except for Microsoft, which is going in a different direction entirely). The W3C has wisely decided to start listening to Mozilla, Opera, and Apple and revisit classic HTML. Unfortunately though they realize they have a problem, they haven’t yet realized what the problem is. Berners-Lee seems to think it’s about “quotes around attribute values and slashes in empty tags and namespaces”, and it’s not.
XHTML is not the problem. Well-formedness is certainly not the problem. Hell, even namespaces aren’t really the problem although they’re clunky and ugly and everyone hates them. The problem is that the W3C has abandoned HTML for years. HTML hasn’t moved forward since 1999. No wonder browser vendors are getting antsy.
Read the rest of this entry »
Posted in Web Development, XML | 77 Comments »
October 27th, 2006
The POST method is vastly overused in HTML forms, with negative consequences for the user experience. POST requests cannot be bookmarked, linked to, indexed, searched, or cached. For example, recently I wanted to link to a list of top independent albums from RIAA Radar. However I couldn’t becuase the search request was sent via POST. The URL was http://www.riaaradar.com/search.asp, but there was nothing in the URL to indicate whether I was searching for Black Box Recorder or Britney Spears.
All safe requests should be done with GET. GET is vastly friendlier to users and dramatically improves your search engine placement. (In fact, form results sent with POST might as well be invisible to search engines.) POST should only be used for requests that cause some action to be taken: a book to be ordered, a page to be printed, a contract to be signed, etc. Search results and many other things don’t fall into this category.
Read the rest of this entry »
Posted in Web Development | 20 Comments »