May 2007 - Posts

Alt.NET 1 - Microsoft 0

There has been quite a lot of noise on the blogosphere and it all revolves around Microsoft.

This morning Jamie Cansdale's posted some correspondence between himself and Microsoft surrounding the support of TestDriven.NET in Microsoft's Express IDE's. Microsoft is unhappy that TestDriven.NET can plug in to the Express IDE's claiming that doing so is a violation of the licence agreement. Jamie has also lost his MVP award over this.

This comes as a big disappointment to me. It is a clear demonstration that Microsoft still does not get it. Martin Fowler sums up perfectly why I think so:

The attitude [of Microsoft] to open-source is a large part of [Microsoft's] problem. When Java appeared there were yawning gaps in its portfolio, and worse some dreadful standard tools in its API (visions of Entity Beans spring to mind). Those gaps and bad ideas were fixed by the open-source community. Ant gave us a build tool, EJB was displaced by Spring and Hibernate. .NET has also got its gaps, and again the open source community has stepped up to fill them. Yet Microsoft refuses to collaborate with these efforts, even seems to go out of its way to undermine them. I was particularly sickened by Microsoft's reaction to NUnit - an excellent XUnit testing tool, elements of whose design were lauded by Anders Hejlsberg at OOPSLA. Microsoft ended not just bringing out a competitive library, but deliberately making it incompatible. That's not the kind of reaction that encourages people to invest their time in the platform.

As a result of Microsoft's lock-in, proprietary bully tactics and copy-cat strategy to open source, many alpha geeks are moving away to more open platforms like Ruby on Rails. Others are becoming "Alt.NET".

And for a while I have been concerned about my position too. Am I going to be as marketable as a C# developer in three years time? Or should I diversify my skills and learn Ruby and Java?

Shelving in Subversion?

The person whom I report to asked me today whether there is a feature similar to shelving available in Subversion. The good news is that you can "shelve" in Subversion. The bad news is that it requires a bit of admin.

In Subversion, the concept of shelving is known as private branching. Here are the steps:

Step 1: Create a branch, switching your working copy

Let's say that you are working on the trunk and I have some modifications that I would like to shelve. The trunk url is http://localhost:81/svn/default/Trumpi.CruiseControl/trunk (this is a private repository on my home PC). To shelve my modifications, I create a branch in http://localhost:81/svn/default/Trumpi.CruiseControl/shelves/trumpi/my-feature. Be sure to switch to the new branch as well. Take note of the revision number!

 

Step 2: Commit the modifications to the shelf

Take note of the revision number here too!

Step 3: Restoring the modifications from the shelf

When you need to restore from the shelf, make sure that your working copy is pointing to the trunk url. Typically the trunk url will have no modifications, but if it does then that is not a problem. What you need to do is perform a merge.

When performing the merge, ensure that the "from" revision is the revision number mentioned in step 1. (You did remember it, right?) Likewise, make sure that the "to" revision is the revision number mentioned in step 2. Lastly, make sure that the "from" url and the "to" url is the url of the shelf. The diagram below shows an example.

Now you're probably thinking "Hey, that's not really that slick." I agree. It involves a lot of admin and is certainly an advanced use of Subversion. But at least we know that it is possible and I would like to see Subversion providing a shelf command in the future that abstracts the complexity of these steps away from us.

Posted by trumpi | with no comments
Filed under:

StyleSpread 2.1 Released

I've been looking for a decent CSS editor for quite a while now and it looks like StyleSpread may just be what I'm looking for. One of the features that I like is that it can show how the CSS renders in each if the different browsers available out there.
 

Posted by trumpi | with no comments

Pause after running a batch file

One thing that irritates me is having to open a command prompt every time that I want to run a batch file. I need to do that because if I run a batch file from Windows Explorer, the window that opens will automatically close when the batch file completes running. When this happens, I cannot read the output that was generated from the batch file's commands. It would be so nice if a 'pause' statement could be automatically added to the end of each batch file when running it from Windows Explorer. Well, I've figured out how to do it - here's the step by step process.

Step 1 - write a wrapper batch script

The first thing that I do is create a batch file that looks like this:

@echo off
call %*
pause

I placed it in C:\Tools, but it does not really matter where you put it.

Step 2 - Edit the registry

Now you need to edit the registry to launch our newly created batch file every time it is launched from Windows Explorer. Have a look at the code below, replacing C:\Tools\batch_runner.cmd with the full path of the batch file that you created in step 1.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="c:\\Tools\\batch_runner.cmd \"%1\" %*"

[HKEY_CLASSES_ROOT\cmdfile\shell\open\command]
@="c:\\Tools\\batch_runner.cmd \"%1\" %*"

Step 3 - Enjoy having less command prompts open

And we're done!

Posted by trumpi | with no comments