Don’t use the @author Javadoc Tag

The @author Javadoc tag is unnecessary and can even be harmful.

In theory, @author lists “those who make significant contributions to the design or implementation” of a package, class, or interface [source]. Maybe this is true within the JDK, but in corporate software, it really just signifies the first author: it’s put there by the default Eclipse/IntelliJ/NetBeans templates. I’ve almost never seen a second @author listed, and when I do I think, “look who thinks they’re so important!” (Seriously, what kind of narcissist adds their name to @author?)

I also feel that @author tinges the code with unwarranted ownership. Code belongs to the team — really, the company — and the team is responsible for the quality and maintenance of the code, not the @author.

The real coup de grâce for the @author tag on corporate code is that it’s usually wrong. In an active codebase, many different people modify a file as different refactorings and features are added, sometimes to the point where the original design is completely lost. And you know what keeps track of all those changes? That’s right, version control! Not only can you see the author of every line of a file, but you can see the history of those changes. What good is the @author tag with these tools?

So please, stop using @author; open up your IDE templates and delete it!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s