📎 Webclip
Clean Code: The Good, the Bad and the Ugly
The article says Clean Code had a major impact on developers by making code quality, readability and maintainability central concerns. It highlights advice on naming, tests, SRP, DRY, CQS, boundaries, data abstractions and code smells, while also arguing that some recommendations are outdated or too dogmatic.
Fichamento#
- The book helped create awareness around code quality and made readability and maintainability a larger focus in programming.
- It gives lasting advice on naming, exception handling, unit tests, SRP, pure functions, CQS, DRY, boundaries and data abstractions.
- The author values the code-smells compendium because it teaches how to detect bad code as well as write good code.
- A main criticism is that parts of the book are obsolete, especially the heavy Java focus, the reliance on EJBs and AspectJ, and the shallow treatment of concurrency.
- The article says the book does not cover functional programming enough, including immutability, referential transparency, higher-order functions and avoiding side effects.
- Its presentation of principles is described as dogmatic, which can encourage cargo-cult programming when rules are applied without context.
- The article argues that duplication can sometimes be acceptable and that higher design concerns like coupling, cohesion and information hiding should come first.
- The code examples are presented as the ugly part of the book because they are verbose, Java-specific and often harder to understand than the lessons they are meant to teach.
- The prime generator example is used to show excessive function granularity, long names, many side effects, violation of CQS and problematic use of static state.
- The conclusion recommends Clean Code for new programmers, but not as the first software engineering book, and suggests other books that explain practices, trade-offs and reasons more openly.
