Archive for September 2009

Learning C# and WPF

A while back, I decided that I was going to use C# and Windows Presentation Foundation (WPF) to implement any Windows desktop applications that I write.  I had some exposure to both technologies at my last job and want to learn more of them.  I liked what I saw of the C# language and I think that WPF is a fantastic platform for developing user interfaces.

When coming up to speed on new programming technologies, I really prefer using books to get started rather than searching online.  Books are great for a couple of reasons:

1) A solid chunk of information in one spot rather than having to piece together bits scattered all over the internet. A book is also usually presented in a logical order with the early chapters being basic fundamentals and subsequent chapters building on that.

2) A book has been reviewed and edited so that the information in it is almost always accurate (although sometimes a bit out of date). When you find a random article through Google you really have no idea if the information presented is accurate in any way. And even worse, the information you find is often not dated so you don’t even know if it’s recent.

Google is your best friend when trying to find an answer to a specific question, but it’s really hard to to know what questions to ask when you are unfamiliar with the topic at hand.

I’ve been using the following books to learn C#/WPF:

Professional C# 2005

I got this book a few years ago and it’s decent as an introduction to the C# language. It goes over all of the C# syntax and language features – it’s not bad, but not great either. The major downside is that it only covers version 2.0 of the language (3.0 has been out for a while, and 4.0 is on the way). There is an updated version, Professional C# 2008, which covers C# 3.0.

C# in Depth: What you need to master C# 2 and 3

I’m still working my way through this book, but so far it’s fantastic. The book focuses on detailed explanations of the advanced features that were added in C# 2.0 and 3.0. If you want to really understand of inner workings of the C# language – this book is for you. Due to the advanced topics that it covers, the book assumes that you already know the basics of C#.

WPF in Action with Visual Studio 2008

This book starts off with talking about the history of UI development, covering both Windows drawing and web UI design. It outlines the flaws in these previous approaches to UI development and explains the technical design goals of WPF. It’s interesting background information and I found it helpful to know the motivations behind the design of WPF. The rest of the book covers a set of carefully selected topics in great detail. It’s by no means a comprehensive reference for WPF, but what the book does cover it covers very well. There’s a lot of “how” and “why” explained so that you get a full understanding of each topic. The book is written with a good sense of humor so it’s very easy to read. As of this writing, it’s also the most recent WPF book published and covers .NET 3.5 SP1.

Programming WPF

This book is big (863 pages) and covers a wide range of WPF topics with a good amount of detail. Like WPF In Action, the writing style is excellent and the authors make the material relatively easy to understand. Its topic coverage is a little different than WPF In Action (with some overlap, obviously) so the two books complement each other well.

Development Project : Hello, Internet!

One task that every home computer user needs to do from time to time is to troubleshoot their internet connection.  Even for computer savvy users this task can be a bit of a chore.  A web page isn’t loading – is the problem with the website?  Is it my computer? Is it my router?  Is it my cable/dsl modem?  Is it my ISP?  Is it none of the above?  For inexperienced users, trying to resolve the problem can be overwhelming.

Finding the source of a network connection problem often requires one of more of the following:

  • Run ipconfig from the command line
  • Run tracert from the command line
  • Checking various properties in Control Panel
  • Restarting the network card
  • Rebooting the computer
  • Contacting the ISP

Not only does a user need to know about how run several different tools, they also have to know how to interpret the results.  My goal is to write a single application that will be able to walk the user through (and perform when possible) all of the troubleshooting steps needed to diagnose a broken network connection.

The requirements for the application are as follows:

  • Provide a streamlined interface and detailed information for advanced users
  • Walk novice users through the troubleshooting steps – explain the results and suggest steps to take to resolve the problem
  • Educate users that are interested in learning more by explaining various network terms and describing what test results mean and explain why resolutions are suggested

I would really like this application to be something that is useful for everyone.  Too many tools are targeted solely at users who already know what they’re doing.

The idea here is that advanced users (like me)  will be able to do network troubleshooting by running one tool instead of several.  Novice users will be able to do their own troubleshooting and not have to bother computer savvy friends or relatives every time their network connection goes south :) .

If you have any comments, questions, or would like to participate in beta testing when it’s ready then head over to the forums.