Advertisement

How stupid were/are you?

Started by October 24, 2010 12:29 PM
19 comments, last by Cygon 14 years ago
When I had just started learning C++, someone had asked me to create a small application that terminates any programs a PC wasn't supposed to run (at certain days, certain times of a day, etc.)

I finished my task, but while everything else was solid, once in a while, the configuration tool would completely mess up the configuration file so I had to set everything up again from scratch. The errors would occur when reading different parts of the configuration file, too.

After two days of searching, the configuration tool suddenly failed consistently every time without exception. That's when I got the error:

My configuration file was loaded and saved via C++' iostreams. I forgot to set the stream to binary mode, which apparently worked for the values I was writing (all in the 1-30 range) - except for the value 9, the tab character, which the stream interpreted as a delimiter.

The configuration tool saved a time stamp of the last time the configuration file was changed.

So if you clicked on save exactly 9 seconds after the minute, the file was corrupted.
If you clicked save on the 9th minute of the hour, the file was corrupted.
If you clicked save on 9 o'clock, the same.
If you clicked save on the 9th day of a month.
And you couldn't save your configuration file for the whole of September :)


Quote: Original post by FableFox

anyway, after all those plug-in and removing, I became too careless. One day I broke a few of the IDE pin, rendering the hd useless (and the data inside).


Hey, I know that one all too well.

Except I only broke one pin of mine and then tried to bend a piece of hard wire to form a tiny noose that would go around the base of the pin below where it was clipped off. I then shoved the other end into the corresponding hole of an IDE cable and carefully pushed it into the hard drive.

Surprisingly, it worked and I kept using that hard drive for a another year or so :)
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.

This topic is closed to new replies.

Advertisement