On Saturday, 8 September 2018 at 11:29:15 UTC, Josphe Brigmo wrote:
On Saturday, 8 September 2018 at 07:08:46 UTC, Colin wrote:
On Saturday, 8 September 2018 at 06:59:28 UTC, Josphe Brigmo wrote:
Having source code that doesn't show changes with dates is pretty useless for diagnostics. I realize that git has the changes but the source code should.

If some code is added or changed it is very simple to add the date of change in a comment.

// Date: Date1, Date2, Date3, ....

Anything below a was changed at those dates.



Why not also add a link to the git hub patch or bugzilla or whatever?

Git is the tool that's used to manage changes, including viewing the changes.

A lot of dev time has gone into it and it works really well.

Some ad hoc comment system in source code to point out changes will never be as good.

Just Use Git!

Um, I didn't say don't use Git!

Your illogic is that you believe that one can have only one or the other when one can have both. Hence, you are excluding a completely valid addition. You think it is an alternative. You are wrong. Please think about the question before you answer next time so that you don't get in the habit of doing it. No one said that Git couldn't be used and telling me to use it is very arrogant of yourself.

The fact of the matter is that dates in source code will help when git is not available and one only has the source code.

Comments showing last modified date are pure noise. The code is what gets executed and what you should focus on. If you need history look at git log. The date is generally useless and code deltas are what you want and this is why VCS tools exist.

The only caveat to all that is a copyright statement, which should include the year. But this is orthogonal sprinkling dates throughout your code base.

But if you really want to do this more power to you, it is your code. Set up a hook in your fav. editor that inserts a date comment each time you enter ";" followed by the return key.

Bye,
Norm

Reply via email to