My Life in a Bush of Legacy Code – Michael Feathers
I am attending this session from the godfather of legacy code. How could I pass it up?
Michael’s core assertion is that a code base reflects the business climate of the organization that created it.
- The result of my book has been the opportunity for me to see some of the worst code you can imagine.
- Two things we deal with: Laziness and ignorance. Ignorance is forgivable and correctable.
- Code is alive and it has its own defenses. A big one is the code’s complexity increases in order to keep you from messing with it. Like a garden getting out of control.
- Personal Note: I like to think about this as “trending to entropy”. Organic systems (like a code base or a human) ill trend to entropy without constant attention to its health.
- Organic systems go through periods of recession and recovery.
- Like breaking down muscles to get stronger.
- Like the U.S. economy today.
- If an organization has no competition, code will atrophy
- TCO of a code base increases due to complexity, not its size.
- The way of the magpie is to chase shiny things. Magpie’s create sticky balls of mud. Don’t be a magpie.
- Emergence works. Put a small group of people together and let them own a problem. They will almost always succeed.
- Dunbar’s Number. Look it up, this is cool. Group sizes larger than this require restrictive rules, laws, and policies in order to maintain stability.
My question: “Do you have some prescriptive guidance for an individual team member who would like to evolve the the team and reclaim a code base that has trended toward entropy?”
- Have someone on the team who can do green field TDD. Someone on the team needs to understand what to strive for.
- Set standards for quality and team behavior and hold people accountable to those standards.
- Find the area of code that everyone is scared of. Attack that one first. The team will feel better having relieved its pain and realized initial success.
- Note: This one reminds me of Mary Poppendieck’s saying, “Find the thing that is hard to do, and do it more often.”