domingo, 27 de março de 2011

The if else and switch programming

Okay, I'm being honest about this... I don't like switches... and I don't like if/else blocks containing more than one statement... I just think it isn't elegant..

But when I find code blocks like the following I just wanna choke myself

if(condition){
// do nothing [Really, this was the comment]
}
else{
[A BUNCH OF STUFF]
}

What were they thinking? Do they wanted to put more instructions later in the if block? Even if they wanted why don't they put the else later instead of doing this crap?