Where does bad code come from?
Principles
- Producing good quality software requires having measurable metrics.
Takeaways
- Software quality is a function of measurable components.
- Learning things requires exploration.
- Heuristics are only a guide and should not become dogma.
- Improvements require measurements.
- "You can't improve what you can't measure"
Notes
- There is an ongoing trend of growing complexity and decreasing quality in the software we use.
- There are no economic incentives/pressures (currently) on the quality of the code.
- The judgement right now is not on things we should do, but that we could do if we were to care about quality.
- Algorithms are a well understood component in software development, and so it seems this is not part of the equation regarding what has made software decay.
- The learning process for developers implies there is a filtering process on how to produce software. This filtering process ends up providing an structured way of programming with a filtered set of features.
- When we generate code, we work through an explorative way. Charting the route is our experience. If its the first time we do something, we might have a blank canvas, and may end up going in circles or with a very messy path. The more we do it, the less messy the path becomes.
- The current tools we are teaching on how to chart new places are not terrible.
- Heuristics (Clean code, S.O.L.I.D.) can't be validated or measured.
- Lack of measurement is the real problem here. Do we really know if they are as effective as we've been told?
"Doing these things is like saying, we are going to bless the food before eating"
- These heuristics are disconnecting the physical realities of the computer from the problem.
- As a joke, he makes a new acronym, that he thinks is more valuable,
W.A.R.M.E.D.
- W: Write
- A: Agree/Argue
- R: Read
- M: Modify
- E: Execute
- D: Debug
- All of this are tied to a cost, computation or development time
- The lack of metrics in the current environment leads to poor understanding on the underlying realities of the software. This removes the capacity of the developer to iterate and improve on something measurable.
- Working in an ecosystem that is plagued with this train of thought makes every layer unreliable. App developers rely on library developers which may not have done the right thing. Languages and platforms are developed this way. What is the quality of our foundational tools? ¯\_(ツ)_/¯
- The lack of measurements are the crux of the problem right now. We need to start talking more about what the actual problem is, and how we can measure it.
- Heuristics and rules of thumb and not bad by their own. The problem is making them rules without validation or measurements.