Re:How to Score a Google Onsite Interview
by Luyt on Sunday May 01, 2011 @03:26AM
(#2502599)
"CONST == variable" is called a 'Yoda condition'.
More information on this can be found at http://united-coders.com/christian-harms/what-are-yoda-condi... , which describes its uses and advantages. I tried to use them a while, but not anymore, because I find them unnatural; like reading backwards. In my opinion, it's more logical to first introduce what is being compared instead of some value which will be compared against. This is especially true if you revisit the code after a few months.
[ Parent
| on HN ]