Third Shelf

Programming pragmatically

Posted in books, dont-program-if, productivity, reviews by Sydney du Plooy on June 13, 2010

Don’t program if… you have not yet read The Pragmatic Programmer: From Journeyman to Master by Andy Hunt and David Thomas. I never understood what all the fuss was about and here I am making a fuss about it.

pragmatic 1540s, from M.Fr. pragmatique , from L. pragmaticus  ”skilled in business or law,” from Gk. pragmatikos  ”versed in business,” from pragma  (gen. pragmatos ) “civil business, deed, act,” from prassein  ”to do, act, perform.” (1)

Pragmatic programmer

So, what makes a pragmatic programmer? A pragmatic programmer is someone who exhibits certain attitudes and practices when thinking, writing, testing and deploying software. This includes being an early adopter or fast adapter, being inquisitive and thinking critically. It also means being realistic and being anything-ready. And to be anything -ready one must learn continuously.

One of the major philosophies is to always place the problem and the solution in a larger context. This means to always think beyond the immediate problem and see the bigger picture. Why? Simply, so that you can make informed decisions such as deciding where to comprise and where to apply the Pareto principle.

A pragmatic programmer takes responsibility for everything they do. They don’t just sit there and watch the code rot. A pragmatic programmer will always endeavor to keep the code pristine.

Instigating change is another important skill that a pragmatic programmer must learn to apply. People are naturally opposed to change and in order to be a pragmatic in a software project, it is sometimes necessary to break the “we have always done it like this” mentality.

Skills and Tools

Using the appropriate tools is one of the best ways to amplify your productivity. Try various tools and pick the ones that work for you. Then, learn them extremely well. Mold them to the shape of your hand. Consider the following categories of tools:

  • Source control
  • Text manipulation
  • Debugging

Another important tool is to be able to touch type. This is a worthwhile skill to learn, so be prepared to put in a lot of time.

Life as a pragmatic programmer

Being a pragmatic programmer does not make you write perfect programs. Accept it. Things will go wrong and when they do, we should ensure that the data always remain consistent. As the book says “dead programs tell no lies” and sometimes it is best to just simply kill it.

As long as there are people, software will change, continuously. That’s life. Pragmatic programmers guard themselves against the impact of these changes by observing the Law of Demeter (it’s not a dot counting exercise) and decoupling dependencies. Keep separate concepts separate.

Coding is not just a matter of transcribing requirements into source code. It is a continuous process of making decisions. Decisions that will either pave your way or cause you grief later on. The choice is yours. Think critically about every line of code and remember to refactor continuously. Test, test and test some more.

While building software, there are two important principles that a pragmatic programmer always observes. These are avoiding duplication at all costs and avoid splitting a piece of knowledge across multiple components. Failing to observe these two principles will invariably bring you headaches in the future as the source code spirals out of control.

This is the way of the pragmatic programmer.

By the way, there are loads of tips in the book that will not only benefit you now, but for as long you write code.

(1) Dictionary.com, “pragmatic,” in Online Etymology Dictionary. Source location: Douglas Harper, Historian. http://dictionary.reference.com/browse/pragmatic. Available: http://dictionary.reference.com. Accessed: June 13, 2010.

Follow

Get every new post delivered to your Inbox.

Join 144 other followers