Shared Source CLI (aka Rotor) on Vista

I thought I would share my experiences with Rotor on Vista (x86 and x64). First off Rotor is an open source version of a big chunk of what’s in the full commercial .NET that you use on your machine today BUT certain things in Rotor are no where near the quality of that in the commercial .NET – keep that in mind.

I hacked around with Rotor on several setups not including the supported setup (XP with SP2 and VC++ 8.0). My mileage with each is briefly summarized below.

Vista x64 with VC++ 9.0

I tried to get Rotor working with Vista x64 and VC++ 9.0 but was unsuccessful. Couldn’t even get it to build. This was as I expected though.

Vista x86 with VC++ 9.0

Made the same changes I did with the x64 version pretty much and got it to build. After the initial hope of it all building and the tests that Rotor comes with all passing I was somewhat annoyed that some programs including the C# compiler were not behaving correctly e.g., the C# compiler would give random parser errors for programs. I’m sure that other components were affected as well but seens as though I needed the C# compiler to work this was pretty much the final straw for me.

Vista x86 with VC++ 8.0

Builds without any hacking required. Every now and then though a buffer overrun would occur during the build, particularly when building some of the BCL C# stuff. Haven’t had this error again since I rebuilt my machine but the obvious fix would be to just make the buffer that is overran larger. This occurred during a call to MakeMacroString and it seems as though someone else has come across this as well.

My personal view is that the SSCLI project is doomed to spend the rest of its time only officially supporting that which it did when it was first released. If anyone knows any different then let me know. I couldn’t find any information on the web hinting that it would be updated if only to support Vista.

Follow me on Twitter?

In a bid to keep up with friends and suchlike I have joined Twitter. I can’t promise much in the way of earth shattering Tweets but I’m sure it will be a mildly entertaining read.

So, if you want to follow me please tune your browsers to this URL – http://twitter.com/g_barnett.

Probably worth noting that the Tweets I make will not necessarily be on .NET. Follow me at your own peril! 😉

Code Contracts – my opinion on them anyway…

One of the great things that came out of the PDC for me was the confirmation that code contracts would be coming to .NET 4.0. I was a big fan of Spec# [1] but admittedly I never thought it would make it into the mainstream C# or VB.NET languages even though the prior solution provides the more concise and descriptive syntax. On Sunday I played around with the library released at the PDC [2] and in general it all looks good. For the astute reader you will know that I co-authored a book on Data Structures and Algorithms [3] with Luca [4] not so long ago (we will probably release an update just before Christmas, more on that later) and each algorithm within the book states both pre and post conditions. We did consider explicitly defining invariants as well; however we opted not to for conciseness.

While I’m very much encouraged by the inclusion of code contracts in .NET 4.0 I’m still a little apprehensive about it in API form, maybe it’s because I was set on a language based feature set? I’m just not sure.

The big thing here is that there will be something in .NET 4.0 and hopefully its inclusion in the official distribution will emphasise to developers the importance of specifying explicitly contracts to which their algorithms will adhere to. Another interesting thing that came up in the session on code contracts [5], which coincidentally shared its session with Pex [ 6] was the announcement that there would exist tooling that would analyse the contracts within your code and inject the necessary documentation in there. Whether this will annotate the source code with xml-doc or do something else I’m not sure though. The former was the one most alluded to during the PDC session.

Sorry about not posting recently I’ve just moved to Australia from the UK to do my PhD. Today actually I shared my desk with Gordon Bell [7] who was visiting the Microsoft QUT eResearch Centre [ 8] of which I am now a member.

 

1. Mike Barnett, K. Rustan M. Leino, and Wolfram Schulte. The Spec# programming system: An overview. CASSIS . 2004, Vol. 3362.

2. Code Contracts download. Microsoft Research. [Online] 2008. http://research.microsoft.com/research/downloads/details/4ed7dd5f-490b-489e-8ca8-109324279968/details.aspx.

3. DotNetSlackers. [Online] 2008. http://dotnetslackers.com/projects/Data-Structures-And-Algorithms/.

4. Tongo, Luca Del. [Online] http://blogs.ugidotnet.org/WetBlog/Default.aspx.

5. Channel9. [Online] 2008. http://channel9.msdn.com/pdc2008/TL51/.

6. Microsoft Research. [Online] 2008. http://research.microsoft.com/Pex/.

