WebTech: Archive

Entry for 11th May 2005 at 16:10 GMT

“Making Wrong Code Look Wrong”

Wed 11th May 2005 17:10 BST by Andrew from Darlington, U.K.

There's a lot that I like about this article: Making Wrong Code Look Wrong over at ‘Joel on Software’. Web programmers everywhere should read it and re-read it. For small projects with a single programmer it's possible to keep track of the flow of raw and HTML-encoded strings, but for anything larger the scope for mistakes is huge. The ‘Apps Hungarian’ method that Joel applies in the article looks to be a really good idea for development teams in this context — anything to help with the appalling security record of web applications.

The article is more like 3 articles in one, the first 2 should be essential reading for web programmers but the last one on exceptions is a little dry and really should be carted off to another article. When it comes to defensive programming via conditions or exceptions though, my tuppence on the matter is to do both and not one or the other — a lot of conditional state checking for anticipated errors with a lightweight exception handler wrapping it all up for unanticipated foul ups as a means to bail out. I take the point though that bailing out with exceptions isn't something you want to take lightly in many mission-critical situations.


This entry has no published comments yet, write a comment.

271 Archived Entries by Month & Year

Search Reminder

Can't find what you're looking for? Search for it!

Blog Search