Clean Code

1 分钟阅读

  • Working Efficiently With Legacy Code
  • User Stories Applied For Agile Software Development by Mike Cohn

SOLID principle

SOLID

Three laws of TDD:

  1. Write failing test first
  2. Write only enough test to fail
  3. Write only enough code to pass

If the test gets more specific, the code gets more generic.

Transformation List

  • Null
  • Null to constant
  • Constant to variable
  • Add computation
  • Split flow
  • Variable to array
  • Array to container
  • If to while
  • Recurse
  • Iterate
  • Assign
  • Add case