Book Review: The Art of Readable Code

Lately I have been very involved with code quality, not just in terms of testing and actually working, but also on a deeper level, readability and plain good architecture. At my previous employer we had been working for a good while already applying rules from “Object Calisthenics” a concept by Jeff Bay, a simple set of exercises that helped identify bad code and improvements points. Once I saw this book show up at O’Reilly I did not blink and made a purchase.

“The Art of Readable Code” was written by Dustin Bowell and Trevor Foucher and basically focuses on concepts and suggestions to make you code not just readable, but comprehendible by other developers, or as the author’s suggest, yourself in six months. Code readability is a topic that I truly believe the PHP community does not focus enough on and i really wanted a look at this book to see what kind of ideas it had and what I could do my best to bring to the attention of other developers.

The book does not focus on any one language and has examples from PHP, Python, Java, Javascript, C and C++, which is great. But the concepts are presented in a very verbose and conversational form so that the pieces of code really play a small part and it does not matter if you do or do not know any of these languages, any developer should be able to pick it up. The book goes from variable naming, to commenting, to refactoring and even into transforming ideas into code and testing, it really does a great job of describing various developer downfalls. I even picked up a few tips and added them to my talks about refactoring and writing better code, its will surely be on the recommendation page at the end.

After reading this book you will look at you code a little different, I can assure you. I agree with most of what’s on the book (except part of the test chapter) and i really believe more developers should see these points and work on them. So if you write code, pick up this book, its a very light read and very pleasant one as well. It kept me good company on the trams to and from work, and even walking, that’s how easy going it is. So go get it, read it, learn from it and make your code better.

The Art of Readable Code Simple and Practical Techniques for Writing Better Code By Dustin Boswell, Trevor Foucher Publisher: O’Reilly Media Released: November 2011 Pages: 204 Print ISBN:978-0-596-80229-5 | ISBN 10:0-596-80229-3 Ebook ISBN:978-1-4493-1417-0 | ISBN 10:1-4493-1417-1 Buy it on Amazon

comments powered by Disqus

Related Posts

2007: Passando a régua

2007: Passando a régua

  • December 24, 2007

2007 venho, e foi. Durante este ano defini vários objetivos para mim mesmo, passei por diversas experiências, fiz muitas coisas, e também deixei de fazer algumas. Agora com o final do ano é hora de pedir para o garçom passar a régua, e ver no que deu tudo isso.. analisar tudo que aconteceu de bom e ruim.

Read More
Mini-curso: PHP e AJAX com XAJAX

Mini-curso: PHP e AJAX com XAJAX

  • May 17, 2007

Se você esta procurando aprender a utilizar AJAX aplicado em sistemas PHP e é do DF, não perca esta oportunidade!

Read More
NXT: Lego Mindstorms

NXT: Lego Mindstorms

  • August 27, 2007

NXT - AlphaRexUma vez engenheiro, sempre engenheiro.

Nunca escondi minha paixão pela engenharia e pela robotica, são coisas que me facinam a muito tempo e o fato de fazer um curso de engenharia somente aumentou meu interesse em robos e eletronicos. Mas por outro lado acho que isto tudo deriva da minha infancia, desde pequeno crescendo na Alemanha, tive contato constante com peças de montar conhecidas como “lego”.

Tenho certeza que muitos conhecem a linha de brinquedos, pequenos tijolos que se encaixam formando as mais diversas construções, desde castelos medievais até navios piratas e naves espaciais. Foi uma infancia e tanto, e até hoje tenho em casa um baú de 1,5mx1,0m cheio destas peças, sim o sonho de qualquer criança “pré-eradovideogame”. Até hoje digo a minha namorada que meu filho vai ser muito feliz, pois me perderia no tempo brincando de lego com ele, ou até sem ele!

“Anos dourados” a parte, o lego vem evoluindo constantemente, me deixando com vontade de voltar aos meus anos de criança, mas acima de tudo trazendo novos brinquedos, mais divertidos e mais complexos, e é neste ponto que entra o NXT, minha última aquisição (bem, quase, comprei uma powerball também)

Read More