June, 2010

Doing less with LINQ

While reading a recent article in MSDN magazine, I came across some code that gives me a great opportunity to show how to get more done with less effort by using LINQ.

NAntGraph Configuration

I've just written up some documentation on how to configure NAntGraph if the built in search for dot.exe doesn't find the GraphViz installation. See Configuration under the NAntGraph menu item.

Hope this is helpful.

Upcoming Presentation: Build Automation with NAnt

On July 7, I'll be giving a talk Build Automation with NAnt to the Wellington .NET User group.

Here's the advertising spot I wrote for it:

Think about the project(s) you’ve worked on in the last six months. What was involved in going from source code in development to working code in production? How many manual steps were involved? Do you have a copy of the mythical 47 step checklist for deployment into the test lab? We developers spend much of our time streamlining and automating other peoples workflow, yet often we’re like the Cobblers children as we do things the hard way: manually. Start working smarter, not harder, and start automating your builds. NAnt is one good tool for this automation – come and see how NAnt works and discover how you might be able to use it yourself. If you’ve been considering use of psake, rake, make, nmake, msbuild (or any of their cousins) but aren’t quite sure what they’d do for you, come along to see some of what can be achieved with a little investment of time.

Hope to see you there.
Assuming you're based in Wellington, NZ, of course! I'll be posting for download a PDF of the slides plus the scripts I write on the night.

Building a Programmers Blog: Why Drupal?

Drupal is a mature, extensible, actively supported and secure content management system for the web, and an excellent base for publishing a technical blog.

In this series of articles, I'll guide you through setting up a programming blog through Drupal.

Avoiding Stack Overflow with Params

Here's a pattern that I've seen occur a number of times - a pair of method overloads, one accepting IEnumerable<T> and the other accepting params T[].

NAntGraph 2.2

A minor update to NAntGraph, allowing you to specify a different font and font size to use when rendering the graph.

Go to the NAntGraph page to download.

Extension methods for XElement

I've found myself writing code like this quite a bit lately:

var orderElement 
    = document.Element(OrderXml.OrderElementName);
if (orderElement == null)
{
    var message
        = string.Format(
            "Didn't find expected child element <{0}>",
            OrderXml.OrderElementName);
    throw new InvalidOperationException(message);
}

The intent is to find a specified child element, throwing an error if the element is not found.