Beautiful Code
Leading Programmers Explain How They Think
By Andy Oram, Greg Wilson
Publisher: O'Reilly Media
Final Release Date: June 2007
Pages: 620

How do the experts solve difficult problems in software development? In this unique and insightful book, leading computer scientists offer case studies that reveal how they found unusual, carefully designed solutions to high-profile projects. You will be able to look over the shoulder of major coding and design experts to see problems through their eyes.

This is not simply another design patterns book, or another software engineering treatise on the right and wrong way to do things. The authors think aloud as they work through their project's architecture, the tradeoffs made in its construction, and when it was important to break rules.
This book contains 33 chapters contributed by Brian Kernighan, KarlFogel, Jon Bentley, Tim Bray, Elliotte Rusty Harold, Michael Feathers,Alberto Savoia, Charles Petzold, Douglas Crockford, Henry S. Warren,Jr., Ashish Gulhati, Lincoln Stein, Jim Kent, Jack Dongarra and PiotrLuszczek, Adam Kolawa, Greg Kroah-Hartman, Diomidis Spinellis, AndrewKuchling, Travis E. Oliphant, Ronald Mak, Rogerio Atem de Carvalho andRafael Monnerat, Bryan Cantrill, Jeff Dean and Sanjay Ghemawat, SimonPeyton Jones, Kent Dybvig, William Otte and Douglas C. Schmidt, AndrewPatzer, Andreas Zeller, Yukihiro Matsumoto, Arun Mehta, TV Raman,Laura Wingerd and Christopher Seiwald, and Brian Hayes.
Beautiful Code is an opportunity for master coders to tell their story. All author royalties will be donated to Amnesty International.

Table of Contents
Product Details
Recommended for You
Customer Reviews


by PowerReviews
oreillyBeautiful Code

(based on 10 reviews)

Ratings Distribution

  • 5 Stars



  • 4 Stars



  • 3 Stars



  • 2 Stars



  • 1 Stars



Reviewed by 10 customers

Displaying reviews 1-10

Back to top

(4 of 13 customers found this review helpful)


do you like bare bones of coding-go, go

By Michal Owsiak

from Poland

About Me Developer

Verified Reviewer


  • Concise


  • Difficult to understand

Best Uses

  • Expert
  • Intermediate
  • Student

Comments about oreilly Beautiful Code:

Andy and Greg collected quite impressive set of IT related essays and enclosed them within Beautiful Code. These are the texts that refer to various topics and treat them in a hard, engineering way. There is no place for humanity science like stuff. There is quite a loot of examples getting to bare bones of the problems.

During my studies I had to go through quite a some IT related books. I don't say I didn't liked them however, Beautiful Code reminds me all these books some way. Each problem described is somehow intriguing and innovative while at the same time you can say - hey, I have read that already somewhere. Don't let me be misunderstood, I value the book, but for me, now it's not the best pick. Hawking wrote once: "Somebody told me, that each equation put into my book will reduce the number of sold copies by two - thus I have put just one into it". Well, Beautiful Code has much, much more than one equation inside.

(8 of 9 customers found this review helpful)


Excellent book for the practicing coder

By Another Working Programmer

from Chatham ON, Canada

About Me Designer, Developer

