January 6, 2020

Maintaining Balance While Reducing Duplication

Speaker

David Chelimsky, Consultant at Cognitect

Thoughts

I really see this happening on several ocasions and it is very hard to argument against to some well established concepts like DRY. Very brave and informative talk.

I really like the paper recommended in the end of the talk: Keep it shy, DRY, and tell the other guy.

Quotes

"Code duplication is the root of all evil"(?)

every time you reduce duplication you increate coupling by introducing new dependencies. it is important to depend on the right things

Every piece of knowledge must have a single, unambiguous, authoritative representation representation within a system

DRY does not mean "don’t type the same characters twice"

Recomendations

  1. depend on abstractions

  2. depend on things which are less likely to change

  3. code is easier to understand when it operates at a consistent level of abstraction

  4. DRY is about isolation of change and duplication of concepts

  5. How do I know if this particular duplication is problematic? Purpose/Intention

  6. Metaprogramming is useful when you can’t know the runtime conditions

Tags: patterns