Tuesday, November 8, 2011

So that your threads do not tangle..


I had never thought an application could crash of an unsafely handled label. But this did happen with me once when this exception popped up out of nowhere and said: InvalidOperationException : Control label1 accessed from a thread other than the thread it was created on. As .Net developers, we usually assume that all such stuff is being taken care of by the framework or the visual studio. Hence this was something new for me. As I figured out, this is a compile time exception which occurs to warn the developer of a situation when more than one thread would try to access the same control and hence get locked. This exception usually occurs during compile time and reliably during debugging and sometimes during run-time.

Wednesday, October 5, 2011

Rebuild Master

This happens a lot of times that you install your Sql Server with a particular collation and find that the database you need to have on the server requires a different collation. At first this seems to be pretty simple. I thought I would just go to the Server properties and change it. I made a confident move for it only to find that the collation cannot be edited from the properties. I browsed through a few online forums which suggested re-installing the Sql Server. I was not willing to give re-installation a try (Installing the MS Sql Server really makes you develop ardent love for cloud services). So I asked a few peers around and then eventually the IT guys and all of them suggested a re-installation. Re-installing the Sql Server is a cumbersome task. Also the collation property box (though inactive) would not let me think that there was not a simpler way to do it. After a little searching I finally found a simpler way.

Sunday, August 28, 2011

Of Zombies and Unicorns..

“Honest Differences are often a healthy sign of progress.” – M K Gandhi
In the past 2 weeks we saw a few resolute people standing against the Indian government to bring about a system in place which is expected to provide a fix for corruption in India. This small group of people who call themselves the Civil Society regarded the LokPal bill proposed by the parliament incapable of solving the corruption problem in India. They suggested a Jan-LokPal bill of their own which was proposed to be much more effective. The difference in opinions did not boil down to an open discussion and rather took form of a protest movement which attracted eyes from across the globe as well as the support of millions of Indians. The desperate need of this country to lighten itself from prevailing corruption requires no explanation. This post comments on the effectiveness of the bill and the response of the people associated with it.

Sunday, June 26, 2011

Thou shalt be compliant !

The bullish surges and the nose dives, the bursting bubbles and the depression fears……if the system could contain itself with some grace at all, there would have been no policing. Every time we see the market crash, be it the black Friday , the great depression or the 2008 Credit Crunch, it brings out the need to put in place some sort of discipline in the market.

Thursday, April 7, 2011

MAX Dope

Have you ever felt the frustration of waiting for your data to be fetched while your Sql query is taking millions of years to get executed? Sometimes it goes fast when the server is moderately loaded, but rush hour time and yo ! you are staring at the thing looking as dumb as a person staring at the hot toaster. So it is the mark of an educated mind to strive and make your queries as efficient as possible. Here I wish to mention one way you can make your queries get executed faster.