Tuesday, July 8, 2008

3 months in

I have been teaching myself C# for about the last 3 months now. My background was in C and Assembly and sometime last year I picked up Python. Python was a lot of fun. I didn't need to understand much about OOP to get started and was still able to be functional from day 1.

C# hasn't been so easy. I purchased 2 books on learning C# from Apress, "Beginning C# 2008" and "Beginning Visual C# Express 2005". Knowing what I do now they are great books, however, coming from a C/Assembly background they did not allow me to learn the language. I feel the reason for this is limited exposure to OOP in these books. One of the books had 1 chapter on OOP while the other had 2. After reading both books I was frustrated, lost and thinking about ditching C# all together. That was when I decided to try a different approach.

I went out and purchased "The Object-Oriented Thought Process" by Matt Weisfeld. I have to say that this was the best thing I could have ever done to get a grasp on C# and OOP in general. Most of the code samples were in Java but C# is similar enough that I was able to follow along without getting lost. I learned a lot from this book and plan to reread it several more times to get a better grounding in OOP. It also opened up some new areas I didn't know about, UML for instance. For anyone coming from a procedural background I can't tell you how invaluable this book is.

I then went back and reread my previous 2 purchases and have been happy with the content. The Visual Studio book got me started on creating UIs for my apps, something I have never had a need for. The 2008 book taught me about writing tests for the code that you are writing. This was something new and after trying it out I felt it added alot to my learning ability. I even picked up a new book "Pro C# 2008 and the .NET Platform. This was definitely the next step in C# books for me. It was around this time that I began speaking with a co-worker of mine, Adron, about some of what I was working on. Talk about opening a can of worms.

Adron is one of those guys that if he couldn't do it he would be teaching. I am not talking about the boring lecture types but the one that gives real world concrete examples. He also has a ton of knowledge on process that I never had any exposure to. He starts throwing out terms like "Agile Programming", "Unit Testing", "Refactoring", "Design Patterns". I am just looking at him like he is speaking a foreign language, because he is. That was when he did something I hadn't expected, he gave a 5 minute brain dump of it all. Not everything mind you but enough to wet my appetite and show me why they were important. Now I was hungry again and off to the bookstore to find out what I could on these "new" processes.

So I take a look at all the books they have to offer and realize I am not going to dump $300 on the books I want so I prioritize the list of processes and Test Driven Development rises to the top. I felt that at this point I was going to get the most out of TDD. For some reason I couldn't find anything on TDD in C# but I did find the next best thing, TDD in Java using jUnit. Again Java is close enough to C# that I can follow along and jUnit is close enough to mbUnit as well. I purchased "test-driven development A Practical Guide" by David Astels. So far it has been an exceptional book. It has some minor coverage on refactoring and design patterns already in it. This is another highly recommended book.

The frustrations have been hard but the rewards are starting to pay off.

Some things that I would really like to see change is an improvement in the documentation surrounding mbUnit. I end up using the nUnit documentation to figure out where to start from then fill in the blanks. I suppose it is pretty smart to have another project providing your documentation but until Adron told me to look at the nUnit documentation I didn't even know the project existed. Here is a perfect example. Perform a google search on mbunit and exception assert. I didn't find an mbUnit page until the 44th entry. With nUnit it was the first entry returned.

No comments: