4 ms·
People want greenfield projects, but maintaining and improving legacy code is where the real, fundamental learnings occur ;). Probably the cruftiest code was a
by throwarayes 5y ago
People want greenfield projects, but maintaining and improving legacy code is where the real, fundamental learnings occur ;).
Probably the cruftiest code was a ship autopilots UI code that was 20k lines of C in one file with no automated testing. There was a very manual process for loading code onto a test display. The debugging experience was terrible. There was a way to manually inspect memory addresses, but that was about it. Oh and there were threads, managed by the homegrown OS (basically just a scheduler that ran on a 10 ms ticks or on an interrupt). These threads had priorities so they could a sometimes get into deadlocks waiting for each other.
As insane as it was, it was the best learning experience I could have had. I’m glad I stuck with it. I learned a lot about low level systems, prioritizing the highest value refactoring, and introducing automated testing to a legacy code base.
- touisteur 5y agoOh yes, legacy is the best place to learn. You replace something that's 'working' with something that keeps working but better. You write tests against a working system. The thing is already giving value, so you don't have to worry about that. And usually the problems are more and more complex as the code 'matures' so challenge. I don't like working on big greenfield projects. Give me a somehow working big ball of mud codebase to steer and I'm a happy man.