Chapter 2 - A tale of two values
-
Two different values
- Behaviour - what the code does, correctness
- Structure - How easy the code is to change
-
Many programmers believe that their job is to focus on behaviour and neglect structure
-
The difficulty of making a change should be proportional to the scope of the change, and not to the shape of the change
- Proportional to the change to the domain model
-
Developers are given a stream of changes which pull the code in different directions
-
Code designed for one day's changes may not easily fit the next's
-
Architecture should be as shape agnostic as practical
The greater value
- Structure is more important than behaviour
- Good structure makes the code easier to change
- Poor behaviour can easily be fixed
- Poor structure with good behaviour will have poor behaviour when the requirements change
- And will be hard to correct
Eisenhower's matrix
- Priority
- Urgent and important
- Important but not urgent
- Urgent but not important
- Neither urgent or important
- Architecture of the code is important
- Behaviour of the code is urgent
- Do not prioritise behaviour which is urgent but not important over important architecture
- Business managers are not trained to understand the importance of good architecture - not their job
- Responsibility of the software team
Fight for the architecture
- Developers are stakeholders
- You are responsible for the code quality
- Need to fight for what you know is important