<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Jonas Follesø</title>
    <link>http://jonas.follesoe.no/</link>
    <description>Recent content on Jonas Follesø</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <copyright>Some rights reserved - 2016</copyright>
    <lastBuildDate>Sat, 23 Apr 2016 16:49:58 +0200</lastBuildDate>
    <atom:link href="http://jonas.follesoe.no/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Turning on the GoPro</title>
      <link>http://jonas.follesoe.no/seestarbuild/turning-on-the-gopro/</link>
      <pubDate>Sat, 23 Apr 2016 16:49:58 +0200</pubDate>
      
      <guid>http://jonas.follesoe.no/seestarbuild/turning-on-the-gopro/</guid>
      <description>&lt;p&gt;The &lt;a href=&#34;https://bitbucket.org/mbari/seestar/src/cdf1be6cf2767a04bdbfaf30209a50e14e1dab07/SeeStar_II_Release/Software/SeeStar_ProMini/SeeStar_ProMini.ino?at=master&amp;amp;fileviewer=file-view-default&#34;&gt;source code for the Arduino Sketch (firmware)&lt;/a&gt; for the SeeStar camera is available as part of the SeeStar repository. I struggled a bit to build an deploy the code to the Arduino Pro Mini. The SeeStar documentation says you should use the online IDE from &lt;a href=&#34;https://codebender.cc/sketch:199916&#34;&gt;Codebender&lt;/a&gt;. I had some issues getting it to work, so after &lt;a href=&#34;https://bitbucket.org/mbari/seestar/issues/4/seestar2_lib&#34;&gt;filing a bug on the SeeStar repo&lt;/a&gt; software developer on the SeeStar team &lt;a href=&#34;http://www.mbari.org/maughan-thom/&#34;&gt;Thom Maughan&lt;/a&gt; uploaded the code and library to the repo.&lt;/p&gt;

&lt;p&gt;The way you configure the SeeStar camera to set interval length is using the serial port. When you connect to the camera using serial, you get some version information etc. You can also issue commands to test different features, such as turning on and off the GoPro or LED light.&lt;/p&gt;

&lt;p&gt;I had some challenges having the camera register my commands. The SeeStar firmware use a &lt;code&gt;SerCmd&lt;/code&gt; library to handle commands entered sing the serial port. The library lets you assign commands to handler functions like this:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-c++&#34;&gt;SCmd.addCommand(&amp;quot;HELP&amp;quot;, menu);
SCmd.addCommand(&amp;quot;MENU&amp;quot;, menu);
SCmd.addCommand(&amp;quot;PARAM&amp;quot;, get_param);
SCmd.addCommand(&amp;quot;TIME&amp;quot;, get_time);
SCmd.addCommand(&amp;quot;SETTIME&amp;quot;, set_time);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;From the Arduino IDE you can connect to the board using the Serial Monitor tool:&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;http://static.follesoe.no/seestarbuild/serial-monitor.png&#34; alt=&#34;Arduino IDE Serial Monitor&#34; /&gt;&lt;/p&gt;

&lt;p&gt;The problem I ran into was that commands wouldn&amp;rsquo;t execute when I typed them in and hit enter. After doing some debugging, looking through the source code of &lt;code&gt;SerCmd.cpp&lt;/code&gt; I realized that the command terminator character was set to &lt;code&gt;\r&lt;/code&gt;, (Carriage return), while the Serial Monitor defaults to &lt;code&gt;\n&lt;/code&gt; (New line). You can change the delimiter in Serial Command tool, and after doing that I was able to issue commands.&lt;/p&gt;

&lt;p&gt;The SeeStar is connected to the GoPro camera using the Hero bus connector. The GoPro supports accessories such as external battery and LCD screen though backpacs. Using that port, and setting pin 12 to HIGH for 100ms will turn the camera on. I was able issue the test command to turn on the camera, and it was quite satisfying hearing the beep of the GoPro turning on!&lt;/p&gt;

&lt;p&gt;&lt;blockquote class=&#34;instagram-media&#34; data-instgrm-version=&#34;6&#34; style=&#34; background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);&#34;&gt;&lt;div style=&#34;padding:8px;&#34;&gt; &lt;div style=&#34; background:#F8F8F8; line-height:0; margin-top:40px; padding:50.0% 0; text-align:center; width:100%;&#34;&gt; &lt;div style=&#34; background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAAGFBMVEUiIiI9PT0eHh4gIB4hIBkcHBwcHBwcHBydr+JQAAAACHRSTlMABA4YHyQsM5jtaMwAAADfSURBVDjL7ZVBEgMhCAQBAf//42xcNbpAqakcM0ftUmFAAIBE81IqBJdS3lS6zs3bIpB9WED3YYXFPmHRfT8sgyrCP1x8uEUxLMzNWElFOYCV6mHWWwMzdPEKHlhLw7NWJqkHc4uIZphavDzA2JPzUDsBZziNae2S6owH8xPmX8G7zzgKEOPUoYHvGz1TBCxMkd3kwNVbU0gKHkx+iZILf77IofhrY1nYFnB/lQPb79drWOyJVa/DAvg9B/rLB4cC+Nqgdz/TvBbBnr6GBReqn/nRmDgaQEej7WhonozjF+Y2I/fZou/qAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;&#34;&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&#34; color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;&#34;&gt;&lt;a href=&#34;https://www.instagram.com/p/BEUCqsvEA_0/&#34; style=&#34; color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none;&#34; target=&#34;_blank&#34;&gt;A video posted by Jonas Follesø (@follesoe)&lt;/a&gt; on &lt;time style=&#34; font-family:Arial,sans-serif; font-size:14px; line-height:17px;&#34; datetime=&#34;2016-04-17T19:29:56+00:00&#34;&gt;Apr 17, 2016 at 12:29pm PDT&lt;/time&gt;&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;script async defer src=&#34;//platform.instagram.com/en_US/embeds.js&#34;&gt;&lt;/script&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Soldering and the Arduino Pro Mini</title>
      <link>http://jonas.follesoe.no/seestarbuild/soldering-arduino-pro-mini/</link>
      <pubDate>Sat, 26 Mar 2016 19:19:27 +0100</pubDate>
      
      <guid>http://jonas.follesoe.no/seestarbuild/soldering-arduino-pro-mini/</guid>
      <description>&lt;p&gt;Today I&amp;rsquo;ve done the first bit of work on the actually SeeStar camera. I&amp;rsquo;ve soldered breakout pins onto the Arduino Pro Mini, so that I can program it and connect it to the SeeStar Arduino Shield. I&amp;rsquo;ve only done soldering a couple of times before, so to learn the basics I followed this &lt;a href=&#34;https://learn.sparkfun.com/tutorials/how-to-solder---through-hole-soldering&#34;&gt;How to solder - Through-hole Soldering&lt;/a&gt; tutorial from SparkFun.&lt;/p&gt;

&lt;p&gt;I had a &amp;ldquo;learn to solder&amp;rdquo; kit I bought years ago laying in my box of electronics, so I used that for practice. SparkFun has a whole &lt;a href=&#34;https://www.sparkfun.com/search/products?term=learn+to+solder&amp;amp;what=products&amp;amp;_ga=1.267798794.588480341.1454956611&#34;&gt;series of these kits&lt;/a&gt; that teach you soldering by building simple electronics and toys. The kit I built used a microphone to blink four LEDs when ever sound was detected. I was quite pleased when it worked when I connected the battery.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;http://static.follesoe.no/seestarbuild/soldering-led-sound-toy.jpg&#34; alt=&#34;Complete sound-to-LED kit&#34; /&gt;
&lt;em&gt;Complete sound-to-LED kit&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After building some confidence on the sound to LED kit I soldered the breakout pins onto the Arduino Pro Mini. SparkFun has a tutorial on &lt;a href=&#34;https://learn.sparkfun.com/tutorials/using-the-arduino-pro-mini-33v&#34;&gt;Using the Arduino Pro Mini 3.3V&lt;/a&gt; which provides some good information on the Arduino Pro Mini and how to program it. To power and program it I use the &lt;a href=&#34;https://www.sparkfun.com/products/9717&#34;&gt;FTDI Cable from SparkFun&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;http://static.follesoe.no/seestarbuild/arduino-pro-mini-usb.jpg&#34; alt=&#34;Arduino Pro Mini running blinking LED example&#34; /&gt;
&lt;em&gt;Arduino Pro Mini running blinking LED example&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Once I had verified the Arduino Pro Mini was working correctly I tried to hook it up to the SeeStar Arduino Shield. The SeeStar documentation describes the procedures to power and test the shield. I used an old 12 Vdc adaptor I had laying around for power. Once the Arduino Pro Mini was connected to the shield it powered up and the blinking LED sketch was running.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;http://static.follesoe.no/seestarbuild/arduino-pro-mini-seestar-shield.jpg&#34; alt=&#34;Arduino Pro Mini connected to SeeStar Arduino Shield&#34; /&gt;
&lt;em&gt;Arduino Pro Mini connected to SeeStar Arduino Shield&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That concludes a productive day, both in terms of learning new skills and making actuall progress on the SeeStar camera. Next task is to program the Arduino Pro Mini with the actual SeeStar code and have the Arduino Shield connect to the GoPro Hero 3 to turn it on/off at set intervals.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Learning the basics</title>
      <link>http://jonas.follesoe.no/seestarbuild/learning-the-basics/</link>
      <pubDate>Sun, 06 Mar 2016 14:45:32 +0100</pubDate>
      
      <guid>http://jonas.follesoe.no/seestarbuild/learning-the-basics/</guid>
      <description>&lt;p&gt;Part of the reason I wanted to take on the SeeStar project was to learn more about electronics. I write software and program computers every day, but building custom hardware and electronics is something I do not have much experience with.&lt;/p&gt;

