Automated install comes to open source .NET projects

One of the nice things about Linux is the ability to install apps (and dependencies) very easily using apt-get or similar. Windows users have been missing a similar tool for a long time. Never fear, the Scottish Alt.Net group have written Hornget, a tool for installing open source .NET projects.

Quite a few projects are supported, though most are of interest only to programmers. It would be nice to see a lot more user oriented tools like games and the like.

Update June 2011: There is in fact now a far better tool called Nuget, project gallery is here.

Update January 2013: Puppet has been ported over to Microsoft Windows. Great for installing dependencies in a virtual setup.

Update June 2013: Chocolatey brings apt-get type installer to Microsoft Windows. Seems to be gaining some traction too.

Powershell as Lisp

One of the interesting things about Lisp is the ability to use macros to effectively create your own language. Instead of using Lisp to solve your problem, write a language in which your problem can be solved and then solve it using your own mini-language.

When I heard of the new features in Powershell v2, the one that stood out for me was the ease with which you can create cmdlets using the Powershell scripting language rather than being forced to use C# or VB.NET.

One side effect of easing the ability to create cmdlets is that building your own mini-language will become very easy because you’ll have the whole .NET library at your disposal and you’ll also be able to utilise all other cmdlets and providers as well.

PowerTime now on Google Code

PowerTime is now available on Google Code. You can even browse the code without having to download anything.

The only problem I ran into was the size of the ECAD data set exceeded the quota given to new projects. I’ve now split the ECAD data set so that it is available for download but isn’t versioned inside Subversion.

I’ll be back onto PowerTime real soon now. Just having a rest doing some web work at the moment. Expect a first beta by the end of June.

Now we’ve got a decent wiki (courtesy of Google Code) I’ll be adding some much needed documentation too.

Hurrah! Some real data to play with

I’ve written about my woes finding some good test data sets for PowerTime before…some good news. There is a place you can get hold of climate data for free over at European Climate Assessment & Dataset project. Whilst the temperature data is averaged, the precipitation data is not…so that’s what I’m going to use for my tests. The Berlin data set goes all the way back to 1876 with only quite minor disruption during World War 2. Quite an achievement.

Creating open source software using Microsoft’s .NET framework

Whilst developing PowerTime, I’ve kept in mind the requirement that I need to ensure that the software can be built using only freely available tools.

Of course we will eventually provide an installer, but I like the idea that people can build the software on their own machine if they want to.

One way to make self building easier is to minimise the number of external dependencies required. To that end, everything is written in C# and only standard .NET framework libraries are used. No external libraries are required to create a functional build.

Build Environment

A free command line build tool is available with the .NET framework called MSBuild. The tool uses the same build files used by Visual Studio so duplicate maintenance of separate build scripts is not required.

Unit Testing

One area of .NET development positively overflowing with options is unit testing. A number of very good open source tools exist, including the excellent NUnit framework that I’ve employed.

Microsoft does have their own unit testing framework nicely integrated into the IDE, but it is only available to people who have stumped up for Visual Studio Professional 2008.

The only real problem with NUnit is that it isn’t integrated into Visual Studio. A solution is available through TestDriven.NET but unfortunately that is a (modestly priced) commercial product. Fortunately it doesn’t impact anybody else so I may buy it anyway because it would certainly improve my productivity.

A binary installer for NUnit is freely available so satisfying this code dependency shouldn’t be too onerous.

Development Environment

The following development environment options are available:

  1. Use the command line compilers supplied with the .NET software and use your favourite text editor; or
  2. Use the free Visual Studio Express IDE for whichever language you are interested in; or
  3. Use the (paid for) Visual Studio Professional; or
  4. Use the open source mono project on Linux with your favourite IDE.

Options 1 & 2 are not open source, but they are free. Option 3 is a paid for option and most certainly isn’t open source. Option 4 is completely open source and free. Only problem with mono is that it isn’t complete as yet. Mono has implemented most of .NET up to and including v2. For me that isn’t a problem because I’m targeting .NET v2 anyway. If you need features beyond v2 then you’d better look at the other options.

I’ve gone with option #3 because it is the most productive for me and I’ve already got the software. Fortunately using Visual Studio Professional doesn’t impact my goal of ensuring that anybody can build the code because if you haven’t got it you can use either MSBuild or Visual Studio Express.

Code Coverage Tools

One of the central tenets of unit testing is that you’ve got to make sure that you are testing as much of your code as possible. Believing that your code is being tested when it isn’t is far more dangerous than knowing it isn’t. That’s where code coverage analysis tools come in. Whilst a number of options exist (NCover & dotTRACE) for .NET developers, none are available for free.

Whilst JetBrains offers their IntelliJ IDE product for free to open source developers, I couldn’t see a similar offer for their .NET based products.

Again, whilst it would be nice to have a free high quality tool available to everybody there are no code dependencies to resolve with a code coverage tool. Those who have one can run it against the software without affecting those without it.

Conclusion

Nobody said that developing open source code on Windows was cheap. There are a wide variety of high quality tools available, unfortunately they cost money and most certainly aren’t open source.

Having said that, a viable development environment can be created either for free or cheaply. When compared, from an open source development perspective, to the Java environment, .NET doesn’t come out too favourably.

Perhaps Microsoft, if you’re listening, you could provide software like code coverage tools as a standard part of .NET just like you’ve already done with the compilers. Just very simple command line tools would be fine…no need to tread on the toes of the commercial ISVs.