I’m a firm believer in making the computer work harder than I do. The Pragmatic Programmers call this Ubiquitous Automation - whatever can be automated, should be automated.

While I love the fancy sound-bite, to me the idea is one of common sense - if something has to be done the same way every time, a computer is going to be much more reliable and predictable than a human.

As a consequence, I’ve made use of both NAnt and it’s elder brother, Ant, in many projects.

Both tools are extremely powerful, but that power comes at a price - too often build scripts become cryptic and hard to maintain.

Partly, this stems from the XML syntax; partly from the fact that the scripts tend to grow and evolve over time; and partly from people trying to be too clever for their own good.

I found an interesting post where the author writes:

I’ve only had the privilege of working with a few NAnt scripts but most of them are very cryptic. They use XML attribute names delimited by periods … With the advent of fluent interfaces and striving to make our code more readable lets make our NAnt build scripts readable. I’m sure that NAnt has a naming convention but who cares lets be pragmatic about this and make our build files easier to read. Let us think of those who are looking at NAnt for the first time.

I admire the sentiment, but suspect he’s throwing the baby out with the bath water.

Certainly, build scripts need to be less cryptic. I couldn’t agree more whole-heartedly with the stated goal.

But, we shouldn’t ignore the gathered wisdom of those that have experience in the tool. Those who have been using NAnt for a while have developed their own techniques and conventions as a way to manage the complexity.

I don’t know about you, but I don’t have time to make all the mistakes myself - I’m more than happy to learn how to avoid the traps from those with greater experience.

Comments

blog comments powered by Disqus
Next Post
Copy Error Dialogs  24 Apr 2008
Prior Post
User Settings Gotcha in Visual Studio  16 Apr 2008
Related Posts
Dependency Load Failures  29 Apr 2011
Synergy  20 Jun 2009
False positive from Gendarme?  09 May 2009
StyleCop for ReSharper  24 Feb 2009
Reflector  28 Aug 2008
Sequence Diagrams for Reflector  23 Jun 2008
Insanity, revisited  13 Sep 2004
Visual Basic is driving me insane  25 Aug 2004
Wiki for the win  01 Dec 2003
Archives
April 2008
2008