Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Brutal Refactoring Game - LSCC Sep 2012 Hands o...

Avatar for gnorsilva gnorsilva
September 26, 2012

Brutal Refactoring Game - LSCC Sep 2012 Hands on session

Avatar for gnorsilva

gnorsilva

September 26, 2012
Tweet

Other Decks in Programming

Transcript

  1. Today Take a simple problem Use pair-programming Language agnostic Write

    code Add functionality only when the code is clean Refactor often Refactor a lot
  2. Code smell A code smell is a hint that shows

    you might have a problem in your system. '
  3. Refactoring Changing a software system without changing the behavior of

    the code and improving its internal structure
  4. Coding smells 1) Lack of tests 2) Name not from

    domain 3) Name not expressing intent 4) Unnecessary if 5) Unnecessary else 6) Duplication of constant 7) Method does more than one thing 8) Primitive obsession 9) Feature envy 10) Method too long (> 6 lines) 11) Too many parameters (> 3) 12) Test – not unitary 13) Test – setup too complex 14) Test – unclear Act 15) Test - more than one assert 16) Test – no assert 17) Test – too many paths