Author:  Dan Fernandez & Brian Peek
Publisher: O'Reilly, 2009
Pages: 510
ISBN: 978-0596520748
Aimed at: Programmer interested in designing games or looking for inspiration
Rating: 4
Pros: A mixed bag including something that will interest most readers
Cons: Some projects fail to inspire
Reviewed by: Mike James

 Coding4Fun (or even just coding for fun) is a great idea. Programming as a hobby used to be more popular than it is today and the main reason for this is probably that it has become more difficult to create something that compares to a commercially available game or other application. The good news is that there seems to be a slight resurgence in the coding for fun movement and any book that promotes it is a good thing. The subtitle of this book is "10 .NET Programming Projects for Wiimote, YouTube, World of Warcraft, and More" and it's a collection of ten projects by different people. It therefore makes sense to review it project by project rather than as a single “this is great/terrible” judgement. Before getting started you need to know that these all make heavy use of .NET technologies and most of the programs are in C# and VB .NET.

Project 1 Alien Attack.
This makes use of the XNA programming system to create a game that is better looking than could be achieved working with a raw graphics system. However the game is 2D and fairly uninspired. The presentation is also fairly dull, even allowing for the enthusiastic style. It amounts to an XNA tutorial of which there are a few available as part of the documentation and on the web. It really doesn’t go beyond the obvious.

Project 2 Lego Solider
Another game and while this one does manage some thinking outside of the box in its use of the Lego designer it really just another tutorial on how to use Popfly to create a game. Presentation is good but it's not an inspiring project.

Project 3 Feed Reader
A project to add an RSS reader to the World of Warcraft. Its well presented and if you are into World of Warcraft then  you might enjoy it. However it isn’t going to inspire you to become involved so it is probably a minority interest topic.

Project 4 InnerTube
This is a offline YouTube video system that uses the standard API to download and convert videos so that you can watch them when an internet connection isn’t available. If you enjoy watching YouTube clips then this will appeal and it actually has a component of using something in a way that was never intended which is a part of every good “fun” project. It might even stimulate you to think up something new of your own.

Project 5 PeerCast
IHere you create a system that lets you watch videos anywhere in the world. It’s a good introduction to using a P2P approach. The problem is that most of the interesting stuff is hidden inside a provided library that does the job. There are still plenty of interesting ideas and techniques illustrated by the example but you have to take how the P2P system works on trust. The explanations also suffer from not really making the overall architecture of the application particularly clear and as a result you have to sometimes guess or infer what is actually going on. At the end of the day however you might just be inspired enough to find out how it all works and take it further. This is one of the more successful of the projects.

Project 6 Twitter Vote
Adding a polling facility to Twitter seems like a good project but it turns out to be mainly an exercise in using the Twitter API and Popfly. If it's something you want to do then it's an interesting way to get started with customising Twitter.

Project 7 WHSMail
Adding a mail viewer to Windows Home Server seems like a good idea but as a project it is best described as tough work. Unless you really want an email system based on the use of Outlook then it probably moves down a notch to become boring. You will find out about the messy details of using legacy COM objects and building a WCF application. It also suffers from long listings and weak explanations. Its simply too long and really just raises the question of why in the .NET era we are still using COM applications libraries to access MAPI mail services?

Project 8 Wiimote controlled car
This is the first of the hardware projects and it makes use of a spare Wiimote that you might already have to provide a more “natural” control of a radio controlled car, that you just happen to have. The interface to the Wiimote is via Bluetooth which is sophisticated, but the interface to the car is via a USB relay board (Phidget interface) that you have to buy and wire directly to the car’s radio control.  If you think that this is going to be a chance to learn how to work with Bluetooth devices then you are going to be disappointed. A library DLL does all the work and how it does it is left unexplained. The project is reasonable, but just explaining how to work with a Bluetooth device would have been so much more worthwhile.

Project 9 Wiimote whiteboard
The Wiimote has a simple IR tracking camera and this is used to create a remote whiteboard. The same DLL is used and again no explanation is provided. The only electronic construction required is to wire an LED in a marker pen to create an IR beacon that the Wiimote can track. The clever bit is, of course, the code that works out the correction needed to get camera co-ordinates into whiteboard co-ordinates. However if you know a little maths then this simple linear transformation isn’t that tough and certainly nowhere near as difficult as the pages of unbroken code would lead you to believe. Overall this isn’t well presented but it has enough of a spark of creativity and excitement to carry it off and this is, surprisingly, one of the better projects.

Project 10 Animated musical lights
All I have to say is that the lights are switched on and off using the pre-built Phidget interface used in the car project. As a result it amounts to “wire up the lights to the Phidget interface – I’m also not sure that the more detailed instructions would work anywhere in the world given the different wiring regulations and practices. After that we have a program that basically switches things on and off.

At the end of the ten projects you can’t help but feel that you have been subjected to a massive Microsoft publicity campaign designed to introduce you to .NET and related technologies. This isn’t surprising given that one of the authors is an “Evangelism Manager” with Microsoft and the other is a C# MVP. I’ve nothing against .NET technologies, indeed some I rate very highly, but occasionally I found myself thinking that there might be better ways to do the job given the idea was supposed to be “coding for fun”. Overall the presentation of the ideas is also very poor. Lots of long boring listings that really could just be downloaded or included on a bound-in disc. If the book restricted itself to just explaining and illustrating the interesting ideas in each project then it would be about half the size, or have 20 projects instead of 10. These are all small criticisms however and the final verdict has to be that if any of these projects completes your particular circuit then the book is well worth getting. For me they simply failed to find the right level of thinking outside of the box and, with the notable exception of the Wiimote whiteboard,  they are simply tutorial style examples that lead no where more exciting.