slink,
@slink@fosstodon.org avatar

Seemingly simple question: What is the correct format for a notice in code?

I tried to find the answer online, found several resources, and they all seem to disagree. Two examples:

https://opensource.google/documentation/reference/copyright

https://matija.suklje.name/how-and-why-to-properly-write-copyright-statements-in-your-code

Q1: What is best? Copyright, ©, (c) or a combination of them?
Q2: Update the year or not?
Q3: Add contact information or not?
Q4: Reference License in Copyright line or not?

@osi @fsf can you help?

boosts welcome for reach

bluGill,
@bluGill@kbin.social avatar

@slink Not a lawyer, but I think I can give useful advice. Get a real lawyer if this is important though.

© is legally recognized internationally. The others are technically not, though almost all courts will accept them as close enough unless your lawyer is incompetent.

Courts will probably accept the year in your version control system if your lawyer takes the time to explain that. In almost all counties copyright stats from time of creation and not what is in the year. In fact a good lawyer (though you will be dead before this matters) will get the courts to agree that the year in version control is what matters. I would put a year in, and update as needed - but put this in a COPYRIGHT file (all caps is legally important) and NOT in each file. In each file just put "© whatever project, see COPYRIGHT in the distribution" (this is one place to get legal advice!)

q3: Not. you are likely to move while those files stay the same. Your contact can be useful, but it should be separate from anything legal.

Q4: the COPYRIGHT file should give the full license and no place else. If you relicense in the future it is one place to update. It also means there is less opportunity for a copy/paste error in a place you probably won't examine closely in code review - until a lawyer has you on the stand and you are forced to admit that one file has a difference license.

Hopefully this is all academic: the odds that any of this matter is low. So long as the courts can figure out what you meant that is generally enough that nobody will copy your code illegally (or if they do they will ensure you never find out)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • KamenRider
  • Ask_kbincafe
  • TheResearchGuardian
  • KbinCafe
  • Socialism
  • oklahoma
  • SuperSentai
  • feritale
  • All magazines