0 Comments

Normally, I don’t dedicate an entire post to a remote link, but this is no normal case!

Douglas Crockford, whom I’ve never heard of before, did a speak recently at the 2007 FrontEnd Engineering Summit about code quality and the kind folk at Yahoo recorded it for everyone to see.

It’s a long video but it is worth watching it from start to finish. He has a huge insight into the history of software development and makes some really good analogies that help to understand what he talks about.

If you only watch one video this year, then this video should be the one.

Check out Douglas Crockford on code quality.

8 Comments

There seem to be some confusion about the Google Sitemap support of BlogEngine.NET, so I thought I would elaborate on it. First of all, BlogEngine.NET has a build-in sitemap handler so you don’t need to write it yourself.

BlogEngine.NET comes with many build-in handlers such as:

  • microsumary.axd
  • sitemap.axd
  • syndication.axd
  • commentfeed.axd
  • opensearch.axd
  • rsd.axd

…and more not so interesting ones.

All the handlers are accessible by typing http://www.yourblog.com/handler.axd where handler can be any one of them. So, in order to see the generated Google Sitemap just type in http://www.yourblog.com/sitemap.axd in your browser. Here is mine.

Auto discovery

You can tell Google manually about the location of your sitemap file or you can put the URL in the robots.txt file. I recommend putting it in the robots.txt because then Yahoo, MSN, Ask and Google can find it. Yahoo, MSN and Ask also supports the Google Sitemap format.

Just add this line to your robots.txt file:

sitemap: http://www.yourblog.com/sitemap.axd

This line can be the only line in the robots.txt if you don’t want to provide more information to the robots and spiders.

I hope this clears things up.

0 Comments

10 minutes ago we released the first version of BlogEngine.NET for anyone to download and use. This is very exciting to me because I’ve spent many hours during the last couple of months designing and coding in my spare time.

The release

We have been using CodePlex as a code repository and we also use it to host the release and help files. It has a nice discussion forum and issue tracker that has been used heavily by the beta testers. The repository is very impressive and it hooks directly into Visual Studio 2005 by a free download of Team Explorer. I can highly recommend it for anyone interested in starting an open source project.

Official website

The official website www.dotnetblogengine.net has also been released a couple of days ago and here you’ll find a lot of information, new themes and of course the team blog. The site is built 100% upon the BlogEngine.NET 1.0 release.

History

BlogEngine.NET was started out of the need for a simple ASP.NET 2.0 blog platform, that was easy to modify, extend and theme – a blog that didn’t needed an expensive SQL Server installation and was so simple that it didn’t needed 10 Visual Studio projects.

For six months I played with the idea, but it was first when I pitched it to Michal Talaga that it took off. We created the overall architecture and design, but not long after, Michal ran out of spare time and I was left alone with the project. Al Nyveldt came to the rescue, and soon also Brian Kuhn and Mauricio Quiros was part of the team and now things really got going.

After a month of high pace development, we came to realize that we needed help on the search algorithm so my co-worker Claus Christensen stepped up to the plate. Also the UI design of the admin section needed work, so Victor Rivero volunteered and designed the coolest looking admin section.

Today, the core team consists of Al, Brian, Mauricio and I with special thanks to Michal, Claus and Victor. That’s a very international team covering United States, Costa Rica, Spain, Poland and Denmark. Don’t get my started on the time zone issue :)

The project is only 2½ months old, but I have been running it on this website for two since the alpha release only 14 days after kick-off.

Roadmap

We look forward to keep the versions flowing at a steady pace and we already have a roadmap for the next 5 versions. The next version is planned for release already this summer.

0 Comments

Today, I had to print out all the .cs files in a Visual Studio project for code review. To my big surprise it wasn’t possible from within Visual Studio. It doesn’t even support multiple file printing. My only choice was to open and print the individual .cs files and print them separately. It’s just an unnecessary nuisance that could easily have been implemented by Microsoft.

All this made me think about how I write software and what the users of that software expect of it and how they use it. Normally, I have a pretty good idea about how my application is going to be used, but I always get surprised by the way it is actually being used by end users.

Things that the users would expect to find in an application should always be there. Otherwise, they get annoyed and maybe even frustrated. It’s extra work, but probably not that much.

3 Comments

Some time ago, when I wrote the blog post importer for BlogEngine.NET, I wanted to be able to display different text in the ClickOnce application dependant on the user opening it directly from a web page. I did some digging and found out that ClickOnce supports query strings just like a website.

That made it possible to create a link similar to this:

BlogConverter.application?url=http://blog.madskristensen.dk/&username=my username

Enable URL parameters

In your ClickOnce project, right-click the project file in Solution Explorer and click Properties. Select the Publish tab and press the Options… button. Here you need to check the Allow URL parameters to be passed to application checkbox and hit the OK button.

Retrieve the parameters

The next thing was to find out how to retrieve the values of the query strings, because a ClickOnce application does not have an HttpContext so there is no Context.Request.QueryString property.

Instead, you need to retrieve the query strings from the application deployment context. I used this handy method, which returns a NameValueCollection of all the query strings.

using System.Deployment.Application;
using System.Web;
using System.Collections.Specialized;

private NameValueCollection GetQueryStringParameters()
{
  NameValueCollection col = new NameValueCollection();

  if (ApplicationDeployment.IsNetworkDeployed)
  {
    string queryString = ApplicationDeployment.CurrentDeployment.ActivationUri.Query;
    col = HttpUtility.ParseQueryString(queryString);
  }

  return col;

It’s pretty easy if you know where to look.