Thursday, October 23, 2014

I'm already used, you know?!

Every once in a while I come across a type that it is documented as being used by another type:

/**
 * Used by {@link SupremeCook} to bake supreme cakes.
 */
public class NewFlavor { ... }

As the author of a blog takes pride into having his posts read by many individuals, it would be the pride of the author of a type to have it reused as much as possible within the codebase.

Practicing over-documentation, the author of the type above softly coupled it with another type, defeating the above stated goal by making potential new users think the new type was not designed for reusability ...

3 years have passed by ...

Miles and miles away from our programmer, in a remote conference room in a remote part of the world, upon being advised by his lawyers, the young entrepreneur decided to withdraw the flavor packages still on the supermarket shelves to make the following correction to the usage instructions: