Thursday, May 22, 2008

Beautiful Code

The awesome people at Google have decided to send a gift (a book entitled Beautiful Code) to the students of the GSoc 2008 program.

I'm currently out of non work related reading material, so it was very well timed. I have only read around 50 pages, but am enjoying it so far. It is comprised of many different chapters written by different authors, each discussing what he feels is a piece of beautiful code. The back of the book says "...today's leading programmers walk through elegant solutions to hard problems, and explain what makes those solutions so appealing."

One of the reasons it is appealing to me is that this year I have been doing a lot of coding under time constrains, and pushing for some sort of visual signs of progress that I can demonstrate - hence hacking together a lot of code that is not very beautiful, but just works. Hopefully I'll be able to learn a couple of new tricks from this book.

Here are a couple of quotes from the end of a chapter on reducing code - Entitled "The Most Beautiful Code I Never Wrote"

  • If I had more time, I would have written you a shorter letter. (Pascal)
  • Simplicity does not preced complexity, but follows it. (Perlis)
  • Less is more. (Browning)
  • Make everything as simple as possible, but no simpler. (Einstein)
  • The cheapest, fastest, and most reliable components of a computer system are those that aren't there. (Bell)

No comments: