Member-only story
Software: Reading vs. Writing
Developers love writing code. Our schools, tutorials, and side-projects teach us how to start projects and write new code in a new codebase. When a developer comes out of school, they know how to write new code. Great.
Writing code is not the same as reading code. Whether you are dealing with your code from last semester or someone else’s code from 2 years ago, regardless of the quality of the code, it is harder to understand than fresh code. This is why developers complain about code quality and are so willing to re-write code.
Here’s the catch. As Joel Spolsky (of StackOverflow-founding fame) made clear in April 2000, you should never re-write the codebase. Why? Because old code is tested, reliable, working code and represents large amounts of effort. New code is not tested, not reliable, and will take large amounts of effort just to get it working, with the end result of a less-featureful product. (There are exceptions, of course: Chrome ends Flash support in December 2020, so re-write your Flash Web UIs now.)
Ok, so reading code is harder than writing code. How do we handle this without shooting our projects in the foot?
I see 2 fundamental approaches. First is to value readable code. Second is to value re-writeable code.