Posts

Showing posts from December, 2009

ASP.NET MVC – Do I Really Need It?

As a professional software developer, particularly of the Microsoft flavor, you get bombarded with “new stuff”. If you do not instill in yourself a certain discipline, you are sure to be brought down by the sheer complexity of tackling every “new thing” that is sent your way. I say this from personal experience; I do not mean to be negative in any way in saying this. It’s just a fact of life. There are so many “CTPs” and new technologies being thrown at you that it is easy to succumb to “Beta-itis” – the debilitating compulsion to download and play with every new thing, to the point where your productivity as a software developer begins to suffer. It’s even worse if you’re an MVP because when you go to the Summit each year, they throw a whole truckful of even more sexy new “Stuff” at you. Sometimes, its stuff that nobody else has seen before and you had to sign an NDA saying you wouldn’t talk or blog about it. Talk about getting excited! ASP.NET MVC is an example for me. About a ...

SQL Server 2008 Fix: SP1 Install Failure

  For quite a while I could not install SQL Server 2008 SP1, as it reported a failed shared component installation – in this case, Books Online. Problem is I could not find the source MSI to fix it. So here is how I solved the problem:  If any shared components installations result in a failed state, a Registry key is updated. SP1 reads these keys when it starts, and if the value is not “1” (in my case it was “3”) – it will stop. Seems ridiculous to me, but that’s how they do it. And doing a repair may not fix it either – because you may have installed Books Online from an interim standalone MSI installer. if you try to find the original MSI to handle the repair, it might not be the correct one. Edit this key (or the respective key for whatever your fail message says) and ensure that the value is 1: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\ConfigurationState\Sql_BooksOnline_Redist That took care of that problem! Now I have a different issue, b...

Why the Economic Stimulus Plan Doesn’t Work

When President Obama was elected, the economy was already sick and getting sicker. If nothing was done, his economic team said, the unemployment rate would keep rising, reaching 9 percent in early 2010. But if the nation embarked on a fiscal stimulus of $775 billion, mainly in the form of increased government spending, the unemployment rate was predicted to stay under 8 percent. Obama bought into a classic Keynesian solution – and so did Congress. Congress passed a huge fiscal stimulus that focused almost entirely on government spending. Yet things turned out worse than the White House expected. The unemployment rate is now in the 10 percent range — a full percentage point above what the administration economists said would occur without any stimulus ! So what should they  do now? The administration seems  determined to stay the course, although recently, the president showed interest in “increasing the dosage” – a bad prescription indeed. A better approach might be to r...

Don’t Break the Interface

Recently while contributing to a test suite that covers some 250 C# DAOs (Data Access Objects) I discovered a couple of issues: 1) There was an implementation of “PrimaryKey” which is defined as a nullable long (long? PrimaryKey) that returned a 0 (zero) if the nullable type had no value. Uh-Oh! 2) There was more than one implementation, e.g., this actually appeared in more than one base class, in different assemblies. Depending on which references you had set, you could get clobbered! Needless to say we’re going to fix that quickly; there are objects that are “older code” that need to be updated to reflect the change. Fortunately our test suite will show immediately which guys need to be updated,underscoring the importance of having robust unit tests. But the real question is, “How did this creep in”? The answer: Most probably, "Stinkin' Thinkin'" by developers. Nullable types are instances of the System.Nullable struct. A nullable type can represent the normal range...