Oop Ideas - Deepstash

oop

4 ideas

DRY is not a silver bullet

"Don’t repeat yourself" (DRY) is usually good advice, but you have to get the abstractions right. Otherwise they quickly become unmaintainable.

Here's how it usually plays out:

  1. You write a cool abstraction
  2. Time passes
  3. A new requirement appears for which that abstraction is almost perfect
  4. Programmer B gets tasked to implement it. They feel honor-bound to retain the abstraction, so they alter the code to take a parameter, and then add logic to conditionally do the right thing based on the value of the parameter

Loop these steps a couple of times and you quickly get an unmaintainable mess.

2 STASHED

1 LIKE