&lt;p&gt;This weekend I&amp;rsquo;ve spent some time learning more about the basics of electronics. The &lt;a href=&#34;https://learn.sparkfun.com/tutorials&#34;&gt;SparkFun web site&lt;/a&gt; has a wealth of fantastic learning reasones. Some of the articles and tutorials I&amp;rsquo;ve work through over the weekend are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://learn.sparkfun.com/tutorials/what-is-electricity&#34;&gt;What is Electricity?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://learn.sparkfun.com/tutorials/voltage-current-resistance-and-ohms-law&#34;&gt;Voltage, Current, Resistance and Ohm&amp;rsquo;s Law&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://learn.sparkfun.com/tutorials/what-is-a-circuit&#34;&gt;What is a Circuit?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://learn.sparkfun.com/tutorials/polarity&#34;&gt;Polarity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://learn.sparkfun.com/tutorials/how-to-use-a-multimeter&#34;&gt;How to Use a Multimeter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://learn.sparkfun.com/tutorials/how-to-use-a-breadboard&#34;&gt;How to Use a Breadboard&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also spent some time installing the Arduino software and getting it connected to old Arduino Duemilanove. I bought the Arduino and some components back in 2009, but haven&amp;rsquo;t really done much with them, so it was fun to try out some of the concepts from the SparkFun tutorials.&lt;/p&gt;

&lt;p&gt;The SeeStar uses an Arduino Pro Mini, a much smaller version than the Duemilanove, but the same principles apply. The SeeStar software is already written, but understanding how the different parts work will make it easier to test each component in isolation when I start putting together the camera.&lt;/p&gt;

&lt;p&gt;The little circuit on the picture is turning the LED connected to the Arduino on or off. The source code is included below.&lt;/p&gt;

&lt;p&gt;Right now I&amp;rsquo;m waiting for break away headers for the Arduino Mini Pro. Once I get them I need to do some soldering, so the next SparkFun tutorial I plan to go through is on &lt;a href=&#34;https://learn.sparkfun.com/tutorials/how-to-solder---through-hole-soldering&#34;&gt;how to do through-hole soldering&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-c&#34;&gt;#define LED 13    // LED connected to digitial pin 13
#define BUTTON 7  // input pin for push button

int val = 0;
int old_val = 0;
int state = 0;

void setup() {
  pinMode(LED, OUTPUT);   // LED is output
  pinMode(BUTTON, INPUT); // button is input
}

void loop() {
  val = digitalRead(BUTTON);

  if (val == HIGH &amp;amp;&amp;amp; old_val == LOW) {
    state = 1 - state;
    delay(10);
  }

  old_val = val;

  if (state == 1) {
    digitalWrite(LED, HIGH);  // turns on LED
  } else {
    digitalWrite(LED, LOW);   // turns off LED  
  }
}
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
    <item>
      <title>Bringing this blog back to life!</title>
      <link>http://jonas.follesoe.no/post/bringing-this-blog-back-to-life/</link>
      <pubDate>Wed, 17 Feb 2016 21:00:00 +0100</pubDate>
      
      <guid>http://jonas.follesoe.no/post/bringing-this-blog-back-to-life/</guid>
      <description>&lt;p&gt;My previous blog post was published on the 28th of April 2012, almost four years ago! I&amp;rsquo;ve kept the blog online for reference purposes, as I still get a bit of traffic from people Gooling for various .NET-related topics.&lt;/p&gt;

&lt;p&gt;As most programmers, I return from a period of absence from writing not by writing something new, but by upgrading my blog platform. I&amp;rsquo;ve migrated all my old content over from &lt;a href=&#34;https://github.com/cloudhead/toto&#34;&gt;Toto, the 10 second blog-engine for hackers&lt;/a&gt; to &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo, A Fast &amp;amp; Modern Static Website Engine&lt;/a&gt;. The reason for the move was the fact that I wanted a static, fully customizable platform. Toto runs on Ruby, and hasn&amp;rsquo;t received any commits since 2013.&lt;/p&gt;

&lt;p&gt;All the old content is available in a separate section called &lt;a href=&#34;http://localhost:1313/oldblog/&#34;&gt;Blog Archive&lt;/a&gt;. I&amp;rsquo;ve kept the old URLs working so that I don&amp;rsquo;t loose any Google-mojo this blog might have left. I wanted to keep these posts separate, as they span the years 2005 to 2012, and allot of the content is outdated. Going forward the content on my page will probably be more diverse and cover other topics that interest me; such as traveling, triathlon training, GoPro videography and the under water world. Hugo has great support for organizing  your content, so I might set up different sections for specific projects or types of content.&lt;/p&gt;

&lt;p&gt;The first major project I will cover on this blog is my build of the &lt;a href=&#34;https://bitbucket.org/mbari/seestar/&#34;&gt;SeeStar II open-source underwater time-lapse imaging system&lt;/a&gt;. I will introduce this project in a separate post.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>First components have arrived!</title>
      <link>http://jonas.follesoe.no/seestarbuild/first-components-have-arrived/</link>
      <pubDate>Wed, 17 Feb 2016 21:00:00 +0100</pubDate>
      
      <guid>http://jonas.follesoe.no/seestarbuild/first-components-have-arrived/</guid>
      <description>&lt;p&gt;The first set of components have arrived. This week I received the Arduino shield, the GoPro 3 Battery Eliminator, and the DC-DC converter.&lt;/p&gt;

&lt;p&gt;The Arduino shield is one of the key components in the SeeStar. The Arduino Pro Mini attaches to the shield, and through the shield it will provide power and control the GoPro Camera and the LED light.&lt;/p&gt;

&lt;p&gt;The GoPro Battery Eliminator will be used to power the GoPro through the SeeStar battery module, instead of using the normal GoPro battery.&lt;/p&gt;

&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;If you are using the GoPro camera for extended periods, it is better to power the camera with a Battery Eliminator instead of connecting it to the camera’s mini-USB charger.&lt;/p&gt;

&lt;p&gt;The coupler style Battery Eliminator snaps into the battery slot of all GoPro HERO3 and HERO3+ models and latches like the GoPro lid for a secure fit. Using a Battery Eliminator eliminates two sources of heat. The charging circuit in the camera and the battery itself, which gets warm while charging. Less heat makes the camera more reliable. Overheating can cause unexpected shutdown of the camera. A Battery Eliminator also bypasses the problems that some users have had with the GoPro charging logic causing the camera to freeze and require a reset.&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;http://cam-do.com/products/battery-eliminator-h3&#34;&gt;CamDo Battery Eliminator Product Description&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;

&lt;p&gt;I don&amp;rsquo;t have enough components yet to start the build, but once I get the Arduino Pro Mini and the 30-Pin Ridax Connector I should be able to automatically turn the GoPro on and off at given intervals.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Looking for battery alternatives</title>
      <link>http://jonas.follesoe.no/seestarbuild/looking-for-battery-alternatives/</link>
      <pubDate>Thu, 11 Feb 2016 21:00:00 +0100</pubDate>
      
      <guid>http://jonas.follesoe.no/seestarbuild/looking-for-battery-alternatives/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been in contact with Battery Specialities to order the battery. They do not list the item on their website, nor do they ship it internationally. So currently I&amp;rsquo;m looking for alternatives. I have filed &lt;a href=&#34;https://bitbucket.org/mbari/seestar/issues/2/12-cell-nimh-battery-pack-from-battery&#34;&gt;a bug on the Bitbucket repository&lt;/a&gt;, and have gotten the following reply from Chad:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Our battery is a custom part number for them so I wouldn&amp;rsquo;t expect it to be on their website. Their sales team should be able to reference it, though. I will check with my contact there and make sure it is available. However, the battery is the easiest module to modify. It just needs to be in the 12-16Vdc range.&lt;/p&gt;
