CDN$ 38.21
  • List Price: CDN$ 45.37
  • You Save: CDN$ 7.16 (16%)
Only 1 left in stock (more on the way).
Ships from and sold by Gift-wrap available.
The Art of Readable Code has been added to your Cart
Have one to sell?
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 3 images

The Art of Readable Code Paperback – Nov 26 2011

See all 4 formats and editions Hide other formats and editions
Amazon Price
New from Used from
Kindle Edition
"Please retry"
"Please retry"
CDN$ 38.21
CDN$ 25.42 CDN$ 29.23

Harry Potter and the Cursed Child
click to open popover

Special Offers and Product Promotions

  • You'll save an extra 5% on Books purchased from, now through July 29th. No code necessary, discount applied at checkout. Here's how (restrictions apply)

Frequently Bought Together

  • The Art of Readable Code
  • +
  • Working Effectively with Legacy Code
Total price: CDN$ 95.91
Buy the selected items together

No Kindle device required. Download one of the Free Kindle apps to start reading Kindle books on your smartphone, tablet, and computer.
Getting the download link through email is temporarily not available. Please check back later.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your mobile phone number.

Product Details

  • Paperback: 206 pages
  • Publisher: O'Reilly Media; 1 edition (Nov. 26 2011)
  • Language: English
  • ISBN-10: 0596802293
  • ISBN-13: 978-0596802295
  • Product Dimensions: 17.8 x 1.1 x 23.3 cm
  • Shipping Weight: 340 g
  • Average Customer Review: Be the first to review this item
  • Amazon Bestsellers Rank: #440,431 in Books (See Top 100 in Books)
  •  Would you like to update product info, give feedback on images, or tell us about a lower price?

  • See Complete Table of Contents

Product Description

Book Description

Simple and Practical Techniques for Writing Better Code

About the Author

Although raised in the circus, Dustin Boswell realized early on that he was better at computers than at acrobatics. Dustin received his B.S. from CalTech, where he got hooked on Computer Science, and then went to UC San Diego for his Master's Degree. He worked at Google for five years, on a variety of projects including web crawling infrastructure. Dustin is now an internet startup junkie who spends his free time hiking the Santa Monica mountains and being a new dad.

Trevor Foucher has been shipping software projects for over 10 years, including Windows 2000 and OneCare at Microsoft, and Webmaster Tools at Google. He's been an individual contributor, manager, and tech lead. His goal is to make code more readable and reliable.

Customer Reviews

There are no customer reviews yet on
5 star
4 star
3 star
2 star
1 star

Most Helpful Customer Reviews on (beta) HASH(0x9c03fc18) out of 5 stars 21 reviews
38 of 45 people found the following review helpful
HASH(0x9cc0a81c) out of 5 stars Nothing New Dec 12 2011
By W. Doran - Published on
Format: Paperback
Good coding practices/style is well worked territory. There are many book and web pages devoted to the subject. This book walks through well treaded territory: variable names, loop structures, code block organization, subroutine structures, etc. For an experienced programmer, there is nothing new in The Art of Readable Code. This is especially unfortunate because they start off with a measurable metric for readable code: how long does it take a programmer previously unfamiliar with the code to understand it. This seemed like a great idea and got me to buy the book. However once you get into the text, when comparing code snippet A with snippet B, instead of showing the two versions to a group of programmers and timing them, they give their opinion about which version would take less time to understand by some mythical programmer looking at the code for the first time. Now, I don't really disagree their opinions any of the topics in the book (ok, I like the ternary operator more than they do), but it is just opinion. I would love for someone to take the examples in this book and do the experiments. This would be hard, and maybe expensive, but the authors and I would surely learn something. That would be great book to read.
6 of 6 people found the following review helpful
HASH(0x9cc0a870) out of 5 stars Great advice for all programmers Dec 14 2011
By N. Krumpe - Published on
Format: Kindle Edition Verified Purchase
I teach an introductory Java programming course. I spend a lot of time (my students might say that I spend too much time) reminding them that well placed comments, meaningful variable names, indentation, judicious use of blank lines, and so on all lead to code that is easier for them and for other programmers to read and understand. But, when these words come from me, I'm afraid that it comes across as "just another requirement to follow".

Along comes "The Art of Readable Code". The authors have written a very enjoyable, highly readable book about readability. They go beyond simply stating a set of guidelines, instead explaining the motivation behind each suggestion. I love that they show both good and bad from-the-field examples of how programmers write code. I found myself nodding in agreement with much of what they said. I also think they do a much better job than I when it comes to explaining that readable code is not simply a set of requirements to follow, but that there are simple compelling reasons behind readability, not the least of which is to make life easier for others who will read your code.

