Riding the Elephant

While working on a software development project some time ago, I was consumed by a stack of different products and technologies - among them the .NET framework, SharePoint, K2, SmartObjects, C#, SQL, the dreaded Global Assembly Cache, Web User Controls, Server Controls, and a lot of object oriented code. While drawing nearer to a "working solution", I began to notice the performance of the colossus we have been working on - or rather the lack of it.

It brought to mind my experiences working on open source web projects with PHP and MySQL - the simplicity, the speed, and the flexibility of the LAMP (Linux, Apache, MySQL, PHP) platform. It's been a few years now since I've had the chance to work with PHP, and I have to admit I miss it.

While C# is a wonderful language, and the Visual Studio development environment is fantastic, you can't help noticing the amount of horsepower required to get things done. While waiting for the solution to build earlier, I found myself mentally comparing it to a new computer with Windows installed - and the inevitable dragging down of it's possible performance as soon as you start installing layers of software.

When I left college (20+ years ago!), C++ was a new language, and OS2 was handing Windows it's ass. I had learned to program in Pascal, knew a little C, a bit of assembler - and had been taught from day one at college that great developers wrote clean, fast, elegant code. It came as quite a shock when I entered the world of professional software development a few years later, and discovered that commercial pressures almost always ensured that software was never quite as good as it might be.

Parallel to my career, the open source movement grew like a weed, and it was no accident that I eventually became involved - writing one of the early popular blogging scripts, and a content management system. They were engineered from the ground up for speed, minimal footprint, utility, maintainability, clarity, and elegance.

And so we finally return to the title of the post - my thoughts about .NET development.

The .NET framework, and C# to a lesser extent, are one hell of an achievement. So is Visual Studio. Granted, they steal ideas from many other software development languages (chiefly Java), but there is a clarity of thought and depth of implementation present that is incredibly impressive. While I can understand why MSIL exists, and the advantages it brings, I also think Microsoft have missed an enormous trick by not letting us compile .NET code directly to machine code. The Framework does it via it's intermediate language and caches it - why not let the developer do it up front too? Just as an option ?

I suppose I'm just getting a bit old. It seems a shame to have fantastic hardware in front of you, and then lay an operating system on top of it that restricts all access to the hardware. You then overlay a framework on top of the operating system to run (and cache) interpreted code, and finally you create innumerable code libraries to allow communication with database servers, web services, and such like by implementing further layers of complexity.

More bloat. More expense for the hardware. More, more, more.

I have to keep reminding myself that we no longer have to worry about memory management, file handles, pointers, linked lists, and the various other demons that haunted the software developers of yore. It just feels some days that we start each project with a gazelle humming away under the desk, and slowly turn it into an elephant... a really heavy, slow, lethargic elephant.