How do you set the author in a comment on a java class?

For our development in the house, we often have to write the authors of the java class in a comment on the class.

It will be written as

* @author Doe, John ( john.doe@example.com ) 

All authors will be listed in this form, the one who worked most on this class will be listed first.

My question (s): How do you deal with this requirement? Do you blame the comments or use the original repository to track this information? What is the best format for writing authors name and email?

+4
source share
2 answers

Your supervisor has the right information about who does what in the classroom. This is the only reliable source of information (except when several users use the same user / password).

I usually don't need the @author tag, which most of the time automatically inserts the IDE when creating the class. Use it the way you want and select the format you want.

By the way, who works more? The one who writes all the code in the class, or the one who changes one line of code to fix a production error after two weeks of investigation?

+7
source

I like this format:

 * @author <ul><li>John Doe ( john.doe@example.com )</li><li>...</li>...</ul> 

It prints a list, name and email address. I like to see the name and email in this format. Its easy to read. Format Surname, name I found it too formal. It is not intended to order by last name, so why bother?

+2
source

All Articles