The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,317 other followers

Archive for May 25th, 2010

Happy Towel Day

Posted by jpluimers on 2010/05/25

Don’t forget to bring your Towel today


Posted in .NET, About, Delphi, Development, Opinions, Personal, Software Development | 1 Comment »

“Yoda Conditions” (from: stackoverflow – New programming jargon you coined?)

Posted by jpluimers on 2010/05/25

Having done quite a bit of C and C++ work in the past, I often still use “Yoda Conditions”, especially in environments where you have both = and == as an operator.
So, in a boolean expression, I often put the constant to test in front of the test.

I recently learned at stackoverflow that quite a few people call these “Yoda Conditions”:

“Yoda Conditions”— the act of using if(constant == variable) instead of if(variable == constant), like if(4 == foo). Because it’s like saying “if blue is the sky” or “if tall is the man”.

Thanks to dreamlax for helping me find that.

This is a problem in languages that have both the = and == operators, and the result of an assignment itself is also a value (i.e. allowing a = b = true). Read the rest of this entry »

Posted in .NET, C#, Delphi, Development, Java, Ruby, Software Development, Web Development | 22 Comments »

<span>%d</span> bloggers like this: