Formatting is about communication, not cosmetics.

That is the message from Chapter 5 of “Clean Code”, and while I agree with the intention, it was one of the less useful chapters for me.

📏 My main takeaway: Format your code automatically and move on

Let me summarise the key points:

✅ Formatting should create a visual structure, like a well-written newspaper ✅ Keep related things vertically close, and separate distinct things with whitespace ✅ Let your code tell a top-down story, from abstract to concrete ✅ Short files are easier to navigate than large ones ✅ Horizontal whitespace should reflect logical grouping and operator precedence ✅ Manual alignment and “clever” formatting are usually not worth it ✅ Indentation shows structure. It should be predictable and consistent ✅ Teams should not waste time discussing formatting ✅ Agree on a formatter and enforce it through automation

👀 My opinion: Teams should not argue about formatting preferences. Just pick the standard of your language that has solid tool support and stick with it. For Java, I recommend the Google Java Style Guide.

Formatting is not a creative act. It is a solved problem. The goal is clarity, not individuality.

#CleanCode #SoftwareDevelopment #CodeStyle #CodeQuality #DeveloperExperience #RethinkCleanCode

View image

Kommentare auf LinkedIn →

Kommentieren und diskutieren können Sie direkt unter dem Beitrag auf LinkedIn.

← Alle Beiträge