Hacker News new | ask | show | jobs
by FpUser 837 days ago
>"When a feature needs to be added that can just be tacked onto the code, do it without touching anything else."

In few lucky cases. In real life new feature is most likely change in behavior of already existing one and suddenly you have to do some heavy refactoring in numerous places.

1 comments

if you're going to own it for the foreseeable future. then own it. learn it, refactor it, test the hell of out of it. otherwise you're never going to be able to debug or extend it.

one thing I always do is throwaway major refactors. its the fastest way for me to learn what the structure is, what depends on what, and what's really kinky. and I might just learn enough to do it for real should it become necessary.

> throwaway major refactors

Thank you for providing me a term for this! I indeed learned a lot from doing this because some things can only be understood by hitting them with a hammer, putting them together again and observing where that doesn't work.

absolutely. the best is when you spend all this time trying to figure out what this awful and convoluted thing is. and you finally just take it out to see what happens, and the answer is .. nothing

its software. we should take full of advantage of its plasticity.