3 ms·
I think there's some indirect psychological value that shouldn't be underestimated. People have a tendency to comment out unused code "in case they still need
by hannob 7y ago
I think there's some indirect psychological value that shouldn't be underestimated.
People have a tendency to comment out unused code "in case they still need it". Or not delete unused stuff, because who knows what.
I have the feeling that I'm much more inclined to just delete a bunch of code lines that "I might still need in some situation" if I know there's version control. Because even if it's unlikely, "I can get it back if I want to" is a good feeling.
I think this leads to less cluttered code overall.
Also something that came to mind: When the shellshock vuln was discovered in bash noone really knew when and how it got introduced, because it was so old (literally decades) and there was no version control in that time. I don't think anyone suspects any malpractice with shellshock, but think about it: If you find a really strange bug that looks like a backdoor, and it's 10 or 20 years old. Wouldn't you want to know who committed that code?
- wruza 7y agoOne thing CVS (yes, that one) taught me was to create versioned “attic.<langext>“ files and throw all aging code in there separated by enough newlines instead of commenting out or just deleting. While you can search through a history, it is much easier to have an inactive source with all the remnants you may need to revive in a week. Once things are done, delete it from there and then you always know where it was or how it looked like.
- H8crilA 7y agoVersion control is like an out-of-the-money option, or like a home insurance policy. And just like with an OTM option in capital markets or with a home insurance - the point isn't that you know you'll use it. The point is that you can, if need be, which allows you to take more risk (in your example - delete some code). It's not just psychological, it can be explained quite easily in terms of risk management.
- dharmab 7y agoWe use reverts frequently enough that it's not an insurance option for us, it's just our normal workflow. http://thecodelesscode.com/case/118 http://thecodelesscode.com/case/118
- tonyarkles 7y agoAt an old employer, I wrote neat visualization that drew equal-potential curves through a sampled grid of points. Somewhat complicated, targeted for one specific feature. I leave, but stay in touch with friends there. They completely turned the ship and that whole module was no longer part of the system. A few years later, I get a message from a buddy: “dude, we dug up your equal-potential curves thing from SVN and damn is it nice to work with. Good job! That just saved me a ton of time!”