No respect

I have no respect for people who write code like this example below:

if(this.hasActionMessages()){
return false;
}else{
return true;
}

Comments

vpapanik said…
You mean the wrong indentation don't you ? :D :D :D
if(this.hasActionMessages() == BooleanConstants.FALSE){
return false;
}else if (this.hasActionMessages() == BooleanConstants.TRUE) {
return true;
} else {
throw new IllegalArgumentException("Unknown value returned by hasActionMessages()");
}
Much better ;-)

Popular posts from this blog

Useful Fonts for Linux

CyLog Raster Fonts for Linux

Chrome Packaged Apps