S h o r t S t o r i e s

// Tales from software development

Archive for the ‘Books’ Category

Pro C# 2010 and the .NET 4 Platform

leave a comment »

I’ve come to regard Andrew Troelsen’s Pro C# and the .NET Platform as the best single book reference for C# programming and didn’t hesitate to buy the fifth edition, Pro C# 2010 and the .NET 4.0 Platform, when it was recently published.

The first disappointment was that, unlike the previous editions, Apress has published it as a paperback rather than a hardback. I guess they’re trying to keep costs down but, as this is a book that you’re likely to keep close to hand as a reference rather than read once and discard, I feel it warrants a hardback edition. As a paperback, it’s a nightmare to try to hold while you’re reading it as it’s a large heavy book at 1712 pages and nearly 6lb. The ebook is not quite as heavy ūüėČ

Troelsen has to tread a difficult line for each new edition in choosing which material from the previous edition should be discarded, refreshed, or rewritten. In this edition he seems a little inconsistent in his choices. As an example, WPF is covered is detail while Windows Forms has been relegated to an appendix. Fair enough, although I’d personally have thought that the continued use of Windows Forms for commercial applications justifies its inclusion as a chapter. However, outside of the WPF chapters the examples tend to use Windows Forms. Presumably because Troelsen either didn’t have the time or inclination to rework the example code for WPF. It’s not a problem for anyone familiar with Windows Forms but it would be a problem for someone new to .NET. In effect, they’re going to have to learn Windows Forms just for the examples even though they might never use Windows Forms in any programs they write, preferring to learn and use WPF instead.

It’s also difficult to find a balance between writing a complete reference specific to this version of .NET but also highlighting the new features of .NET 4.0. Troelsen tries to do this using callout sections that highlight new or changed functionality but, personally, I think .NET 4.0 needs more than this. A preface chapter introducing .NET 4 would have been useful.

More problematic is the complete omission of some significant .NET 4.0 features. Troelsen demonstrates how to implement a plugin archtecture using dynamically loaded assemblies and reflection, i.e. the traditional way. But there is no mention of MEF. In fact, the whole 1712 pages is complete MEF-free – it doesn’t appear anywhere in the book. There doesn’t appear to be any coverage of ASP.NET MVC or AJAX either. I understand that it’s difficult to cover the entire .NET platform in a single book (although the title implies that the book does this) but surely it’s reasonable to at least mention the areas that are not covered ? Not mentioning MEF when discussing plugin programming is likely to lead some developers down the wrong path.

Finally, as regards the ebook version – in the past, purchasers of the hardcopy edition could download a free copy of the ebook. This time around Apress is charging ten dollars for the ebook. That’s still a great deal but it’s a shame it’s no longer free if you’ve already bought the hardcopy.

In summary, I’d still recommend the book but I’m disappointed at the omissions, the lack of an overview of .NET 4 changes, and that it’s a paperback rather than a hardback.


Written by Sea Monkey

July 14, 2010 at 6:00 pm

Posted in Books

Tagged with

Quick book review: Introducing .NET 4.0

leave a comment »

I haven’t downloaded any of the .NET 4.0 / Visual Studio 2010 betas so although I have a vague idea of some of the changes I thought it’d be useful to buy a book that gave a quick summary of what’s new. Alex Mackey’s Introducing .NET 4.0 with Visual Studio 2010¬†(Apress) is exactly that.

It’s probably unfair to criticize a book that’s been written against early non-production releases of the new .NET and Visual Studio and the marketing material but it is worth pointing out that some areas are covered¬†very briefly. Not only are they lacking any depth but seemingly insight as well. And while references to web sites and blogs is useful additional¬†information,¬†all too often in this book they’re used as a substitute for actual content.

Personally, I found the coverage of VB.NET changes to be an annoying irrelevance. I guess it’s not economically viable to publish two books to cover C# and VB.NET separately but it would have been better to cover the language changes as separate chapters for C# and VB.NET.

Some of the changes are given the briefest mention and are easily missed. As an example, at the bottom of page 81 there are two sentences that explain that the 4Gb¬†limit has been removed from the System.IO.Compression methods. This is a significant enhancement to anyone who’s tried using these methods for general purpose file compression in the past as the 4Gb limit often meant that these methods were not practical solutions.

