News for hackers. Stuff that matters.
Re:3 lines of code shouldn't take all day by cjfd on Thursday December 16, 2021 @02:58AM (#29576096)
Very good points. In his book 'working effectively with legacy code' Michael Feathers actually defines 'legacy code' as code without tests. Largely because of reasons like you state.
Re:3 lines of code shouldn't take all day by vbezhenar on Thursday December 16, 2021 @04:27AM (#29576549)
What do you think about code being too smart for current team? I encountered that use-case three times in my career. It was C++ program which was written by very bright person, used template magic, boost and stuff. Rest of the team were ordinary C developers. After that person left, they had to rewrite his program, because it took too much time to understand how it works and to fix or improve it. Second case was when someone wrote some helper program with Haskell which happened to be important. Same story, nobody knew Haskell, nobody wanted to invest into learning, so rewrote in node.js. Third story: someone used reactive API with Java (Spring Flux) and again same story: team don't understand it and slowly rewrote it with ordinary blocking API.

Does that code counts as legacy?

Re:3 lines of code shouldn't take all day by marquis_andras on Thursday December 16, 2021 @06:09AM (#29577093)
Michael Feathers uses several definitions of legacy code, depending on the situation. In your situation, he defines legacy code as follows.

"legacy code is the product of ... when your team turns over faster than your code turns over." [1]

1. https://www.software-engineering-unlocked.com/legacy-code-mi...

Re:3 lines of code shouldn't take all day by dotancohen on Thursday December 16, 2021 @06:12AM (#29577114)
Those two definitions just sold the book to me. Thanks.
Re:3 lines of code shouldn't take all day by hu3 on Thursday December 16, 2021 @05:59AM (#29577052)
This is where Go shines in my opinion. It's really hard to write smart Go code.

Sure it is a bit verbose but dam is it easy to understand due to sheer bluntness and lack of magic.

Re:3 lines of code shouldn't take all day by dinvlad on Thursday December 16, 2021 @11:20AM (#29579825)
That's where I borrowed that term as well :-)