Latest Tweet:
  • Loading...

I try to keep this blog more or less focused on software development, but every now and then I think it’s good to throw in some personal updates as well… Last week Hege and I went up to Cairns for a dive expedition with TAKA Dive to the Northern Great Barrier Reef and Coral Sea. Before the trip we did some research, checking out YouTube video and Flickr photos from the area, but the trip turned out even better than what we dared hop fore. Already after the first dives on Ribbon Reef #10 a group of 6-7 Dwarf Minkie Whales came up to the boat. We got to snorkel with the animals, and it was just unreal having a 6 meter animal swimming just couple of meter underneath me. Another highlight of the trip was the diving at Osprey reef - heaps of sharks, big fishes and amazing visibility (30-40 meters). We also did a shark feed at North Horn, which attracted schools of white tip reef shark, gray whaler sharks, and some oceanic white tip sharks. On one of Hege’s photos we could count more than 30 sharks in one shot. So I don’t know the total number, but they were plentiful. We did a total of 14 dives over a 5 day/4 night trip, and got to sea sharks, whales, turtles, big schools of fish, amazing healthy coral reefs and more.

We were about 30 people on the boat, but it never felt crowded. It had plenty of space, good cabins, modern mid-deck with plasma TV’s and computers where we watched the video of the days diving every night. The food was top notch, including dishes like lamb roast, roast beef and homemade lasagna. The crew did an awesome job, and I can’t do anything but highly recommend TAKA for anyone wanting a great dive expedition to the Great Barrier Reef.

I’m going to keep this post short, and Hege have also posted a more lengthy story on her blog, as well as heaps of photos on Flickr. I’m including some of the best once here, but I strongly recommend checking out her Flickr feed.

MinkieWhale  PotatoCod

Shark1 Shark2

Shark3  Shark4

Dinner with Andrew, Jon, Tom and Ian This week I attended CodeCampOz in Wagga Wagga, a five hour drive from Melbourne and Sydney. Code camp is a free to attend, community driven developer conference. I had an fantastic time in Wagga, made some new friends, learned a few things and had a blast. The content was really top notch, with 17 sessions (including pre-conf) spanning a wide variety of topics such as SQL Server 2008, Silverlight, WPF, UX, Facebook, Visual Studio, SyncLinq and more, presented by some of Australia's most talented developers and speakers.

I had the pleasure of kicking off the conference with the first session on how to build interactive video applications using Silverlight. The session was about how you can encode script commands into a video file using Expression Media Encoder and program against the markers. The session was one large demo building up the video player using Expression Blend 2.5. The video I used is a dive video from our holiday in Egypt back in 2007. When ever there is a fish on the screen an event occur, and the app call out to Wikipedia to get facts about the fish. To retrieve the data from Wikipedia I use an open API from Futef. I've embedded the final video player in this post, as well as a link to the source code if you want to play with it your self. The play/pause/forward/backward buttons are taken from Jose Fajardo's amazing blog where he re-does many of the popular UI's like iTunes, Media Player and MSN Messenger in Silverlight.

encoderscreenshot 

A big thanks to Andrew Browne and Ian Thomas for the drive to Wagga, Greg Low and Mitch Denny for organizing an amazing event, and to everyone for all the good conversations. For a full recap of what went down in Wagga check out the Twitter hash-tag, and the Flickr tag for pictures.

Because of cross-domain scripting limitations the embedded player does not include map integration. Check out these two links for alternative versions:

download Download Interactive dive video in Silverlight

One of the activities me and Hege have really gotten into the last year is scuba diving. I'm currently "PADI Advanced Open Water" certified and have 39 logged dives. Hege got me a an awesome Suunto D6 dive computer for Christmas (she has the D9 model). If you buy the (way over priced) computer cable you can sync your Suunto watch with your computer using the "Suunto Dive Manager" application. Once synced to your computer the app gives you all kinds of cool stats, like dive profile, air consumption (if you have the D9 model), temperature, maximum depth, total dive time and lots of other interesting stuff.

suuntodivemanager

Being a programmer I immediately started poking around in Suunto DM trying to figure ut how to access my dive log from code. Turns out Suunto store all my dives in a Microsoft Access database. When I first discovered this I was pretty happy thinking this was going to be easy as stealing candy from a kid. This was until I discovered Suunto had applied a "one table to rule them all"-database design. The main "Items"-table has 82 (!) numbered columns (custom_1, custom_2 etc.). The only reasonable (?) reason I can think off for this design has to be that Suunto at some point migrated from a proprietary database-like binary format to Access, and that they kept some of the same "data structures" for easy migration. At least that's what I hope... for their sake.

suuntodivemanagerdb

My first idea was to see how well the ADO.NET Entity Framework would play with this database deisign. After all EF is supposed to give you that extra flexibility when mapping objects to data. I did some research only to realise that Access won't be supported by EF v1.0. Danny Simmons, developer on the ADO.NET EF team, gives some background information in a forum post from back in July 2007:

"OLE-DB ado.net provider has not been extended to support the entity framework, and we do not currently have plans to do so in our first release. Further, this would be a fairly difficult effort because OLE-DB doesn't provide enough information in general to translate CQTs (canonical query trees--the entity framework intermediate query representation) to a particular back-end query syntax."

I sent Danny an e-mail to check if this was still the case. Turns out it is. In theory you could use a third party ODBC provider, but according to Danny you probably going to need a custom Access provider in order to use ADO.NET Entity Framework on top of Access databases.

So, since ADO.NET EF was out of the picture I was pretty much left with the default LINQ to SQL support in .NET 3.5 (no way I was going to write the T-SQL by hand). Officially only SQL Server 2000 and 2005 is supported by LINQ to SQL, but it turns out the DataContext object accepts a IDbConnection in its constructor. By passing in a OleDbConnection you can have LINQ talk to an Access database. You will not get design time support in Visual Studio 2008, and have to write all the mapping classes your self. But at least you can execute some basic LINQ queries. The LINQ runtime will not now that it's talking to a Access database, and it will generate SQL code as if it was running against a SQL Server. But for basic SELECT queries I haven't gotten into trouble yet.

This is how happy you get when you discover you can use LINQ against your dive log!

I'll write a follow up post on the actual implementation of my LINQ layer on top of the Suunto Dive Manager database. For now a class diagram might give you a an idea of how the end mapping looks like.

SuuntoLINQ

Do you care about Microsoft Access support in ADO.NET Entity Framework? Or are you perhaps into diving yourself? Let me know in the comments section!

<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910