11 Nov
2008

The Worst Software I’ve Ever Written

Category:General PostTag: :

I have been stupid busy and am stacking up blogging topics like cordwood. Maybe it’s because of that guilt that I am about to tell you about the absolute worst piece of software I ever gave birth to.

My guilt over this is so core to my being that just relating the story is going to feel like recovering from the flu, I think. Please remember that this happened early in my career as a software developer. OK, excuses done. Here goes.

No, really. Here goes.

The Tale

The company had a product that was a giant pile of content. The content had been marked up into HTML by hand via a note-paddish application that made every file essentially different in chrome and in layout. This was a massive pile of hand generated HTML: think encyclopedia Britannica big.

The big pile of HTML (POH) was great when it was being sent on a CD to clients (yes, it was that long ago), but a new business opportunity arose for us to host the POH on a web server on the Internet.

The only rub in this idea was the fact that the POH needed to be skinned for individual clients. The idea is a simple one that we now think of as a core function of a multi-tenant web site. Show the same content with different branding and chrome.

In my previous job, I had written code that parsed news feeds and sports scores and wrote HTML pages out to ESPN.com. This was reasonable solution at the time because we were going for performance over any other advantage.

So, using a similar technique I wrote wrote an application that used an internal parsing engine to process a proprietary language embedded in my own template language.

So, to make that simpler:

image

This was implemented in Java and had some pretty trick code in it that allowed me to do basic looping structures and things in the templates with a custom language. This allowed me to make lots and lots of copies of the crappy HTML with different logos.

Here’s where it goes from bad to horrible.

My boss walks in and announces that there is this new technology called ASP (classic in VBScript, not ASP.NET). So, the order is this:

“Make the Fancy HTML Maker Application write out the files with a file extension of .asp so that we can be using Active Server Pages.”

“Huh? But this ASP thing might be cool because it lets us do dynamic data binding to web UIs and …”

“Just do it.”

“OK.”

So, I added the “feature” to my perfectly executed bad idea of a content engine and embedded things like this into the asp pages that got written out:

<h1 color=”<%Session[‘ClientColor1’]%>”/>

The ASP “application” loaded up about a thousand params out of the database during it’s 30 second OnSessionStartup function and re-used them out of the client session.

The best part? The best part is that the links didn’t look like this:

/vdir/rendercontent.asp?id=br549

Nothing that reasonable. Nope, I wrote out each ASP page as a file so that the links looked like this:

/vdir/dir1/dir2/dir3/file.asp

That’s right. I wrote and ASP file for every HTML page equivalent.

The Shame Lingers

I don’t even know what the hell to call a solution like that. It isn’t really an application. It’s not really static content. I’m not sure what it is, but it is mine. Yes sir, all mine.

This application remains my reminder we sometimes need to be more professional than is asked of us.

There you have it, my worst software shame. What’s yours?

11 thoughts on “The Worst Software I’ve Ever Written

  1. That brings back a lot of memories. I actually did work at Encyclopedia Britannica and it was my job to write perl scripts which processed all of their content and made any changes/updates they needed. It was this massive amount of html files and we had scripts that would do stuff like “Replace all links to this article with a picture and a link to this other article.” It was messy but I guess that is where technology was at the time.

  2. Loved this post, I think that with all of us the learning curve when a new technology comes along can cause us to knee jerk in response.

    There’s a lesson to learn from this one.

  3. That’s so funny! I think all of us as developers have skeletons in the closet like that, those small projects or little custom hacks that make you shudder when you think back over them (and hope that no other developer ever has to look over them!) 🙂

  4. I worked for a company that had several sites in ASP. Before I worked there, my future manager failed miserably at deploying any successful Java web applications (JSP). This caused management and the application testing team to fear Java as “unstable”. Also, the dot-net manager was feeding their fears in order to maintain “his” technology as superior.

    After I was hired, my manager asked me to deploy a web application, which I designed in Struts. It worked fine, but no one trusted it and preferred it to be written in the “more reliable” ASP.

    So I changed the .do to .asp in the configuration and everyone stopped complaining. Reliability is based primarily on your development team’s coding abilities, not necessarily on the technology used.

  5. Well, I produced a real crappy software at school as I was working on a real life project associated with my course assignment. The horrible thing was, I had the connection strings hardcoded into the source code! Because I though, in a desktop application the connection string should be hardcoded to protect from security attacks!

    I really feel ashamed when I remeber that!

Comments are closed.