Verified Reviewer


  • Accurate
  • Concise
  • Easy to understand
  • Helpful examples
  • Well-written


    Best Uses

    • Expert
    • Intermediate
    • Novice
    • Student

    Comments about oreilly Beautiful Code:

    This isn't the book you get to go and figure out some new technology you want to integrate into your system. The great thing about this book is that it's the book version of the conversation you have with coders you may meet at conference where you trade good stories about challenges you had while in front of your code editor. It brings an element of storytelling to a subject that is usually all explanation and example. Its a breath of fresh air in the technical book genre.

    (8 of 8 customers found this review helpful)


    A beautiful addition to your bookshelf.

    By William Deegan

    from Undisclosed

    Comments about oreilly Beautiful Code:

    Beautiful Code: Leading Programmers Explain How They Think

    Edited by Andy Oram & Greg Wilson

    Ever wonder how some of the most notable programmers think and approach programming problems?

    When was the last time you opened an analysis of algorithms book, or delved into the beauty of quicksort and recursive binary partitioning solutions?

    Not for the faint of heart, it will make your brain hurt, but in a good way. Does this sound like a commercial? Well, that's how good this book is.

    If you brave reading this book, you'll get to hear what notable programmers such as Brian Kernighan, Lincoln Stein, Charles Petzold (o.k. those are just the names I recognized before I started reading the book) consider "beautiful" code, and how they approach creating and/or analyzing it. Same goes for pieces of projects such as subversion, perforce, python, jUnit.

    Charles Petzold goes through an excruciating to read, but interesting, example of on the fly byte code generated for .NET. The net is a 4x speed up over plain code, though I would argue whether this qualifies for "Beautiful", maybe a neat "hack", but probably not Beautiful.

    Elliotte Rusty Harold goes through a description of how he contributed/created JDOM and later XOM, what he learned from the first effort, and how he optimized XOM to its current state, using analysis of the algorithms, clever programing, use of precalculated values, and some other good tricks to come up with a high speed validating XML parser.

    Want to understand the subversion delta editor? Read chapter two, again, not for the light read.

    So if you want to learn about your art, you know programming, brew yourself a fresh pot or two of coffee, sit down and read. This book is probably best read a chapter at a time to absorb the content. I know I had to reread some of the examples to get the little light bulb above my head to glow brightly, but I will say it's worth the effort.

    I can count on one hand the number of programming or programming related books I would recommend every programmer reads, this gets added to that short, and changing, list.

    (5 of 6 customers found this review helpful)


    Beauty is in the eye of the beholder

    By joshSVUG

    from Undisclosed

    Comments about oreilly Beautiful Code:

    I found the book's concept intriguing. The ability to learn from 33 highly respected members of the programming community is invaluable. I've enjoyed my daily dose of Beautify Code, but one thing caught me by surprise:

    Not all samples are beautiful, well in my eyes not all samples/chapters are beautiful.

    I'll skip listing the ones I found beautiful, interesting, insightful and educational because I'm sure you will find others that "do it" for you.

    All in all I think it's worth giving this book a shot.

    (2 of 4 customers found this review helpful)


    A Very Good Book

    By Amar

    from Undisclosed

    Comments about oreilly Beautiful Code:

     The editing of the book, and the selection of the authors, whose articles are published are good. The articles are extremely useful for design and coding.

     The vision of the book has achieved more than my expectations.

     The interface designing addressed in the Delta editor interface chapter is very useful for the people who want to understand the system first and then to start coding.

     For intermediate programmers, the book helps you to design a solution for a problem in an optimum way.

     The topics are more about designing than coding. But the Test driven Development and writing the beautiful tests explained by Alberto Savioa are very useful for the developers who are in Test Driven Development and for the developers who want improve writing tests and who want to start practicing writing tests extensively. Coding principles explained in Code in Motion chapter are very beautiful and the discussion about Code Comprehension is something to follow for better readability of the code.

     This book helps to design and code for the given task or in developing a framework or solving a problem.

     The book covers all the topics or components of a software system, which can be designed, coded, tested, and debugged beautifully.

     I hope that publishers take enough interest to publish some more of this kind.

    The endless journey of making software systems more elegant and robust with high performance continues.

    (1 of 1 customers found this review helpful)


    Excellent. Must read for software engineers.

    By jdruin

    from Undisclosed

    Comments about oreilly Beautiful Code:

    This book is a great compilation of software design problems and solutions. Each chapter is an essay from one author which covers a particular problem in computer science and/or software engineering.

    The chapters are complete discussions within themselves and they offer different insights into how to solve problems. The solutions are geared to issues found in both the natural world and the business world.

    Of particular interest (for me) were the chapters on seraching and debugging.

    One aspect of the book that will be either a plus or a minus depending on the reader is that because each chapter is by a different author, there are many distinct writting styles used. Since I was looking towards the book to gain insight into how others solve these problems, I found this useful. Since some of the context of the thought process came through in the writting, it was more like talking to the authors rather than just reading a textbook.

    The chapter vary considerably in both topic and the thought process that went into the solution so inevitably there will be chapters that interest any programmer.

    The books chapters can be read in any order and the editor indexes the chapters well. Information is easy to find.

    Programming Pearls is of similar composition but with shorter chapters and explanations. This book goes a step further and is the next evolution of the computer science short-story tome.

    (1 of 2 customers found this review helpful)


    Learn How to Think

    By Max Luebbe

    from Undisclosed

    Comments about oreilly Beautiful Code:

    A frequent topic of discussion among those in any technical field is for a short list of essential books that anyone worth their salt has read. With regards to software engineering, two classics quickly come to mind: Code Complete, and Design Patterns, as well as a recent publication joining the ranks of these epics, Beautiful Code by O'Reilly Press.

    What makes Beautiful Code stand apart from the rest, is that it's format is so unconventional when compared to most other programming texts. The book is comprised of 33 Chapters, each written by a different author about a particular bit of code they had written and thought to be particularly eloquent. The best way to explain why this book is so wonderful is to make an analogy about the differences between learning something via a lecture as opposed to a private lesson. Most instructional books will take the lecture approach, where the author shows you one correct way to solve a problem, or complete a certain task and the reader must then digest that as best as possible. Beautiful Code is more like a private lesson in which the author of each chapter is giving the reader personalized attention by explaining their thought processes, how they arrived at each step, and occasionally showing some dead ends that didn't work out. Now consider that these private lessons are being given by such legendary names as Brian Kernighan, Charles Petzold, and Yukihiro Matsumoto - and it becomes obvious why this is a must-have addition to any serious software engineer's bookshelf. Some particularly memorable sections include Karl Fogel's discussion on the origins and implementation of the Subversion Delta Editor and the look inside Google's MapReduce technology by Jeffrey Dean and Sanjay Ghemawat.

    As stated earlier, one of the best strengths of this book is that it is language neutral. In each chapter, as the author is speaking from experience on a particular project, rather than writing a chapter for a hypothetical "Better Programming in Language XYZ", you will see code snippets in C#, MSIL, Python, Ruby, and several other languages (There's even one chapter with Emacs Lisp!). This is important because the insight gained from this book will not be diluted from one language falling out of favor or into obsolescence, and allows for the possibility of this title being just as valuable ten years from now.

    Many books will teach you how to solve a problem, but rare are those to teach you how to think. Beautiful Code is one of those select few, and will keep you coming back from project to project to consult its veteran sages of computer science. A worthy edition to any serious programmer's library, and hopefully a second volume is not far off.

    (2 of 2 customers found this review helpful)


    A classic in the making?

    By Mitch Wheat

    from Undisclosed

    Comments about oreilly Beautiful Code:

    Is this book a classic in the making? Probably!

    This book contains many diverse and wonderful chapters; the highlights for me personally were from Jon Bentley (the 'Programming Pearls' author) on "less is more", Simon Peyton Jones on Concurrency and although it was hard to pick a favourite, I think "Beautiful Debugging" from Andreas Zeller and "Distributed Programming with MapReduce" from Jeffrey Dean and Sanjay Ghemawat stand out.

    This is not an easy book, in the sense that it requires that you get into the right frame of mind to fully appreciate some of the subtleties. You might need to find a quiet corner and get into the zone whilst tackling one or two of the more difficult topics. You might even need to read the odd chapter twice before the 'Aha!' moment strikes, but it's certainly worth it. The time spent might well pay for itself several times over if it provides the insight required to solve a problem you encounter.

    I believe it is worth buying this book solely for the chapter titled "Distributed Programming with MapReduce" which lucidly describes how large-scale computations can be performed in parallel with the important MapReduce algorithm (which is what Google uses in many applications including google search, across approximately 500,000 machines!). I mentioned the original paper by Jeffrey Dean and Sanjay Ghemawat in a blog post here.

    It covers many fields all with the theme of 'Beautiful Code'. Jon Bentley (the author of Programming Pearls) talks about the 'most beautiful code he never wrote'! This chapter struck a chord because I often 'soapbox' that code should be short as possible but not obtuse. Let's face it, verbose code is just as hard to understand (if not worse) than terse code.

    If you are a programmer purely because it is the way you pay your bills, I don't think you will find much to help with your day-to-day routine in this book. On the other hand, if you are a programmer who likes to find out how things really work, and gain some insight into the minds of past master craftsman, then you should definitely buy this book.

    This book deserves a place on every serious programmers bookshelf since the lessons to be learned will not become obsolete as languages and technologies change. Highly recommended.

    There is a web site dedicated to the book here:

    [ This review originally appeared on my blog: ]

    (3 of 5 customers found this review helpful)


    Beautiful Code

    By Regnard Kreisler C. Raquedan

    from Undisclosed

    Comments about oreilly Beautiful Code:

    The talent of the contributors is undeniable and the text reminds me of the Algorithms class I took in college. The book relates how various software design architects and experts attack and solve problems while maintaining the elegance of the implementation. The range of topics include Perl, Haskell, Python and Ruby. This should give the enthusiastic developer a fresh and broad perspective on software. I have to mention that the book is developer oriented, so expect a lot of code and text intertwined.

    (4 of 5 customers found this review helpful)


    Beautiful Code

    By Anonymous

    from Undisclosed

    Comments about oreilly Beautiful Code:

    I am always looking to for new ways to look at programming problems. I love studying new programming languages in order to bend my mind in new, uncomfortable ways. Both of these are reasons I enjoyed Beautiful Code.

    Beautiful Code is a collection of essays from some well known software engineers. That said, I didn't immediately recognize many of their names (this is probably an indication of my lack of exposure in their fields of expertise). If you are like me, there is an alphabetical list of short biographical entries in the back of the book you can use to acquaint yourself with who wrote each chapter.

    There are chapters from people in the Perl, Python, Ruby, Google, Scheme, and Haskell communities (among others).

    I especially enjoyed reading about Google's MapReduce algorithm, Haskell's Software Transactional Memory, and Scheme's syntax-case macro system. These are subjects I have previously tried to tackle, but the explanations written in this book have helped me approach understanding far better than the academic papers on these subjects I have tried to read.

    You'll have to put forth effort to follow the explanations in the chapters as the authors walk you through how they tackle a given problem. This leads eventually to the solution, but may involve many twists and turns along the way. These twists and turns show how the authors think and grants us as the readers insight into how they approach the problems at hand. It's the journey to the desination that sometimes matters more than the destination.

    For example, I've long wondered abut the difference between hygenic and non-hygenic macros. Various descriptions on the web have given me some clue, but chapter 25 shows examples and explains the problem very clearly. It then goes about discussing various solutions that have been devised over the years before going into the details of the current solution that is in use today. I've seen the end result before, but knowing what motivated the solution gives me a much greater appreciation for and understanding of it.

    The effort required for some chapters may be over your head as they are for me, but those are the chapters where I find the rewards to be the greatest as they force me to look at things in new ways. Once I do achieve understanding I'm able to apply the new found ways of thinking about problems to the situations I face at work and elsewhere which has led to unique and compelling solutions that I would not have thought of before.

    I've long been on the search for beauty in the code I write. I have found that as I read and take the time to understand what others see as beautiful, even when I do not see beauty in it at first, I gain greater insights into my craft. I am glad that O'Reilly has taken the time to solicit responses from the authors in this book as it has given us a wealth of experience and expertise that we all can benefit from as we seek to gain greater insights into the various facets of beauty and elegance in code.

    Displaying reviews 1-10

    Back to top

    Buy 2 Get 1 Free Free Shipping Guarantee
    Buying Options
    Immediate Access - Go Digital what's this?
    Ebook:  $35.99
    Formats:  APK, DAISY, ePub, Mobi, PDF
    Print & Ebook:  $49.49
    Print:  $44.99