Monday 17 November 2008

Clean Code by Robert C. Martin Review (Ch.1)

I recently bought the new book by one of my favourite software development writers, Robert C. Martin (Uncle Bob). I consider myself an experienced software developer and perhaps should already know how to write "Clean Code". Hopefully this book will give me confirmation that I'm on the right track but also I hope to learn a thing or three.

This book is Java programming orientated but the principles should easily transferred to any other programming language. Since my programming language of choice is C# I decided I'd give the book a review and translation to my way of thinking in C#.

Chapter 1: "Clean Code" is the argument for the existence of a book about writing clean code and why it is important. These arguments are well put and well documented in other literature. In a nutshell, code is read more often than it is written and this is as true on new projects as it is in maintenance tasks.

I have no problem with this, the problem comes in the definition of what "Clean Code" looks like. Uncle Bob saves the day by not claiming that this book is the be all and end all definition of what clean code should be. He simply says that the book represents the current opinion of Uncle Bob and his compatriots. Therefore it is open to your modification and, possibly, improvement.

I like that. It gives me the opportunity to think out how I may apply this to my own work without necessarily getting too dogmatic.

As I read the book I'll post my review and C# translations here.