Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 199217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:00:16+00:00 2026-05-11T17:00:16+00:00

What information do you consider worth to put in the comment at the beginning

  • 0

What information do you consider worth to put in the comment at the beginning of a sourcecode file?

All I could think about was the name of the author and perhaps the date the file was created (although I’m not to sure if there is any useful value to this information).

[EDIT] To clarify, I don’t mean comments before a class, but at the first lines of the file, before include statements and what else. Like

/**
 * Author:    Name
 * Created:   11.05.2009
 * 
 * (c) Copyright by Blub Corp.
 **/
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T17:00:16+00:00Added an answer on May 11, 2026 at 5:00 pm

    What to put in the file header:

    • Library/component that source code is part of
    • Copyright details
    • Brief and meaningful description of class(es) in source file

    What NOT to put in the file header:

    • Anything that duplicates low level logic which is part of the code itself. This can lead to maintenance problems if it isn’t updated when the source code changes.

    • Author name(s). Why?

      • In the world of revision control systems, while there may be an initial author of some code, eventually ownership becomes blurred. This is especially true when code enters the maintenance phase of the life cycle where owners can change regularly.
      • All code eventually becomes “community wiki” after enough changes 😉
      • Would you want your name associated with all of the code forever, knowing full well that you will not be responsible for the code until its death?
    • Creation and last changed dates. This is for similar reasons as list above. Revision control includes this information – why duplicate it in the header, making more work for yourself and risking leaving inaccurate information in the comment when things inevitably change?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What information is important to include in an About dialog? Definitely: Name of the
Backrground Information I've just started to learn stuff about drivers and the linux kernel.
Consider the following: ThreadA and ThreadB are two threads writing diagnostic information to a
Consider the following table: Song ---- SongID GUID Primary Key Name Varchar dateAdded DateTime
Consider the following, simple class constructor. (note that I am obviously not including all
Consider two tables transaction and category each having their own ID and information. A
Consider this snippet of Jade: if(#{episode[question.name][field]}) #{episode[question.name][field]} I want to check if the value
Consider the following tables; test SQL> desc test; Name Null? Type ----------------------------------------- -------- ----------------------------
Currently I have the following resource: /api/user/12 returns information about user with id=12 /api/user/12/trips
I need some expert information about ActiveX and some valuable experience reports from those

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.