“Cleanliness is next to Godliness.”
Today, despite the trepidation, a small smile broke over my lips when I saw the email.
The message was brief but exciting, heralding the official start of the Programmer’s Book Club!
I voiced my interest in the bookclub at the end of the Web Developers Meetup Group that I attended last Thursday (See A Sangha For Soun-Ja) and today I received my official invitation to join in.
The date is set. Our inaugural meeting will be Thursday April 30th from 6pm -7pm. Earlier, a vote was conducted to determine the book we will read.
The winner is: Clean Code by Robert Martin. I have a pdf of the book already downloaded and ready to go. According to the email, we are to have the first three chapters read and ready to discuss for our first meeting.
To help facilitate our discussion, a chatroom has been created so that we can communicate with each other even when we are not in person.
I am looking forward to sharing ideas and learning from real programmers. This is an excellent opportunity for me to form the programming Sangha that I need to take my studies to the next level.
Then why the trepidation?
Well, I am a little apprehensive because I fear that I will not be able to keep up with the discussion. Further, I fear that I will not even be able to understand the book!
I am still very much a stranger in a strange land. I have learned a great deal and made some strides, but I could still be in over my head here.
So I started reading. This is really the only way for me to discover just how accessible or obtuse the book is going to be. Today I read chapter 1 and what follows is a summary.
The book opens with a cautionary tale about a software company in the 1980’s that shall remain anonymous. This company wrote an extremely successful application, however subsequent versions contained numerous bugs and often crashed. It wasn’t long before this once successful company went out of business. Years later the author, Robert Martin, met one of the employees of this ill-fated company. The person revealed that the original application had been rushed to market. As a result, the code at the heart of the app was bad code. Everyone knew it, but no one felt they had the time to fix it. As newer versions of the app became necessary the code got worse and worse. Finally it was untenable and the company collapsed!
As a fledgling programmer, reading this astonished me. Bad code brought down an entire company!
That was enough to scare me straight. I don’t EVER want to write bad code. Which leads to the question, what is good code?
The author calls good code clean code and spends a majority of the chapter defining what it means to write clean code in broad strokes. He does this in an interesting way. He interviewed several eminent programmers and asked them, “What is clean code?”
I noticed several of the same adjectives and ideas used to describe clean code by these titans of computer science. According to them, clean code is:
- contains minimal dependencies
- reads like well written prose
- can be maintained and enhanced by someone other than the original author
- well tested
- free of duplication
- written by someone who cares
It was an eye opening experience for me to read about programmers describing their work almost in the same way that an author might describe a piece of writing. In fact there are many parallels between stellar writing and clean code. Elegance, readability, and passion are necessary for writing prose and code.
After reading and digesting chapter one, I feel a little bit better about my ability to comprehend the book. But the sections that contain actual code are yet to come and I know those parts will be a real challenge.
For now, my take away is that there is an art to computer science. It is not good enough to throw something together that works. The code needs to be beautiful as well as functional, clean as well as marketable. It is up to the programmer to take responsibility for the code and do it right they first time. No excuses.