I had a great conversation with MVP Einar Ingebrigtsen. He was the one who invited me to Wave, and I figured why not use Wave to do an interview on his latest project. He has been working on an application for a Norwegian television show called “De Ukjente”. It is an WPF application for Microsoft Surface. In this interview he talks about all the challenges he faced creating this application.

It is apparent that Einar is a developer with a taste for developing quality software. It really shines thru in this interview.

First a couple of “teaser” screenshots

The first one is for the actual application, and the next ones are from the admin console

You can even watch the show here

..and then the interview

1) What problem does your software solve ?

The television program was a gameshow, and their alternative was to have physical items on a table for the interaction. The purpose of the gameshow is to match known professions with unknown persons in studio. The application was used to solve this interaction, and more. The administrator could send clues to the tables that was displayed per face when touched. In addition there was a monitor application that the gameshow host used to monitor the interaction.

2) What did you use to develop this software ? WPF?

The project was originally not targetting surface, but Windows 7 multitouch and HP Touchsmart desktop machines, so we started out in WPF 4. But 2 weeks before we were supposed to be finnished, we got hold of 2 surface tables and decided to go for Surface. We then needed to rewrite the touch logic, which was fairly simple since I had pretty much abstracted that away. And we ended up doing a WPF 3.5 SP1 solution using the Surface SDK 1.0.

3) How did you develop the user interface ? Is it all your work, or did you do it togheter with a designer ?

The television channel provided the graphics elements in Adobe Illustrator format - they controlled the look. I did not do any graphics myself, but was in control of the layout of things and had some “artistic freedom”.

4) Assuming you used XAML. Did you write the raw XAML or did you use Blend ?

Handwritten in Xaml for the most part - only did a couple of storyboards in Blend. I feel a lot more productive in Xaml. When I first started doing Xaml based development, I started in Blend, but after å while I ended up feeling a lot more productive hand-writing Xaml.

5) Did you use any design patterns to shape the user interface. MVVM?

The entire solution was built around MVVM and was 100% test driven all the way from the backend to the UI. All in all the solution consists of 7-10 views, all with different viewmodels, some user controls with their own viewmodels and data from a database with an abstraction layer built on top of DevExpress Persistent Objects. It uses commands for handling behavior. It was crucial to go with test driven and use well known patterns, as this was to be on television and we needed to have control of code quality right from the start.

6) Did you have any challanges related to the fact that you developed for Microsoft Surface ?

My main challenge was the lack of hands on with an actual surface during the main development. I was pretty much doing this blindfolded. Had a chance the last day of development to sit down with the actual surfacetables and tweak things. The simulator worked out pretty good for me though. The challenges in the project was more related to other technical difficulties, such as concurrency, realtime data transfers between all the clients and such.

7 ) Did you have any bugs in production, that is in the TV show ?

Bugs - what do you mean? :) Well, the first show we had a couple of issues. The entire solution was using UDP broadcasting to let all the clients communicate with each other, they shared this code. That all worked out great, only thing was I left some experimental code in the receiverthread that allocated 10MB of data everytime an UDP packet was received, needless to say - OutOfMemoryException occured a couple of times. But thanks to the fact I did it all TDD, we got lucky and didn’t have much bugs and the ones that occured was really easy to get fixed and tested. After the second show I never heard back from the TV channel, which is a good thing. Only thing I heard from them was that they wanted to do a nother program with surface in it, so look out on NRK2 at the end of October, there will be a program called Tekno with a WebBrowser created for Surface that can be rotated and scaled and moved around on the table. Also something I will be putting up a blogpost on how to do, btw.

8) I have been wathcing a couple of episodes of the show, and it seems the participants are having some problems moving items on the screen. I’m guessing this has nothing to do with you, and everything to do with the nature of MS Surface

Both yes and no. We had some issues with lighting in the studio. The technology behind surface uses cameras within the table that captures the interaction on the table, if one is not careful with the lighting it will think that shadows on the table are interaction. That being said, we had a bug we didn’t have time to fix - the snap mechanism didn’t take into consideration the scaling of the pictures being moved. So in some cases the faces did not snap. It is not that apparent on the show, since we prepped the contestants to be aware of this. But some times you can actually see this problem. You can also see they have some problems moving things at all, and this is because of lighting in the studio.

F Share