« JSON vs XML| Main | Breaking News: I am an Informon »

Same Lesson, Different Day

| | Comments (0)

One of the things I hate the most about programming is when you make the same mistake twice.

You think yes, anybody can make a mistake once. But twice? Or more? What kind of idiot does that?

I remember one of the first larger programming projects I did for myself. Here I am, big object-oriented guru and teacher of all things OOP. But when I started designing my program? I just bulldozed ahead without any model to guide me.

What a disaster! Soon I found myself having to code around a poor object structure. To make it worse, each time I had to code around it, I realized it because of my lack of planning ahead. Gosh that was a miserable experience. And I knew better!

The next time, I spent about four days pounding out a model. Oh, it was a great model. Had all kinds of notes and comments, the lines were all drawn with care, and the thing was as solid as the Rock of Gibralter.

The program was a disaster. This time I had too much stuff for what little functionality I needed. The comments got lost, I never used round-trip engineering, and I ended up with butt-ugly commands that involved 46 objects for every operation (or so it seemed). Heck this rascal was built for a moon landing, and I needed a motor scooter to get around the block. Once again, I knew better. I was the first person to teach people to only design to the degree necessary. But I got so caught up in the furor of desiging (is there some sort of disease for this?) that I went way too far.

So here I am with my latest project, a properly designed blogging toolbox that runs anywhere and has a zero install. The backbone is built with .NET and CodeSmith, and there is a simple .NET application for signing up for the tool. Everything in the core libraries has NUnit tests built into them.

Well almost. I didn't write any NUnit tests for my simple sign-up web applications (who has time for that nonsense? It's a simple app!) I have noticed over the past few days that I have been averaging 40 or more people dropping by the sign-up page, but nobody has signed up.

Gee. What could it be? Could it be the font size, the type of text, the background color? How about the information? Is the screen busy enough? Are there enough endorsements for users to feel comfortable signing up?

Funny thing. When presented with a problem sometimes you run down every rabbit hole but the one with the rabbit in it.

Tonight I get an email from Michael Shields (thank you, Michael!) that says something simple like "batBack signup page is not working"

And still I hang on to the wrong things! Perhaps he has an odd browser, or he forgot his own name. He could speak a foreign language and not have a keyboard to enter the text. I email him and ask him for specifics. After all, I am the great white programmer. Surely it can't be my code. Heavens no.

He sends a detailed screen shot. Gee. Kinda looks like my code is all hosed up. In fact, it looks just like my code is all hosed up. I briefly consider the idea that Michael may be an Al Qaeda terrorist bent on destroying Huddleston, Virginia by way of ruining my day. The entire error business could be forged!

But that ain't happening. Instead I dig out the compiler and go fix the problem. What was it? Turns out I had made some changes that propagated into this other web application where I was making assumptions that were no longer valid. You know, a nice unit test would have taken just a few minutes, and it sure would have caught this problem long ago. The page was broken for probably a week, and I was too silly to fix it.

So again I make the mistake. I know better! I am the man! I know what I will do: next time, I will make elaborate unit tests for each button on the page, and double test the text boxes so that there is an intricate system of .....

Perhaps I'll never learn?

Leave a comment

About this Entry

This page contains a single entry by Daniel published on April 8, 2006 3:58 AM.

JSON vs XML was the previous entry in this blog.

Breaking News: I am an Informon is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.23-en
Daniel Markham