DRY 2.0

DRY 2.0

DRY (Don't Repeat Yourself) is often defined as "No Code Duplication". That's DRY 1.0. The DRY principle really shimes in when you get it to the next level: "No Knowledge Duplication".

This lightning talk was given at #VanRuby Lightning Talk Meetup on Dec 1st 2016.

25a07538df2545604409a6216b4a3bc8?s=128

Philippe Creux

December 01, 2016
Tweet

Transcript

  1. @pcreux VanRuby - Dec 1st 2016 DRY 2.0

  2. @pcreux VanRuby - Dec 1st 2016 D R Y

  3. @pcreux VanRuby - Dec 1st 2016 D on’t R epeat

    Y ourself
  4. @pcreux VanRuby - Dec 1st 2016

  5. @pcreux VanRuby - Dec 1st 2016 “For example, if you’ve

    duplicated a bit of code in many places, the Don’t Repeat Yourself (DRY) principle tells you to extract the duplication into a single common method and then invoke this new method in place of the old code.”
  6. @pcreux VanRuby - Dec 1st 2016 DRY = NO Code

    Duplication
  7. @pcreux VanRuby - Dec 1st 2016

  8. @pcreux VanRuby - Dec 1st 2016

  9. @pcreux VanRuby - Dec 1st 2016

  10. @pcreux VanRuby - Dec 1st 2016 DRY = NO Code

    Duplication
  11. @pcreux VanRuby - Dec 1st 2016 DRY 1.0 = NO

    Code Duplication
  12. @pcreux VanRuby - Dec 1st 2016 DRY 2.0 = NO

    KNOWLEDGE Duplication
  13. @pcreux VanRuby - Dec 1st 2016

  14. @pcreux VanRuby - Dec 1st 2016

  15. @pcreux VanRuby - Dec 1st 2016

  16. @pcreux VanRuby - Dec 1st 2016 Free Starter Pro99 Pro199

    Pro499
  17. @pcreux VanRuby - Dec 1st 2016

  18. @pcreux VanRuby - Dec 1st 2016

  19. @pcreux VanRuby - Dec 1st 2016 Free Starter Pro99 Pro199

    Pro499 NEW PRICING! Free Startup Prime Premium …
  20. @pcreux VanRuby - Dec 1st 2016

  21. @pcreux VanRuby - Dec 1st 2016

  22. @pcreux VanRuby - Dec 1st 2016

  23. @pcreux VanRuby - Dec 1st 2016

  24. @pcreux VanRuby - Dec 1st 2016 How did we get

    there?
  25. @pcreux VanRuby - Dec 1st 2016 KNOWLEDGE Duplication

  26. @pcreux VanRuby - Dec 1st 2016 Let’s FIX IT!

  27. @pcreux VanRuby - Dec 1st 2016

  28. @pcreux VanRuby - Dec 1st 2016 ONE SOURCE of TRUTH

  29. @pcreux VanRuby - Dec 1st 2016 ExAMPLE: POLICY OBJECT

  30. @pcreux VanRuby - Dec 1st 2016 POLICY OBJECT Can I

    do X?
  31. @pcreux VanRuby - Dec 1st 2016 POLICY OBJECT cancancan pundit


  32. @pcreux VanRuby - Dec 1st 2016 ONE SOURCE of TRUTH

    = RICH DATA MODEL
  33. @pcreux VanRuby - Dec 1st 2016

  34. @pcreux VanRuby - Dec 1st 2016 DRY = NO CODE

    DUPLICATION + NO KNOWLEDGE Duplication