3 ms·
Reminds me of the story of knowing which screw to turn[1]. Whenever I modify or add to code, unless it's a total pile of dung I usually try to figure out the ge
by scioto 5y ago
Reminds me of the story of knowing which screw to turn[1]. Whenever I modify or add to code, unless it's a total pile of dung I usually try to figure out the general pattern of the original developer, which leads to the smallest number of added lines to accomplish things.
I've noted code where a previous fixer obviously didn't figure out what was going on, and instead bolted their solution to the side of the codebase instead of figuring things out. I spent a good six months after go-live on my last big project removing the bolt-ons and following the patterns, leaving consistent code.
Committed LoC: not much, bad if quantity proves worth; actually removed more than I added on that clean-up job.
[1]https://www.snopes.com/fact-check/know-where-man/ https://www.snopes.com/fact-check/know-where-man/