File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programming Diversions and the fly likes author name in java files ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "author name in java files ?" Watch "author name in java files ?" New topic
Author

author name in java files ?

M K Rayapudi
Ranch Hand

Joined: Feb 19, 2007
Posts: 157
What is wrong in keeping personal name as author name in JAVA source files ?
My Lead asked all our team members to keep our team name as author name (for e.g. XYZ)
If we consider the same programmer works for longer time at the same company and same project:
If the author name consists the actual programmer name then, it will be easy to debug/enhance the program

In general What is the general practice in companies? and what is the suggested approach?

R6i
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

This might be because of your company policy.
Check out the Java source code. You can find author names there too.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Onkar Joshi
Ranch Hand

Joined: Mar 01, 2007
Posts: 116
The team name as author approach seems odd to me. That has not been the practice on any of the projects that I have worked on so far.


SCJP 5 - 95% | SCWCD 1.4 - 88% | SCBCD 5 - 93%
Onkar Joshi's blog | LinkedIn profile
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Unless you're publishing the source code outside your organization, including metadata like author name in source files is just lame. That's what source control systems are for.


[Jess in Action][AskingGoodQuestions]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Ernest Friedman-Hill wrote:Unless you're publishing the source code outside your organization, including metadata like author name in source files is just lame. That's what source control systems are for.

Quoted for truth.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Darya Akbari
Ranch Hand

Joined: Aug 21, 2004
Posts: 1855
A class usually belongs to one owner, the one who created that class and gave birth to it.


SCJP, SCJD, SCWCD, SCBCD
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11481
    
  94

Darya Akbari wrote:A class usually belongs to one owner, the one who created that class and gave birth to it.

I rarely see that in the workplace. I am more used to an individual writing the class and doing any initial modifications needed with it, after which time it can get worked on by anyone else within the organization (although often it is only those within an individual team who do modifications).

The rare occasions I have seen the code base staying with the original creator is when there are not enough unit tests and/or the original author has obfuscated the code (whether deliberately or not). In such cases other developers are often afraid of changing code that they don't own as they are afraid of what they might break. That single author can then become a bottleneck for the entire company - a really bad idea.

Personally I cant see why any company would want to have a single person "own" a class: what happens if that person ever leaves that company (as if that would ever happen!)? Or go on vacation or get sick? It just makes sense to have many people capable of adding features and supporting the code base.

Likewise I can see no reason why a developer would want to be in a position where they "own" classes for as long as they work at a company - talk about career limiting! How on earth could I ever move onto new and exciting projects when I must always own any code I have previously written?

Back to the original issue - I believe, as Ernest & Bear have indicated they believe, that meta data belongs in the code repository for any internal projects.


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
M K Rayapudi
Ranch Hand

Joined: Feb 19, 2007
Posts: 157
thank you one and all for your valuable views/comments.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: author name in java files ?