Sunday, 20 September 2015

Book review - Clean Code

After a few years of putting it off I’ve finally got round to reading Clean Code by Uncle Bob. I’m glad I did. It’s one of a handful of books that regularly appears on lists of must read programming books.
Why do I like this book?
  • The main reason is that it’s fundamentally about how to write simple code that humans can understand. The importance of this cannot be overstated. It’s not enough that code compiles and meets all the requirements, code must be easy for other developers to understand.
  • It’s about details, and I like details. Many of the code smells and heuristics covered in Clean Code are small details. For example, unnecessary comments, vertical distance between variable declaration and usage, code formatting, method size. They may be small but when you add them all up, they make a significant difference to your code
  • Each chapter is short, easy to read and to the point. While the book as a whole isn’t short, about three hundred pages excluding appendices, you can sit down for half and hour, take in a chapter and learn something from it.
  • There are plenty of examples. Each chapter contains plenty of small examples and the last two chapters rework larger pieces of code using some of the principles covered earlier in the book.

Thursday, 30 April 2015

Book review - Peopleware

I’ve been meaning to read Peopleware ever since I heard read about it on Joel Spolsky’s blog a few years ago. It was written by two software development project managers who came to the realisation that “the social complexities on most of the projects we’d known simply dwarfed any real technological challenges that the projects had to deal with.” The book is comprised of many short examples of the types of social problems they faced and suggestions on how to deal with them. One of the key words in the last sentence was short. I imagine many other books on management are dry and long winded. Peopleware on the other hand is an easy, enjoyable read that crams a huge amount of content into each short chapter. Much like rework you can pick it up for fifteen minutes and get something out of it.

Why read Peopleware?

I’m not a manager and I have no intension of becoming a manager any time soon, so why read this book? Firstly, it’s incredibly interesting. Secondly, it’s relevant to all software developers, not just managers. For example there is advice on overtime, office environment, innovation, hiring staff, meetings, leadership, making change possible and email. And this is just scratching the surface.

What did I learn?

There’s a huge amount to learn by reading this book but a few parts stood out to me.
  • The flight from excellence. The authors talk about the friction between the client’s desire for quality and the builder’s desire for quality. The client often isn’t concerned about code quality, they just want a finished product for their consumers. Builders (developers) on the other hand get a deep sense of pride from achieving high quality code. We’ve all been there
  • Making change possible. The insight in this chapter about why people resist change really hits the nail on the head. It’s argued that the resistance comes from emotion, not logic and I can’t help but agree. There’s also some good suggestions on how to make change easier
  • Productivity. This is a theme covered by a number of chapters. Flow is highlighted as being essential for productivity, as is quiet and the avoidance of distractions like email, telephone and multi-tasking

Some quotes

I know quotes like this don’t really mean much out of context, but I still like them, so here’s are some of my favourites.
“The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted”
“The fundamental response to change is not logical, but emotional”
“Change won’t even get started if people feel safe”
“The managers function is not to make people work, but to make it possible for people to work”
“People under time pressure don’t work better, they just work faster”
“Innovation is all about leadership, and leadership is all about innovation”