&lt;/blockquote&gt;
</description>
    </item>
    
    <item>
      <title>I have decided to build the SeeStar II</title>
      <link>http://jonas.follesoe.no/seestarbuild/decided-to-build-the-seestar/</link>
      <pubDate>Mon, 08 Feb 2016 21:00:00 +0100</pubDate>
      
      <guid>http://jonas.follesoe.no/seestarbuild/decided-to-build-the-seestar/</guid>
      <description>&lt;p&gt;I have decided to build the SeeStar II Project, and today I ordered the first set of parts.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Two Arduino Pro Mini (3.3v/8MHz) and a FTDI Cable 5V from SparkFun: $43.47.&lt;/li&gt;
&lt;li&gt;DC-DC Converter OKX-T/10-D12P-C from Mouser Electronics: $28.80.&lt;/li&gt;
&lt;li&gt;GoPro Battery Eliminator from CamDo: $69.79.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I have also contacted Chad Kecky, Electrical Engineer at Monterery Bay Aquarium Research Institute, who have offered to send me an Arduino shield (the only custom hardware part in this project) for beta-testing. The Arduino shield was the part I was most uncertain about, and which would be outside my skill level to build my self.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Building testable WP7 apps using Microsoft.Practices.Phone.Adapters</title>
      <link>http://jonas.follesoe.no/oldblog/testable-wp7-apps/</link>
      <pubDate>Sat, 28 Apr 2012 00:00:00 +0000</pubDate>
      
      <guid>http://jonas.follesoe.no/oldblog/testable-wp7-apps/</guid>
      <description>&lt;p&gt;I’m a big believer in Test Driven Development as an effective practice that helps me write high quality, maintainable code. TDD is a practice I not only apply on larger enterprise applications, but something I try to do even on smaller mobile apps. In the day of the Apple App Store or Microsoft Marketplace you are relying on Apple or Microsoft to approve your application before it’s made available to your users. The process typically takes around a week – meaning it can potentially take a week before you fix a bug and the update is made available to the users. Introducing a bug in your mobile app can greatly hurt your rating in the Marketplace/App Store. Given the fact that you cannot simply upload a quick fix to the app stores, like you can on a web application, having solid testing for mobile applications is even more important than for other types of applications.&lt;/p&gt;

&lt;p&gt;With this in mind I was thrilled to see that Microsoft Pattern &amp;amp; Practices had taken this to hearth in their latest guidance for building Windows Phone 7 applications. The latest guide includes three major topics:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;http://msdn.microsoft.com/en-us/library/hh848247.aspx&#34;&gt;Developing a Windows Phone Application using the MVVM Pattern&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;http://msdn.microsoft.com/en-us/library/gg490765.aspx&#34;&gt;Developing an Advanced Windows Phone 7.5 App that Connects to the Cloud&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;http://msdn.microsoft.com/en-us/library/hh830877.aspx&#34;&gt;Building Testable Windows Phone Applications&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have previously written &lt;a href=&#34;http://jonas.follesoe.no/2008/07/19/youcard-re-visited-implementing-the-viewmodel-pattern/&#34;&gt;several blog posts&lt;/a&gt; and given presentations on how the MVVM Pattern can help you separate the state and behavior of a piece of UI from the actual View-code. By moving state and behavior into a View Model-class with no UI dependencies, you can easily unit test the View Model in separation. If you would like to learn more about the MVVM-pattern I would strongly recommend my &lt;a href=&#34;http://jonas.follesoe.no/2010/03/07/mvvm-presentation-from-ndc2009-on-vimeo/&#34;&gt;presentation from NDC 2009&lt;/a&gt;, or the &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/hh848247.aspx&#34;&gt;MVVM-chapter from the P&amp;amp;P WP7 Guidelines&lt;/a&gt;.
To ensure that the View Model classes can be tested independently it is important that they do not have any external dependencies that are hard to test. Whenever a View Model depends on some external resource, such as a web service, we introduce an interface for that dependency, and enable some form of Dependency Injection on the View Model so that we can replace the dependency with a stub or a mock during test.&lt;/p&gt;

&lt;p&gt;When working against the Windows Phone 7 APIs you will quickly realize that they are not very test-friendly. The API consists of several static or sealed classes that provide access to core phone-functionality such as Location Services, Compass, Camera, Gyroscope or other sensors. Since the classes are sealed, and do not implement an interface, there is no simple way to test code accessing these classes directly. The solution in such cases is typically to define your own interface mimicking the underlying API, and then implement an Adapter class delegating through to the underlying API.&lt;/p&gt;

&lt;p&gt;To demonstrate this principle I have created a simple application that displays your current location and compass heading. Such an application would need to use two classes that are hard to test; the &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/system.device.location.geocoordinatewatcher.aspx&#34;&gt;GeoCoordinateWatcher-class&lt;/a&gt; and the &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/microsoft.devices.sensors.compass(v=vs.92).aspx&#34;&gt;Compass-class&lt;/a&gt;. A simple design, using the View Model pattern, would look something like this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;http://static.follesoe.no/testablewp7diagram1.jpg&#34; alt=&#34;Class Diagram illustrating the MVVM pattern&#34; /&gt;&lt;/p&gt;

&lt;p&gt;The problem with this design is how the TrackingViewModel-class is using the Compass-class and GeoCoordinateWatcher-class directly. It would be impossible to unit test the View Model, both because the Compass-sensor is not available in the simulator, but also just because of the fact that getting a location/compass reading takes time, and would make the tests slow and unreliable. Instead we are going to modify the design, and use the abstractions introduced by the Patterns &amp;amp; Practices team. We change our TrackingViewModel-class to depend on ICompass and IGeoCoordinateWatcher. At test-time we pass in mock-implementations of these two classes to enable testability, while at run-time we use the adapter classes GeoCordinateWatcherAdapter and CompassAdapter.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;http://static.follesoe.no/testablewp7diagram2.jpg&#34; alt=&#34;Class Diagram illustrating the MVVM pattern with testable Compass and GeoLocationWatcher classes&#34; /&gt;&lt;/p&gt;

&lt;p&gt;With this small change we can now write unit tests for the TrackingViewModel-class. Here is an example of some of the tests I have written for the View Model.&lt;/p&gt;

&lt;script src=&#34;https://gist.github.com/2520932.js?file=TrackingViewModelTest.cs&#34;&gt;&lt;/script&gt;

&lt;p&gt;Many people assume that you have to use an IoC-container to use Dependency Injection. That is not the case. My personal preference is to not introduce an IoC-container until it is necessary, and instead use overloaded constructors. The TrackingViewModel-class has two constructors, one that accepts the ICompass and IGeoCoordinateWatcher interfaces as parameters, and one default constructor that calls the parameterized constructor passing in the adapter classes as default. This enables testability, yet at the same time keeps the architecture of the application simple.&lt;/p&gt;

&lt;script src=&#34;https://gist.github.com/2520938.js?file=TrackingViewModelCtr.cs&#34;&gt;&lt;/script&gt;

&lt;p&gt;In this example I only use two of the wrapped classes provided by the Microsoft.Practices.Phone.Adapters project. In addition the project contains adapters for the following classes in the Windows Phone 7.1 SDK:&lt;/p&gt;

