Wednesday, May 26, 2004

A great time in Switzerland ...

I am currently in Switzerland on business in the Lake Zurich area. I had the pleasure of spending the evening in Rapperswil at the southern end of of the lake. This is a very pleasant city that is built around an old cloister.

Imagine the this scene:

It is a warm spring evening at sunset. You are sitting at an outdoor cafe in a grove of manicured chestnut trees on the shore of Lake Zurich. You look to your right and you see the sun setting over the lake. You look to your left and you see the golden evening light reflected off the snow capped Alps in the distance. In front of you you see the green hills that dive into the lake.

This makes the hassle of traveling worthwhile...

Thursday, May 20, 2004

NAnt Part 2

We'll I've successfully gotten my first build to work with NAnt and it works great. It took me a week to do what a full time contractor took a month to do previously. My build does the following:

Creates support directories:
Checks the entire build tree out of source control
Recursively compiles the code. (Using the solution task).
Runs NUnit on the output to execute the unit tests.
Runs NDoc to produce all of the product documentation.
Creates and installer.
Emails the development team about the state of the build.


So what is the secret? The secret for NAnt is that its tools are directly relevant to the task of building. For example for the NUnit task you simply specify the assembly containing the unit tests and the format you want your report in, and you're done.

The other key thing about NAnt is that it unifies the calling conventions for all of the tools you use in a build. To build a product you need compilers, test harnesses, source code control commands, and so on. Normally you have a learning curve for each one of these tools. You need to go through the documentation for each and learn the syntax and calling conventions for each tool. And to be certain each tool has a different calling convention.

With NAnt all of the hard work of how to call the tools is hidden. Instead there is a unified syntax for everything. I think that is the biggest reason that it is so easy to create build environments with this tool.

So here is a application design pattern: The Unified Syntax Pattern. With this pattern you take tools/components that are all used together and wrap them in a unifying syntax. The end result is orders of magnitude ease of use improvement.

Monday, May 17, 2004

NAnt - Part 1

I've been developing a new build system for my project. Since we are developing entirely in C# under .NET I am using NAnt. NAnt is the .NET version of Java project Ant. It represents an enormous step forward in build technology. I won't go into great detail here since this is a topic that has been widely written about here and here and here.

NAnt is a step forward because it is smart. The tasks in NAnt have parameters and and actions that are relevant to performing builds. There are tasks for creating directories, deleting files, running regression (Nunit) tests, and creating NDoc documentation sets. NAnt is also extensible. New tasks can be created as C# assemblies and are seamlessly integrated into NAnt.

Contrast this to old systems such as nmake and make by comparison were dumb tools. The old systems were really just scripting environments with some intelligence about dependencies. Build systems always had to be supplemented with shell scripts or perl scripts. On top of that they had crappy syntax. A Tab was an significant piece of syntax. If you missed a tab all was lost.

Builds based on make were so difficult to create we didn't even bother with it the build system at my last company. As it turns out the the feature of tracking dependences isn't that important. Computers today are so fast that it is almost always worth it to recompile everything from the top. NAnt is like having a set of tools tailored for doing builds. More to come ...

Thursday, May 13, 2004

Blogger is buggy!

Well I spent the better part of the last hour typing up my first full blog entry describing MSBuild. The title of the entry was Missed Opportunities. Well upon hitting the "Publish Post" button I was greeted with a "Server not found" error. And the content of my post was lost. So the message is: Do not rely on the Blogger interface to type in articles. I guess I'm going to have to use an external editor and then paste my content into Blogger.

This is indeed a missed opportunity for Google/Blogger. Perhaps Blogger isn't ready for prime time...

Wednesday, May 12, 2004

First Looks

Greetings world ...

This is my first step into the world of blogging. I am an Engineer who writes software. As such I feel it is a bit of a cop-out to write a blog using something like Blogger. Real engineers craft their own blogs natively out of Java or .NET with hosted databases. I have designed a blog engine, however I also have a bunch of children. So guess what, I'm going to choose the simple route.

I am a pragmatic engineer, who sees too much pain and suffering in project because of disconnects between true customer needs and mis-use of software technology. I plan on using this as a forum for expressing my great thoughts on engineering. My particular bugbears are abstractions and patterns. I have seen these over used and mis-used. More horror stories another day...

I need to get to bed now. Perhaps you'll see more activity here in the near future.