IDEs and stabbings in the back

Yeap, sometimes IDEs can simply stab you in the back. Really. That’s probably the price you pay for having such a nice, secured and user friendly environment and tools.
But out on the streets, life is cruel.

The same rule applies when going outside the IDE. I know that this happens in general but today I was really surprised. Today’s incident:

While working on a project that needed to parse a file and afterwards use it for something, when the app was launched from inside the Netbeans IDE, everything just worked surprisingly smooth.

Then, the project just compiled and built nice and smooth and then I tried to run it. There was the pitfall. There was a bug somewhere in the code (or the libraries) and NO EXCEPTION HANDLING CODE COULD COPE WITH IT OR EVEN DETECT IT.

For a moment I recalled in my mind “the million dollar bug”nowhere near in complexity but I wanted to make myself look good- and tried to figure out what the hell just happened.

After searching the libraries for bugs and doing some googling that simply left me procrastinating from site to site on the internet, I ate some chocolate digestives and dived back to the code for some “rubber duck debugging”. For me is rhino debugging as I have my favourite rhino on my desk, but obviously you get the point.

After some lines of code, I bumped upon -oh the irony- a chunk of code responsible to read utf-8 input from a file. Yeap, I’ve already written a blog post about it. Well, the method wasn’t configured correctly as on the blog post and that thing was causing the application to fail miserably.

The interesting thing though is,

how the hell the application read the file correctly when it was running inside the IDE…

If it didn’t read the file in the first place correctly, I think that it would be much easier for me to imagine what the problem was.

Anyway, anyone who knows the reason that happens, may contact me to share his light and wisdom on the subject…

Leave a Reply