&lt;table&gt;
    &lt;thead&gt;
        &lt;tr&gt;
            &lt;th&gt;Wrapper&lt;/th&gt;
            &lt;th&gt;Implements&lt;/th&gt;
            &lt;th&gt;Abstracted Class&lt;/th&gt;
        &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;AccelerometerAdapter&lt;/td&gt;
            &lt;td&gt;IAccelerometer&lt;/td&gt;
            &lt;td&gt;Accelerometer&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;ApplicationFrameNavigationService&lt;/td&gt;
            &lt;td&gt;INavigationService&lt;/td&gt;
            &lt;td&gt;PhoneApplicationFrame&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;CameraCaptureTaskAdapter&lt;/td&gt;
            &lt;td&gt;ICameraCaptureTask&lt;/td&gt;
            &lt;td&gt;CameraCaptureTask&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;CompassAdapter&lt;/td&gt;
            &lt;td&gt;ICompass&lt;/td&gt;
            &lt;td&gt;Compass&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;            
            &lt;td&gt;GeoCordinateWatcherAdapter&lt;/td&gt;
            &lt;td&gt;GeoCoordinateWatcher, IGeoCoordinateWatcher&lt;/td&gt;
            &lt;td&gt;GeoCoordinateWatcher&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;GyroscopeAdapter&lt;/td&gt;
            &lt;td&gt;IGyroscope&lt;/td&gt;
            &lt;td&gt;Gyroscope&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;IsolatedStorageFacade&lt;/td&gt;
            &lt;td&gt;IIsolatedStorageFacade&lt;/td&gt;
            &lt;td&gt;IsolatedStorageFileAdapter, IsolatedStorageFileStreamAdapter&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;IsolatedStorageFileAdapter&lt;/td&gt;
            &lt;td&gt;IIsolatedStorageFile&lt;/td&gt;
            &lt;td&gt;IsolatedStorageFile&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;IsolatedStorageFileStreamAdapter&lt;/td&gt;
            &lt;td&gt;IsolatedStorageFileStream, IIsolatedStorageFileStream&lt;/td&gt;
            &lt;td&gt;IsolatedStorageFileStream&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;            
            &lt;td&gt;MessageBoxAdapter&lt;/td&gt;
            &lt;td&gt;IMessageBox&lt;/td&gt;
            &lt;td&gt;MessageBox&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;MotionAdapter&lt;/td&gt;
            &lt;td&gt;IMotion&lt;/td&gt;        
            &lt;td&gt;Motion&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;AccelerometerSensorReading&lt;/td&gt;
            &lt;td&gt;ISensorReading&lt;/td&gt;
            &lt;td&gt;AccelerometerReading&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;CompassSensorReading&lt;/td&gt;
            &lt;td&gt;ISensorReading&lt;/td&gt;
            &lt;td&gt;CompassReading&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;GyroscopeSensorReading&lt;/td&gt;
            &lt;td&gt;ISensorReading&lt;/td&gt;
            &lt;td&gt;GyroscopeReading&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;            
            &lt;td&gt;MotionSensorReading&lt;/td&gt;
            &lt;td&gt;ISensorReading&lt;/td&gt;
            &lt;td&gt;MotionReading&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;PhotoResultTaskEventArgs&lt;/td&gt;
            &lt;td&gt;TaskEventArgs&lt;/td&gt;
            &lt;td&gt;PhotoResult&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;The Microsoft.Practices.Phone.Adapters project can be added as a &lt;a href=&#34;https://nuget.org/packages/Microsoft.Practices.Phone.Adapters.Source&#34;&gt;NuGet-package&lt;/a&gt;. The package adds the interfaces/adapter files to your project, and you can choose to delete the once you don’t need (it is not a pre-compiled package). If you &lt;a href=&#34;http://www.microsoft.com/download/en/details.aspx?id=28804&#34;&gt;download the example project from the MSDN site&lt;/a&gt; you also get a set of pre-written mock-classes you can use in your Unit Test project to mock the different interfaces.&lt;/p&gt;

&lt;p&gt;If you want to learn more about making your WP7 applications testable I would strongly encourage you to &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/gg477144.aspx&#34;&gt;read the full guide on this on MSDN&lt;/a&gt;. As I mentioned in the introduction, testability is just one aspect of the Patterns &amp;amp; Practices Guide for WP7, and I will be covering other areas in a later blog post.&lt;/p&gt;

&lt;p&gt;The example application for this blog post is available at &lt;a href=&#34;https://github.com/follesoe/TestableGeoTrackerDemo&#34;&gt;https://github.com/follesoe/TestableGeoTrackerDemo&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Cross platform .NET mobile apps talk at NDC 2011</title>
      <link>http://jonas.follesoe.no/oldblog/cross-platform-mobile-ndc-2011/</link>
      <pubDate>Fri, 22 Jul 2011 00:00:00 +0000</pubDate>
      
      <guid>http://jonas.follesoe.no/oldblog/cross-platform-mobile-ndc-2011/</guid>
      <description>&lt;p&gt;Earlier this summer I gave a presentation at NDC 2011 about writing cross platform mobile
applications using C# and .NET. At the time of the presentation the future of MonoTouch and
Mono for Android was uncertain, but with the &lt;a href=&#34;http://blog.xamarin.com/2011/07/18/first-press-release/&#34;&gt;recent news of Xamarin gaining ownership&lt;/a&gt;
of the products, the future of C# on iOS and Android looks brighter than ever.&lt;/p&gt;
~
&lt;p&gt;The presentation covers 8 concrete strategies for designing applications for
maximum code re-use across all three platforms, as well as techniques to make development
more productive and hassle-free. The strategies/techniques covered in the presentation are:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Portable Class Libraries&lt;/li&gt;
    &lt;li&gt;Linked Files&lt;/li&gt;
    &lt;li&gt;The &#34;Project Linker&#34; tool&lt;/li&gt;
    &lt;li&gt;VSMonoTouch to open MonoTouch projects in Visual Studio&lt;/li&gt;
    &lt;li&gt;Pre-processor directives&lt;/li&gt;
    &lt;li&gt;Abstract common functionality&lt;/li&gt;
    &lt;li&gt;Leverage MVVM on all platforms&lt;/li&gt;
    &lt;li&gt;Use pre-built abstractions such as MonoMobile.Extensions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All the presentations from NDC 2011 are available in a &lt;a href=&#34;http://ndc2011.no/userfiles/NDC2011_mp4.torrent&#34;&gt;torrent file&lt;/a&gt;,
but to make the presentation more discoverable and accessible I have uploaded it to my Vimeo
account. The slides are available on SlideShare.&lt;/p&gt;

&lt;p&gt;&lt;iframe src=&#34;http://player.vimeo.com/video/26701639?portrait=0&amp;amp;color=ff0179&#34; width=&#34;671&#34; height=&#34;377&#34; frameborder=&#34;0&#34;&gt;&lt;/iframe&gt;&lt;p&gt;&lt;a href=&#34;http://vimeo.com/26701639&#34;&gt;Cross platform .NET mobile apps in practice&lt;/a&gt; from &lt;a href=&#34;http://vimeo.com/follesoe&#34;&gt;Jonas Follesø&lt;/a&gt; on &lt;a href=&#34;http://vimeo.com&#34;&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;&lt;/p&gt;

&lt;div style=&#34;width:425px&#34; id=&#34;__ss_8657552&#34;&gt;&lt;strong style=&#34;display:block;margin:12px 0 4px&#34;&gt;&lt;a href=&#34;http://www.slideshare.net/follesoe/cross-platform-mobile-apps-using-net&#34; title=&#34;Cross platform mobile apps using .NET&#34;&gt;Cross platform mobile apps using .NET&lt;/a&gt;&lt;/strong&gt;&lt;object id=&#34;__sse8657552&#34; width=&#34;425&#34; height=&#34;355&#34;&gt;&lt;param name=&#34;movie&#34; value=&#34;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=crossplatformmobileappsusing-net-110721173336-phpapp01&amp;stripped_title=cross-platform-mobile-apps-using-net&amp;userName=follesoe&#34; /&gt;&lt;param name=&#34;allowFullScreen&#34; value=&#34;true&#34;/&gt;&lt;param name=&#34;allowScriptAccess&#34; value=&#34;always&#34;/&gt;&lt;embed name=&#34;__sse8657552&#34; src=&#34;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=crossplatformmobileappsusing-net-110721173336-phpapp01&amp;stripped_title=cross-platform-mobile-apps-using-net&amp;userName=follesoe&#34; type=&#34;application/x-shockwave-flash&#34; allowscriptaccess=&#34;always&#34; allowfullscreen=&#34;true&#34; width=&#34;425&#34; height=&#34;355&#34;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style=&#34;padding:5px 0 12px&#34;&gt;View more &lt;a href=&#34;http://www.slideshare.net/&#34;&gt;presentations&lt;/a&gt; from &lt;a href=&#34;http://www.slideshare.net/follesoe&#34;&gt;Jonas Follesø&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>QR code scanning on Windows Phone 7.5 using ZXlib</title>
      <link>http://jonas.follesoe.no/oldblog/2011-07-22-qr-code-scanning-on-windows-phone-75-using-zxlib/</link>
      <pubDate>Fri, 22 Jul 2011 00:00:00 +0000</pubDate>
      
      <guid>http://jonas.follesoe.no/oldblog/2011-07-22-qr-code-scanning-on-windows-phone-75-using-zxlib/</guid>
      <description>&lt;p&gt;One of the big new features of Windows Phone 7.5 (code named Mango) is direct camera access.
