The new site www.wulffmorgenthaler.com went live tonight and the feedback has already been overwhelming. The website has undergone a complete renewal in both design and features to give it a more modern look and feel.

It was build from the ground up using SQL Server and ASP.NET 2.0 and has been designed to utilize a lot of the new features of the .NET 2.0 Framework. We also added support for RSS feeds with embedded comics and a whole new comment engine for the news section as well as the comics them selves.

We also added a rating system allowing visitors to rate the individual comics and see the top 10 best rated comics of all times.

All the new features will, hopefully, increase the level of participation by the visitors and also help wulffmorgenthaler to better communicate with their many fans world wide.

Every day, a new comic strip gets released and you can subscribe to them by e-mail or RSS for free.

This project allowed me to work closely with some of the best people in the industry, and I hope this shows when you see the website.

The comics are hilarious, so go visit wulffmorgenthaler.com and prepare to be entertained.

Today, I had to do file renaming on 1.000 files in a directory so they could be sorted alphabetically. I will not go into details, but it was a lot trickier than anticipated because the original filenames where very different.

Basically, I wanted all filenames to be 4 digits long, so that 1.psd became 0001.psd and 754.psd became 0754.psd

In order to do that, I needed a method that would prefix any given number with the right number of zeros. So I came up with this:

private static string ForceLength(int number, int length)
{
   string s = number.ToString();
   string returnString = "";

   for (int i = s.Length; i < length; i++)
   {
      returnString += "0";
   }

   return returnString + s;
}

If you pass 54 as the number parameter and 4 as the length parameter, the method returns "0054".

I’m not sure this is the best way to go, but it works. What do you think?