3 ms·
I can almost guarantee that, if your code bases version history is too messy to find old code, then it will be even worse if you were to favor commenting out to
by jballanc 13y ago
I can almost guarantee that, if your code bases version history is too messy to find old code, then it will be even worse if you were to favor commenting out to deleting.
That said, I do see where you're coming from. Part of the issue is that we (well, most of us) don't have good ways of searching old code. There is Codeq ( https://github.com/Datomic/codeq https://github.com/Datomic/codeq ), which is prettydamncool™ ...hopefully we'll start to see more systems like it.
- tjr 13y agoYes, well -- and I suppose I should add that I'm not advocating for an environment in which keeping commented-out code around is a good idea. Just suggesting that there could exist situations in which it is a reasonable thing to do. I've increasingly been noticing that a lot of really good development practices make sense if you're starting from scratch and can employ them right away, but sometimes if you've got years or decades of legacy code and legacy process (and code that was written as the result of legacy process) to deal with, the right thing to do isn't always so clear. (I've unfortunately/fortunately been working some recently on a very large, very old code base that mostly doesn't need updating. Trying to unravel its mysteries enough to add a new feature has been an interesting experience.)
- im3w1l 13y agoOk, I can understand that a good version history will allow you to find what you are looking for. But how will you know that you should look for it in the first place?