Which is a better practice? (I\'m coding in .Net if that makes a difference)
IF condition = true THEN
...true action--even if rare...
ELSE
...action
E
According to Steve McConnell, author of Code Complete, you should
"Put the case you normally expect to process first. This is in line with the general principle of putting code that results from a decision as close as possible to the decision...[putting the normal case after the if] puts the focus on reading the main flow rather than on wading through the exceptional cases, so the code is easier to read overall."
Code Complete, 2nd Edition, pages 356-357.