Saturday, November 24, 2007
On Wednesday I listened to an interesting talk on IronRuby by Ivan Porto Carrero.

Ivan has a set of interesting posts on IronRuby on his blog, including a few examples on how to wire up WPF apps using IronRuby rather than XAML.

The slides from his talk are available.

Thanks Ivan!

Next session at the Wellington .NET User Group is 5 December. More details to follow.

posted on Saturday, November 24, 2007 7:51:10 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]
 Friday, November 16, 2007
Wellington is a happening place if you want to learn something new. Last week at the .NET user group we had a great presentation by Jeremy Boyd on the developer features in SQL 2008.

Next Wednesday we've got a presentation on IronRuby by Ivan Porto Carrero.

Mark Carroll is starting a new Team System user group in Wellington, the first meeting is 28 November (Jeremy has the details).

As well as .NET and Team System, other user groups in Wellington are:

If you managed to go to all of them, you'd be eating lots of pizza!


posted on Friday, November 16, 2007 9:45:09 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]
 Wednesday, November 14, 2007
Perhaps more interesting than the other PowerShell features announced in the past week, the SQL 2008 team will release a PowerShell provider in their latest CTP.

For a little more on providers, see my earlier post. I hope the provider allows data access, and not just management capability.

Looking forward to having a play with that when I can get my hands on it!

posted on Wednesday, November 14, 2007 11:10:50 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]
Reading, transforming and instrumenting MSIL has been something that has kept me interested (and sometimes over-wraught) since the .NET framework came out in 2000.

It's interesting to see the benefits that a common intermediary language and a virtual machine bring to the party: difficult problems can be dodged by programming language designers (such as garbage collection); languages can interoperate; compiled code can be platform independant, and JIT compiled when needed -- and doing fun stuff with compiled code is easier (and more fun!) with MSIL or Java bytecode.

A few interesting things have happened with Java bytecode over the past few years, with a couple of high profile cases recently. Java bytecode is no longer just the output of a java compiler and the input for the Java Virtual Machine:
  • Google's new Android phone platform translates from Java bytecode to its own virtual machine -- which is not a JVM (via Miguel and Stefano)
  • IKVM.NET, a runtime and set of libraries that convert Java bytecode to .NET MSIL
  • Jython, a version of the python language that compiles to the JVM
Of course the same thing happens in the .NET land -- there are a multitude of languages that compile to MSIL, and MSIL can be run on the Microsoft .NET CLR, Mono's runtime engine and a few other runtimes built by Microsoft and third parties.

The angle taken by Google in developing an alternative virtual machine, rather than using the CLR or Sun's JVM is very interesting. On one hand, they have the benefit of full control of their platform, and this move means that they are not reliant on other vendors solutions. They promise to open source the platform, so the typical arguments about closed proprietary platforms may not apply, but it will still be interesting to see how another VM fits into the ecosystem.

posted on Wednesday, November 14, 2007 10:14:33 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]
 Thursday, November 08, 2007
I think it was Derek that first convinced me of the beauty of the Guid, and I have been using them in databases ever since.

Wade Wright has written up the "Gospel of the Guid". It has a humorous coverage of some of the good Guid reasons:

  • No database roundtrips to get the next integer ID
  • Easy merging, mirroring and deletion of erroneous merges
  • Ability to wire up relationships in memory before saving
I remember when I first started using Guids there was talk of them not being unique, due to dodgy network cards having the same MAC address. Thankfully that's no longer a problem.

Something that I struggle with though, is the lack of type safety when using Guids. e.g.

Guid personId = Guid.NewGuid();
Guid bookId = Guid.NewGuid();

Library.BorrowBook(personId, bookId);

...or is it this way around?

Library.BorrowBook(bookId, personId);

There's no compiler checking that the correct Guid is passed to the right parameter. I've been toying with a Guid wrapper that would be a bit like a typedef in C++, but typesafe. Has anyone already done this?
posted on Thursday, November 08, 2007 9:10:30 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [3]
I seem to spend less time in Virtual PC and more time in (nested) remote desktop sessions these days. I'm not a huge mouse fan, and when using the keyboard I need to do this when I'm in a windowed remote-desktop session:
  • ALT+PgDn / ALT+PgUp - cycle through programs (ala ALT-TAB)
  • ALT+Home - display start menu (ala CTRL-ESC)
My fingers still do the regular ALT-TAB / CTRL-ESC the first time round, but after a while I remember to use the alternate shortcuts.

Thanks to Mark Wagner.

posted on Thursday, November 08, 2007 8:36:14 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]
 Wednesday, November 07, 2007
Adam from Xero and I went to look at the Eee PC at Dick Smith's today. Quite a cute little PC that has no spinning hard drive, no fans and only weighs 900 grams.

Looks like a nice little email / web PC, but the screen is a little tiny for my liking. The install of Linux is quite smooth, and Firefox is integrated nicely onto the desktop.

Quite good for $600NZ though!


posted on Wednesday, November 07, 2007 9:13:35 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [4]
I've been looking forward to the CTP of PowerShell 2 for a while, and it's finally here.

I'm looking forward to installing it on a VM tonight (don't install it on your production / main desktop system just yet).

The stand-out features from the two blog posts (The Community Technology Preview (CTP) of Windows PowerShell 2.0, What's New in CTP of PowerShell 2.0) are:

PowerShell Remoting

"Windows PowerShell 2.0 provides support for executing Cmdlets and Scripts remotely. PowerShell Remoting allows managing a collection of remote machines from a single client. Managing remote computers using PowerShell 2.0, requires that PowerShell 2.0 be installed on all the computers taking part in the operation; that is the client computer and the computer(s) being managed."

This solves a problem that a lot of sysadmins have - being able to nicely administer many machines in their farm / network using PowerShell.

Background Jobs

"Windows PowerShell 2.0 introduces the concept of a background job (PsJob).  A PsJob runs a command or expression asynchronously and "in the background" without interacting with the console. The command prompt returns immediately and you can query for the job results at your convenience.  You can run background jobs on a local or remote computer."

Hurrah! I was surprised how much I missed this unix feature, so it's good to see background jobs make an appearance. I'll be interested to see if they have changed the threading model within PowerShell.

Graphical PowerShell

"This release includes a very early alpha version of the new graphical shell..."

Definitely something that people want, although others have filled the void quite well up until now. Looking forward to playing with this.

Well done PowerShell team!


posted on Wednesday, November 07, 2007 9:27:23 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]