Book review – Debug It!: Find, Repair, and Prevent Bugs in Your Code

41wUoTodBVL._SL160_[1]

I bought Release it! some time ago, and it was a really good book. Now Pragmatic Programmer released a new book in their ‘do it!’ series – Debug it!, so when I got a change to snap a copy, I did, and I’m here to let you know that it is a remarkable book.

First of all, I think the title might be a little misleading for some people. It is about debugging in a broader sense than most people define it. If for you debugging equates dealing with debugger, you won’t find much of that in this book. The book talks about debugging as in getting the bugs out of your software (and doing your best to make sure they won’t come back).

The book is divided into three parts:

The first part, which accounts for almost half of the book, talks in great detail about four stages of dealing with bugs in your code – reproduction, diagnostics, actual fix and reflecting over reasons why the bug was there in the first place. There is not much earth shattering here, and when reading this part you’ll (hopefully) think to yourself – “yeah, I knew this” and “sure, it makes perfect sense”. The fact that this all common sense, and rules of thumb are gathered in one place though, and backed up by concrete discussion and good anecdotes helps you organize your workflow when dealing with misbehaving code. The fact that what you felt under your skin is said out loud makes you stop and realize there’s deeper meaning to all this.

Second part is relatively small, but concentrates on very important topic – working with people. That includes both, working with QA department and users as well as working with bug tracking systems. It discusses what makes a good bug report, what it should contain, what it should not contain etc. This part was a revelation, and if I could I would make it mandatory to read for all my clients, and people submitting bugs to OSS projects I contribute to. Then it moves to pragmatic approach towards working with bugs (hey, it’s a Pragmatic Bookshelf book after all). It talks about perfectionist attitude of bug-free software, and working with software that is riddled with bugs, which was interesting to read in the context of Tim’s post.

The final part, is a loosely connected group of topics, though it is as valuable as the previous ones. It talks about special cases, like service releases, about building the ideal debugging environment, which I found particularly interesting as this is topic close to my heart, although I would disagree with the author, who discourages extensive use of branching is source control. We also get a chapter on how to make software easy to debug. The book ends with list of anti-patterns along with discussion about how to remedy them.

I know that this book influenced the way I work now, and there aren’t many books I could say something like this about. It discusses extremely important part of software engineer’s profession, and does it very well. If you call yourself a pragmatic programmer I think you should read this book.

Technorati Tags: ,

Book review – C# in Depth, 2nd edition

Note, that this is a review of very early MEAP release – this is not complete book, and I review only 2 chapters that are available at the time of this writing.

skeet2_cover150[1]

If you are at least a casual user of StackOverflow you know who Jon Skeet is. Jon has a hard earned reputation of being an expert in just about anything he touches, so it came as no surprise that first edition of his C# in Depth book was universally praised for its high quality.

Fast forward almost 2 years later, we’re awaiting new version of .NET framework, along with its tools (Visual Studio) and what’s more important – new version of C# language. So while some of us are cheering for the new features and scenarios that new improvements enable we’re all faced with a task of upgrading our knowledge with this information. Here’s where Jon comes to the rescue with second edition of the book.

So far two chapters are available, both covering new additions to C# 4.0. “Minor changes to simplify code” talks about optional parameters, named arguments, COM improvements and generic variance. “Dynamic binding in a static language” is all about the dynamic keyword and all the things around it. The whole book however is going to talk about improvements introduced in earlier versions as well, and how they fit together in the grand scheme of things.

This is a language book, and language books tend to be either focused on a newcomer to the language, or try to satisfy both newcomers as well as people with experience which results in tomes of monstrous sizes. If you’re concerned that this is the case with this book – rest assured. This book is “lean and mean” – it does not waste your time explaining basic principles that would make you yawn or skip pages. It’s also very focused and concentrated on getting you up to speed with new features. It is really very well balanced in that it spends just enough time for you to grasp the feature, and then move on to the next one.  The only place where I felt lost was generic variance and higher order functions, but this is very convoluted stuff, so it’s not a downside by any means.

The book not only describes features from a bystander’s perspective, but is full of opinions and tips about them, which is arguably the best aspect of this book, and something that differentiate it from MSDN documentation or language specification.

That’s the great value of this book – it’s incredibly well written, and after you’ve read it, you feel like you not only know what the new features are – you also feel like you know how to put them into good use, how they work under the cover, what are their limitations, and how you might go about overcoming few of them. If you’re looking for a quick way of getting up to speed with C#’s fast progress, search no more – this is the book for you. Highly recommended.