Wednesday, March 20, 2013

Book Review: Effective C# by Bill Wagner; Addison-Wesley

This review covers Effective C#: 50 Specific Ways to Improve Your C# (Second Edition) by Bill Wagner, published by Addison-Wesley. You can pick it up from Amazon or InformIT.

Bill Wagner's book, Effective C#, 2nd Edition delivers fifty easily-digested best practices to take your C# to the next level, covering a variety of topics from language idioms to dynamic programming and beyond. There are roughly 300 pages that are packed with content, striking an excellent balance of code and prose.

As a professional programmer who has used C# mostly for hobby projects, I was looking for a book that'd expose me to additional C# language features and the best practices for using them. Effective C# was just what I was hoping for.


The author divides his topics into fifty discrete items spread across six chapters. I took an interest in each item. Even in cases where I was already aware of the best practice, the discussion included enough details about what's under the hood of the C# language and .NET platform that I maintained my enthusiasm while reading them.

Wagner did a particularly excellent job at summarizing each item. After digging into the details and sifting through the code, I appreciated being able to come back up to the surface and reinforce what I had just learned.

The code examples were mostly solid, although there were a few cases where they could have been clearer. Class and interface names like Foo, MyType, and MyBusinessObject take more work to analyze than more real-life names like Customer or Account. Other names were terse, like "dlg". You can figure out that it's short for "dialog", but it'd take less effort on the part of the reader if the extra three characters were there.

The book could also be improved by adding a few more diagrams to illustrate some of the ideas, such as in the items about PLINQ. There was a case in item 9 where the author whipped up an ad hoc diagram to show an inheritance relationship, but I felt like a real UML class diagram would have communicated it in a much more standard way.

Overall, though, the book was outstanding, and I learned a lot. Naturally, to get the most out of this book, you'll want to crack open Visual Studio, and take your time to work through each of the items on your own.

Kindle Notes

I read this book on the Kindle app on my iPad. The code blocks had syntax coloring, which I thought was spectacular! Since they're stored as images, those code blocks don't come out so clearly on an ink-based Kindle. So if you've only got an ink reader, you might prefer to snag the printed version instead.


On the whole, this was a great book – well organized, and easy to read. I give it a solid 4 out of 5 stars. If you've already been coding in C# for a while, and you're interested in getting a deeper dive into the language, I'd recommend this book to you.

FTC 16 CFR, Part 255 Disclosure: I have no material connection to this book – I simply read it and thought you'd like to hear about it. The links to Amazon and InformIT are not affiliate links.

No comments:

Post a Comment

Profile Picture
Dave Leeds
My Hobbies:
  • Programming
  • Cartooning
  • Music Writing
Full Profile