Clean Up Your Spaghetti
CtrlK
  • Introduction
  • What Happened to the Title
  • Author
  • Preface
  • Syllabus
  • Session 1: Don't Code Now!
    • Why Clean Code?
    • What is Clean Code?
    • How to Write Clean Code?
    • User Interface Design
    • UML
  • Session 2: Be Like a Writer
    • Naming
    • Comment
    • Function
    • Formatting
  • Session 3: Ideal Coding Process and Principles
    • Less Coupling High Cohesion
    • Level of Abstraction
    • Duplication
    • Test Driven Developement
  • Session 4: Stand on Giants
    • Strategy Pattern
    • Adapter Pattern
    • Factory Pattern
    • Singleton Pattern
    • How to Write Clean Code Exactly
  • Exercise: Get Your Hands Dirty
    • Session 1: Draw UML
    • Session 2: Clean Your Own Code
    • Session 3: TDD - The Ideals
    • Session 4: Let's Rock
  • Don't End Here
Powered by GitBook
On this page
  • Why
  • More?

Was this helpful?

  1. Session 3: Ideal Coding Process and Principles

Duplication

DRY Principle (Don't Repeat Yourself).

  • Duplication = missed opportunity for abstraction

    • make it subroutine / another class / etc

Why

  • raise abstraction level: faster / fewer bugs

  • design for change

  • design for reuse

More?

Avoid doing duplicated things is the purpose of inventing computers.

PreviousLevel of AbstractionNextTest Driven Developement

Last updated 5 years ago

Was this helpful?