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

GetDIBits vs. Scanline vs. Pixels[] in Delphi Bitmaps

Installation of Ubuntu 17.04 (Zesty Zapus) on VMWare Workstation

Installation of Mint 17.1 Cinnamon on VMWare