Programming terms you have never heard of

The title above may be a lie. It just depends on your context or situation. You may have heard these terms (especially if you read Jeff Atwood’s recent post or Dodgy Coder’s 2011 post). Note that there may be very practical uses for some of these in real life. Others simply describe situations that should never happen.

Yoda condition

if(constant==variable) instead of if(variable==constant)

 This is equivalent to saying “If blue is the sky”.

This is no insult to Yoda, after all,  “When nine hundred years old you reach, look as good, you will not, hmmm?”

Bugs in code


A bug that naturally disappears when you look for it.

This notorious bug gets its name from the Heisenberg Uncertainty Principle. The classic example is outlined in this Wikipedia article. The bug manifests itself with an optimized (normal) compiler. But when the programmer compiles with the debug option, the bug disappears.  In debug mode, values are often stored in memory instead of registers, allowing for slight differences in floating point values.

One example I have experienced is in using different Java environments. Our test environment used the IBM JVM and the production environment used the Sun JVM.  The Sun JVM evaluates the “==” operators differently than the IBM JVM. That’s why you should always compare strings with “string1.equals(“string2″)”.

Fermat’s last post

A poster to a forum or discussion list claims a solution, but never gives the answer.

I’ve seen this hundreds of times. Someone posts a complicated question on a forum and no answer is known. Finally, the person writes back and says “Nevermind, I figured it out.” But, they never share their results.

This term comes from Pierre de Fermat’s infamous last theorem, where he claimed he had a proof for the conjecture that no positive integers a,b,c that are greater than 2 can satisfy the equation an + bn = cn.

Unfortunately, he never published his full proof  because he said it would not fit in the margin of his book (which if it existed, would have been done without a computer, so it would have been simple enough for an intelligent person to understand). No proof existed until 1995, a full 358 years after Fermat claimed he had a proof.

Leave a Reply