Showing posts with label peer programming. Show all posts
Showing posts with label peer programming. Show all posts

Monday, May 23, 2011

DON'T hide pointers

I have seen alot of code where typedefs are used to create pointer types like:

typedef unsigned char *Message;
Some people might think that this is a very good thing to do or that it serves some (obscure) purpose but in my opinion such typedefs are plain wrong and evil. They cause alot of errors. Why would a sane person want to hide the fact that a variable of type Message is actually a pointer? It serves no pupose, is usually longer to type and creates disparity between declaration and use of a variable which makes code harder to understand for a new commer and a nightmare to maintain.

Tuesday, November 23, 2010

Extreme Programming is overrated

Xtreme Programming is a seriously flawed technique. As development methodology XP is nothing new. Iterative development was first explained by Spiral model which was introduced back in 1986. Also, few of its basic rules, most notably Peer Programming and Collective Ownership, are really against the management sense.

Peer programming simply wastes a resource. One guy writing the code and other just watching him write the code is just non-sense. Why not let both of them write their own code and review each-other's code at the end of the day? It is also very difficult to pair the right programmers together as not all programmers are made equal. So if you pair a good programmer with a not-so-good-programmer then the results will suffer, the productivity of the pair will be lesser than the productivity of the good programmer working alone as he will need to explain him self quite frequently. Programming is not an exact science. Its an art and programmers, like musicians, painters, writers, work well when left alone. You wouldn't want Picasso and Michael Angelo working on the same painting, would you?

Collective ownership diminishes the individual sense of ownership and responsibility. For a highly productive work environment, it is important to develop sense of ownership in the work force. As employees (developers in our case) develop sense of ownership there is an increased sense of pride, motivation and self-esteem. This results in increased productivity. If you want great software, let the developers own what they create.

In my opinion, XP is overrated and unpractical. Some of its ideas like Test First Development, Refactoring and Integrate Often work well but they are not specific to XP. Others like Pair Programming and Collective Ownership really make no sense.