Thursday, 19 January 2012

Launch of Career in Canada Event @ UBC

I will be speaking again at the Univeristy of British Columbia's Launch a Career in Canada event on February 7, 2012 at 6:00pm.

I spoke at it last year and it was a great opportunity to meet many motivated university students looking to get a foothold in a career after they graduate.

Thursday, 12 January 2012

Presenting at the Vancouver Windows Azure Meetup Group hosted by Microsoft

I will be giving a talk about SQL Azure and Data-tier Applications (DACPAC) at the Vancouver Windows Azure Meetup Group this coming Wednesday, January 18th, 2012. There will also be a guest speaker who will be a Sr. Azure Architect from Redmond, Washington.

The meetup will be hosted by Microsoft in their Downtown Vancouver offices and if you would like to attend please RSVP via this meetup group.

I will also be attaching the presentation slides to this post after the talk.

-----------------

The talk went really well and there were lots of great questions from the audience. Below are the presentation slides I used during the Windows Azure Meetup talk (hosted on SlideShare):


Wednesday, 11 January 2012

Insights from LeWeb'11


I attended LeWeb in Paris, France on Dec 7-9th 2011. LeWeb is the premier technology conference in Europe which attracts influential businesses, up and coming entrepreneurs, passionate speakers and bold ideas while providing an opportunity to network with everyone involved. LeWeb'11 was themed around what they called SOLOMO (Social-Local-Mobile) and they had a wealth of influential speakers on the subject.

Below I have captured some of the insights and notable content from LeWeb'11:

:: Berlin


Bright and young entrepreneurs are flocking to Berlin. London has always been seen as a cultivator of entrepreneurs and their startups within Europe but Berlin is taking off. Its tech scene is trying to emerge as a thriving economy: entrepreneurs are setting up shop along with talented young professionals seeking employment. From SoundCloud to Gibsy to Wooga.

:: Tackling Heavily Regulated and Entrenched Markets


:: Mobile


In the history of computing, mobile has had the fastest adoption rate. There are currently 700 million smart phones being used and the projections are that this will treble in 3 years. Product companies building web-based applications should therefore think seriously about where their user base currently is and where it will be in 3 years. Given that the general trend is heading towards mobile, if companies are not heavily focused on it then they should at least know why not and have a good reason for it.

