"yoda conditions":
http://stackoverflow.com/questions/2349378/new-programming-j...
I know it's safer, but personally I find it harder to read. Especially if the constant is a #define or enum and is similar in format to the variable in question.
Re:A common bug in published code
by nostrademons on Friday April 22, 2011 @04:15AM
(#2473546)
I personally like Yoda Conditions, but a few coworkers have pointed out that any linter worth its salt will catch an = inside a conditional, so this doesn't actually gain much in safety. I've stopped using them because there a large number of coworkers find them confusing.
Yoda conditions, those are called.
http://united-coders.com/christian-harms/what-are-yoda-condi...
if (CONSTANT == variable)