Tuesday, December 12, 2006

Book Review: Agile Principles, Patterns, and Practices in C#

I’m not completely through this book yet but it’s such a great one that I wanted to plop out a quick review of it to pass on the word.

Are you sick of books on XP which seem too much like mystical hand-waving with really shitty lousy examples of paired programming sessions?  Are you sick of books on patterns which are too convoluted and abstract to make any sense at all?  Are you sick of books full of silly, contrived examples which don’t make any real-world sense?  What about books on UML which approach it from a near-religious dogma direction with no room for any deviation or common sense?

If so, then you badly, badly need to read Agile Principles, Patterns, and Practices in C# .  This book, written by the father/son team of Robert and Micah Martin is part of the impressive Robert C. Martin series on Agile from Addison Wesley/Prentice Hall.

This book is amazingly great from start to finish.  All the basics of good agile development are covered clearly and sensibly in the first section: what agile is, how to go about it, why testing and planning are so critical, and where refactoring fits in all of this.  Design and general patters are hit in the second section, again in a clear, concise, and sensible fashion — and with common sense thrown in. 

The final two sections cover a real-world case study implementation of a payroll system.  Here the rubber meets the asphalt: walking through use cases, building transactions based on smartly-chosen patterns, discussion of what patterns make sense where and why, implementation, packaging, and evolution.

I found myself shaking my head in wonder as I read this book and stumbled across one nugget of gold after another.  Some bits of goodness pop out in the middle of nowhere simply because the authors are so well-versed in their domain that they’re letting fly wisdom even when discussing other topics.  An example of this is in the XP pairing session episode where some discussion of increment operator side effects is tossed in the middle of another discussion stream.  You read that section once and pass over it, only to do a head check, bounce back and re-read it while nodding your head and saying “Yeah, that’s absolutely right and I might not have caught that otherwise.”

As an aside, this book had the first XP paired programming episode I’ve ever read which didn’t make me barf.  Other example episodes were so contrived and smarmily written that I thought for sure I was going to heave.  This pairing epsiode is real life stuff, complete with some strong discussion between partners, good examples of refactoring and patterns, and also shows the developers making and recovering from various mistakes.

Another bit of greatness is the chapter on UML.  The authors are emphatic about keeping UML tightly in check and using it only in specific cases where it makes clear sense.  Mountains of UML diagrams are not the answer; the authors show where a few concise diagrams make perfect sense.

More goodness can be found throughout the book in the gems relating to any number of design issues such as a small example of a problem the authors put forth to students of their various design/patterns courses: build a coffee maker.  The authors go through the most common result they see and show the specific problem areas of that solution — and then show a solution that is amazing in its simplicity, elegance, and maintainability.

Micah Martin, the co-author and son of the other co-author Robert Martin, makes a great statement in his introduction to the book.  He talks about his father’s first edition of the book (winner of the 2003 Jolt Award) not making much of an impact on the .NET community.  This new edition, specific for C#, certainly should make a tremendous impact on the .NET community.  If it doesn’t then we have ourselves (or our colleagues) to blame for not caring enough to improve ourselves by reading seminal works.

This book is a critical read for folks at any level of experience.  I’m going to do my best to make sure it gets on the required reading list for developers at my company.

(Go register for CodeMash, by the way.)

No comments:

Subscribe (RSS)

The Leadership Journey