Having access to the camera stream enables several new scenarios, such as in-app QR and barcode scanning,
augmented reality applications or custom looking photo camera UI. There are some good resources on how
to use the new APIs to access the camera in Mango, but I haven’t found any complete examples of how to
implement a QR code scanner, which is what I am going to do in this blog post.&lt;/p&gt;

&lt;p&gt;Mango adds two API to access the camera. You can either use the webcam APIs introduced in Silverlight 4,
or you can use the new PhotoCamera class introduced in Mango. I’m not going to cover all the details of
the two APIs; instead I will focus on how to solve the scenario of implementing a QR scanner. If you want
to learn more about the Silverlight 4 APIs for accessing the camera I would highly recommend &lt;a href=&#34;http://kodierer.blogspot.com/2010/06/push-and-pull-silverlight-webcam.html&#34;&gt;Rene Schulte’s
detailed blog post&lt;/a&gt;. For information on the PhotoCamera API I would recommend &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/hh202956(v=VS.92).aspx&#34;&gt;this MSDN article showing how
to build a camera application for Windows Phone&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When starting on the task of building a QR scanner one of the first things I did was to research different
open source libraries to do the image recognition. Thankfully there are multiple libraries available,
but the &lt;a href=&#34;http://code.google.com/p/zxing/&#34;&gt;ZXing library from Google&lt;/a&gt; seems to be one of the most popular. The ZXing library is ported to multiple
programming libraries, and supports a wide variety of 1D/2D codes (QR, Code128, Code39, EAN and many more).
There is a C# port of the library, which has later been &lt;a href=&#34;http://silverlightzxing.codeplex.com/&#34;&gt;ported to Silverlight and Windows Phone 7&lt;/a&gt;.
So the actual task of writing the QR scanner is to integrate the ZXing library with the Mango camera API.&lt;/p&gt;

&lt;p&gt;The XAML code for the scanner consists of 4 main components. A Rectangle is used as to display the viewfinder
video stream. The way you hook the camera up to the rectangle is through a VideoBrush. A VidoBrush let you
paint any XAML element using a video source of some kind. To control orientation (depending on landscape or portrait)
a CompositeTransform is added to the VideoBrush. This transform lets us programmatically set the rotation of
the video brush to match the rotation of the camera. The final component is a ListBox used to display the
text decoded from the QR codes.&lt;/p&gt;

&lt;script src=&#34;https://gist.github.com/1098650.js?file=QRScanner.xml&#34;&gt;&lt;/script&gt;

&lt;p&gt;In the code behind file we need to add some initialization code. In the constructor we instantiate an
ObservableCollection which will be the ItemsSource of the ListBox. Whenever a QR code is successfully
scanned the result is added the collection, which in turn will update items in the ListBox. We also create a
DispatcherTimer that will execute every 250 millisecond. On each tick we will try to decode the image for
any QR codes. In the OnNavgiatedTo method we instantiate the PhotoCamera class and hook the Initialized
event for the camera. We also set the source of the VideoBruch created in XAML to the photo camera.
This will start drawing whatever the camera sees on the Rectangle. We also hook the ShutterKeyHalfPressed
event to focus.&lt;/p&gt;

&lt;script src=&#34;https://gist.github.com/1098656.js?file=MainPage.cs&#34;&gt;&lt;/script&gt;

&lt;p&gt;When the photo camera is initialized we run some more setup code. The code needs to access the width and height
of the preview resolution, so it cannot run before the camera is initialized. Next we create an instance of
PhotoCameraLumianceSource. This is a custom class extending the LumianceSource class from the ZXing library.
This class is responsible for extracting luminance data from any image. Since you could have different image formats,
ZXing has mad the framework extensible by providing a base class you can extend with the code needed to get
luminance data from the specific image format you are working with. Next we create an instance of the QRCodeReader.
This is the class responsible for decoding the image to scan for a QR code. The ZXing library comes with multiple
readers, so if you want to read Code128 bar codes you simply create a Code128Reader instead. Finally we set the
rotation of the preview VideoBrush and start the timer.&lt;/p&gt;

&lt;script src=&#34;https://gist.github.com/1098661.js?file=MainPage.cs&#34;&gt;&lt;/script&gt;

&lt;p&gt;Every time the timer ticks the ScanPreviewBuffer is executed. This method is responsible for getting the image
data from the photo camera and tries to decode it. The photo camera offers multiple methods to get images.
You can either capture a full resolution image, or you can get the preview buffer. Capturing a full resolution
image would be too slow for a computer vision application, but thankfully we got methods to access the preview buffer.
You can get the preview buffer as either ARGB format or YCbCr format. The camera sensor is internally using YCbCr,
so getting it as Argb format would require conversion. If you only care about luminance (the Y in YCbCr)
there is a convenient method giving you the Y component of the YCbCr format. This is perfect as this is exactly
what we need to pass to the ZXing library. Rene Schutle got a good blog post going into the details of Argb vs YCbCr.&lt;/p&gt;

&lt;p&gt;The GetPreviewBufferY method takes a byte array as its parameter and will populate this byte array with the
luminance data from the preview buffer. We pass in the PreviewBufferY property from our luminance source class
(which will be explained later). Once we have captured the luminance data we create a HybridBinarizer and a
BinaryBitmap. They are part of the ZXing library. I haven’t worked enough with ZXing yet to fully understand
the architecture, but these classes are steps the luminance data pass through before being passed to the decode
method of the QRCodeReader. If the decode is successful the decoded text is added to the ObservableCollection,
which in turn will update the ListBox. The QRCodeReader decode method will throw an exception if it is not able
to decode the image, so we need to wrap the code in a try-catch block.&lt;/p&gt;

&lt;script src=&#34;https://gist.github.com/1098663.js?file=MainPage.cs&#34;&gt;&lt;/script&gt;

&lt;p&gt;The PhotoCameraLumianceSoure implements the LumianceSource base class used by the ZXing library. The class is
responsible for exposing the luminance data for the image format you are working with. Conveniently the PhotoCamera
class gives us the luminance data directly, so implementing the class does not take much code. There are basically
one property and one method you need to implement. The Matrix property simply returns the luminance data for the
complete image. The getRow method returns the luminance data for a given row. Both the property and the method
simply read the PreviewBufferY byte array which is filled every time the timer calls the GetPreviewBufferY method.&lt;/p&gt;

&lt;script src=&#34;https://gist.github.com/1098666.js?file=PhotoCameraLuminanceSource.cs&#34;&gt;&lt;/script&gt;

&lt;p&gt;So how does this work in practice? Below is a YouTube video demonstrating the QR scanner. As you can see it’s
fairly quick and accurate (well, at least on bright images of my computer screen). I have not yet tested it in the wild,
and the ZXing library offers many customizations to fine tune how you want the scanner to behave, but at least this
demonstrates how you can combine ZXing and the Mango PhotoCamera API to implement a QR scanner in less than 150
lines of user code!&lt;/p&gt;

&lt;iframe width=&#34;640&#34; height=&#34;510&#34; src=&#34;http://www.youtube.com/embed/kZOtzRMMpws?rel=0&amp;amp;hd=1&#34; frameborder=&#34;0&#34; allowfullscreen&gt;&lt;/iframe&gt;

&lt;p&gt;The complete QR code scanner &lt;a href=&#34;https://github.com/follesoe/WinPhoneSamples/tree/master/ScannerDemo&#34;&gt;example code is available on github&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>WP7, iOS &amp; Android: Is .NET the platform to rule them all?</title>
      <link>http://jonas.follesoe.no/oldblog/mono-across-all-platforms/</link>
      <pubDate>Sun, 20 Mar 2011 00:00:00 +0000</pubDate>
      
      <guid>http://jonas.follesoe.no/oldblog/mono-across-all-platforms/</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;img width=&#34;120&#34; hspace=&#34;10&#34; src=&#34;http://static.follesoe.no/TheDeveloperCover.jpg&#34; align=&#34;left&#34; /&gt;The following blog post is an article originally published in the most current issue
