What if something changes?

(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at: lawrence@krubner.com, or follow me on Twitter.

This is both funny and true:

“What if it changes?” isn’t just a question. It’s a powerful heuristic for software design that can be used to justify almost anything. Everyone should use it more. It’s great precisely because it’s rooted in pure speculation. Once you’ve freed yourself from the baggage of reality, there’s nothing easier than inventing scenarios where your special code will be useful under the new imaginary future conditions. If you encounter any pushback against your defensive layer cake of abstraction, interfaces, or ham-fisted design patterns, don’t fret – they can’t actually prove that the future you predict won’t happen. That’s the magic of the design rationale: the only way to fight speculation is with further speculation. You’re both making the same gamble. 

Developers from certain languages[0] have learned to wield this design principle with more power than many others. It’s how we end up with so much stuff in code bases that’s just… there. Existing. Superficially it appears unused, but silently and stoically, we know it protects us from the turbulent future change which lurks ever ahead. As I navigate through 18 levels of defensive indirection, I smile happily to myself, thankful for the warm, comforting, temporal protection created by someone with the good graces and foresight to ask “what if it changes?” before each and every line of code written.

Post external references

  1. 1
    https://chriskiehl.com/article/the-tyranny-of-what-if-it-changes
Source