Tidying
Tidyings are a subset of refactorings. Tidyings are the cute, fuzzy little refactorings that nobody could possibly hate on.1
Immediate value
Software design creates value, when it creates value, that is realized over time. Tidy first is a bit of an exception. When you tidy first, you know you will realize the value of tidying immediately.1
Misconceptions about refactoring
“Refactoring” took fatal damage when folks started using it to refer to long pauses in feature development. They even eliminated the “that don’t change behavior” clause, so “refactoring” could easily break the system. Let’s see: no new features, possible damage, and nothing to show for it at the end. No thank you.1
List of tidyings
- Guard clauses
- Dead code
- Normalize symmetries
- New interface, old implementation
- Reading order
- Cohesion order
- Move declaration and initialization together
- Explaining variables
- Explaining constants
- Explicit parameters
- Chunk statements
- Extract helper
- One pile
- Explaining comments
- Delete redundant comments