4 ms·
"but understand the business that the code was being used in/by." From my experience(currently on a 10MM line of code, 15 year old codebase) in software the co
by debt 8y ago
"but understand the business that the code was being used in/by."
From my experience(currently on a 10MM line of code, 15 year old codebase) in software the code is the business so it's important to understand it.
First trap: "Oh, I'll just document everything."
I could say just do it, but do it for yourself. I could say that it won't be maintained over time and it'll rot and may do more harm than good when someone goes to reference it and thinks it's still an up-to-date understanding of the system.
But I'd rather just tell you to not waste your time doing it in the first place and focus on not falling into the second trap.
Second trap: Rewrite.
I could say it's easier to write new code than it is to understand it. I could tell you to be ambitious and stay up nights and weekends rewriting some view layer logic bullshit.
But I'd rather tell you that you're not as smart as you think, your solution may be more complex than the currently impenetrably complex behemoth before you, and that you should instead focus on not falling for trap 3.
Third trap: Replacement.
I could tell you there's cheaper off-the-shelf solutions available that solve the same problem; it's simply a matter of spending money and reading documentation.
But I'd rather encourage you to really, truly embrace the final realization.
Final realization: You are dumb and will never, ever understand all the complexities of this system as there are too many interdependent moving parts and other similarly complex subsystems.
And that's okay!
This is a system built over many years that consists of hundreds of thousands of tiny decisions made by hundreds of different "very smart" individuals just like you solving complex business problems giving the climate of the time it was built in.
So approach it like you would approach a beast in the wild, with caution and grace.
Heroes are at the morgue, and just make sure the thing doesn't go down.