Write deletable code
It may seem antithetical to software development, but I believe deleting code is often much more important than people think. The ease at which it can be done is often overlooked by engineering teams, so removing code is usually flat out tough.
Writing code is, however, usually pretty easy. Good code, bad code, adding it is the part that excites developers the most. It’s what we’re best at. Our job is to write code and contribute to whatever we may be working on. So doing the opposite and removing from the codebase simply feels backwards.
We can group our reluctance to remove code into two categories: 1) the wrong feeling you get from doing it, and 2) the technical unknowns and worries you have to overcome.
Selecting a block and hitting the backspace key feels wrong. It feels unproductive, it makes us feel like failures. We spent time writing this code, only to now be deleting it.
...