Wednesday, December 24, 2008

Auto-generated javadoc Aaargh!

Auto-generated javadoc is perhaps the most pointless invention in the world of programming. Who decided that it would be a good idea to generate this sort of thing:

/**
* @param vehicleRegistered the vehicleRegistered to set

*/
public void setVehicleRegistered(Boolean vehicleRegistered) {
this.vehicleRegistered = vehicleRegistered;
}

There is nothing that auto-generated javadoc cannot tell you that isn't immediately obvious from the method signature. Modern IDE's even obviate the need of looking at the signature at all. These sort of comments clutter up the code, and obscure the comments that actually have some meaning (i.e. were written by someone with a heartbeat).

On the topic of comments and in a similar vein - here is my all time favourite code comment:

/**

* This method leverages collective synergy to drive "outside of the box" thinking and formulate key
* objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players
* to drive-up their core competencies and increase expectations with an all-around initiative to drive down
* the bottom-line.

*/





0 comments: