Saturday, April 16, 2005

As usual, it took doing C++ in uni for me to finally buckle down and try to grasp the language properly, as I should have done some three years ago. I got Stroustrup's book in mid-2002, but I never really progressed very far. Admittedly, my programming and design skills were not very impressive at that stage, but nonetheless I find myself disappointed that I couldn't try harder to understand things back then. It's only now that I'm being forced to learn it (and get assessed on it) that I am getting sufficient motivation to read and comprehend the subtleties of this complicated (relative term?) language.

For some reason, my interest in extreme programming (XP) was rekindled once I started reviewing C++. Test driven development, for instance, seems a pretty radical shift in the way of approaching problems. There are no silver bullets in the programming world, but the excess hype surrounding TDD has made me think I ought to give it a try sometime. The problem is a mental block when it comes to using it - the part that says "Are you crazy? This is never going to work!". I've read up on critique of XP, and most critics are asked whether they've actually tried it; some say yes, but there are quite a few who admit they haven't, just because it seems so outlandish that it will be a waste of time! Although I've read many people praising the techniques (particularly writing unit tests before coding), including the sometimes infuriating Craftsman series at ObjectMentor (infuriating because I think "Argghh, you're joking, this isn't right!", much like the protagonist!), I'm a bit skeptical when it comes to larger projects, the ones where my brain tends to let me down. Rigorously testing components there seems to be a much harder task, and refactoring and making modifications as more tests are added seems like it wouldn't be as easy. What I'm having in mind in particular are the games I used to spend my time trying to write; I'd love to see whether my "knowledge" gained by experience these past three years has given me a better chance of completing these properly. Purely because I'm familiar with it, I would want to restart work on these using C++ with DirectX - part of me thinks I should give C# a try, but maybe I should go about it one step at a time.

I'm curious as to whether there is integration of a testing framework (I'm thinking CppUnit at these early stages) with any IDEs. Lots of examples of unit testing seem to be Java based, and with IDEs like Eclipse around I can see why (you never have to leave your workspace!).

No comments: