
Clean Code
A Handbook of Agile Software Craftsmanship
by Robert C. Martin · first published 2008
951mentions
298recommended by
739HN commenters
2008–2026first – last mentioned
40% recommend32% neutral28% critical
Why HN recommends it
Concrete guidance on writing readable, maintainable, testable code, with chapters on comments and tests. Suggested for developers at any level wanting better habits, and applicable beyond Java.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








I am rather fond of the concepts described in "Clean Code" by Robert Martin but it seems that in real life, a really high-quality codebase is hard to come by. While I am asking myself this question, the only one that popups to my mind would be Laravel: https://github.com/laravel/laravel…
on “Ask HN: What are the “best” codebases that you've encountered?” ↗Robert C. Martin's Clean Code book has a great section on comments: - The proper use of comments is to compensate for our failure to express ourself in code. Comments are always failures. We must have them because we cannot always…
on “I've never seen a language's style guide recommend avoiding comments before” ↗…just don't know any better, but want to improve. Read these books: _Working Effectively with Legacy Code_ by Michael Feathers _Refactoring: Improving the Design of Existing Code_ by Martin Fowler _Clean Code_ by Uncle Bob These are invaluable resources. There are many others, but these three are particularly germane to your situation.
on “Ask HN: Codebase at my work is a complete mess, what should I do?” ↗Clean Code was one of the first books I read professionally, and I'm glad I did. Since then, I've formed the opinion that "Uncle Bob" sometimes (as in this case) takes helpful ideas a bit too far. But I'm still…
on “REPL Driven Design” ↗…decision/order/suggestion, but it helps understanding. - most user stories / user requests are raw diamonds waiting to be polished. ("What do they really want me to solve") Essential reading list: - Clean Coder and Clean Code https://www.amazon.com/Clean-Code-Handbook-Software-Craftsma... https://www.amazon.com/Clean-Coder-Conduct-Professional-Prog... - Test Driven Development by Kent Beck https://www.amazon.com/Test-Driven-Development-Kent-Beck/dp/...
on “Ask HN: Senior developers, what would you tell a younger you?” ↗I've read most of the recommended books, but as far as what I think has delivered immediate real value, I'm going to go with: 1) Clean Code 2) The Phoenix Project 3) UNIX and Linux System Administration Handbook I'm sure #2 will be something folks want to fight over shrug. If you want to sidestep years of headache it's a must-read though.
on “Ask HN: Books you should have read when you start a career in SE / CS?” ↗Thanks everyone, the comments are much appreciated. Here's a list of books and other media resources recommended so far in the thread: Robert C. Martin, Clean code: https://www.amazon.com/Clean-Code-Handbook-Software-Craftsma... Vaughn Vernon, various: https://vaughnvernon.co/?page_id=168 Steve McConnell, Code Complete: https://www.amazon.com/Code-Complete-Practical-Handbook-Cons...…
on “Ask HN: How to transition from academic programming to software engineering?” ↗Nice list. Appreciate it. But I see there are a few amazing software books missing from the list such as: - Clean Code (by "Uncle Bob")) [https://www.amazon.com/Clean-Code-Handbook-Software-Craftsma...] - Design Patterns (by "Gang of 4") [https://www.amazon.com/Design-Patterns-Elements-Reusable-Obj...] - Introduction…
on “Professional programming resources” ↗I disagree. I think the central thesis of Clean Code still holds up. You should never mix layers of abstraction in a single function. That more than anything is what kills readability, because context switching imposes a huge cognitive load. Isolating…
on “Write code. Not too much. Mostly functions.” ↗…Think: A Common Sense Approach to Web Usability, 2nd Edition" by Steve Krug Publisher: New Riders "Expert C Programming: Deep C Secrets" by Peter van der Linden Publisher: Prentice Hall "Clean Code: A Handbook of Agile Software Craftsmanship" by Robert C. Martin Publisher: Prentice Hall "The Elements of Computing Systems: Building a Modern Computer from First Principles" by Noam Nisan Publisher:…
on “Top Books on Amazon Based on Links in Hacker News Comments” ↗Code Complete rocks. It's easily in the top 20 books for any developer. Maybe top 5 Having said that, remember the idea is to stick with a theme, so if you choose good coding, do "Clean Code" by Uncle Bob a few other books along the same lines.
on “HN: The distress of a young padawan. (rant)” ↗…get your next, better job. Off the top of my head, try "Domain Driven Design" by Eric Evans, "Growing object-oriented software guided by tests", "Refactoring" By Martin Fowler, and on the last topic "Clean code" by Robert Martin and "Code Complete" by Steve McConnell Big ball of mud apps (http://www.laputan.org/mud/ ) may be common, but it doesn't have to be that way - you can learn some pitfalls to avoid
on “I'm doing 90% maintenance and 10% development, is this normal?” ↗…investing a lot of time and mental effort. Sometimes it's almost impossible. I don't know, I think it's a point where education fails. Your average enterprise developer should be forced to read books like "Clean Code" by Bob Martin before being allowed to touch a keyboard.
on “How Class-based Programming Sucks (2011)” ↗…the Google style guidelines) standard years ago and found it exciting and very helpful material, I unfortunately did not get such a kick skimming through this. Perhaps it's because after having read Clean Code [2], I feel that there is much missing that can lend itself to better code. [1] http://www.oracle.com/technetwork/java/javase/documentation/... [2] http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...
on “Google's updated Java coding guidelines” ↗Great post. If you want a even _further_ expanded version of this I highly recommend "Clean Code"[1] by Robert C. Martin, and I learned a few days ago that there is a follow up book, "The Clean Coder"[2] which I am yet to read [1] - http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...…
on “How to be a great software developer” ↗