2. Software design is the art of
making code easier to understand.
It involves deciding things like
where code is, what it is called and
how it is used.
- Rouan
3. Design is not
architecture
“To me the term architecture conveys
a notion of the core elements of the
system, the pieces that are difficult to
change. A foundation on which the
rest must be built.”
Martin Fowler
4. Why does design
matter?
Well-designed software is:
- Easy to understand
- Easy to change
- Easy to extend
- Easy to maintain
- Easy to debug
- Faster to work with
- Cheaper to work with
- More fun to work with
5. Emergent design is about noticing
the best design while you are looking
at the code.
- Rouan
6. 1. First, it has to
work
Well-designed software is built in
small, incremental steps
BeckDesignRules
https://martinfowler.com/bliki/BeckDesignRules.html
7. 2. Know when to
leave it be
Sometimes the best thing to do is
nothing
● The rule of three
● The danger of premature
abstraction
● The power of talking about an
option and not using it
● The principle of diminishing
returns
● Write code that is easy to delete
8. 3. Do the least
surprising thing
Nobody likes surprises
● Put similar things together: don’t
put your socks in the kitchen
drawer.
● How will someone expect this to
work? Don’t open the crisp
packet from the bottom.
● Single responsibility principle
● Consistency vs correctness
https://en.wikipedia.org/wiki/Principle_of_least_astonishment
9. 4. Favour simplicity
Leave the simplest possible system
behind
https://zen-of-python.info/simple-is-better-than-complex.html#3
10. 5. Complexity comes
from complexity
Get to the bottom of it
● Find the root cause
● Either eliminate it or find a way
to encapsulate it better at its
source
● E.g. Rethink UX requirements
that force you into bad design
● E.g. Rethink system architecture
that forces you into bad design
11. 6. Coding is an
exercise in empathy
Do your best to imagine what will
be easiest for the next person
● The people who read your code
will be different to you
● Coders have different
backgrounds, both technically
and in life
● Even you will be different to you
● Talking to people helps
● Coding with compassion
19. Rouan’s design principles
1. First, it has to work
2. Know when to leave it be
3. Do the least surprising thing
4. Favour simplicity
5. Complexity comes from complexity
6. Coding is an exercise in empathy