I realize it's the prerogative
I realize it’s the prerogative of fools and talk show hosts to come in after the fact and point out the mistakes made previously, but I’m feeling indulgent. I work on a project at work that was written by consultants with KPMG, as far as I’ve been told. I have not seen such shoddy code since my own early experiments with programming. It’s a bunch of StoryServer templates (read: Tcl templates) with HTML and JavaScript mixed in. While this isn’t a bad thing in and of itself, what they did to it would send shivers down the spine of Dante and Virgil.
The baboons, excuse me, the highly compensated team of baboons that wrote this program appear to lack any design, coding, documentation or testing capabilities that progressed past elementary school. I have my own theories about the culture that exists within a company like KPMG, and the code naughtiness they unleashed on Cingular seems to confirm my pet theories. The details of my rant are sprawled out below for those who are curious about the egregious, dare I say it, domestic terrorism KPMG waged against Cingular.
In the HTML they have a number of missing closing tags, like closing <tr> tags. They use this phantom <image> tag instead of <img>. Two times out of ten they will spell JavaScript correctly in the <script language=“JavaScript”> tags. If I were to be pedantic I’d call them out on their lack of a DTD, but I’m not. I am repeatedly appalled at the inconsistency with which they use " marks around their attribute values in their HTML tags.
In the JavaScript code they do things like name frames “top” which makes it really awkward to get to the top object at times. What genius thought abc was a good function name? Who decided to use JavaScript document.writes to put the proper stylesheet for IE or Netscape in the documents? StoryServer’s variations are meant to solve this very problem.
In the StoryServer tcl code they do nasty things like use hardcoded template IDs in their CURLs. You’d think they never learned how to do a SQL join with the number of times they will perform a SQL query in one template. Also they have never heard of components or libraries because they just cut and paste all their code everywhere rather than reuse it. While I’m talking about that how about moving some of the JavaScript into external files so it can be reused between templates? The size of some of these templates is absurd because they pour the kitchen sink into them. I don’t know who thought the templates would be easier to maintain and debug by putting everything into one gigantic template instead of componentizing things! Also someone must have thought they were clever using the lindex command to extract database results from queries instead of using FIELD. I guess they never realized that wouldn’t work if the database table changed. It’s not like these people are new and deserve a little slack. When I was brand new to StoryServer I did not make those mistakes, and I’m just a lowly wage slave compared to what a KPMG consultant gets.