CS 372 Spring 2016 > Notes for February 19, 2016
CS 372 Spring 2016
Notes
for February 19, 2016
The following is an outline of the February 19 lecture.
Clean Code (cont’d)
Clean Code Developer Initiative/School
- Begun 2009. Stephan Lieser & Ralph Westfall.
- Four Values
- Evolvability: Build for change.
- Correctness: Care for correctness.
- Production Efficiency: Work efficiently.
- Reflection: Rethink your actions.
- Five “Paths”: Red, Orange, Yellow, Green, Blue
- The Red Path: Understanding Practices
- DRY
- KISS
- Avoid preliminary optimization.
- Distrust your own cleverness.
- Boy Scout Rule
- Root Cause Analysis
- Never do “programming by coincidence: understand why.
- Use version control.
- Simple refactorings.
- Apply Extract Method and Rename liberally.
- We will discuss refactoring later in the semester.
- Reflection
- Review your own achievements based on principles.
- Partition work into tasks that can be finished in one day.
- Take time to reflect.