News for hackers. Stuff that matters.
Re:Ask HN: What is the first thing you implement at a new co... by 3pt14159 on Wednesday June 20, 2018 @08:45AM (#17354828)
If it's well tested a straight re-write is the right call. It's when there isn't good test coverage where things ossify.
Re:Ask HN: What is the first thing you implement at a new co... by mseebach on Wednesday June 20, 2018 @08:59AM (#17354917)
In theory. In practice, the code will often have corner case behaviours that eludes any of the tests, yet are still important.

As an aside, as I understand it, refactoring was popularised as a response basically to this conundrum - it's a technique for reorganising code without changing its functionality. So you can gradually "rewrite" your two page function without losing the accumulated knowledge.

Re:Ask HN: What is the first thing you implement at a new co... by 3pt14159 on Wednesday June 20, 2018 @09:25AM (#17355097)
Unless we really stretch the word "refactor", my "in practice" is different than yours. I've done plenty of re-writes that fixed more unknown bugs than re-opened previously solved ones.