10 I call this the Clipboard Board Factory pattern. – Chris Noe Sep 24 '08 at 1:34.
When I make a minor change and it works, but I'm not really sure why.
These ones always make me nervous! – ConroyP Oct 3 '08 at 15:46 1 Oh God yes. I get a very sick feeling when this happens.
And you know you can't just change it back, it works now. And all you can do is hope to goodness the new fix doesn't break 'cause you have no idea what you'll do to "fix" it again. ::shudder:: – Dinah Apr 21 '10 at 0:02 I always have an idea how to fix a certain problem, its just, this idea is permanently changing ... – Chris Apr 21 '10 at 0:13.
Find/Replace All. " Even scarier when it works.
When I read this answer and felt my stomach lurch with thoughts of the last time I did the same, I immediately gave it a +1 – Dinah Apr 21 '10 at 0:11 Actually very safe and useful if you are converting a program from tabs to spaces. (not the other way around though) – PiPeep May 1 '10 at 1:01.
Throwing DLLs into the same directory as the executable so that they can be found.
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! ).
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.
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.
1 That is scary. :) – George Edison Apr 21 '10 at 1:07.
Code that is dependent on the date because of changes in other systems. Code like, "after 2008-10-xx, remove this check".
Replacing a faulty peice of code with an if / else.
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...
If nothing explodes when I build after an hour of code-editing, I get suspicious.
Changing the timezone instead of fixing the timestamp problems.
Commenting out the line that is causing a segfault.
Coding something without proper exception and argument handling. I.e. Not checking for null or empty variables.
Opening a connection (which could fail) and then running methods on that. Selecting from a list of elements (which may not return anything) and doing logic on the first element (which may not be there since the list could be empty).
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....
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.
– Jorge Israel Peña Apr 21 '10 at 0:14 1 Switch statement which is an O(1) jump to a hash vs a type comparison or Vtable lookup can affect performance in certain areas... – Spence Apr 21 '10 at 0:53.
Table based HTML design when x-browser issues made me realise my CSS skills need more work.
2 This used to make me feel sick until I reasoned that, like tables, a million div tags is not separating my content from layout. The layout doesn't work until I have just the right HTML voodoo first. So I'm just as happy with tables if I can't get CSS working in a reasonable amount of time.
– Dinah Apr 21 '10 at 0:06 @Dinah I do aggre there is no point replaceing a table layout with divs if you're going to end up with more div tags than table related tags! – Jon P Apr 22 '10 at 0:02.
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.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.