sábado, 4 de diciembre de 2010

Essential readings: Pragmatic Programmer

Pragmatic Programmer
by Andrew Hunt and David Thoma. 1999.


(33$ kindle edition, 29$ paperback edition in Amazon.
Incredible, <españolada>we are all crazy</españolada>).

When I came to Barcelona in 1997, this was the first task in my first serious job. I was asked to read this book in order to understand the basis of their job, and I found it quite illuminating. I want to spread this good practice :)

In my humble point of view, this is a great compilation of good practices about programming, and simply being, as you may read below:

[From the book]
While software development is immune from almost all physical laws, entropy hits us hard. Entropy is a term from physics that refers to the amount of ``disorder’’ in a system. Unfortunately, the laws of thermodynamics guarantee that the entropy in the universe tends toward a maximum. When disorder increases in software, programmers call it ``software rot.’‘
There are many factors that can contribute to software rot. The most important one seems to be the psychology, or culture, at work on a project. Even if you are a team of one, your project’s psychology can be a very delicate thing. Despite the best laid plans and the best people, a project can still experience ruin and decay during its lifetime. Yet there are other projects that, despite enormous difficulties and constant setbacks, successfully fight nature’s tendency toward disorder and manage to come out pretty well.
What makes the difference?
In inner cities, some buildings are beautiful and clean, while others are rotting hulks. Why? Researchers in the field of crime and urban decay discovered a fascinating trigger mechanism, one that very quickly turns a clean, intact, inhabited building into a smashed and abandoned derelict .
A broken window.
One broken window, left unrepaired for any substantial length of time, instills in the inhabitants of the building a sense of abandonment—a sense that the powers that be don’t care about the building. So another window gets broken. People start littering. Graffiti appears. Serious structural damage begins. In a relatively short space of time, the building becomes damaged beyond the owner’s desire to fix it, and the sense of abandonment becomes reality.
The ``Broken Window Theory’’ has inspired police departments in New York and other major cities to crack down on the small stuff in order to keep out the big stuff. It works: keeping on top of broken windows, graffiti, and other small infractions has reduced the serious crime level.
Don’t Live with Broken Windows
Don’t leave ``broken windows’’ (bad designs, wrong decisions, or poor code) unrepaired. Fix each one as soon as it is discovered. If there is insufficient time to fix it properly, then board it up. Perhaps you can comment out the offending code, or display a “Not Implemented” message, or substitute dummy data instead. Take some action to prevent further damage and to show that you’re on top of the situation.
We’ve seen clean, functional systems deteriorate pretty quickly once windows start breaking. There are other factors that can contribute to software rot, and we’ll touch on some of them elsewhere, but neglect accelerates the rot faster than any other factor.
You may be thinking that no one has the time to go around cleaning up all the broken glass of a project. If you continue to think like that, then you’d better plan on getting a dumpster, or moving to another neighborhood. Don’t let entropy win.

From: http://pragprog.com

2 comentarios:

  1. Yes that is a great and inspiring book, focussing on the everyday life of programmers and giving advices that really can be followed. Another "must-read" is Code Complete (http://www.amazon.co.uk/Code-Complete-Practical-Handbook-Construction/dp/0735619670/) which, as its name implies, is very complete and is more focussed on coding activities.

    Keep on with this great blog !

    Thibaud

    ResponderEliminar
  2. Thanks Tibo!

    I think I have never finished reading that book, I will re-read through it.

    See you soon :)

    ResponderEliminar

Nota: solo los miembros de este blog pueden publicar comentarios.