of &#34;The Developer&#34;, a magazine distributed to Norwegian developers.
The article discusses the exciting possibility to use C# and .NET across the
three major smart phone platforms WP7, iOS and Android. Since the magazine is only
distributed in Norway I decided to post it on my blog as well.
You can either read it here, or &lt;a href=&#34;http://static.follesoe.no.s3.amazonaws.com/Is .NET the platform to rule them all.pdf&#34;&gt;download a PDF version of the article&lt;/a&gt; as
presented in the magazine.&lt;br/&gt;&lt;/em&gt;&lt;/p&gt;
~
&lt;p&gt;If you ask me 2010 was the year of the mobile app. Everyone was talking about
them, from consumers around the lunch table, to CEOs in the boardrooms. It was
like 1999 all over again; only this time it was not about building websites, but to
have some kind of offering in one of the major mobile app stores. According to
the analysts at IDG the huge interest in mobile apps is not just a fad. They expect
download numbers to grow from 10.9 billion in 2010 to 76.9 billion in 2014. As
a result app revenue will surpass $35 billion the same year. In short, mobile is
going to play an important role for software developers over the next few years.&lt;/p&gt;

&lt;p&gt;As a .NET developer you are faced with some tough decisions. Which platform
do you bet on? How do you get your skills up-to-date quickly enough? Do you
suck it up and learn CocoaTouch and Objective-C to target the popular Apple iOS
devices? Should you learn Java and go for the Android? Or should you skip two
of the most popular mobile platforms and stick to C# and develop for the newly
released Windows Phone 7?&lt;/p&gt;

&lt;p&gt;Businesses face some of the same decisions, as they need to decide where to
focus their resources and efforts. Should they target all the major platforms,
or focus only on iOS devices? What will be the cost of maintaining these
applications over time? A quick search for “DnB NOR” (Norway’s largest financial
services group) in the iTunes App Store reveals that they already have five apps
available. This is for iOS devices alone. In addition, two of the applications are
also available in Android Market. With seven apps published already one can
start to imagine what the cost and technical challenges of maintaining them over
time will be.&lt;/p&gt;

&lt;p&gt;When choosing which technology to use for implementing mobile apps, the
popular choices have traditionally been either web-based apps written in HTML,
CSS &amp; JavaScript, or alternatively fully native apps tailored to a specific platform.
Both alternatives have their pros and cons. Web-based applications might be
quicker to build and easier to make cross-platform, but the drawback is that you
do not have full access to the phone specific APIs. And it is harder to provide the
same high fidelity user experience as a native app offers. With native apps, the
challenge might be a steep learning curve and having to re-implement the same
app across different platforms.&lt;/p&gt;

&lt;p&gt;With the release of MonoTouch at the end of 2009 Novell introduced a new
way to build apps for iOS devices. Against all odds the programmers at Novell
had found a way to bring Mono, the open source implementation of .NET,
to the iPhone without requiring unlocking or jail-breaking the device. The
MonoTouch framework enables developers to build native iOS apps using the C# programming
language using many of the core .NET libraries. MonoTouch is designed to conform to the
strict requirements set by Apple for App Store eligibility. MonoTouch allows .NET
developers to take advantage of their existing skills, reuse existing code and libraries,
making the transition to the iOS platform easier.&lt;/p&gt;

&lt;p&gt;Instead of porting Windows Forms or WPF to the iPhone, MonoTouch provides
a thin .NET layer on top of the native CocoaTouch APIs giving your applications
a fully native look and feel, making them indistinguishable from the traditional
iPhone applications. And where it makes sense, MonoTouch will provide
standard .NET APIs instead of the CocoaTouch counterparts. For example, you
use standard ADO.NET to talk to SQLite databases on the device, and XML can
be processed using the familiar System.Xml.Linq API. MonoTouch apps are
developed using the MonoDevelop IDE, an experience very similar to that of
Visual Studio.&lt;/p&gt;

&lt;p&gt;Managed runtimes like the CLR (Common Language Runtime) and JVM (Java
Virtual Machine) typically use just-in-time (JIT) compilation, where byte
code is translated to machine code at runtime. Apple forbids the inclusion of
mechanisms that enable execution of arbitrary third party code, effectively
blocking the use of non-standard runtimes, interpreters and virtual machines.
The developers at Novell were able to overcome this obstacle by using an
alternative ahead-of-time (AOT) compilation model where .NET Common
Intermediate Language (CIL) is compiled directly to native code. AOT compiles
the MonoTouch applications to native executables that do not rely on a virtual
machine to run.&lt;/p&gt;

&lt;p&gt;With the success of MonoTouch, Novell decided to take a similar approach to
bring .NET to the Android platform. MonoDroid provides .NET bindings against
the Android API, as well as a .NET-to-Java interop mechanism. Android is a
more open platform than iOS and allows for JIT compilation of code. The Mono
runtime will run side-by-side with the Dalvik runtime, providing direct access
to many of the core Linux OS APIs through the standard .NET libraries like
System, System.IO and System.Net. Just as with MonoTouch, a MonoDroid app
will use the native UI toolkit, giving the user the same great user experience as
with any other native app. MonoDroid integrates with Visual Studio making the
experience of writing apps for Android even more familiar.&lt;/p&gt;

&lt;p&gt;Both MonoTouch and MonoDroid expose the same subset of the .NET core
API, which is a subset based on the Silverlight API. This is the same subset
Microsoft chose to use for their newly released Windows Phone 7. This means
that there now exists a core set of APIs that are the same across the three major
smartphone platforms. By carefully crafting an application in such a way as to
separate business logic from user interface code, it is possible to reuse code and
libraries across all platforms. I expect patterns to emerge over time that describe
how to best structure your code for maximum reuse across the different mobile
platforms.&lt;/p&gt;

&lt;p&gt;For many developers mobile apps have made it fun to program again. Within
weeks you can go from an idea to an app that can be downloaded by millions of
users through one of these app stores. Who knows, something that starts of as
a hobby project might turn out to be the next Angry Birds. No matter if you do
app development as a hobby or professionally there is nothing more gratifying as
seeing your first app being available in one of the app stores.
Happy app-ing everybody!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>I’m joining BEKK</title>
      <link>http://jonas.follesoe.no/oldblog/2010-08-01-im-joining-bekk/</link>
      <pubDate>Sun, 01 Aug 2010 00:00:00 +0000</pubDate>
      
      <guid>http://jonas.follesoe.no/oldblog/2010-08-01-im-joining-bekk/</guid>
      <description>&lt;p&gt;Tomorrow will be my first day as a &lt;a href=&#34;http://www.bekk.no&#34;&gt;BEKK&lt;/a&gt; employee. I will be joining the BEKK Trondheim office as a senior consultant. After three good years in Capgemini I decided it was time for a change. I will continue to work on different projects as a consultant, but my role in BEKK also gives me some dedicated time for other activities like exploring new technologies, preparing presentations, writing articles etc. I will continue to be just as involved in the developer community as I am today, and I already got some cool speaking gigs lined up for the fall. More on that later.&lt;/p&gt;
~
&lt;p&gt;BEKK have &lt;a href=&#34;http://open.bekk.no/&#34;&gt;some really talented people working for them&lt;/a&gt;, and over the years I’ve noticed how they’ve been one of the early adopters of agile processes and techniques (XP, Scrum, Kanban, TDD/BDD etc), as well as new technologies (Ruby on Rails, Cucumber) here in Norway. I hope that by working for BEKK I’ll get a chance to broaden my technical experience, and perhaps do some projects on alternative platforms (I’m sure .NET will continue to be my main platform  so don’t worry about me leaving the .NET community).&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>NDC2010 - Patterns and techniques for building Windows Phone 7 applications</title>
      <link>http://jonas.follesoe.no/oldblog/2010-07-07-ndc2010---patterns-and-techniques-for-building-windows-phone-7-applications/</link>
      <pubDate>Wed, 07 Jul 2010 00:00:00 +0000</pubDate>
      
      <guid>http://jonas.follesoe.no/oldblog/2010-07-07-ndc2010---patterns-and-techniques-for-building-windows-phone-7-applications/</guid>
      <description>&lt;p&gt;Last month I was lucky enough to both attend and speak at the Norwegian Developer Conference. It was a fantastic conference, and the conversations following the conference are still &lt;a href=&#34;http://search.twitter.com/search?q=%23ndc2010&#34;&gt;buzzing on twitter&lt;/a&gt; and &lt;a href=&#34;http://blog.scottbellware.com/2010/06/praise-for-norwegian-developers.html&#34;&gt;in the blogosphere&lt;/a&gt;. For me NDC must have been one of the best conferences I’ve ever attended, offering a diverse range of topics from some of the best speakers in the industry. I’m humbled to be invited to speak at such a great event.&lt;/p&gt;  
~

