Wednesday, 2 January 2008

Accelerated C# 2008 by Trey Nash (Apress)

An aside about this review...

I volunteered when an email from Apress asking for “fresh voices to write about [their] recently published, hot-off-the-press .NET 3.5 titles” was circulated to the members of the Perth .NET Community of Practice late in 2007. In return for reading two electronic books and posting a review of each to the Amazon, Barnes & Noble, and bookpool sites, Apress promised to supply reviewers with the printed versions and an additional ebook. Apart from the freebie, I thought this would be a great opportunity to freshen up my skills and interact with a significant technical publisher. Apress withdrew their offer of the free printed books due to a large response but I’ve got to say this was nonetheless a very cool offer on their part.

That said, I must make two key points:
  • My review is entirely unbiased and the free offer was by no means inducement to write a positive review. My favourite titles to date have originated from Microsoft Press, Addison-Wesley, and Wrox and I hate nothing more than wasting my time with a weak book from a publisher that pays little attention to detail.
  • I don’t write books about Information Technology and I don’t produce the technology to support the software production process; apart from an undergraduate English Literature degree, a master’s IT degree, and four very intense years on the ground, I’m not an authority on anything, let alone C# and .NET 3.5.

This is the first review of two. The second review will be for Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition and will follow soon (I’m a slow reader).



Accelerated C# 2008 is one of those books you stumble across every so often that answers so many questions you know it will reside on your bookshelf for some time to come. Trey Nash offers an in-depth look at C# 2.0 and 3.0 without the excess material most experienced developers are already familiar with. Although the book is strongly focussed on C#, many of the concepts discussed can also be extracted out and filed under the broader titles of object oriented development and software design. Bringing together a book spanning many of the changes and new features from .NET 1.1, 2.0, 3.0, and 3.5 is a big ask and despite a few minor issues I’d recommend every developer working with C# 2.0 and on read this book.

The book is a mere 510 pages but in my mind that makes a text like this all the better. Nash’s writing style is to the point and meticulous, skimming over concepts with which most experienced developers should already be familiar in early chapters (“this is a book for experienced object-oriented developers”) and diving in to cover some of the great features introduced with C# 2.0 and 3.0 at close range. After years of reading about the superficial aspects of boxing and learning about generics and iterators first hand, for example, I finally understand the underlying mechanics of these issues that simply aren’t covered in the MSDN documentation and high-level technical articles. More importantly, I now feel I have the knowledge to discuss these concepts and put together truly effective designs from the information acquired from this book.

As a fairly advanced, special-topic book, I wouldn’t classify this as an academic text but the author discusses each topic in a fairly “textual” manner. In other words, there is a strong focus on how the C# language embodies specific concepts before delving into the practicalities and code samples. Individual subjects are examined in detail but are also related to the CLR, object oriented and functional programming concepts, best practices, and coding efficiency. This is personally my preferred format but I wonder if it will appeal to a broader audience.

My favourite chapters include the rather lengthy chapter four (“Classes, Structs, and Objects”), chapter eleven (“Generics”), and chapter thirteen (“In Search of C# Canonical Forms”). Chapter thirteen in particular was a great starting point for defining key considerations when designing types in C# and despite its length, I think this chapter could have gone further.
The title of Accelerated C# 2008 sounds to me like a marketing title. I say this because

a) there’s no such thing as C# 2008. There’s C# 3.0 and Visual Studio 2008 but they’re not the same thing; and more importantly

b) while most chapters in the book apply to C# 3.0, all but the final three chapters describe features specified with C# 2.0 and shipped .NET 2.0/Visual Studio 2005.

The first point is just me being nitpicky. The second point stems from a nagging feeling I had while reading this book that it was originally written as Accelerated C# 2005 and jazzed up at the last moment to reflect the changes and improvement brought about by C# 3.0. The structure of the book reflects this assumption as only the last three chapters relate specifically to C# 3.0. If you currently work with C# 2.0 day to day you won’t go wrong with this book—it’s filled with many insights and gems that can only be learned by experience or taught by a great teacher (eg. Nash); as a C# 3.0 book, however, I think there’s room for improvement. To illustrate this gripe, the author frequently indicates many of the language features new to C# 3.0 are there to support LINQ but the final chapter in the book (“LINQ: Language Integrated Query”) barely scratches the surface. Other resources are referenced but this is one subject that should have been examined at greater length at the cost of some detail.

It would have also been helpful to have the various code samples in each section align better with each other. There’s nothing more frustrating than reading about employees in the context of one topic and Bluetooth radios in the next. I think the IT publishers as a whole need to do better at this. I also would have liked to see a few more guiding comments in the code samples covering trickier aspects of the code. Overall, however, the code samples are well formatted and concise and illustrate the discussion very well.

The book in general is formatted and organised very well and despite the heavier material it contains, the book is a pleasant read. The chapter summaries seem to follow the old presentation approach of tell ‘em what you’re gonna tell ‘em, tell ‘em, and then tell ‘em what you told ‘em; as a result, each chapter summary quickly rehashes the chapter content at a very high level where it would be preferable to have a decent summary that makes theses bits worth reading. As Nash is obviously a well read individual, I was also really hoping for an annotated bibliography.

Overall, I loved this book. It was a great refresher on some of the aspects of C# 2.0 I deal with less frequently and tend to forget about, a thorough insight into what it means to think like a really, really good developer, and a good introduction to C# 3.0. I’m looking forward to the next edition when C# 3.0 has matured and the author has some really C# 3.0-specific insights to convey.

1 comment:

  1. It was a nice, helpful review. Thank you.

    ReplyDelete

Spam comments will be deleted

Note: only a member of this blog may post a comment.