Sunday, August 23, 2009

Java Facepalmers

Just fyi, the following are retarded:

SomeType thing = new SomeType(paramerters);
if (thing == null)
// ...
// ...

if (this == null)
// ...

These are both real mistakes I've found working on a Java project at work. It makes me feel dumb explaining that a constructor never returns null, and that this is never null.

Please write good code and don't make these mistakes. At least it gives me a job.

1 comment:

Jordan said...

the word groop was also found in the code of this project. apparently that's how you spell group in india.