In a recent discussion with my oldest daughter about the importance of basics and piano practice, I found myself reaching for a beginner-to-Intermediate C# 4.0 book with Post-it Flags "flagging" a large number of pages. What I hoped to communicate to my daughter (who was bored with the basics of piano) was that even though I've been professionally developing for over a decade, I'm still constantly focusing on the basics—because I'm convinced that mastery of anything only comes from a solid understanding of the basics.
How I Suckered You in to a Book Review
Ironically, what made me reach for a C# 4.0 book when talking to my daughter was the fact that I had been anguishing over whether or not to do a book review for my next DevProConnections Update.
On the one hand, I think book reviews are cheap. They're fairly easy to write and just don't strike me as being as beneficial as articles where I outline examples of how to solve technical problems or work with technology directly. On the other hand, book reviews are probably more constructive than many of my editorials/rants.
But, in musing about whether or not to spout off about Windows Azure, do an article on how to leverage SQL Server Full Text Indexing within .NET applications, or tackle a book review, I couldn't help but think about how much I had enjoyed C# 4.0 How-To (Sams Publishing), by Ben Watson—simply because of how many pages and recipes I had flagged.
C# 4.0 How-To, by Ben Watson: A Fantastic Cookbook
Simply stated, C# 4.0 How-To, by Ben Watson is a fantastic book.
Above and beyond being a great cookbook that's chock-full of recipes for C# developers, I was impressed about how it made me think about my understanding of C# basics. Recipes in this book require very little documentation, as the code defined in them is very well written to the point where it clearly defines how to solve the problems outline, or listed, as part of each recipe. The author also does a great job of pointing out potential pitfalls and addressing best practices when and where needed—making recipes more valuable than the mere code used to solve a given problem.
In no particular order, here are some other things that I really enjoyed about this book:
I found it to be a great way to "review" C#. If you think you know your stuff, then skimming through all of the recipes in this book will only take you an hour or so. And, if you do this, I can guarantee that you'll find or spot things that challenge some of your existing assumptions or make you question ways that you're currently doing things. (And while I think you could get a similar experience "cruising" C# documentation, what I think makes this book so valuable is the way it has condensed so many different aspects of coding with C# 4.0 into a single resource and the way in which the code samples are so logically defined and laid out.)
This book is vast. It covers C# language basics, numerous intermediate and even advanced concerns (such as threading), and then lightly touches upon virtually all aspects of how to use C# within the .NET Framework—meaning that there are recipes for Entity Framework (EF), working with Silverlight, ASP.NET, Windows Communication Foundation (WCF), XML, and so on. In-depth coverage of any particular topic (other than C# language basics) is beyond the scope of this book. However, but one huge benefit of this book is that many of the recipes are "linked" in ways that make learning about certain facets of the .NET insanely intuitive. For example, coverage of threading, asynchronous operations, and parallel programming was one of the best overviews of the complexity and pitfalls of "async" programming that I've seen. And it was done in a tiny amount of space with very little documentation thanks to a set of very well-crafted examples that "tell the story" themselves.