Page MenuHomePhabricator

Remove @author lines from code
Open, MediumPublic

Description

Can we abandon the practice of putting names inside files themselves? I see this practice in JavaScript and PHP files throughout core (grep for @author). As Team Geek [2] says "unlike other collaborative pieces of creative work... software keeps changing even after it's "done". So while listing contributors credits at the end of a movie is a safe and static thing, attempting to add and remove names from a source file is a never-ending exercise in insanity".

For similar reasons this practice gives an impression of ownership of a file/code review responsibilities (which are not always true) and risks hurt feelings.

My suggestion is we remove any @author lines from any script file in the codebase.
[2] http://www.amazon.com/gp/search?index=books&linkCode=qs&keywords=9781449302443

Event Timeline

Jdlrobson renamed this task from Create formal process for CREDITS files to Remove @author lines from code.Jul 4 2016, 4:05 PM

I thought hurt feelings were the whole point. I thought those were there so we know who the original author is, and thus who it is we need to go hunt down and murder with a shovel after their code drives us to utter madness.

I have put myself as an @author has an indication I am the original author of the code. My understanding of the GPL is that if one drop the Copyright notice that might well be an infringement of the license since it requires the Copyright notice to stick around when work is redistributed.

Honestly, just keep them around, as comments they are harmless.

I thought hurt feelings were the whole point. I thought those were there so we know who the original author is, and thus who it is we need to go hunt down and murder with a shovel after their code drives us to utter madness.

Death threats are not welcome here and are definitely illegal in most countries AFAIK! In the future please refrain from using potentially hurting words such as death, kill or ... murder. Thanks!

It's called a joke. If we murdered everyone who gave us a headache, we'd probably have nobody left.

The point is that knowing the original author can be useful, and tracking them down is one of the potential uses.

If we murdered everyone who gave us a headache, we'd probably have nobody left.

Fortiori if we murdered even those who made us suffocating by laughing at their posts...

I think the @author tags should be removed. They aren't useful. git log / blame can help figure out code evolution. @author tags are misleading and assign undue credit to the original author given that over time, code evolves and might change significantly from the original. The author field is misleading in those contexts.

The committer/owner isn't necessarily the author, especially before the transition to git. Not sure @author is the right way around this either, though.

This definitely needs the OK from Legal.

The usual course of doing this is to have the named persons approve the patch removing their name. Death threats or free t-shits may be required.

The GPL requires some sort of copyright notice for the source code. But if we want to, in general it should not be a problem to put the credits in a centralized CREDITS file instead, see T139300 and point to that file from each source file.

For example, you might want to have some language like this instead of the standard @author credits
/*

  • Copyright 2016 by its authors. See CREDITS. */

Of course, if we go ahead, it might be a good idea to discuss the changes with the existing authors beforehand as well.

Change 358634 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[mediawiki/core@master] Remove "@author Bryan Davis" annotations

https://gerrit.wikimedia.org/r/358634

Change 358823 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Remove "@author Umherirrender" annotations

https://gerrit.wikimedia.org/r/358823

Change 358823 merged by jenkins-bot:
[mediawiki/core@master] Remove "@author Umherirrender" annotations

https://gerrit.wikimedia.org/r/358823

Qgil triaged this task as Medium priority.Jun 19 2017, 2:08 PM
Qgil subscribed.

(Reflecting reality)

Change 358634 merged by jenkins-bot:
[mediawiki/core@master] Remove "@author Bryan Davis" and "Brad Jorsch" annotations

https://gerrit.wikimedia.org/r/358634

Change 361624 had a related patch set uploaded (by Aaron Schulz; owner: Aaron Schulz):
[mediawiki/core@master] Remove "@author Aaron Schulz" annotations

https://gerrit.wikimedia.org/r/361624

Change 361624 merged by jenkins-bot:
[mediawiki/core@master] Remove "@author Aaron Schulz" annotations

https://gerrit.wikimedia.org/r/361624

FWIW, I agree with @Isarra . The comments are harmless, and freely dispensing credit is part of what makes the open source ecosystem tick. Note https://www.mediawiki.org/wiki/Gerrit/New_repositories#Step_3:_Review_community_expectations :

Credit

Credit for your work being preserved in future versions — including any merged extensions.
  Similarly, you should credit the developers of any extensions whose code you borrow from — especially when performing a merger.

We don't pay our volunteers. We can at least give them visible credit in as many places as their contributions deserve.

That said, I have no problem with individual developers removing their @author lines, and I would have no problem with WMF making it a policy not to add @author lines for employees/paid contributors. But I would strongly object if anyone made a volunteer feel guilty about taking credit for their contribution. (And, functionally, volunteers are precisely those folks who we might want to be able to track down when we are maintaining their code down the line.)

greg subscribed.

(Release Engineering doesn't, as a team, have an official opinion. We use Code Stewards / https://www.mediawiki.org/wiki/Developers/Maintainers and git blame to do our work.)

My personal opinion:

  • For projects with a large number of authors under the stewardship of the Foundation (for example mediawiki/core.git and some widely used extensions):
    • Copyright statements should be "Copyright [year] Wikimedia Foundation and contributors"
    • "@author" and equivalent statements of 'ownership' should be discouraged by convention, but not a cause for wide spread removal from existing files
    • A "CREDITS" file should be maintained (ideally via a scripted process) to visibly document contributors to the project
  • For projects with a single author, a small number of contributors, and/or no formal relationship with the Foundation:
    • Do what makes you feel good :)
    • Try to be consistent to the attribution and copyright style that you pick
    • Consider adopting the large project process or some variation in the hope that your project will grow to the point where you need that level of formality ;)

We have maintenance/updateCredits.php and .mailmap to manage the CREDITS file in MediaWiki core since late 2016 (rMW08d54bc01c54: Convert CREDITS to list of all known git contributors).

Copyright statements should be "Copyright [year] Wikimedia Foundation and contributors"

Fwiw, i dont like WMF being specially preivleged in the copyright statements over other contributors (whether individual or WMDE, etc)


For the actual question of author lines, personally i find it sometimes interesting to see who started the file, as that usually corresponds to whose idea it was initially. But mostly it doesnt matter to me

  • For projects with a large number of authors under the stewardship of the Foundation (for example mediawiki/core.git and some widely used extensions):

What is a "widely used extension", exactly? Before we can determine what, if anything, to do, we need to determine what projects are affected.

Copyright statements should be "Copyright [year] Wikimedia Foundation and contributors"

Fwiw, i dont like WMF being specially preivleged in the copyright statements over other contributors (whether individual or WMDE, etc)


For the actual question of author lines, personally i find it sometimes interesting to see who started the file, as that usually corresponds to whose idea it was initially. But mostly it doesnt matter to me

Pretty much my thoughts on this.