At the loss of words
I usually don't bother posting links to The Daily WTF, no matter how ridiculous some of the postings are. But this time, I have to. The posting describes an application that passes SQL strings from one ASP page to another – using a cookie. Even by the normal WTF standards, this is… ugly.
Without starting on lengthy rants about all the possible problems with the mentioned approach, I'll make one general point. During the past two weeks I've reviewed quite a lot of code, both from in and outside our organization. I've seen both brilliant examples of truly responsible codership and totally horrifying lumps of code strung together by very fragile APIs. It's been a very demanding experience – with both patience and understanding being stretched to their limits. But it did come with lots of prizes in terms of understanding and knowledge.
This has to be the gem of all my learning: If your organization doesn't have a policy for frequent code reviews by colleagues, establish one. Most of the really horrible solutions simply stem from leaving bad code alone for too long. It doesn't matter if the reviewer isn't the Einstein of the coding world – the most important thing is having another human being evaluate the readability of the code. That, and feedback. DO IT.
June 17, 2005
В· Jouni Heikniemi В· Comments Closed
Posted in: Web