Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Superstitions are widely held beliefs with little or no rational reasoning behind them. They often result in little rituals we do to ward off the bad luck that we believe will result from them. Superstitions are frequently passed along from person to person and may have origins in magical thinking.

What are the superstitions that you (or your coworkers and friends) have when they are programming or working with computers?

Here are some I've thought of:

  • Relative paths in Unix must begin with . or ..
    I see this one a lot. Some programmers believe that there are only two kinds of paths: those that start with a slash (/etc/motd) and those that start with a dot (./myfile). All others are errors.

  • All classes must have getters and setters for their private fields
    This is, of course, not true. They were probably taught it in their first programming course and it has stuck ever since and passed along as gospel.

  • (Using a flip phone) The phone must be closed and opened between calls
    My parents do this. They will close the phone and open it again even though pressing the red END button would do the same. Not specifically programming related, but it's an example of a superstitious ritual and could influence the user interface design of future phones.

What superstitions do you or your family/friends/coworkers have about programming?

Note: I'm exploring this as a possible topic for a research dissertation in computer science.

share|improve this question
4  
I like the close votes with no explanation. How is this not a real question? –  TheLQ Oct 3 '10 at 13:08
2  
@TheLQ -- Because it doesn't end with a question mark, obviously. (oh wait, never mind...) –  Note to self - think of a name Oct 3 '10 at 16:21
1  
I think superstitions might be the wrong word, even though it is being used correctly. I must admit that when I first found the question I thought it was going to be some grand question asking whether programmers walk under ladders and such. –  EnderMB Oct 4 '10 at 13:10
1  
Quote: "They often result in little rituals we do to ward off the bad luck that we believe will result from them". But virtually every single example you pointed out is not done for "luck" but simply for lack of knowledge. –  Jas Oct 12 '10 at 20:38
show 8 more comments

closed as not constructive by Mark Trapp Sep 16 '11 at 2:56

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

48 Answers

Here's one specific to .NET ...

The Microsoft.VisualBasic namespace can't be used from a C# program.

In fact, it's just another namespace, and some of the members (e.g. SpecialDirectoriesProxy, Strings, ControlChars) are useful.

Updated 8 Oct

Here's a more complex example of why this namespace is useful.

Writing a single instance application - one that's only ever running once, reguardless of how many times the user starts it - is a common requirement. Lots of text editors do this, for example, opening later documents in tabs. You could do all the work yourself with Mutexes and cross process communication and the like. Or, you could just reuse WindowsFormsApplicationBase and reuse the hard work of the VB team. See MSDN Magazine, September 2005 for more details.

share|improve this answer
show 4 more comments

Is this code working? Don't modify absolutely!

share|improve this answer
show 2 more comments

Ctrl-L to clear to the xterm, before the firing the build.

share|improve this answer
show 1 more comment

When adding a new source file to my project using Eclipse or any other IDE I ALWAYS create an empty file and I strongly refuse to use any pre-made template. Even for .h files I like to write the classic #ifndef FILE_H_ (...) lines by myself

share|improve this answer
add comment

I've notices on many programmers, myself included (or even some or even non programmers) that while "idling", thinking or talking on the phone, etc. when there is no active window on the screen, we tend to right-click on the desktop and click Refresh item repeatedly... I don't know about linux users, but with windows users this is a quite common thing...

share|improve this answer
5  
Or if an editor of any kind with an active document, image, file, etc. is focused, we press Ctrl+S every 15 seconds. –  Miljenko Barbir Oct 7 '10 at 11:24
12  
I tend to repeatedly draw selection boxes. –  Kaz Dragon Oct 18 '10 at 15:06
2  
I close all unnecessary windows and play with the wobbly windows in linux. –  Evan Plaice Nov 19 '10 at 22:57
add comment

there is no such thing like my text editor to compose a 2-word e-mail.

share|improve this answer
add comment

Compulsive . in floats in strongly typed languages

I see even experienced people add a add . to float variables to make sure they are not interpreted as int, even though we compile with -Wconversion, e.g.

const float f=1.;

instead of

const float f=1;

Never mind that

const float f=1.f;

would be the truly anal way to specifiy f.

share|improve this answer
show 4 more comments

Not exactly programming, and it only applies to Notepad on Windows:

ALT + f, s to save a file rather than just CTRL + s

When I see the file menu briefly flicker, I know that the file is actually saved.

share|improve this answer
add comment

I am right-handed, but when working (esp. programming), I use the mouse with my left-hand (I do not change the mouse-button orientation). This has tangible benefits: (a) obviates any carpal tingling in my right wrist and (b) prevents anyone from wanting to use my computer (it takes a few hours to adjust).

Here is the superstition: I secretly hope this tactic exercises my brain in some way that will stave off dementia in my later years. I have no medical evidence to support this idea.

share|improve this answer
show 1 more comment

Hoping that non working code may work tomorrow morning without changing a line of code.

share|improve this answer
add comment

Even though are Delphi programmers and the source of our product was originally ported from C++, we still feel the need refer to commented out code as REMMED out code.

I know what it means but have no idea why this is and no one else in the office knows. If it hadn't been for the 4 week BASIC class at College For Kids I took when I was 10 years old this would have been totally lost on me.

share|improve this answer
show 2 more comments

Fear: If Your head hurts for real ,while thinking over a problem. You must be getting stupid.

share|improve this answer
show 2 more comments

Supersitious selects!

Select * from mytable where oid=35; 
Delete from mytable where oid=35;

Crossing fingers when testing deployed version

share|improve this answer
add comment

I always try to hunt down the code change (the SVN revision number) which introduce the bug (according to my guess) whenever I report that the bug is fixed. And sometimes I was wrong (i.e. the bug wasn't caused by that change.) SVN blamey.

Edited: mine seems to be a compulsion, not superstition.

share|improve this answer
1  
Binary search. Nothing beats it. –  Evan Plaice Nov 19 '10 at 22:56
show 1 more comment

If a TSQL schema update didn't go through, check for missing GO, or check if there's extra space characters before GO.

share|improve this answer
add comment

If you use threads your code will have errors and be impossible to debug. While depending on the experience of the dev, tools being used, etc... there may be a little truth to this, often it seems to be caused by fear of learning something new.

Ironically I've heard the same people argue for adding large numbers of threads to under performing applications and ignoring the number of processors available on the target system.

This same superstition can be applied to clustering and any other scaling mechanism that relies on asynchronous events.

share|improve this answer
show 3 more comments

Believing it as a plain WEIRD BEHAVIOR instead of admitting that one didn't read and understand the code well.

share|improve this answer
add comment

When I'm modifiying an existing file, I'll cut everything into notepad then start modifying everything. In case the IDE crashes or something weird happens whlist I'm modifying the code. Even though I've Source control.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.