I spend about ten hours a day coding, primarily in Java.  Ten hours is enough to give me a headache, but ten hours of getting literally nowhere is a migraine.  This stressed me out enough last night to just give up, and today I had to show the working code to a moderator which was obviously not working.

Fortunately for me the person whom isn’t familiar with Java decided to go through the code and ask me exactly what’s being called.  I spent an hour going through the code until eventually I spotted something, and this is what it looked like:

hasChanged();
notifyObservers();
clearChanged();

A cold sweat sat upon my brow upon realising what I had done.  Let’s try that one again:

setChanged();
notifyObservers();
clearChanged();

Three characters.  Three characters!  That’s all it takes to waste twenty-four hours of mind-numbing agony of confusion.  Tomorrow this code has to be working for some show-off event, so at least I found the bug!


Rss Commenti

No Comments

No comments yet.

Post a comment

You must be logged in to post a comment.