Category: Uncategorized


On of the most painful aspects of working with .NET is the time to retrieve feedback after writing tests and waiting to see the red/green result. The obvious overhead is the compilation time, and this is especially apparent when updating a large solution where files in several projects have changed.

Unfortunately, the solution coming from the guys in the Microsoft camp seems to spend excessive amounts on quad core machines with SSD drives. While this is *an* option, I started to wonder if there were other alternatives coming from other development communities. Now obviously, looking at the Ruby or Python worlds would be a little pointless, as they live in blissful interpreted language heaven, but what about Java?

One advantage that Java has is it’s compilation model, here each java file is compiled to a corresponding class file holding it’s intermediate data representation ready to be interpreted by the VM. In order to reduce the number of class files floating around Java supports packaging these files into a JAR/WAR archives. What this essentially means is that it is possible to compile only the files that have changed and replace the individual class files. Couple this with the fact that most Java IDE’s support compilation on save of a file (which I *think* on success overrides the .class files) , this leads to fast compilation and code that is usually ready to execute at any given time.

In the .NET world compilation does’t happen at this level of granularity, instead all files within a given MSBuild project are compiled to a single dll assembly, making it quite difficult to only update the parts that have changed.

In my mind the only solution is to determine the minimum requirement for a given test class and ONLY compile these files, instead of the whole world. I’m unsure how this could be accomplished other than parsing the text of a given .cs file and its corresponding solution+project files to resolve dependencies. Even in this case there is no way to determine dependencies resolved via reflection (aka IoC injected dependencies). I would love to see the day that c# has lightning fast test feedback cycles, and am open to any ideas on how to achieve this.

Advertisement

nLess – Less Css For .NET

While the world ticks by and time to play with personal open source projects gets more and more limited it seemed like the best thing to do was to push live what I have with regards to my .NET version of  the Less library. With this in mind I have pushed my latest code up to codeplex at: http://nlesscss.codeplex.com/

When time permits(i.e. when I find a stable contract for a few months)  I’ll get back to working on the project, but until then enjoy the codeplex release.

EDIT: We now have a shiny new home for the .NET Less port – www.dotlesscss.com

nLess Update

So my Less port is finally producing some nice output for example the following css:


@small-padding: 10px;
@large-padding: 20px;
@black: #FFFFFF;
@red: #FFFFFF;
@lessred: @red - 20;

.logo
{
background:url(images/logo.png) @lessred;
}

#banner {
height:100px;
padding:@small-padding;
border:solid 1px red;
.logo;

li.menu
{
list-style:none;
}
}

Produces:

.logo{ background: url(images/logo.png) #EBEBEB ;
}
#banner{ height:100px;
padding:10px;
border: solid 1px red ;
background: url(images/logo.png) #EBEBEB ;
}
#banner li.menu{ list-style:none;
}

There is still a way to go, and the next step will be getting all my outputs to match the Less spec defenitions.