Monday, December 04, 2006

MCP #7

A mere three years after buying the first tutorial book, I finally sat the succintly-named Developing and Implementing Web Applications with Microsoft Visual C# .NET and Microsoft Visual Studio .NET exam. Like a few too many of the MS exams, a lot of it seems to be aimed at stuff you're never likely to need - honestly, DataSets? So it was more a question of finding the time to learn stuff I'm never going to use than anything else. Anyway, since getting some more MCP certifications was part of the KPIs for my next performance review (which is only a month or so away), I thought I'd better pull my finger out. So an intensive session with Transcender over the weekend saw me back in the game, and after a stroll round the corner to the local testing centre and a couple of finger-chewing hours, I passed the exam with a score of 943 something-or-others. Out of what, I don't know? 1000? Microsoft aren't saying specifically, but given that the pass is 700, I'm pretty pleased. Now to do it all over again with the equally terse Developing XML Web Services and Server Components with Microsoft Visual C# .NET and the Microsoft .NET Framework. Perhaps the people who write these exams get paid by the word...

Friday, September 15, 2006

Messing About In Boats

Believe me, my young friend, there is NOTHING - absolute nothing - half so much worth doing as simply messing about in boats.

Kenneth Graham could not have penned a truer word. There is something special about boats, or to be more precise, sailing boats. As a practical means of getting from A to B, they're not too practical, but if you're someone who believes that the journey is as important as the destination, then sailing is for you.

Jules grabs some raysAnd so it proved for the Fairfax Digital Classifieds Services team. Having shipped a big software project some six weeks ahead of schedule, and under budget, we felt we were due a little bit of a letting down of hair before cracking on with the next big project. So with winter safely out of the way, the vote for sailing was pretty much unanimous. Seeing as our office building is only two minute's walk from the offices of Sydney By Sail, it couldn't be easier, and so here's some photographic evidence of people enjoying themselves, maybe helped a little by the cases of beer that found their way on board, maybe by the fact that it had been raining heavily for the past week and today was the first clear day, and maybe by the fact that the rest of our colleagues were still hard at it.

The conditions were pretty much spot on for us, with a light northerly wind, and the gentlest of swells coming in through the Heads. With only seven of us, we didn't need a big boat, so Charlotte, a Hunter 33, was more than sufficient - no jetski, but plenty of drinks holders... Anyhow, we motored out past the Harbour Bridge away from the traffic of ferries, shook the sails out and tacked our way up towards Manly. We then dropped the anchor for an hour while we finished lunch, then ran back down with the wind and back into harbour. Now we just need to finish the next project in record time too, catch the end of summer, and we can bring our bathers with us.

Tuesday, September 12, 2006

CruiseControl.NET - Using the Multi SourceControl block with filters

As some have been led to observe, the documentation that goes with CruiseControl.NET is, charitably speaking, a little sparse. This is particularly true of the Multi SourceControl Block, which, unsurprisingly, allows the use of multiple source control blocks in a project. In the project that I am currently working on, I have some five separate CVS projects to check, and to add to the fun, I wanted to add some path filters to the mix. So, after a little trial and error, and a quick peek at the source code, here's a code sample for using path filters with multiple source control providers:
<sourcecontrol type="multi">     <sourceControls>         <filtered>             <sourceControlProvider type="cvs">                 <executable>C:\Program Files\cvsnt\cvs.exe</executable>                 <workingDirectory>D:\Cvs\Services</workingDirectory>             </sourceControlProvider>             <exclusionFilters>                 <pathFilter>                     <pattern>**/build.number</pattern>                 </pathFilter>                 <pathFilter>                     <pattern>**/CommonAssemblyInfo.cs</pattern>                 </pathFilter>             </exclusionFilters>         </filtered>         <filtered>             <sourceControlProvider type="cvs">                 <executable>C:\Program Files\cvsnt\cvs.exe</executable>                 <workingDirectory>D:\Cvs\Console</workingDirectory>             </sourceControlProvider>             <exclusionFilters>                 <pathFilter>                     <pattern>**/build.number</pattern>                 </pathFilter>                 <pathFilter>                     <pattern>**/CommonAssemblyInfo.cs</pattern>                 </pathFilter>             </exclusionFilters>         </filtered>     </sourceControls> </sourcecontrol>

Monday, August 21, 2006

A new addition to the Keaveny household


Coco
Originally uploaded by DavidKeaveny.
Please welcome the 7th cat to grace our quilts since Emily and I moved in together! This lovely little lady is Coco (although I sometimes call her Keiko), a three year old black domestic long hair. We got her from the local vet, who rescued her after her previous owners were going to have her sent to the pound after they couldn't afford the medical bills when she broke her leg. We were very happy to have her!

Life has been strange these past nine months with only one cat around. We kinda missed constantly tripping over felines, especially when they were waiting right behind us when we were preparing food. To tell the truth, we think Jasmine rather missed the company too, so she now has a new friend.

Coco is quite shy at the moment while she settles in, but very friendly when she's got a little more confidence - I have never had a cat lick my hand so much, even when I've just been handling fish!

Monday, July 24, 2006

Beginning Open-Source Programming

Having spent the last few years making good use of some of the many excellent open-source tools for .NET, I thought that it was long past time that I contributed a little something back. I don't claim to be a guru programmer, but the situation arose at work where I needed a bit of functionality that present in NAnt or NAntContrib. I've been playing around with Microsoft's WiX Toolset for creating MSI deployment packages, and as part of the process, a GUID is required to identify the particular product. You can do this easily enough in NAnt with a bit of script, thusly:

<script language="C#">

<code><![CDATA[

public static void ScriptMain(Project project)

{

project.Properties["mynew.guid"] =

Guid.NewGuid().ToString().ToUpper();

}

]]>

<code>

<script>

but when, as in my case, you are building four separate MSI packages and therefore need four GUIDs, it becomes a bit of a chore. So, I downloaded the source for NAntContrib, and knocked together the tiniest of tasks to do the same.

[TaskName("guid")]

public class GuidTask : Task {

private string _prefix = "new";

/// <summary>

/// The generated GUID will be stored in a property prefix.guid.

/// The default is new.

/// </summary>

[TaskAttribute("prefix", Required=false)]

[StringValidator(AllowEmpty=true)]

public string Prefix {

get { return _prefix; }

set { _prefix = StringUtils.ConvertEmptyToNull(value); }

}

/// <summary>

/// Executes the task.

/// </summary>

protected override void ExecuteTask() {

string guid = Guid.NewGuid().ToString().ToUpper();

Project.Properties[Prefix + ".guid"] = guid;

Log(Level.Info, "Generated new GUID {0} for property '{1}.guid'.", guid, Prefix);

}

I did say that it was tiny! Actually, that's about half of the code; the rest is pretty much all XML code comments for the API documentation. The result of this all is that the NAnt script to do what my first sample does is now:

<guid prefix="mynew" />

Personally, I'm rather pleased with it the whole process. It's quite enlightening being able to trawl through the various codebases for some high-profile open-source .NET applications; and definitely rather pleasing to be able to contribute to the community which provides such great tools. I'm hoping that I'll see the code included in 0.85-rc5.