From a technology standpoint mobile requires different skill sets within an engineering team. Depending on whether the chosen development architecture is cross-platform (PhoneGap, Appcelerator, or simply HTML5) or native (Objective-C for iOS, Java for Android, C# .NET for Windows Phone 7), a clear understanding of how these mobile devices, with their many versions and layouts, will interact with your web-based application is critical. If you are fortunate enough to have already built or inherited a service-oriented architecture (SOA) based application, you are one step in the right direction to building out your mobile product offerings. Scaling with hundreds, thousands or even millions of mobile applications being used in the wild (each set with their own application versions) presents some very unique challenges that will need to be overcome if the mobile growth projections become reality.

:: Prioritize Design


Many companies still neglect design to their detriment. Engineering teams usually hire in a contract graphic designer or user-interface designer for usability concerns instead of focusing on it in-house. Flipboard CEO, Mike McCue, stressed that the trade-off in software engineering is between a few very well designed features or many mediocre ones.

:: Focus


Continually question what your company's focus is and make sure you are always correcting your course back to that initial purpose. Many companies start out with a clear focus but over time there is a strong tendency for it to either become diluted or for the company to forget/ignore what the original focus was. The key take away was that a company's focus is key to their growth and holding onto that singular focus is very important in a sea of constant noise.

:: Put People at the Center


Many people attribute Facebook's huge success to a pivotal turning point when the tagging of photos became mainstream on their social platform. There were many companies building web-based photo sharing applications (such as Flickr) but Facebook quickly became the largest by far by simply putting people at the center of those photos. Facebook added a key feature which allowed people to tag their friends, family and just about anyone they knew which caused a massive change in people behaviour to begin uploading and tagging pictures on Facebook in record numbers never before seen in an online application. The power of social is the people are at the centre.

:: Dream Bigger


The now well know advice that Steve Jobs gave to an executive trying to reinvent the Disney Store was to "Dream Bigger". Time and time again VCs on stage would urge the crowd to ignore the easy road of building yet another photo sharing app and find a problem or need in the world that is so huge that it scares you to even think about it. Those are the kinds of ideas entrepreneurs should be thinking about and trying to solve. Whatever you are thinking you can allows dream one step bigger.

:: Best Interviews (Videos)

Tuesday, 27 December 2011

Deploying Packages to the Azure Compute Emulator for Automated Testing across Local Environments and a Continuous Integration (CI) Server

:: Introduction

When developing on the Microsoft Windows Azure Platform, a storage and compute emulator is available for running applications via the Windows Azure Tools (as of writing this post I am using v1.6). An Azure application package can be deployed to the emulator (running locally) instead of to an actual Azure compute node in the Azure cloud. The benefits of this are two-fold:

  • Deployments to the emulator are dramatically faster (it takes seconds to deploy to the emulator as opposed to minutes to deploy to the Azure cloud)
  • There are no additional costs associated with deploying to and/or using the emulator to run an application package since the emulator is a locally installed application (deploying to the Azure cloud would incur additional compute and bandwidth charges).

Therefore when I needed to create some automated tests to run against various WCF web methods that were apart of my Azure web role, I first needed to deploy my web role (within the Azure package) to the Azure emulator. Note that I wanted to be able to run the automated tests both locally and on our development team's continuous (CI) server, therefore the solution I chose needed to accomodate both environments.

:: Force the Azure Project to Package during Compilation

Before an Azure package can be deployed to the emulator it must first be packaged. Since v1.4 of the Windows Azure Tools, the csx folder and its contents are no longer generated during compilation (See these release notes for v1.4 and search for the breaking change: "PackageForComputeEmulator"). So in order to force the generation of the csx folder we need to specify that the package should be generated for the compute emulator within the Azure project file (*.ccproj). I embedded the this within an existing property group containing some other items:

 <PropertyGroup>  
  <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>  
  <CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\1.6\</CloudExtensionsDir>  
  <!-- This flag generates the 'csx' package folder when this project is compiled (it does not require a separate package command) -->  
  <PackageForComputeEmulator>true</PackageForComputeEmulator>  
 </PropertyGroup>  

:: Deploying to the Azure Compute Emulator

Now that we have the csx package folder generated after each compilation run we can use the CSRun command-line tool to deploy the folder to the emulator at the start of each test suite run. I was able to accomplish this as cleanly as possible by embedding the package deployment within our testing framework's assembly initialize method which looks like the following:

 public static void Initialize(TestContext context)  
 {  
   var emulator = ConfigurationSettings.Settings["AzureEmulator"];  
   var computeArgs = ConfigurationSettings.Settings["AzureComputeArguments"];
 
   using (var process = new Process())  
   {  
     process.StartInfo = new ProcessStartInfo(emulator, computeArgs);  
     process.Start();  
     process.WaitForExit();
 
     Assert.AreEqual<int>(0, process.ExitCode, "Starting the Azure compute emulator and loading it with a package failed");             
   }  
 }  

And the 2 configuration settings I used above look like the following:

 <appSettings>  
  <add key="AzureEmulator" value="C:\Program Files\Windows Azure Emulator\emulator\csrun.exe" />  
  <add key="AzureComputeArguments" value="..\..\..\..\source\Project.Azure\csx\Release ..\..\..\..\source\Project.Azure\bin\Release\ServiceConfiguration.cscfg" />  
 </appSettings>  

:: Cleaning-up the Azure Compute Emulator

Once the test suite run is complete, clean-up should take place in which the previously deployed package is removed from the compute emulator and the compute emulator is shutdown. Both of these tasks require a slight work around due to the lack of options available for the CSRun command-line tool.

A single deployed package can be removed from the compute emulator if its deployment identifier is available (see the "/remove:<DeploymentId>" option on this page). However keeping track of the deployment identifier would require some additional logic that is not needed. This logic could be built but instead I elected to simply remove ALL deployed packages using the "/removeAll" option. I did this because I only deploy one package at a time (future implementations could be more sophisticated and allow for multiple deployments but at the moment I have elected for the simplest approach).

Removing all the deployment packages (as mentioned above) does just that, it does not shutdown the Azure compute emulator. Unfortunately the CSRun command-line tool does not provide a shutdown option for the compute emulator (like ti does for the storage emulator) so I have elected to kill the process manually after the test run.

The following code in the testing framework's assembly cleanup method does what I have described above:

 public static void Cleanup()
 {
   var emulator = ConfigurationSettings.Settings["AzureEmulator"];

   using (var process = new Process())
   {
     process.StartInfo = new ProcessStartInfo(emulator, "/removeAll");
     process.Start();

     process.WaitForExit();

     Assert.AreEqual<int>(0, process.ExitCode, "Removing all the packages from the Azure compute emulator failed");
   }

   foreach (var process in Process.GetProcessesByName("DFService"))
   {
     process.Kill();
     process.WaitForExit();
   }  
 }

:: Conclusion

Once the configuration and code changes mentioned above have been included in the Azure project and the testing framework the Azure package will be deployed into the Azure compute emulator at the beginning of each and every test suite run. Subsequently at the end of the test suite run the Azure package will be "un-deployed"and the Azure compute emulator will be forcibly shutdown. Note that this works both locally for developers running automated tests as well as on our development team's continuous integration (CI) server that is using NAnt and MSBuild to compile and test the application.

Tuesday, 6 December 2011

Attending LeWeb'11 in Paris


I'll be fortunate enough to attend LeWeb'11 in Paris this week.

LeWeb's theme this year is Social, Local & Mobile (SOLOMO). There are some great guest speakers and workshops over the 3 days and I'm especially interested to see how Karl Largerfeld's opening address to LeWeb attendees ties in with the SOLOMO theme given that he is the fashion designer at CHANEL.

I'll also be posting a review of LeWeb'11 a few weeks after the event so stay tuned.

-------------------------------

:: Update


The insights gained from LeWeb'11 can be found on this post.