Bye Bill

With Bill Gates having departed Microsoft to varying degrees of applause and a great deal of commentary, what will happen to Microsoft? Will they continue to dominate the software landscape for the foreseeable future, or will they succumb to the same fate as IBM? Is it a coincidence that mini-microsoft decided to stop blogging just before Bill Gates left???

In my view, Microsoft has the same fundamental problem that affects all producers of shrink-wrapped software: you eventually reach a point of diminishing returns where you can’t sell the same end user any more of the ‘same’ software (by that, I mean yet another upgraded version of a product, such as Office for example). Hence Microsoft’s abortive foray, spearheaded by Steve Ballmer, into the world of leasing software applications to end users. Is he just waiting for all pervasive DRM to be incorporated deeply into the OS and hardware, and will make another attempt soon?

Now I don’t want to be branded a MS hater (I’m not), but Microsoft’s strength until recently has not been raw innovation. Microsoft knows a good product when they see it, with the usual result of them buying the company that produces it! Microsoft has possibly been the world’s best software ‘refinery’. I wanted to use the word immitator to paraphrase their famous sound bite, but I don’t think that accurately describes what Microsoft does best.

Take the .Net framework for instance. It was hardly that innovative (can you spell Java?), but I applaud what the teams at Microsoft have done. It’s nothing short of bloodly marvelous. Imagine the type of systems you can easily create now compared to ten years ago. And SQL Server 2005; well I think it examplies the best aspects of what Microsoft can do well. I’m not ashamed to say that I love SQL Server! I hope that all MS software will become this solid.

How do companies create great products that sell? Unless it’s a paradigm shift (i.e innovation), one way is to listen to consumers to find out what they want, add expertise and flair, and then give them something that goes byond what they asked for.

I think MS should adopt a policy with more emphasis on innovation if they want to be as successful in the next ten years. The ‘Bayesian’ like abilities of Google are something MS should have been incorporating into their products years ago (especially given the size of Microsoft’s research department). I think Microsoft would better serve their consumers by creating products that contain more ‘think ahead’ for the user, rather than coming up with a succession of new interfaces for the core products (as they seem to have done in Office 2007, although it is early days yet and I’m sure it will include new features of value).

I believe Microsoft is likely to dominate as they move into the corporate office arena of content creation, management and (especially) workflow. No other company is so well positioned with Microsoft’s hooks into the Office suite.

Anyway, that’s enough dribbling on from me!

Roy Osherove Releases Regulazy

Roy Osherove has released a new regular expression tool called Regulazy.

Regulazy is an attempt to build a small “Expert System” for creating .NET Regular Expressions. It lets the user create an expression based on a real life example of text they would like to parse.”

Embed any File in a .Net Assembly

This is probably old news; I’m posting it here so I can find it again quickly! Here is a simple way to embed any file in a .Net assembly:

Add a file item to an existing project, go to the file’s properties and change the Build Action to ‘Embedded Resource’

Add the following C# code and you’re up and running. I’ve used this technique to embed parameterised default templates into a .Net executable.

///

/// Reads an embedded file from the executing assembly’s resource and returns it as a string.

///

/// Embedded Resource Filename

/// Namespace of the enclosing assembly

/// Embedded resource as string

public string GetEmbeddedResourceFile(string filename, string rootNamespace)

{

string embeddedResource;

Stream strm = null;

Assembly ass = Assembly.GetExecutingAssembly();

if (!rootNamespace.EndsWith(“.”))

rootNamespace = rootNamespace + “.”;

try

{

using (strm = ass.GetManifestResourceStream(rootNamespace + filename))

{

byte[] buffer = new byte[strm.Length – 1];

strm.Read(buffer, 0, buffer.Length);

embeddedResource = System.Text.ASCIIEncoding.ASCII.GetString(buffer);

}

}

catch

{

// Note: It is generally bad practice to consume all exceptions!

// If any error errors, simply return an empty string

embeddedResource = String.Empty;

}

return embeddedResource;

}

An error has occurred…

I recently got bitten by a rather annoying and hard to track down error. I was in the process of creating a fairly simple ASP.NET 2.0 application which accesses a SQL Server 2005 database. It worked at home but not in the office…

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified)

After doing a few Google searches, it turns out this can be caused by lots of things, and there are quite a few similar error messages for many different reasons. The most often cited one is due to SQL Server 2005 not accepting remote connections by default (which personally I think is ridiculous, it’s a server right, the whole reason for having servers is to allow access by remote clients! But I digress..)

So I fired up the Surface Area Tool 2005 and checked that remote connections were allowed. No problems there.

Another oft cited reason for this error is that a Specific Protocol is not enabled. So I opened up SQL Server Configuration Manager and checked the Client Protocols. All fine.

Of course! It’s probably the firewall. Checked it and in desperation temporarily turned it off. Still no good.

Checked the connection string worked in isolation. Once again nothing wrong there.

After a great deal of hair-pulling and searching I finally found the problem. The ASP.NET role provider was trying to access the role table via a connection string named “LocalSQLServer” defined in the machine.config, and this was pointing to “.\SQLEXPRESS” which was not installed!

The simple fix is to override in your web.config:

<connectionStrings>

<remove name=”LocalSqlServer” />

<add name=”LocalSqlServer” connectionString=”Data Source={local};Initial Catalog=myDB;Trusted_Connection=True” providerName=”System.Data.SqlClient”/>

</connectionStrings>

I had installed several of the ASP.NET starter kits and doing so had updated the machine.config. The reason it worked at home was because an application had installed SQLExpress without me realising! These links helped me track down the problem:

http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx#453222
http://www.aquesthosting.com/HowTo/Sql2005/SQLError26.aspx

Introduction to Test-Driven Development: Updated Link

Rob Farley pointed out that the link to the MSDN Architecture Webcast: Test-Driven Development Using Visual Studio Team System (Level 200) in my previous post was broken. It must have expired within days of me posting it! I’ve updated that post and this one to point to the correct location (I think you will have to have a Passport login to access it). If you can find a spare hour, it is well worth watching. Thanks Rob.

Microsoft Certification Exam 70-441 Status Change

The title says it all! I received confirmation yesterday that I had passed Exam 70-441: PRO: Designing Database Solutions by Using Microsoft SQL Server 2005, which means I’ve completed MCITP: Database Developer in addition to MCITP: Database Admin. Might have to look into the requirements for Analysis Services…

Gemini: A Free and Easy to Use Issue Tracking System

Following on from my previous post Software Development Must Haves, thought I would mention Gemini, a free and easy to use Issue Tracking System. I’ve successfully implemented it at 4 different companies and mentioned it on the ausdotnet mailing list a few times.

Several years ago when I was looking at what systems were available, I did a comparison of the free and not-so-free offerings. For ease of use and bang-for-buck, I think that Gemini is by far the best. Gemini has a free license for up to 10 users, and is under AU$500.00 for a commercial license.

It is web based (but also provides a Windows client), supports a customisable SQL Server backend, web service interface and a utility for importing data. With a little work it can be integrated with your Source Code Control system.

If you are developing software and you are not using an Issue Management System, I strongly suggest you check out Gemini.