🪴 Clean Code - Uncle Bob
My rough notes from watching this series on YouTube, 2020-07-13
- https://www.youtube.com/watch?v=7EmboKQH8lM
- https://www.youtube.com/watch?v=2a_ytyt9sf8
- https://www.youtube.com/watch?v=Qjywrq2gM8o
- https://www.youtube.com/watch?v=58jGpV2Cg50
- https://www.youtube.com/watch?v=sn0aFEMVTpA
- https://www.youtube.com/watch?v=l-gF0vDhJVI
We go slow because we make a mess.
We make a mess because we go fast.
Once the code works you have to clean it.
It’s not done when it works. It’s done when it’s right.
Names
Variables greater the scope longer the name
Functions/classes Greater the scope the shorter the name
Noise words
data
info
Code reviews are very inefficient Pair programming is very efficient
Deployable (could be under featured) Stable productivity (don’t slow down over time)
Software -> changeable product
human beings improve things with time
Constance improvement Fearless competence Team behavior (cover for each other)
If you make an estimate you are lying.
- Best case
- Nominal Case
- Worst Case
Programming Sequence, selection, iteration
TDD Accountant keeping 2 sets of books that balance, this is an ethic and legal enforcement Make tests more specific Make production code more general
Your job is not to be fast.
I have two kinds of problems, the urgent and the important. The urgent are not important, and the important are never urgent.
- Eisenhower
Boundaries are the essence of architecture
Dependancies flow one way across a boundary towards business rules
MVC was meant for small things (like a single button)
Good architecture allows major decisions to be deferred until the last possible moment
IO devices go behind a boundary (they don’t know about business rules)
Frameworks make the first months easy and the next years hard. You must commit to them they do not commit to you.
There is always a cost.
Often better to build than to buy.
Requirements should change.
Estimates !== promisses
Agile === 2 charts on the wall (velocity and burndown)
Agile does not make you go fast or slow.
Agile allows you to produce data.
Agile allows you to know how screwed you are.
Date is the first piece of data and is not moveable
Spec is never frozen
Design and Analysis are not booleans they are never ending.
User story 1 or 2 words, details come later
Iron Cross of project management
- Good
- Fast
- Cheap
- Done
Pick 3
Control Knobs of project mgt.
- Schedule
- Staff
- Scope
- Quality
Early is a good time to tell someone you will be late
Go fast by going well
Agile is for getting the bad news early
Scrum is a business facing project
Agile is a method for small teams to do small things
Relative estimations are better
A sprints job is to produce data
Velocity curve should be flat.
Pressure on the team will inflate the numbers
Anchor to an original card when grading stories
Done === acceptance tests pass (written by qa in an automated fashion)
Architecture, refactoring, and testing are like washing your hands you cannot ignore it. You cannot go faster if it is skipped
Most seniors should spend most of their time mentoring folks.
Teachers only have to stay one page, one day ahead.
Spike story - story to estimate another story of that can’t be estimated