TechBookReport logo




Keywords: Programming, Windows, .Net, C#, object oriented development

Title: Programming In The Key of C#

Author: Charles Petzold

Publisher: Microsoft Press

ISBN: 0735618003

Media: Book

Level: Introductory programming

Verdict: OK, but could have been better

Microsoft owe a big debt of thanks to Charles Petzold. It was his book Programming Windows that helped popularise the Windows platform to a whole generation of developers. Armed with a copy of Petzold thousands of programmers took their first faltering steps into the weird world of event-driven GUI applications. And of course the more applications appeared for Windows the more popular it became and the more popular it became the more programmers wanted to develop for it. But all of that was a long time, and many books, ago.

In his latest tome Charles Petzold aims to teach aspiring developers how to program using C#. Let's be clear here, this isn't a book for people who can already program, it's aimed squarely at those who are completely new to the game. With this in mind the author wisely sticks to programming fundamentals - data types, flow control, arithmetic and logical operators and so on. The book does not tackle the GUI side of things at all, not even on an introductory level. Nor does Petzold spend much time looking at developer tools - indeed he even supplies his own cut-down development environment so that the reader does not have to go out and grab a copy of Visual Studio .Net. (Anybody interested in this should download a copy from the web site at: www.charlespetzold.com).

Given the emphasis on core programming skills the book begins gently and moves forward in small, incremental steps that never quite pick up the pace. What is more the ideas of object orientation are not really introduced until relatively late in the day. Rather than beginning with objects, the book begins with a rather procedural view of the world, with object introduced later. It mirrors the trajectory that many of us have taken in the past, but one has got to wonder whether it isn't better to begin with objects firmly in mind. Particularly given the fact that the language being used is C#. As it is, when the first proper treatment of the subject comes in at chapter 31, which is around three quarters of the way into the book.

The code is generally quite short and illustrates the topic being discussed in each chapter. Unlike some introductory books, such as Ivor Horton's Beginning Java 2 or Head First Java, there is no central project that runs across a number of chapters. What there is, finally, is a chapter which builds a MIDI app to play some Bach (there's a musical metaphor/theme that runs fitfully through book). This little application suddenly zooms out of nowhere and is way more advanced than the material covered in the rest of the book. It feels as though Petzold wanted to through this is because he liked the idea, even if it didn't really match the level of the rest of the material.

While there isn't anything majorly wrong with this book, it somehow feels uninspired and is uninspiring in turn. The joy of programming just doesn't shine through. The material plods along when you'd want it to run forward a bit more. Perhaps if Petzold had touched on user interfaces, events, databases, networks or some other field that really made use of the programming structures he'd talked about. Perhaps if object orientation had been emphasised more. Perhaps.

In the end, this book is damned with faint praise. It's OK. It could have been much more.


Hit the 'back' key in your browser to return to subject index page

Return to home page