The topic for this “Software Development Mantras” post is “defensibility.”
First, let me introduce the concept of “TIMTOWDI” (pronounced “tim-toady”). It’s an acronym for “there is more than one way to do it,” and software development may be unique in that for any given task, this holds true.
So, given N different ways of implementing the task at hand, which one is better?
If one way is dramatically simpler (either conceptually or implementation-wise), that may be guide your decision process.
If one way is especially more testable, that may indicate better separation of concerns, or at least lead to a provably correct solution.
I’ve found there’s a simple litmus test that is always applicable, though. Just put yourself in the developer’s shoes several months from now, who needs to work on this codebase, and ask yourself: “which solution is the most obvious, least surprising, and most defensible.” It may seem like CYA, but it’s for a good cause — you don’t want the engineers of tomorrow putting your code on thedailywtf!
What other development truisms have you found?
Related posts:
- Deliberate Change Management
Software engineering can be described as the orchestration of a quasi-denumerable set of moving parts. With so many moving parts, breakages occur. One main goal as a “software craftsperson” is...... - Completely Correct DRY Simplicity
This is the first in (what may be a series) of posts where I’ll share some concepts, or mantras, that I’ve found helpful in my experiences with software development. The......