Criticisms aside, the book does provide a useful primer but I suspect that most experienced developers will skim through it quickly and then bin it.

Written by Sea Monkey

February 15, 2010 at 8:00 am

Posted in Books

Tagged with , ,

Alan Cooper is an idiot

leave a comment »

Alan Cooper is an idiot.

Yes, that Alan Cooper, ‘About Face’, ‘The Inmates are Running the Asylum’, etc.

Ten years ago a friend and colleague recommended About Face to me. I didn’t buy it. To be honest, I was put off by his rants in the interviews that he did at the time. However, the following year I was in a bookshop in the US looking through a bin of discounted books and I found a hardback copy of The Inmates are Running the Asylum. It was reduced from $24 to $12.50 and I should have realised that there was a good reason for that but, based on my friend’s recommendation, I decided to give Cooper a chance and read at least one of his books. Big mistake.

But that was ten years ago and I’d happily forgotten Cooper and his dreadful book until I was having a clear out last weekend and found it at the back of a cupboard. I picked it up and opened it at random. Page 94 has a section titled, “The Psychology of Computer Programmers”. Over several pages Cooper explains that programmers are hung up on handling edge cases that most users of their software will only occasionally encounter. His view is that programmers spend too much time worrying about stuff that will only rarely happen. Without actually stating it explicitly, he’s saying that most users would prefer to have cheaper or more functional programs that occasionally crash than expensive robust programs. He’s saying that, for example, people would be happy to lose several hours work when their word processor crashes because they mistakenly tried to save a document to a read-only CD-ROM drive (and the programmer hadn’t allowed for this possibility) because the program was a few dollars cheaper than a competitor product. Idiot.

Let’s try another random selection: page 214. There’s a screen shot showing the UI of what looks like a telephony application. It looks like an integrated telephone and answering machine. That’s because that’s what it is. At a superficial level at least, this makes sense. If it’s a telephony program that mimics a telephone and answering machine then it’s reasonable that the developer should use a UI that’s familiar to anyone who’s used the real thing. But according to Cooper: “The interface is undeniably beautiful, particularly if you’re a gadget-loving technophile, but its use is inscrutable.” What ? Has Cooper not used a telephone before ? It has a telephone keypad and some buttons that you’d expect to see on a telephone/answering machine like Screen, Mute, Hold, etc. It’s not that hard Cooper. What’s wrong with you ?

Again, I don’t doubt that if the developer had devised a completely new and innovative UI for a telephone answering application, it’d be Cooper screaming the loudest that the developer had ignored a common and familiar real-world interface and invented a poorly designed and unintuitive UI. You can’t have it both ways Cooper.

I know I’m being more than a little unfair and the bombast is ‘Cooper-style’ to give him some of his own medicine but if this book is typical then he’s very arbitrary and inconsistent in his criticisms. Which is exactly why I consigned his book to a dark cupboard and forgot about it for ten years.

Written by Sea Monkey

February 20, 2009 at 2:00 pm

Posted in Books

Tagged with

Be more effective

leave a comment »

Of all the C# books that I’ve read, Bill Wagner’s Effective C#: 50 Specific Ways to Improve Your C# stands out as one of the best. Each of the 50 topics covered is treated as a short essay and is written in a thought provoking and engaging manner. It also doesn’t matter too much about reading the topics in sequence so it’s easy to pick the book up, browse until you see something that interests you, and start reading. It’s one of the few books that I keep coming back to when I want to read something that might help me become a better developer.

The follow up, More Effective C#: 50 Specific Ways to Improve Your C# has finally been published and it arrived on my door mat yesterday. I pre-ordered it well over a year ago when it was due to be published in September 2007. The fact that it’s over a year late is, I suspect, mostly due to Bill having to play catch up with Microsoft as the new book was intended to focus on C# 2.0 but then C# 3.0 came along. The new book covers both versions 2.0 and 3.0.

I’ve only flicked through it and read the first 20 pages but,¬†so far,¬†it looks like a worthy follow up to the original book.

Written by Sea Monkey

October 23, 2008 at 8:30 am

Posted in Books

Tagged with