Page MenuHomePhabricator

Remove @author lines from code
Open, NormalPublic

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

Details

Event Timeline

Jdlrobson created this task.Jul 4 2016, 4:05 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJul 4 2016, 4:05 PM
Jdlrobson renamed this task from Create formal process for CREDITS files to Remove @author lines from code.Jul 4 2016, 4:05 PM
Danny_B added a subscriber: Danny_B.Jul 4 2016, 4:31 PM
Isarra added a subscriber: Isarra.Jul 4 2016, 4:58 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.

hashar added a subscriber: hashar.Jul 4 2016, 6:52 PM

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!

Isarra added a comment.Jul 4 2016, 6:59 PM

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...

MaxSem awarded a token.Jul 4 2016, 7:52 PM
Restricted Application added a subscriber: JEumerus. · View Herald TranscriptJul 4 2016, 11:12 PM
ssastry added a subscriber: ssastry.Jul 5 2016, 6:31 PM

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.

Isarra added a comment.Jul 5 2016, 9:02 PM

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.

Paladox added a subscriber: Paladox.Jul 6 2016, 7:03 AM
Qgil moved this task from To triage to Team radar on the Developer-Advocacy board.Jul 6 2016, 11:53 AM
jayvdb added a subscriber: jayvdb.Jul 7 2016, 5:14 AM
jayvdb added a comment.Jul 7 2016, 5:17 AM

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.

hashar removed a subscriber: hashar.Jul 7 2016, 8:52 AM
Bawolff added a subscriber: Bawolff.Jul 7 2016, 6:53 PM
ZhouZ moved this task from Backlog to Assigned on the WMF-Legal board.Jul 18 2016, 10:37 PM
ZhouZ added a subscriber: ZhouZ.

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 Normal priority.Jun 19 2017, 2:08 PM
Qgil added a subscriber: Qgil.

(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

cscott added a subscriber: cscott.Jul 13 2018, 8:47 PM

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 added a subscriber: greg.

(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.)

greg removed a subscriber: greg.Jul 13 2018, 8:56 PM

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

ashley added a subscriber: ashley.Jul 13 2018, 9:52 PM
  • 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.

Qgil removed a subscriber: Qgil.Aug 3 2018, 3:18 PM
Retro added a subscriber: Retro.Jun 25 2019, 9:48 PM