Programming Improvement 9 – Don’t try to make last-minute changes

I had a meeting this morning to demo an app I’m building.

After deploying the latest build, I started to test it.  During the testing, I found a bug.

Of course, I thought to myself, “I’ve got a half hour before the meeting starts.  I can fix this bug and re-deploy in that much time.”  Of course, it didn’t turn out to be that simple.

I put in a change that “should” have fixed it, but saw that it also needed a similar change in a second place.  But that second place couldn’t use the same method to fix it.  So I wrote a little extra code to handle the unique thing there.

Then I found there was another problem caused by that change, and wrote a little more code.  Unsurprisingly (as often happens with rushed changes) there were some other side effects caused by those fixes.

At this point, I realized I was getting into WALOC mode (Write A Lot Of Code) – a state I don’t want to be in.

So I stopped and reverted all the changes.

The demo didn’t need to cover that one feature that had the bug.  I wasn’t on a deadline to have that feature complete.  So I was just creating a bigger mess that I’d need to clean up later, and making myself extremely frustrated, by continuing down this path of quick fixes.

After the meeting, took the time to think out the problem and create a simple, clean fix.

Leave a Reply

Your email address will not be published. Required fields are marked *