Hacker News new | past | comments | ask | show | jobs | submit login

I heavily disagree.

At the time of change, its obvious you're making the code shittier. That function? It doesn't do what it says anymore. That other function? Just a few more boolean variables. Hey, we don't need to refactor, we can just make negative numbers mean one thing, and positive ones mean another! Death by a thousand cuts.

This is also the best time to refactor. You skip the whole "I don't like the way the code looks" bullshit. The codebase doesn't support your feature? Make it support your feature, then code your feature.

And you know what else? You are only changing code you're touching. Refactoring code you don't need to otherwise touch is a waste of time.

But yeah, if you parachute in 6 months later to look for a refactor, its gonna be all gravy. How much shittier your code is just a distant memory. Get on that next feature - just another flag, just another lying variable - in hindsight, it's all subjective anyways.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: