- Posted by justin on June 27, 2008
I changed my blog this afternoon from dasBlog to the blogengine.net . The whole process was incredibly painless and took all of an hour to get everything that way I wanted it. To migrate the data I used the DasBlog to BlogML Converter to export from dasBlog and then on the BlogEngine.Net settings page there is a nice Import app that did all of the importing. The only I had to change after the import was the link to a couple of file that I uploaded.
- Posted by Justin on June 27, 2008
Along with the Agile presentation, I also had the pleasure of discussing Continuous Integration. The talk centered on Cruise Control .Net and Nant. I enjoyed giving the talk and sharing but unfortunately I didn't do a great job with the demos and they didn't across the way I wanted them to. I will post some additional information over the next couple of weeks on Nant and CI. For now, the link below will get you the presentation, the sample application with all of the build scripts, 3 Nant custom task and CCNET Config file that I used for the demo.
CI.zip (390.59 KB)
Included in the ZIP File:
Demo Code
- default.build - Master build file for the solution
- common.build - All of the global properties (variables) for the scripts
- common.build - Project.build - Nant task that can be reused
- NantSchema.build - nant script to generate nant.xsd that is needed for VS intellisense
- HelloWorld.DataObject - C# Class Library
- HelloWorld.SQL - VS 2007 Team System Database Project
- HelloWorld.SSIS - Has SSIS sample build script
- HelloWorld.Tests - NUnit Test Project
- HelloWorld.Web - Web Application Project
- HelloWorld.WinForm - WinForm Project
Nant Custom Tasks
- AppSettingsWriter
- Add/Update AppSettings Nodes in App.config and Web.Config files
- Very Simple Task.
- XMLPoke should take care of what this task does
- CleanupOldBuildFiles
- Removes Files/Directories based on either a number of revisions or on a given number of days since creation.
- TaskSchedulerTasks
- Add/Updates/Removes Windows Scheduled Task
- Posted by Justin on June 27, 2008
Tonight I have the pleasure of presenting on Agile development at the SEVDNUG meeting. I focused the talk on things that I have learned over the last 4 years of using Agile. I figured that folks can read the Agile/XP books and get the Agile concept but the books don't discuss things to look out for that can trip you up or how to really convert your project to Agile from a different process. The presentation started off with a quick overview of Agile and the benefit and then jump into the learnings. I did include in the backup slides the Agile overview/concept slides since I already had them done from other presentations that I have given.
Agile.zip (464.45 KB)
The presentation is in Powerpoint 2007 format. If you don't have Office 2007, you can download the Compatibility Pack which will allow you to view/edit/save Office 2007 formatted files
- Posted by justin on June 27, 2008
Several times I have had the need to take a collection and convert it to a delimited string for displaying in the UI. I have been using the code below that I found on a blog that I have since lost the link to. However, while at the SEVDNUG meeting tonight Rob showed me an easier way to get the same output using LINQ.
Original Code:
public class CollectionUtilities
{
public string Join<T>(string delimiter, IEnumerable<T> items, Converter<T, string> converter)
{
StringBuilder builder = new StringBuilder();
foreach (T item in items)
{
string converted = converter(item);
if (string.IsNullOrEmpty(converted) == false)
{
builder.Append(converted);
builder.Append(delimiter);
}
}
if (builder.Length > 0)
{
builder.Length = builder.Length - delimiter.Length;
}
return builder.ToString();
}
}
New Code:
public class CollectionUtilities
{
public string Join<T>(string delimiter, IEnumerable<T> items, Converter<T, string> converter)
{
return string.Join(delimiter, (items.Where(i => string.IsNullOrEmpty(converter(i)) == false).Select(i => converter(i))).ToArray());
}
}
NUnit Test:
[Test]
public void JoinTest()
{
string[] joins = new string[]{"1", "2", "3", "4"};
string joinTest = new.Join(",", joins, item => item);
Assert.AreEqual("1,2,3,4", joinTest);
joins = new string[] { "1", "", "3", "4" };
joinTest = new CollectionUtilities().Join(",", joins, item => item);
Assert.AreEqual("1,3,4", joinTest);
joins = new string[] { "1"};
joinTest = new CollectionUtilities().Join(",", joins, item => item);
Assert.AreEqual("1", joinTest);
}