Posts

Showing posts from 2012

Running Windows 8 in Parallels

I recently attended a great two day code camp on Windows 8 development hosted by Microsoft here in London.  A prerequisite for the camp of course was that attendees bring a laptop running Windows 8.  As some of my readers probably know, my current choice of laptop is a MacBook Air running Mac OS X and Windows 7 on Bootcamp.  I was hesitant to overwrite my Windows 7 installation with a pre-released version of Windows 8 because I was certain there would be drivers missing, etc.  Instead I decided to look into installing Win 8 into a virtual machine.  I already own a license for Parallels for Mac OS so I figured I would start there.  I booted into my Mac partition, started Parallels and clicked the "Create a virtual machine" button.  Much to my surprise, one of the options on the next screen was to download and install Windows 8 Consumer Preview.  I happily selected this options and left for dinner as I waited for Parallels to download the necessary installation files.  I ret

Writing Your First Rx Statement

Image
Introduction In my first blog post on Reactive Extensions (Rx),  Introduction to Reactive Extensions , I mentioned that there are several ways in which you can create an IObservable<T>. The most fundamental way to create an IObservale<T> is be using the Observable.Create<TSource>() method.  At first glance this method is a bit confusing but once you know how to implement it, it becomes very powerful. You First Rx Statement  In this tutorial I will build a Windows console application that will make an asynchronous web call to the Twitter API using the WebClient.DownloadStringAsync() and Rx.  I begin by creating a new console application called SampleRxApp. Next, I add the appropriate Rx reference.  For this, I use Nuget to add a reference to Rx-Main. Once I have added necessary Rx library, I add the following using statement to the top of my Program.cs file.  using System; using System.Net; using System.Reactive.Linq; I n

Introduction to Reactive Extensions

Working in the field of technology means constantly learning new technologies and using them to build cool new software.  I think my desire to learn is what drove me to this industry.   My most recent endeavor was learning the Reactive Extensions (Rx) for the .NET framework.  I had no reason to believe that picking up Rx would be any different from any other technology.  Boy was I wrong!  In my 10 years of learning new technologies, the difficultly of learning Rx rated right up there with making the switch from procedural to object oriented programming.  It is a paradigm shift that requires you to completely rethink the way you develop.  Developing with Rx will probably come more naturally for those of you well versed in asynchronous programming, but I did not have much exposure to async programming prior to this undertaking (which is probably why I found it so difficult to pick up).   Another reason why I found it difficult to learn Rx was because of the pace at which it wa