&lt;p&gt;My session was on building Silverlight applications for the Windows Phone 7 platform. Instead of doing a feature tour of all the new APIs I decided to focus on some of the patterns and principles I find important when doing Silverlight development, and showing how to apply these in a Windows Phone 7 context. Some of the topics I covered in my talk included: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;How to do TDD in Silverlight on WP7 &lt;/li&gt;    &lt;li&gt;The MVVM design pattern and &lt;a href=&#34;http://mvvmlight.codeplex.com/&#34;&gt;MVVM Light Framework&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;How to use dependency injection in a WP7 context and how it can help you inject stub implementations of APIs that isn’t available in the emulator. &lt;/li&gt;    &lt;li&gt;Asynchronous web services using Rx (Reactive Extensions). &lt;/li&gt;    &lt;li&gt;How to use the location APIs and how to make stub implementations for the emulator. &lt;/li&gt;    &lt;li&gt;How to use the push notification API. &lt;/li&gt;    &lt;li&gt;Making your views Blend-friendly by supplying design time data. &lt;/li&gt;    &lt;li&gt;The Metro design language (look and feel of WP7 applications) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To best illustrate these concepts I’ve built a full Windows Phone 7 application that lets you monitor arrivals and departures from any Norwegian airport. The application consumes a set of &lt;a href=&#34;http://www.avinor.no/avinor/trafikk/50_Flydata&#34;&gt;REST services exposed by Avinor&lt;/a&gt; that lets you look up arrivals and departures for a given airport. I’ve made the entire application &lt;a href=&#34;http://github.com/follesoe/FlightsNorway&#34;&gt;available on GitHub as open source&lt;/a&gt;, and I do plan to polish it enough to actually publish it on the app marked place as soon as the WP7 is released.&lt;/p&gt;  &lt;p&gt;&lt;img style=&#34;border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px&#34; title=&#34;Screenshot&#34; border=&#34;0&#34; alt=&#34;Screenshot&#34; src=&#34;http://static.follesoe.no/WindowsLiveWriter/NDC2010PatternsandtechniquesforbuildingW_D1A1/Screenshot_3.png&#34; width=&#34;247&#34; height=&#34;480&#34; /&gt;&lt;/p&gt;  &lt;p&gt;Most sessions from NDC2010 where recorded, and can be &lt;a href=&#34;http://streaming.ndc2010.no/&#34;&gt;downloaded from the Tandberg streaming server&lt;/a&gt; or as &lt;a href=&#34;http://www.ndc2010.no/index.aspx?id=361621&#34;&gt;a complete torrent with all the sessions&lt;/a&gt;. I’ve also uploaded my session to Vimeo (for my personal video archive), and to make it easier to embed it on my blog.&lt;/p&gt;  &lt;p&gt;&lt;object width=&#34;669&#34; height=&#34;251&#34;&gt;&lt;param name=&#34;allowfullscreen&#34; value=&#34;true&#34; /&gt;&lt;param name=&#34;allowscriptaccess&#34; value=&#34;always&#34; /&gt;&lt;param name=&#34;movie&#34; value=&#34;http://vimeo.com/moogaloop.swf?clip_id=12986550&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=00ADEF&amp;amp;fullscreen=1&#34; /&gt;&lt;embed src=&#34;http://vimeo.com/moogaloop.swf?clip_id=12986550&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=00ADEF&amp;amp;fullscreen=1&#34; type=&#34;application/x-shockwave-flash&#34; allowfullscreen=&#34;true&#34; allowscriptaccess=&#34;always&#34; width=&#34;669&#34; height=&#34;251&#34;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href=&#34;http://vimeo.com/12986550&#34;&gt;Silverlight Applications for Windows Phone 7&lt;/a&gt; from &lt;a href=&#34;http://vimeo.com/follesoe&#34;&gt;Jonas Follesø&lt;/a&gt; on &lt;a href=&#34;http://vimeo.com&#34;&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The slides are available on Slide Share, and &lt;a href=&#34;http://github.com/follesoe/FlightsNorway&#34;&gt;the source code is up on GitHub&lt;/a&gt;. I do plan to update the code as new versions of the WP7 platform is released, and hope the application can serve as a good example of how to architect a WP7 application.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div style=&#34;width: 425px&#34; id=&#34;__ss_4524607&#34;&gt;&lt;strong style=&#34;margin: 12px 0px 4px; display: block&#34;&gt;&lt;a title=&#34;Get a flying start with Windows Phone 7 - NDC2010&#34; href=&#34;http://www.slideshare.net/follesoe/get-a-flying-start-with-windows-phone-7-ndc2010&#34;&gt;Get a flying start with Windows Phone 7 - NDC2010&lt;/a&gt;&lt;/strong&gt;&lt;object id=&#34;__sse4524607&#34; width=&#34;425&#34; height=&#34;355&#34;&gt;&lt;param name=&#34;movie&#34; value=&#34;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=getaflyingstartwithwp7-100617052020-phpapp02&amp;amp;stripped_title=get-a-flying-start-with-windows-phone-7-ndc2010&#34; /&gt;&lt;param name=&#34;allowFullScreen&#34; value=&#34;true&#34; /&gt;&lt;param name=&#34;allowScriptAccess&#34; value=&#34;always&#34; /&gt;&lt;embed name=&#34;__sse4524607&#34; src=&#34;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=getaflyingstartwithwp7-100617052020-phpapp02&amp;amp;stripped_title=get-a-flying-start-with-windows-phone-7-ndc2010&#34; type=&#34;application/x-shockwave-flash&#34; allowscriptaccess=&#34;always&#34; allowfullscreen=&#34;true&#34; width=&#34;425&#34; height=&#34;355&#34;&gt;&lt;/embed&gt;&lt;/object&gt;    &lt;div style=&#34;padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 5px&#34;&gt;View more &lt;a href=&#34;http://www.slideshare.net/&#34;&gt;presentations&lt;/a&gt; from &lt;a href=&#34;http://www.slideshare.net/follesoe&#34;&gt;follesoe&lt;/a&gt;.&lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Thanks to everyone who showed up for my session, and for the great feedback on Twitter, in person and through the conference evaluation system. Thanks to everyone I meet during the conference that I got a chance to talk to – it’s amazing how many talented people you meet at a conference like NDC. Also big thanks to the people behind NDC – they did an amazing job and I’m truly looking forward to next year’s conference!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>XP2010 and BlackBoxRecorder</title>
      <link>http://jonas.follesoe.no/oldblog/2010-06-04-xp2010-and-blackboxrecorder/</link>
      <pubDate>Fri, 04 Jun 2010 00:00:00 +0000</pubDate>
      
      <guid>http://jonas.follesoe.no/oldblog/2010-06-04-xp2010-and-blackboxrecorder/</guid>
      <description>&lt;p&gt;This week I have been attending the 11&lt;sup&gt;th&lt;/sup&gt; international conference on Agile Software Development, &lt;a href=&#34;http://xp2010.org/&#34;&gt;XP2010&lt;/a&gt;, in Trondheim. It has been an amazing week, filled with learning, excellent food and awesome social events, making new friends and catching up with old. I gave two lightning talks during the conference, one on UI prototyping in agile projects (the same I gave at Smidig 2009), and one on Generating Characterization Tests for Legacy Code. The talk on characterization tests was based on some work I did back in October – December 2009. I was involved in a partial rewrite of some pretty bad legacy code. One of the techniques we discovered was that we could use the slow running integration tests to code generate fast and more targeted characterization tests for the code we were rewriting. &lt;/p&gt;
~  

