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 8727889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:31:28+00:00 2026-06-13T08:31:28+00:00

Before you start admonishing me with DON’T DO IT , BAD PRACTICE ! and

  • 0

Before you start admonishing me with “DON’T DO IT,” “BAD PRACTICE!” and “Learn to use proper source code control“, please hear me out first. I am fully aware that the practice of commenting out old code and leaving it there forever is very bad and I hate such practice myself.

But here’s the situation I’m in. A few months ago I joined a company as software developer. I had worked in the company for few months as an intern, about a year before joining recently. Our company uses source code version control (CVS) but not properly.

Here’s what happened both in my internship and my current permanent position. Each time I was assigned to work on a project (legacy, about 8-10 years old). Instead of creating a CVS account and letting me check out code and check in changes, a senior colleague exported the code from CVS, zipped it up and passed it to me.

While this colleague checks in all changes in bulk every few weeks, our usual practice is to do fine-grained versioning in the actual source code itself (each file increments in versions independent from the rest). Whenever a change is made to a file, old code is commented out, new code entered below it, and this whole section is marked with a version number. A note about the changes is placed at the top of the file in a section called Modification History. Finally the changed files are placed in a shared folder, ready and waiting for the bulk check-in.

/*
 * Copyright notice blah blah
 * Some details about file (project name, file name etc)
 * Modification History:
 * Date         Version     Modified By     Description
 * 2012-10-15   1.0         Joey            Initial creation
 * 2012-10-22   1.1         Chandler        Replaced old code with new code
 */

code ....
//v1.1 start
//old code
new code
//v1.1 end
code ....

Now the problem is this. In the project I’m working on, I needed to copy some new source code files from another project (new in the sense that they didn’t exist in destination project before). These files have a lot of historical commented out code and comment-based versioning including usually long or very long Modification History section.

Since the files are new to this project I decided to clean them up and remove unnecessary code including historical code, and start fresh at version 1.0. (I still have to continue the practice of comment-based versioning despite hating it. And don’t ask why not start at version 0.1…) I have done similar something during my internship and no one said anything. My supervisor has seen the work a few times and didn’t say I shouldn’t do such clean-up (if at all it was noticed).

But a same-level colleague saw this and said it’s not recommended as it may cause downtime in the future and increase maintenance costs. An example is when changes are made in another project on the original files and these changes need to be propagated to this project. With code files drastically different, it could cause confusion to another developer doing the propagation. It makes sense to me, and is a valid point. I couldn’t find any reason to do my clean-up other than the inconvenience of a ridiculously messy code.

So, long story short: Given the practice in our company, should I not do such clean-up when copying new files from project to project? Is it better to make changes on the (copy of) original code with full history in comments? Or what justification can I give for doing the clean-up?

PS to mods: Hope you allow this question some time even if for any reason you determine it to be unfit in SO. I apologize in advance if anything is inappropriate including tags.

  • 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-06-13T08:31:29+00:00Added an answer on June 13, 2026 at 8:31 am

    If copy of some file from another project really means (for this sources) “The point of divergence” and parallel independent evolution of source and fork, than legacy history and commented code are effectively “white noise” and can be easy eliminated on your side. For future possible propagation from parent mentioning of “bifurcation point” only will be sufficient in first line of Modification History, smth. like

    ...
     * Date         Version     Modified By     Description
     * 2012-10-25   1.0         ADTC            Created from 12.34 of <filename>
    ...
    

    Addendum by asker (ADTC):
    I wish to quote a comment in addition to the answer above.

    […] take the source code, remove the comments related to who did what (history comments), but retain the comment regarding what the source code/class/method does (informational comments). That is what the comment section is supposed to be. It should clearly define what the method is doing, how it is implemented and under what condition an exception will be thrown. – Wins, 2012-10-25 00:57:57Z

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

Sidebar

Related Questions

Before I start writing huge swathes of code that don't work I thought I'd
Before I start, I want to make it clear that my code is working
Before start let me tell my experience: I am experienced with C#.NET, web services,
I want to get one record before start date and end date DtpFrom means
Am using Mediainfo library in my C# project,before start invoking this dll,i just ran
I usually try to do TDD with not much analysis (no diagrams) before start
I am working on a Media up-loader which uploads images to Server. Before start
before I start I want to point out that I tagged this question as
(Before I start, yes I have asked a similar question before; unfortunately due to
Before i start, i know the MD5 is compromised (collision attack and speed of

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.