We've all done them, the short fix that will get the system back up and running until we can Do The Right Thing.
What have you marked in your code with the dreaded //Hack comment?
We've all done them, the short fix that will get the system back up and running until we can Do The Right Thing.
What have you marked in your code with the dreaded //Hack comment?
When I make a minor change and it works, but I'm not really sure why.
Throwing DLLs into the same directory as the executable so that they can be found.
Coding something without proper exception and argument handling.
When using a truly Object Oriented language, typically anything that requires an if statement, or especially a switch. It's usually a sign that you're not doing OO correctly.
Writing my own function rather than taking the time to figure out how to use somebody else's pre-existing, tested, and proven function.
Writing code is easier than reading it.
Table based HTML design when x-browser issues made me realise my CSS skills need more work
Using the windows registry as a communications channel between different parts of the same software system, because it's so much easier than doing it correctly.
My fellow workers have this ritual ( not exactly but some sort of )
Copy resource files all over the computer for the program to find them.
Shutdown the app.
Shutdown the IDE
Shutdown the messenger ( just in case )
Shutdown all the applications ( to make it sure )
Shutdown the whole computer ( not restarting it but actually shut down and leave it for exactly 2 minutes )
Jump three times on one foot.
Turn the lucky cup up side down 1 time
and walk around the block clockwise ( otherwise It won't work ) .... .
Ahh and give a little pray.
When they do this, it makes me so angry. I tell them there is not such a thing like Voodoo programming.
But.. when I'm all alone, at 3 a.m. on a holiday ( like .. Independence Day or some other ) I ask myself... what if I do the ritual....
This just never works..
public static void sanityCheck () throws ScaryException {
// TODO
}
also, putting in all initialization values at the beginning of the program, with a "this will go into a config file" comment. Should just put it in the config file.. it'll take 5 minutes! And yet, I start off this way every time.
Any bug fix that's committed without a non-regression test...
Code that is dependent on the date because of changes in other systems. Code like, "after 2008-10-xx, remove this check".
Adding null checks where null should not be possible, but not figuring out how a null ended up there. (But I never leave the code like that!)
If nothing explodes when I build after an hour of code-editing, I get suspicious.
I have a friend who is a SQL ninja who will occasionally give me some slick solution. I can follow what's being done but I know that if it needs to be tweaked, I will be ill-prepared to do so. This doesn't prevent me from using the SQL but it does fill me with queasiness.
After a while of debugging a lot of errors, I'll run tests to see how many errors are left. If it goes from being a lot of errors pre-debugging to zero errors after, I feel great for a millisecond, then I wonder sickly if I broke the tests themselves.