What do you choose, your boss, or your team?

So you are the team lead and you are responsible for arranging for a team lunch along with your team and the team’s boss in a nice restaurant. It happens so that your boss’s choices are a “little” varying from your team’s likings. You know your boss likes exotic eating places where folks eat anything that moves, and your team consists of chaps that are a little simple types. What do you do? Choose an exorbitantly expensive exotic place where the boss can have a lavish food and you and the team can at the most eat boiled vegetables, or the other way.

You see this was supposed to be a team lunch and it should have been about the team and not the boss. After making so many sarcastic remarks you should certainly know that as a lead your team consists of folks who are with you in all good or bad times on a project, so such parties should be around them. As a matter of fact, if the boss knew this, then you might not even have had a choice to make in the first place.

This post was just another one of those where the writer is pissed off at his job :).

Happy Programming!


Strange Motivations

This post is related to Jeff Atwood’s latest post where he quite honestly explains his views on StackOverflow and StackOverflow Exchange. I did watch the animated video by Dan Pink at the end of the post, its absolutely fascinating. All this is based on the research done at top universities in the US. Bright people huh. It all works well there and the theory is proven.

I tried to place Dan’s theory in the context where I work. Whether I like it or not, I have been working for Service based firms most of my career until now. And I cannot be more frank in saying that, when a service based firm grows and has like thousands of folks working on something or the other, not all of them are “bright”. Well as a matter of fact, this is a very very rare commodity. When I say bright, I do not mean someone who can crack NP-Incomplete problems or like that, I mean folks who love their work (I am mostly concerned with coding), like to do their own stuff sometimes, share knowledge with others and other things that comes in a package of a good developer. With this knowledge, I am highly doubtful that the incentives theory would work here. The theory says something like this,

As long as the work to be done is mechanical, incentives improve the performance of individuals, but the moment you introduce some work which requires even rudimentary cognitive skills, incentives actually work the other way.

I believe this theory when put in the context of software, assumes you have good people working for you. Dan gives an example of Atlassian, which probably hires good people only. I have come across many folks here who openly say I am here jsut for the freakin money, don care much about creative stuff and all that bullshit. The idea Atlassian uses certainly must be bringing the best out of the people there, as long as people intend to do so. We could argue that the reason this might not work here is, most of the work coming to the Indian Service firms is MECHANICAL. All the algorithms are defined, architecture is laid out, just write the freakin code. Hence more money, more performance works. So the first part of the theory does hold true in this sense. But to prove the other part of the theory, you need good people, period. Service based firms consider each one of us as a RESOURCE, parts of a machine, which can be replaced by someone and things would work as usual.

This is by no means, service firms bashing, but all I want to say is theories which have used a certain class of people as experiments, might not work across all classes. Now do not ask why am I still working for a Service based firm!


Bootcamp 3.1 installation error, KeyAgent could not be started…

I am running Mac OS Leopard on my Macbook Pro. Using Bootcamp I run Windows Vista 32bit too (I am ashamed of that). Lately I have been seeing some weird behavior with my Windows side. the screen just freakin freezes, the only option is to hold the power button down and restart, Ouch!! After reading few blogs I kind of realized that this might be an issue with the NVidia graphics card and Bootcamp drivers.

So I got the latest Mac OSX Snow Leopard CD. The installation could not be smoother than that. Absolutely stunning. Booted the Windows side, started installing the new Bootcamp 3.1. It upgraded several new drivers for NVidia, ATI, Intel …. And almost at the end, booom! Service “KeyAgent” could not be started. Of course nothing is straight with Windows I said. So I used the most powerful command know to a Windows user, RESTART. I restarted twice to get the same error.

Then I realized Vista being a really clumsy OS, there is something annoying in it called the User Account Control. I keep it off all the times. So I turned it on, restared again, and this time guess what, the installation worked. It seems that the installer is trying to modify some bits which the UAC was not allowing. Not sure though.

Try this if you are stuck with this error. Honestly a better option would be to get Windows 7 or atleast upgrade to XP.


Searching for the Response Header property in MessageSecurityException?

I had a requirement in my code wherein I had to make a webservice call, catch a HTTP 401 exception returned by the service, read a value from the header, add some value in the header and call the service again. Seems not very uncommon to me. My client was a WCF application and service was written in Java. Apparently, the exception that was being thrown on client side was of type System.ServiceModel.Security.MessageSecurityException. I remember I tried for about half an hour to find where the hell is the Response object returned from the server. Here it is,

try
{
Webservice Call..
}
catch (MessageSecurityException ex)
{
if (ex.InnerException != null && ex.InnerException is WebException)
{
WebException webException = ex.InnerException as WebException;
string sample = webException.Response.Headers["Sample"];
}
}


Happy Programming!

No one likes their code to be changed

I consider myself really really lucky to be in the business of writing software. The reason being, this is the only creative thing I do in a day. When I am done coding a module, I am like, look at this thing, its my work :). ( It might not follow all the SOLID principles, but… well.. what the heck!). And I bet every programmer on this planet has some kind of love with the code they have written in an editor. When someone comes along and without taking your “feelings” into consideration just tears apart the code to “refactor” it, or may be remove extra white spaces for performance reasons!, you can be certain that the person is going to get pissed off at this. Be it your best friend, girl friend whatever, if you think a piece of code is not written with good standards, it is wise to explain why its not good to have it like this, and then delegate that person to refactor or take it up yourself in a friendly way.

Taking someone’s code, refactoring it and checking in with an email saying that your code was not good enough so I refactored it, will only suck all the spirit out of that person and you would be basically named as a dick in the team.

Happy Refactoring!