I have decided that I will begin making this a required reference for my students. Our school subscribes to Safari Online Books, which gives our students free access to O'Reilly books such as this one. Even if my students couldn't get it for free, I think it's a book I would want our computer science/software engineering majors to have handy as a reference. I bought the Kindle edition for myself, and found that it is very readable on the Kindle Fire...and much more relaxing to read this way than from the Safari site (and currently only about half the cost of buying the physical book).

From now on, I will let this book deliver the message to my students about readable code.
4 of 4 people found the following review helpful
HASH(0x9cc0ab4c) out of 5 stars Excellent advice; if only it were commonly followed! Dec 31 2011
By Robert H. Stine Jr. - Published on
Format: Kindle Edition
Insightful and practical coding advice from Dustin Boswell and Trevor Foucher. For years I've been saying that good code easy to understand. Obviously readable code is easier to maintain; the authors point out that it is also easier to test, easier to modify, and easier to reuse. My only quibble is their disparagement of the tertiary operator, which I think can improve code clarity, but without doubt this is an outstanding book on programming.

Other reviewers have described this book as introductory, offering nothing new. Well, the book is not rocket science, but it makes a great case for practices that should be followed but usually aren't. I'm a programmer; I've worked at many software start-ups, and what I see all too often is brittle code, gazillion-line methods, god classes, and pointless tight coupling.

Also, the authors introduce a notion of an economy or budget of mental effort: if what should be simple to understand is a chore, then it is going to be easy to miss problems in the tough stuff. Across the board, the authors articulate compelling cases for doing things the right way, which could be handy for discussions with your colleagues and boss.

Finally, the concrete coding example at the book's end should be educational for even experienced programmers.
4 of 4 people found the following review helpful
HASH(0x9cc0c084) out of 5 stars Worth reading, great for lunch-time discussions Dec 21 2011
By Matthew B. Doar - Published on
Format: Paperback
The more code I write, the more care I take to make it readable for my future self. So I've thought about this subject for a while now. The authors of this book have managed to capture all of my thoughts, and a bunch more.

It's well-planned, written and edited. Not too long (184 pages) and the cartoons don't get in the way, and even occasionally add value. I admired the way that the authors recognized a few classic flame-war subjects, made their opinions known and then moved right along. I think the examples for each idea are all good ones.

I recommend reading it with a body of code in mind, so you can think about live examples of all the issues that the authors raise.

Disclaimer: I requested a copy of this book from O'Reilly so I could review it.
3 of 3 people found the following review helpful
HASH(0x9cc0c09c) out of 5 stars The Art of Readable Code by Dustin Boswell and Trevor Foucher; O'Reilly Media Dec 30 2011
By Systems Dude - Published on
Format: Paperback
Programmers Dustin Boswell and Trevor Foucher present The Art of Readable Code: Simple and Practical Techniques for Writing Better Code with the underlying premise that, "code should be easy to understand." This practical and clearly-articulated text provides sound advice to assist the reader with both fundamental and advanced techniques to write code which is easy to read and understand. With chapters organized into four progressively complex sections, Boswell and Foucher focus first on basic improvements to code, offering tips about naming, commenting, and aesthetics which are applicable to almost any code, both simple and advanced. Progressing to variables, loops, and logic and then to code reorganization into functions, the authors lead the reader through important lessons and a wealth of examples. The book culminates in a study of code testing and a case study analysis of code development, applying the principles offered in the preceding chapters.

This collection of solid programming advice is bolstered by numerous code examples in several mainstream programming languages, yet is presented at a level which is accessible to a broad audience. Whether a student needing guidance, a novice programmer, or a more experienced programmer who could use a reminder about good practices the reader is certain to glean valuable tips which will help him or her write better code. The authors are successful in creating an easy and fun read which can either be traversed cover to cover or selectively, with the help of the contents pages and index. Supplemented with expressive cartoons and quotations (including Yoda!), each chapter concludes with concise summaries which embody the key principles presented. A further reading list is also provided.

As a self-taught intermediate programmer, reading this book has helped me identify some areas in which I could make my existing code better. The authors draw attention to warning signs that code is not as easy to understand as it could be. I only wish that I had encountered this sage advice several years earlier before developing coding habits which need correcting. The success of Boswell and Foucher in their endeavor to educate programmers in the oft-overlooked area of creating code which is intuitive to the reader is evident to me because reading this book has caused me to reflect, learn, and resolve to write better code.

Practical, enjoyable, and very readable. Recommended for students in computer programming and any programmer, of any level of experience, who has looked back at his/her code of several months ago and thought, "What does this part do?"

O'Reilly Media provided me with a free electronic copy of this book to review. Learn more about The Art of Readable Code at [...]