Code That Fits in Your Head Heuristics for Software Engineering

Authors published Link
Mark Seemann 2022 Find the book here


Summary

The book focusses on two areas, that are mixed up in the content:


Chapter 1: Art or Science?

The author lists different analogies that are usually used when trying to explain what software development is, like: Building a house, growing a garden, crafting and more.

He shows that, while all of them contain some truth, none fits right. But for the moment software engineering seems right for him and he wants to contribute something in this direction.


Chapter 2: Checklists


Chapter 3: Tackling complexity

Software engineering is about tackling complexity. The brain works in certain ways, e.g. we can only keep track of 7 things in our short term memory. Our code needs to respect that.


Chapter 4: Vertical Slice

Instead of working your way from the UI down to the database or the other way round, consider creating a vertical slice.

A vertical slice contains everything from the ui down to the database. It means that you only implement one feature, but through your complete architecture.

This has advantages:

This vertical slice can also be described by the name of "walking skeleton" (external explanation).

Then use outside-in test-driven development:

Other recommendations are:

Chapter 5: Encapsulation

Chapter 6: Triangulation

Chapter 7: Decomposition

Chapter 8: API design

Chapter 9: Teamwork

Teamwork is one of the most engineering-like practices you can adopt.
Code Reviews
Pull Requests

Part 2 Sustainability


Chapter 10 - Augmenting Code


Chapter 11 - Editing Unit Tests


Chapter 12 - Troubleshooting

What to do when your code does not work?

Chapter 13 - Separation of Concerns

Chapter 14 - Rhythm

Personal rhythm: Team Rhythm:

Chapter 15 - The Usual Suspects

Chapter 16