Geeks With Blogs


Google My Blog

Catch me at: The List!

My InstallScript Utility Belt My Amazon Wishlist
My Standard Disclaimer

Chris G. Williams Beware: I mix tech and personal interests here.

Crossposted from my Apress blog...

I’m learning C#.

As someone who has been using VB since version 3.0 (around 1993) and since the first beta, I’ve been on the fringes of learning C# for a few years now. Oh sure, I could read it pretty easy. Drop the semicolons and add a few keywords here and there… piece of cake. The problem was, I always tried to relate it back to VB. I never just absorbed it as C#.

At some point, I decided to actually LEARN the language. Learn it, use it and try to really GET it.

I requested a few books on C#, from various publishers… O’Reilly, Apress, MS Press & Addison Wesley. I scored a few books for experts, which I was totally unprepared for. I also scored a book on improving my C#, which I think will be handy in a few months. The real gem was a book I got from MS Press. It’s called Programming in the Key of C# and it’s written by none other than Charles Petzold.

Petzold writes well. If you’ve ever read any of his other books, you probably already know this. He doesn’t fill the pages with anecdotes or tired sarcasm masquerading as humor. He just follows an expanded version of a classic formula. He tells you what he’s going to tell you, he tells you, he shows you, he tells you what he showed you, he tells you again one more time just to be sure, then he tells you what he told you.

This cover describes the book as a “Primer for Aspiring Programmers”, and it’s definitely basic. It’s also exactly what I wanted. Yes, that means there were a few chapters I could probably skip over, but I didn’t. Not a single one.

There is an advantage to reading every chapter in a book like this. I learned C# without relating it back to VB. It took some doing of course. In the past, when reading C# code, if I saw this: int a = 16; I would think to myself: hmm, ok that’s really Dim a As Integer = 16. By actually taking the time to read every chapter, even the most basic ones, you put your mind in the right mode for learning it as C# and not “something similar to VB.NET.”

The funny thing is, while learning C# I somehow managed to learn a little more about VB.NET. When I would come across an unfamiliar concept in the book, if it wasn’t explained to my satisfaction I would google it. (This didn’t happen often.) Inevitably, the answer I would find via google would include some sort of comparison to how it’s done in VB.NET also. Occasionally, there would be some nugget of info that I didn’t already know. Pretty cool.

The book is divided into a lot of really small chapters. Unlike the gargantuan Programming Windows book, I knocked out a substantial chunk of this book over the course a weekend.

It was written prior to the release of 2.0 so there is no mention of generics or any of the other cool new stuff, but it’s definitely a worthwhile introduction to C#. After I finish this book, I’m going to spend a couple of months writing exclusively in C# (except at work, where I have to use VB.NET) before moving on to the next book on my list: Effective C# - 50 Specific Ways to Improve Your C# from Addison Wesley. After that, I’ll probably tackle the expert book from Apress: Pro C# 2005 and the .NET 2.0 Platform.

Why am I bothering? Several reasons. My eventual goal is to be able to pass the C# exams. I’ve already got my MCAD, MCSD (.NET) and MCT, and I’ve taught VB.NET a number of times (along with ASP.NET and Windows programming), but I wouldn’t feel comfortable teaching a C# class. If I can pass the C# exams, then I think I can handle the class.

Also, and perhaps more importantly, C# really does seem to be the favored language at Microsoft. Not that I’m looking of course*, but most of the product development seems to be happening in C++ and C#.

(*One of the best ways to see what kind of new exciting things are coming down the pipe from Microsoft is to look at their jobs board and see what kind of stuff they are hiring for. It’s all right there.)

Posted on Sunday, November 20, 2005 11:43 AM General Interest , Reviews | Back to top

Comments on this post: Adventures in C#

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Chris G. Williams | Powered by: