Thoughts After Reading Clean Code

I finally finished reading Robert C. Martin's 'Clean Code'. I had high expectations since it's such a famous book, but I found it surprisingly difficult to apply many of its principles to actual work.

For example, the book says functions should be small, but in practice, I had no idea how to break down complex business logic. Honestly, I think 'Refactoring' was more practical.

However, the emphasis on coding conventions, reducing comments, and choosing good names really resonated with me. I plan to re-read it and consistently apply those lessons.

What do others think of this book? Has anyone tried applying it in practice?

by 밤샘코더318

6 answers

Agreed. Applying it in practice requires quite a bit of thought.

by 클라우드러버539 · ▲0

The Refactoring book is good, but Clean Code was also quite helpful.

by 문과출신개발자459 · ▲0

But the clean code examples are way too simple, so they don't really match reality lol

by 스타트업러687 · ▲0

I was also lost at first, but I think acknowledging the trade-off is important. Rather than unconditionally splitting functions into 10 lines or less, I practiced breaking them down by meaning, and it gradually got better. In particular, I made an effort to reduce nested if statements.

by 월급루팡768 · ▲0

Tips for splitting functions: Extract conditional statements into separate methods or introduce a Value Object (VO) to make it easier. Additionally, designing a testable structure naturally leads to smaller functions. A recommended approach is to first write the large function, then identify patterns and refactor.

by 코딩하는곰229 · ▲0

Well, I think Clean Code can sometimes be more harmful than helpful. Excessive abstraction actually reduces readability and leads to an unnecessary number of classes. Moreover, under real-world schedule pressure, there's no room to apply all of it, so the book's content often feels idealistic. Instead, I found cognitive science books like 'The Programmer's Brain' to be more useful.

by 알고리즘고수689 · ▲0