Saturday, October 1, 2011

My Review of 97 Things Every Programmer Should Know

A month or so ago, my wife and I were glancing through the local library. I, naturally, gravitated toward the tech section to see what they had to offer. There were some behemoth books, including Java In a Nutshell, which appeared to be about 8 inches in diameter.

I continued to work my way through the iOS books, the For Dummies titles, until a small, purple colored book caught my eye. The book was titled 97 Things Every Programmer Should Know. It's billed as the "Collective Wisdom from the Experts", and I found that to generally be true.

The book is arranged in very tiny gulps. Each topic has a separate author and spans all of 2 pages. It's a very approachable read, and it's one that you can safely pick up for 20 minutes and set down for a week.

The concepts are mid-range, technology-wise. You'll get a few code examples and references to specific hardware/software, but I never felt that the concepts were far over my head.

The authors seem to be experts or, at the very least, professionals with years of experience. The only one I recognized by name was Robert Martin. Over the duration of each article, I grew to trust each author's advice.

Generally, I knew 90% of what I read, which probably suggests good things about me. The big thing that I'll take away from this book is the idea of thinking of the opposite side of the work equation when I'm coding. Meaning I should try to think of the user, the tester, the manager when I'm working. I don't have a lot of experience with Quality Assurance testers, but I understand their role and I'm better equipped to work with them having read this.

Another concept that came up in a few different ways was to continue learning. Several of the authors recommended learning new programming languages regularly, reading the humanities, or learning other spoken languages. Communication is obviously pivotal when it comes to programming, and the advice in this book made that much very clear.




In the nugget "Pair Program and Feel the Flow" I enjoyed this particular part:
(By Gudny HauknesAnn Katrin Gagnat, and Kari Røssland)
Reduce the "truck factor": It's a slightly morbid thought experiment, but how many of your team members would have to be hit by a truck before the team became unable to complete the final deliverable? In other words, how dependent is your delivery on certain team members? Is knowledge privileged or shared? If you have been rotating tasks among pairs, there is always someone else who has the knowledge and can complete the work. Your team's flow is not as affected by the "truck factor."

Robert Martin had this insight to share:
What is a professional programmer?
The single most important trait of a professional programmer is personal responsibility. Professional programmers take responsibility for their career, their estimates, their schedule commitments, their mistakes, and their workmanship. A professional programmer does not pass that responsibility off on others.
  • If you are a professional, then you are responsible for your own career. You are responsible for reading and learning. You are responsible for staying up-to-date with the industry and the technology. Too many programmers feel that it is their employer's job to train them. Sorry, this is just dead wrong. Do you think doctors behave that way? Do you think lawyers behave that way? No, they train themselves on their own time, and their own nickel. They spend much of their off-hours reading journals and decisions. They keep themselves up-to-date. And so must we. The relationship between you and your employer is spelled out nicely in your employment contract. In short: They promise to pay you, and you promise to do a good job.
  • Professionals take responsibility for the code they write. They do not release code unless they know it works. Think about that for a minute. How can you possibly consider yourself a professional if you are willing to release code that you are not sure of? Professional programmers expect QA to findnothing because they don't release their code until they've thoroughly tested it. Of course QA will find some problems, because no one is perfect. But as professionals our attitude must be that we will leave nothing for QA to find.
  • Professionals are team players. They take responsibility for the output of the whole team, not just their own work. They help each other, teach each other, learn from each other, and even cover for each other when necessary. When one team-mate falls down, the others step in, knowing that one day they'll be the ones to need cover.
  • Professionals do not tolerate big bug lists. A huge bug list is sloppy. Systems with thousands of issues in the issue tracking database are tragedies of carelessness. Indeed, in most projects the very need for an issue tracking system is a symptom of carelessness. Only the very biggest systems should have bug lists so long that automation is required to manage them.
  • Professionals do not make a mess. They take pride in their workmanship. They keep their code clean, well structured, and easy to read. They follow agreed upon standards and best practices. They never, ever rush. Imagine that you are having an out-of-body experience watching a doctor perform open-heart surgery on you. This doctor has a deadline (in the literal sense). He must finish before the heart-lung bypass machine damages too many of your blood cells. How do you want him to behave? Do you want him to behave like the typical software developer, rushing and making a mess? Do you want him to say: "I'll go back and fix this later?" Or do you want him to hold carefully to his disciplines, taking his time, confident that his approach is the best approach he can reasonably take. Do you want a mess, or professionalism?
Professionals are responsible. They take responsibility for their own careers. They take responsibility for making sure their code works properly. They take responsibility for the quality of their workmanship. They do not abandon their principles when deadlines loom. Indeed, when the pressure mounts, professionals hold ever tighter to the disciplines they know are right. 



Here are a few of the topics that I found interesting, but in consideration for keeping this short, I'll just link directly to them:
Comment Only What the Code Cannot Say by Kevlin Henney
Continuous Learning by Clint Shank
Learn to Say "Hello, World" by Thomas Guest
Read Code by Karianne Berg
Ubuntu Coding for Your Friends by Aslam Khan
WET Dilutes Performance Bottlenecks by Kirk Pepperdine


And a list of all of the contributions in the book:



Overall, I enjoyed the book. I took a while to read through it since I had a lot of things going on, but the book is cut up into small enough portions that anyone could read for 10 minutes and get something out of it. I'd especially recommend it to junior or senior undergrads. There were a lot of great concepts, but even if the reader knew them beforehand (as I mostly did) the book serves as a great motivator.

No comments:

Post a Comment