Book
The Art of Readable Code
Simple and Practical Techniques for Writing Better Code
Dustin Boswell, Trevor Foucher
Summary
Dustin Boswell and Trevor Foucher analyzed hundreds of examples of bad code, much of it their own, to work out why it was hard to read and what fixes actually helped, then built the book around one governing test: code should minimize the time it takes someone else, including your future self, to understand it. It moves from surface-level fixes, naming, comments, and formatting, to simplifying loops, logic, and variables, and finally to function-level reorganization such as extracting unrelated subproblems and doing one thing at a time. Its examples span multiple languages, which keeps the advice about the reader's experience of code rather than any one language's idioms.
Target Readers
- Developers past their first year who are starting to notice their own code is hard to revisit, but don't yet have a vocabulary for why
- Teams establishing a shared standard for naming and code review comments before adopting something like Clean Code
- Engineers who want the reasoning behind readability advice illustrated with real before-and-after code, not just a style guide's rules
Tags
Colophon
- Publisher
- O'Reilly Japan
- ISBN
- 978-4873115658
- Published
- Jun 2012
- List price
- ¥2,640incl. taxMay differ from the actual selling price on Amazon
Get this book
* The link above is an advertisement via Amazon Associates.Related Books
Prerequisites
- Recommended
Dokushu JavaScript, New Edition (Self-Study JavaScript)
CodeMafia
Reason: Right after learning the syntax is the prime moment to shift your focus from 'working code' to 'readable code.' The Art of Readable Code offers concrete techniques for naming, comments, and control flow, cultivating early the sense of readability that is hard to acquire on your own.
Next Books
- Recommended
Clean Code
A Handbook of Agile Software Craftsmanship
Robert C. Martin
Reason: After grasping the basics of readability such as naming and function decomposition, you move on to binding them into principles of why. Clean Code connects individual techniques into a coherent system of craftsmanship and design principles.
- Recommended
The Pragmatic Programmer
your journey to mastery, 20th Anniversary Edition
David Thomas, Andrew Hunt
Reason: Once you have the concrete techniques of readability such as naming and formatting, you widen your view to the professional philosophy that runs through daily decisions—DRY, orthogonality, and a stance toward change. The Pragmatic Programmer binds individual techniques into an attitude of why.
- Related
Programming TypeScript
Making Your JavaScript Applications Scale
Boris Cherny
Reason: Once you've internalized the principles of readable code, you advance to supporting that readability with the mechanism of types. Programming TypeScript shows how type annotations act as 'documentation expressed in code,' letting you write intent-revealing code on the twin wheels of naming and types.
- Related
Refactoring
Improving the Design of Existing Code, 2nd Edition
Martin Fowler
Reason: Once you know what readable code looks like, you need techniques to move existing code toward that shape without breaking it. Refactoring offers a step-by-step way to improve structure in small moves without changing behavior, guided by code smells.
Sources