Assume that the original document of a class is as follows:
/** * 我的自定义类 * * 这个类帮助你做一些事情。它真的很棒。 * * 作者:David Smith * 版本:1.0 */
If I rewrite 50% of the code, how do I record my important contribution?
What is the best way to add a date? For example, the date the code was last modified, the date I made an update, or the date the version was updated.
P粉5452181852024-01-11 11:59:29
One approach I've seen in companies I've worked for over the years is to do this:
/** * 我的自定义类 * * 这个类可以帮助你做一些事情。非常好用。 * * 作者:David Smith * 版本:1.0 * * 修改者:Rahul Parkar * 修改日期:09/11/2012 */
In addition, I also saw that they used two methods to record changes, one is to use a Git-like method where each commit has a commit message, and the other is to use another document tag to record the changes.
P粉5125267202024-01-11 09:50:28
I know I didn't really answer your question, but I'd like to know why you're still using @author.
If you want to track changes to your code (who created the file? Who modified it?), use your version control system. After all, that's what it's for :)