&lt;p&gt;For the last three-four months I’ve been working on an open source testing tool that streamlines the technique of generating characterization tests for your legacy code. The project is called &lt;a href=&#34;http://follesoe.github.com/BlackBoxRecorder/&#34;&gt;BlackBoxRecorder&lt;/a&gt; and is &lt;a href=&#34;http://github.com/follesoe/BlackBoxRecorder&#34;&gt;available on Github&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href=&#34;http://follesoe.github.com/BlackBoxRecorder/&#34;&gt;&lt;img style=&#34;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&#34; title=&#34;BBR_logo_white&#34; border=&#34;0&#34; alt=&#34;BBR_logo_white&#34; src=&#34;http://static.follesoe.no/WindowsLiveWriter/XP2010andBlackBoxRecorder_141F3/BBR_logo_white_5.png&#34; width=&#34;550&#34; height=&#34;128&#34; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;BlackBoxRecorder is a tool that uses &lt;a href=&#34;http://en.wikipedia.org/wiki/Aspect-oriented_programming&#34;&gt;AOP-techniques&lt;/a&gt; to automatically record and generate characterization tests for legacy .NET code (code without tests). You apply a &lt;strong&gt;&lt;em&gt;[Recording]&lt;/em&gt;&lt;/strong&gt;-attribute on the method you want to generate tests for, and a &lt;strong&gt;&lt;em&gt;[Dependency]&lt;/em&gt;&lt;/strong&gt;-attribute on any class accessing external resources such as the file system, web services or databases.&lt;/p&gt;  &lt;p&gt;Each method invocation of a method marked with the recording-attribute will be stored in an XML file. The XML file contains information about the method, copies of input parameters, output parameters and return values. If the method being recorded invokes any methods on a class marked with the Dependency-attribute, the return values of the dependency will also be recorded in the same XML file. This enables automatic mocking of external dependencies when playing back the characterization test.&lt;/p&gt;  &lt;p&gt;For each method recording BlackBoxRecorder will generate a unit test that will play back the recorded XML file against the method. The return values from the method will be compared against the recorded return values using reflection. If any change is detected the test will fail. The test will serve as a change detector (which in essence is what characterization test is), notifying you of any changed behavior in the method being tested. If the change was intentional you can configure the generated test to ignore that property on next run.&lt;/p&gt;  &lt;p&gt;The generated tests supports automatic stubbing/mocking of the types marked with the Dependency-attribute. When the test is played back, the dependency will load return values from the XML recording and return these instead of actually calling the external resource. You do not have to change your code for this to work and even static methods are supported.&lt;/p&gt;  &lt;p&gt;I got some really good feedback on the session, and it was pretty cool that Michael Feathers attended the session. I referenced his book and quoted him a few times in the presentation, so I was really glad he enjoyed the talk.&lt;/p&gt;  &lt;p&gt;&lt;a href=&#34;http://twitter.com/mfeathers/status/15319087953&#34;&gt;&lt;img style=&#34;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&#34; title=&#34;MichaelFeathersCommentOnTalk&#34; border=&#34;0&#34; alt=&#34;MichaelFeathersCommentOnTalk&#34; src=&#34;http://static.follesoe.no/WindowsLiveWriter/XP2010andBlackBoxRecorder_141F3/MichaelFeathersCommentOnTalk_1.png&#34; width=&#34;665&#34; height=&#34;88&#34; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I also got questions from several people who where interested in what it would take to port BlackBoxRecorder to Java. So on Thursday evening I organized an open space session where we walked through the code and discussed how to implement a Java version. We continued the talk over lunch Friday, and soon enough &lt;a href=&#34;http://twitter.com/olecr&#34;&gt;Ole Christian Rynning&lt;/a&gt;, &lt;a href=&#34;http://twitter.com/jhannes&#34;&gt;Johannes Brodwall&lt;/a&gt;, &lt;a href=&#34;http://twitter.com/infosophy&#34;&gt;Geir Amdal&lt;/a&gt;, &lt;a href=&#34;http://twitter.com/mkotsbak&#34;&gt;Marius Kotsbak&lt;/a&gt; and myself where hacking away on a spike implementing BalackBox for Java. &lt;/p&gt;  &lt;p&gt;&lt;a href=&#34;http://yfrog.com/581z1uj&#34;&gt;&lt;img style=&#34;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&#34; title=&#34;Hacking away on a Java implementation of BlackBoxRecorder&#34; border=&#34;0&#34; alt=&#34;Hacking away on a Java implementation of BlackBoxRecorder&#34; src=&#34;http://static.follesoe.no/WindowsLiveWriter/XP2010andBlackBoxRecorder_141F3/JackBoxHacking_3.jpg&#34; width=&#34;360&#34; height=&#34;270&#34; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;We called the implementation &lt;a href=&#34;http://github.com/oc/jackbox/&#34;&gt;JackBox, and the code is up on Github if you want to jump in and contribute&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href=&#34;http://twitter.com/jhannes/status/15411484272&#34;&gt;&lt;img style=&#34;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&#34; title=&#34;JackBoxFirstCommit&#34; border=&#34;0&#34; alt=&#34;JackBoxFirstCommit&#34; src=&#34;http://static.follesoe.no/WindowsLiveWriter/XP2010andBlackBoxRecorder_141F3/JackBoxFirstCommit_2.png&#34; width=&#34;670&#34; height=&#34;333&#34; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I will definitely blog more about BlackBoxRecorder as soon as I’m done with my NDC2010 presentations. Thanks to organizers, speakers and attendees for making XP2010 a memorable experience!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Simulating multitouch on the Windows Phone 7 Emulator</title>
      <link>http://jonas.follesoe.no/oldblog/2010-03-21-simulating-multitouch-on-the-windows-phone-7-emulator/</link>
      <pubDate>Sun, 21 Mar 2010 00:00:00 +0000</pubDate>
      
      <guid>http://jonas.follesoe.no/oldblog/2010-03-21-simulating-multitouch-on-the-windows-phone-7-emulator/</guid>
      <description>&lt;p&gt;&amp;#160;&lt;img style=&#34;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&#34; title=&#34;WindowsPhone7&#34; border=&#34;0&#34; alt=&#34;WindowsPhone7&#34; src=&#34;http://static.follesoe.no/WindowsLiveWriter/SimulatingmultitouchontheWindowsPhone7Em_11F9B/WindowsPhone7_5.jpg&#34; width=&#34;500&#34; height=&#34;329&#34; /&gt; &lt;/p&gt;  

&lt;p&gt;Over the weekend I have had tons of fun playing around with the Windows Phone 7 Developers Tools. The platform looks awesome, both from an end user perspective as well as a developer perspective. &lt;/p&gt;  &lt;p&gt;One of the scenarios I’ve been exploring involves some simple multitouch pinch and zoom gestures. It’s fairly simple to add custom touch functionality by &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/ff426933(VS.96).aspx&#34;&gt;subscribing to the Manipulation Events hanging off all UIElements&lt;/a&gt;. If you got a touch enabled Windows 7 computer you can even test multitouch directly in the emulator. However, I was a little bummed when I read that, unlike the Surface SDK, simulating multitouch input using multiple mice was not supported: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“The Windows Phone Emulator does not support multitouch input through the mouse, so you must test scale transforms on a development computer that supports touch input, or test on an actual device.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This is not entirely true. When I read this I remembered &lt;a href=&#34;http://geekswithblogs.net/kobush/archive/2009/03/10/129993.aspx&#34;&gt;this cool blog post from Szymon Kobalczyk on emulating a multitouch device in Windows 7&lt;/a&gt;. In his post Szymon talks about the MultiTouchVista project. It’s an open source piece of software that lets you install a Windows 7 touch driver. The driver talks to a multitouch service that can read input from multiple sources and turn them into standard Windows 7 multitouch events. Sources for input include things like multiple mice, web&amp;#160; cameras and Wii remotes. Since the MultiTouchVista application appears as a standard Windows 7 touch driver it will work in any Windows 7 touch-enabled application, like the Windows Phone 7 emulator.&lt;/p&gt;  &lt;p&gt;For detailed installation instructions, check out the projects official CodePlex site. I have recorded a quick demo showing multitouch in Silverlight 3, MS Paint and the Windows Phone 7 emulator using two mice connected to my iMac.&lt;/p&gt; &lt;object width=&#34;671&#34; height=&#34;503&#34;&gt;&lt;param name=&#34;allowfullscreen&#34; value=&#34;true&#34; /&gt;&lt;param name=&#34;allowscriptaccess&#34; value=&#34;always&#34; /&gt;&lt;param name=&#34;movie&#34; value=&#34;http://vimeo.com/moogaloop.swf?clip_id=10330829&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ff0179&amp;amp;fullscreen=1&#34; /&gt;&lt;embed src=&#34;http://vimeo.com/moogaloop.swf?clip_id=10330829&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=ff0179&amp;amp;fullscreen=1&#34; type=&#34;application/x-shockwave-flash&#34; allowfullscreen=&#34;true&#34; allowscriptaccess=&#34;always&#34; width=&#34;671&#34; height=&#34;503&#34;&gt;&lt;/embed&gt;&lt;/object&gt;  &lt;p&gt;&lt;a href=&#34;http://vimeo.com/10330829&#34;&gt;Emulating Multitouch on the Windows Phone 7 Emulator using multiple mice&lt;/a&gt; from &lt;a href=&#34;http://vimeo.com/follesoe&#34;&gt;Jonas Follesø&lt;/a&gt; on &lt;a href=&#34;http://vimeo.com&#34;&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>