May 11th, 2007

Markov ScreenshotAfter I installed MonoDevelop and perused the Banshee source code - a music management and playback application for gnome written in C# + Gtk# - I decided it was time to write my first Mono application. Actually, it’s a rewrite of something I tried to start a while back involving Markov chains, but really there wasn’t much to what I did then. Not that there is much to what I did this time, but it’s a little more thought out than my previous attempt. And it was done with MonoDevelop and Gtk#.

One thing though is that I needed a debugger to track down some problems, and because of the lack of a graphical debugger in MonoDevelop I wound up booting back into Windows and debugging the MarkovDictionary library with Visual Studio. You can look at this in two ways:

  1. Cheating.
  2. A great sign that it is completely possible to move seamlessly between Visual Studio and MonoDevelop with C#.

I’ll leave it up to you to infer which way I lean.

Here’s the source in case you care enough to try it out. If you haven’t used/read about Mono before now, it’s an implementation of the CLR for Unix/Linux; the code in MarkovDictionary.cs is pure C# which can be (and was) compiled and run on my Linux system - currently Ubuntu Edgy Eft.

The Idea

Though the idea here was to write an introductory application in C# using MonoDevelop - a far cry from Miguel de Icaza’s “introductory” C# program of a C# compiler that could ultimately parse itself - the Markov aspect of this is pretty cool so I’ll explain it.

Bah, no I won’t. But I’ll let a guy called Zarf explain it. That by the way is where I got the idea to do this.

Leave a Reply