alama@world: ~/
Clean Code cover

# Clean Code

by Robert C. Martin
Completed
Finished on January 1, 2023
Programming Best Practices Software Engineering

Description

A handbook of agile software craftsmanship that has helped countless programmers write cleaner, more maintainable code.

Favorite Quote

"Clean code is not written by following a set of rules. You don't become a software craftsman by learning a list of heuristics. Professionalism and craftsmanship come from values that drive disciplines."
cat notes.md

My Notes

Why I Read This Book

I wanted to improve the quality of my code beyond just making it work. As I've progressed in my career, I've realized that writing code that others (including my future self) can easily understand and maintain is just as important as writing code that functions correctly.

Key Takeaways

Meaningful Names

One of the simplest yet most impactful lessons was about choosing descriptive names for variables, functions, and classes. Uncle Bob emphasizes that code should read like well-written prose, and good naming is essential for that.

Functions Should Do One Thing

The principle that functions should do "one thing" and do it well has transformed how I structure my code. I've found that following this rule leads to more modular, testable, and maintainable code.

Comments Are a Last Resort

Rather than relying on comments to explain confusing code, the book taught me to make the code itself clearer. Comments should be used sparingly and only when the code cannot be made self-explanatory.

How I've Applied It

I've implemented a personal checklist based on the book's principles that I run through before submitting code for review. This has significantly reduced the number of issues found during reviews and has made my code more consistent.

The chapter on unit testing has especially influenced my work, leading me to adopt test-driven development practices more consistently.

In retrospect, this book has been one of the most influential in my development as a software engineer, and I continue to reference it regularly.