Sunday 22 March 2009

What a Git!

Unfortunately I've not been able to do much with my mono algorithm project lately since publishing the first piece of code which is a shame, the plan though is to start implementing different algorithms starting with some from the C++ STL library. I don't really have a plan yet of which ones so it will most likely be which ever ones interest me and which I'd like to learn more about such as binary searching and various sorting algorithms.

One thing this has prompted though is version control, and I now realise that I really don't know enough about them. Historically I've been use to commercial systems with nice UI's letting me point-and-click for what I want to do. Now however I've got to think about working (possibly) with more people spread over a larger area and not the few guys sat around me. Because I went with Google Code in the end I've restricted myself to Subversion which isn't to bad as I have at least a little experience with CVS but I still could really do with learning the basics again.

I am a little disappointed however as I've recently been reading about using distributed version control systems such as Git and Bazaar which I really love the idea of using. One of the things I really like is having local branches to work on which have no impact on other peoples work unless they start viewing my repositories. The advantage of this has become clear lately at work where a few of us are working on a project where each section is being developed in a seperate branch in CVS, the problem here is the proliferation of branches and keeping track of them. In a distributed world we would all work independently of each others branches and then commit our changes to a main repository which would hold the final code base.

Anyway, I'll need to pick up Subversion soon but I think I'll be investigating the distributed systems as well as I think that they are the way forward.

Finally in C++ and sucky support

Well the time has finally come and I'm now coding with C++ professionally, depending on your definition of professional! And to ease myself into it I've been given the task of writing the code for CRC-32 and MD5 generation, which has so far been driving me nuts. First of there has been issues with reversing streams of data and then with reversing the bits of the finished hash as well as learning how to generate the hashes in the first place.

Whilst I've been doing this I've been making extensive use of Google for getting answers to some awkward questions and what's been frustrating is the level of support out there. After a while digging through various links re-phrasing the question exactly right and making various blood sacrifices you do eventually find something which gives you the answer you want or at least provides enough information to figure it out yourself. But what I have found in various forums is a set of responses which frankly disgust me, two of my most despised are:

1. We are not doing your homework for you
2. Why are you doing that in the first place it's just stupid

These kind of responses firstly don't help anyone and secondly they can be detrimental to the site they were posted on, whose going to want to re-visit a support site where when you ask for help you just get grief? Certainly in my case they don't help because:

1. I don't have time to spend days researching a problem I've got deadlines to meet
2. Sometimes we don't have a choice to do things in a certain way

I've maintained some apps before where I've seen developers try to manipulate code and algorithms in ways that shouldn't be possible or even legal but I've still got to support it and the company I'm working for at that time may not be willing to pay for me to re-do it properly.

So really if you are on a support site and someone is asking for help, try to help them, by all means offer them advice on how it could be done better but don't expect that they can do things that way and if you are going to reply make it useful, if you don't want to help someone then just don't post a reply and move on to the next item.