7. Bell, Gordon. [Online] http://research.microsoft.com/~GBell/.

8. Microsoft QUT eResearch Centre. [Online] http://www.mquter.qut.edu.au/.

 

Design Patterns – Part 5 published

In this part of the series we look at the command pattern.

I’ve also seen that Sonu has posted in the article quick links to the previous articles in the series as well. While the articles are not written in any specific order I would recommend that you read the first part before you read any of the others if only for motivation to learn more about design patterns.

View it – Design Patterns – Part 5

A good book on Vim commands and a Vim emulator for VS

I’ve used Vim for quite some time on Windows (yep, not quite a Vim purist…) however, I have never actually read a book on Vim. For those who don’t know Vim is an awesome text editor with a really powerful set of commands you can issue via the keyboard.

Why care? Well, using Vim commands when editing any sort of document really allows you to do stuff really quick once you have a pretty decent understanding of how to use the commands. Traversing text files and such like becomes a lot less mundane, performing edit based transformations becomes quick and effective, etc etc.

The book I am talking about is called Learning the Vi and Vim Editors, 7th Edition. It came to my attention while browsing Safari as this edition is only a few months old. I’m about 5 chapters in and I must say that its very well written and straight to the point. If you are in the market for such a book then I would happily recommend this one.

Also…

Until around 6 or so weeks ago I didn’t know Vim like functionality could be emulated within any of the major applications I use (namely VS) but to my surprise there was – ViEmu. Now you can use all those Vim commands within VS. The same people also provide an emulator for Office based products – Word, and Outlook (I think those are just the two) as well as SQL Management Studio.

Our cries have finally been answered then?

I for one am very happy that the next version of Visual Studio will finally embrace what some of us have been requesting for a long time now – UML adoption. A few months ago I mentioned some stuff that would be in the next version of VS and now that more has been going on I am thoroughly pleased.

For my part I’ve not really looked too much into what’s going on with the class diagrams etc and whether or not we will be graced with the standard l&f for UML diagrams. I for one hope that this does happen.

This is way overdue and both Eclipse and Netbeans have UML incorporated into them to a certain degree. Netbeans has pretty good UML support right now in fact. Of course the great thing about the addition of these UML features is that we will be able to get a more abstract view of our code and the way various components work with one another by reverse engineering it. Maybe this might not seem so helpful now, but when you revisit old code or encounter code that isn’t yours it will be.

I know that the VS team have had a tonne of stuff to do but why have we had to wait so long for tools which are pretty much essential? We’ve been palmed off to use things like Visio or fork out the big bucks for more comprehensive software.

Well, at least the wheels are finally in motion. Hip hip 😉

Before I go be sure to check out Channel9 this week for more insight on what’s coming up in VS2010. I briefly watched a video today just to get the gist of what has been added since I last looked and it was pretty decent.

Software pipelines

There is a pretty interesting architecture based on software pipelines that will at least allow your systems to utilize many-core processors in a far easier manner than other alternatives. This approach has a lot in common with fluid dynamics in that some principals are the same.

All service requests hit something called a pipeline distributor. The pipeline distributor routes the request to the appropriate pipeline. What is pretty nice about this approach is that the pipelines within a pool can delegate requests to other pipelines within the same pool  or even delegate requests to another pipeline distributor that maps requests to a different set of pipelines within a different pipeline pool.

I can’t do this approach justice myself via a simple blog post but upon further searching I came across a rough cuts book named Software Pipelines: The Key to Capitalizing on the Multi-core Revolution. I’ve quickly skimmed the book just now and it looks as though it covers the subject quite well.

Results: Using a dark theme in VS for a week

As I mentioned several days ago I’ve been seeing if a dark theme in VS would help my eyes a little. The short of it is – no, no it didn’t. The major sore point is that if you use a dark theme in VS then you find yourself constantly swapping between dark (VS) and light (web content, content in general). The latter of course doesn’t sound like its particularly good for you and I’d definitely concur with that.

I actually found that my background was slightly off-white in my VS settings and since changing it to pure white around 3 or so days ago I’ve found that my eye strain has just disappeared. Funny thing is I can never remember changing the background colour.

I’ve no doubt that the colour schemes used in VS are very subjective so I won’t announce that light themes are the best, but it seems to work well for me.