As part of the AltNetWorkshop Roy, told all his students in the class to STOP using the mouse when developing in visual studio and instead only use the keyboard and the tools that you have at your disposal.
Initially dumping the mouse and using only the keyboard to navigate, refactor and develop was daunting and most likely cost me time and increased the amount of effort that went into writing simple sections of code.
However, once I had got to know some key shortcuts I found that I could zip around VS and ReSharper without even having to move the mouse. In fact the mouse started show why it was a problem each time I let myself slip into using it again, I would first have to try and find the cursor and then use it to find the things that I wanted. This is a especially problematic when I’m using my dev workstation in the office as I normally have 3 screens and a laptop all linked together with software so the mouse could be lost anywhere in this vast screen space (I always find myself franticly moving the mouse to try and catch a glimpse of it).
As Roy says in his video, a key part about going mouse-less is knowing where to look when you need to find out a new shortcut. There are two places I normally look, either in the ReSharper menu structure or in VS’s keyboard mapping area (Tools > Options… > Enviroment > Keyboard) typing in the command you either want to find or wish to add a shortcut to.
Some of the key shortcuts that I noted down during the day and have been using recently are:
ctrl + C – copy line
ctrl + V – paste line
ctrl + X – cut line
ctrl + alt + L – Sets focus to the Solution Explorer
ctrl + Shift + B – Build project
ctrl + K, ctrl + C – Comment line / selection
ctrl + K, ctrl + U – Uncomment line / selection
ctrl + K, ctrl + D – Format Document
F12 – Go to Definition
F9 – Toggle break point
Here is a link to the ReSharper key map, that can be printed out for reference.
In case you need some extra help finding all those shortcuts check out the ReSharper keyboard cheat sheet.
Overall I have found that going mouse-less has proven to be a good thing for me to do as I can now memorise a lot more VS shortcuts, and found that some improvements have been made. It also seems to be a mark of honour and pride amongst developers, not having to resort to the mouse (plus you look cool).
Test Driven Development (TDD) has always been a subject that I have heard lots about, and thought of as a very idealistic almost academic approach to software development.
However, when I heard that Seb over at AltNet was organising a TDD workshop with Roy Osherove (ISerializable) the TDD guru himself, I couldn't resist trying to expand my knowledge and get in on the action.
The AltNetWorkshop was the first day of Roy’s usual 5 day TDD course and was a great introduction to TDD along with the reasons, values and tools of the trade. One of the really interesting sections of Roy’s presentation for me was listening to his a case study whereby two teams were delivering a module of software in parallel. The TDD team initially took more time (i think a matter of days longer) to deliver the application, however the app was delivered with less bugs being raised / needing to be solved. The really great part comes when integrating the app’s into other solutions the TDD group took much less time to do this as the tests allowed them to instantly identify why and where their code was failing.
During the course of the day Roy deliver not only a fantastic presentation and a explanation of TDD but also used a hands on lab with his code kata (article coming soon) to really prove the benefits that TDD had for writing code.
Throughout the day various techniques were used to make the class more efficient and effective at writing code. We coded in pairs and this also being my first poke at pair programming and was pleasantly surprised, once I got over the initial shock factor that I had to code in front of the ever judging eyes of another dev (Ryan was actually really cool) I really relaxed into it and found that the extra brain and pair of eyes kept me sharp and more effective. No mice policy and correctly using some great tools also helped with the speed at which we ended up cranking out the code.
I have to admit that I left this one day class with some real sense of achievement and felt that I had improve my skills in a number of areas. I am envious of the guys who attended the full weeks training (see a review here).
I will definitely be attending more AltNetWorkshops and talks from Roy in the future.
Thanks to Roy, Seb, Toby and all others involved in making the day a success.
I have recently been working on a big Azure application that we have been wanting to deploy to the cloud and test, to make sure that no unexpected bugs occur whilst the application is in the wild and give the opportunity to see how it performs.
Now the big problem has been deploying our application to the cloud every time we wanted to update the application online, we had a dev sit there and manually publish the service, upload the package and initialize the instances. This obviously wasn't great as one of the developers on the team would have to take time out from his tasks / bugs to upload the application.
However, the Azure team came through with some great releases just over a week ago that would allow the management of our services via an API. As soon as I read the blog post announcing the Windows Azure Service Management API I knew that my prayers had been answered and we would be able to automate deployment of our application out to the cloud. This surprisingly was much easier to understand and implement than I imagined as a sample called csmanage.exe was included with the release giving a hook into all of the API’s (documentation).
The most time consuming part turned out to be wrapping the calls to csmanage.exe into build scripts and watching a number of builds and deployments fail before getting it right (no one likes to wait 15mins only to see a red light).
So here’s what I did to get our application deploying on the daily build:
Seting up the Service
Setting up the service requires you to upload a certificate to your Azure login, this can either be done with the following handy command line argument:
makecert -r -pe -a sha1 -n "CN=Windows Azure Authentication Certificate" -ss My -len 2048 -sp "Microsoft Enhanced RSA and AES Cryptographic Provider" -sy 24 testcert.cer
Or use Eric Nelson’s walk through “Using IIS to generate a X509 certificate”.
Now we just need to log into the portal and upload the certificate, taking note of your Subscription ID and certificate thumbprint.
Configure csmanage.exe
With this information we can now configure the csmanage tool to talk with the service management API.
Packaging the Cloud Service
When deploying prior to the release of the management API I would normally right click the Cloud service within Visual Studio and let it handle the packing of the application itself, however during the build we will need to do this automatically. So we can dig out cspack.exe a command line application to package up your solution that was shipped with the Azure SDK.
1: cspack \ServiceDefinition.csdef
2: /role:WebRole1;\CloudService.WebRole
3: /role:WorkerRole1;\CloudService.WorkerRole\bin\Release;
4: domgreen.CloudService.WorkerRole.dll
5: /out:CloudService.cspkg
When packaging the application we need to give the cspack executable a number of arguments these are, the service definition so that it knows what configuration to expect, any web roles and their containing folder, any worker roles with the folder containing the dll and also the name of the dll and an optional out parameter. I normally use the out parameter to ensure that I have the correct name and location of the package for the next step.
Uploading cspkg to Azure Storage
When deploying with the csmanage.exe we need to ensure that the packaged solution is available in blob storage on the same account you are deploying to, to do this I have created a simple command line application that takes the cspkg file and puts it into a folder called “packages” in our storage area.
1: PackageToBlobStorage.exe CloudService.cspkg
Using csmanage.exe
Now that we have our package in Azure storage and csmanage.exe configured we can use the management API to call out to our service and deploy to Azure.
I first suspend and delete any service that is currently running:
1: csmanage /update-deployment /hosted-service:domgreen
2: /slot:production /status:suspended
3:
4: csmanage /delete-deployment /hosted-service:domgreen
5: /slot:production
This leave me safe in the knowledge that the creation of a package will not fail due to a running service.
Now the important part using csmanage.exe to create a deployment in our hosted service, within this command I am selecting the hosting area I wish to create the deployment, the production slot as well as the location of the package (blob storage) and any configuration that will be used in the deployed service.
1: csmanage /create-deployment /hosted-service:domgreen
2: /slot:production /name:domgreen
3: /label:domgreenLabel
4: /package:$(BlobStorageEndpoint)packages/CloudService.cspkg
5: /config:$(SolutionDir)\CloudService\ServiceConfiguration.cscfg
Once the service is successfully deployed we can set the status of the deployment to a running state and allow it to initialize itself.
1: csmanage /update-deployment /hosted-service:domgreen
2: /slot:production /status:running
Once the deployment is fully initialized users can start using the application.
Creating Build Targets
With the correct commands figured out and correctly deploying my application to the cloud I decided to write some build targets to do this during our daily builds. To do this I used the msbuild exec command (I know this is probably really ugly but it gets the job done, well at least until the Azure boys give some built in tasks).
1: <PropertyGroup>
2:
3: ...
4:
5: <BlobStorageEndpoint>
6: http://domgreen.blob.core.windows.net/
7: </BlobStorageEndpoint>
8:
9: <PackageCommand>
10: cspack \ServiceDefinition.csdef
11: /role:WebRole1;\CloudService.WebRole
12: /role:WorkerRole1; \CloudService.WorkerRole\bin\Release;domgreen.CloudService.WorkerRole.dll
13: /out:CloudService.cspkg
14: </PackageCommand>
15:
16: <DeployToBlobStorageCommand>
17: C:\PackageToBlobStorage\PackageToBlobStorage.exe
18: </DeployToBlobStorageCommand>
19:
20: <SuspendCommand>
21: csmanage /update-deployment /hosted-service:domgreen /slot:production /status:suspended
22: </SuspendCommand>
23:
24: <DeleteCommand>
25: csmanage /delete-deployment /hosted-service:domgreen /slot:production
26: </DeleteCommand>
27:
28: <CreateCommand>
29: csmanage /create-deployment /hosted-service:domgreen /slot:production /name:domgreen
30: /label:domgreenLabel /package:$(BlobStorageEndpoint)packages/CloudService.cspkg
31: /config:$(SolutionDir)\CloudService\ServiceConfiguration.cscfg
32: </CreateCommand>
33:
34: <RunCommand>
35: csmanage /update-deployment /hosted-service:domgreen /slot:production /status:running
36: </RunCommand>
37:
38: ...
39:
40: </PropertyGroup>
41:
42: <Target Name="BeforeDropBuild" Condition=" '$(IsDesktopBuild)'!='true' ">
43:
44: ...
45:
46: <Message Text="use cspack create a package for deployment"/>
47: <Exec Command="$(PackageCommand)" WorkingDirectory="$(SolutionDir)" />
48:
49: <Message Text="run program to place package in blob storage"/>
50: <Exec Command="$(DeployToBlobStorageCommand) $(SolutionDir)\AirWatch.cspkg"/>
51:
52: <Message Text="suspend the current running cloud application"/>
53: <Exec Command="$(SuspendCommand)" ContinueOnError="true"/>
54:
55: <Message Text="delete the currently deployed cloud application"/>
56: <Exec Command="$(DeleteCommand)" ContinueOnError="true"/>
57:
58: <Message Text="create a azure service using the package placed in blob storage"/>
59: <Exec Command="$(CreateCommand)" WorkingDirectory="$(SolutionRoot)"/>
60:
61: <Message Text="run the created application"/>
62: <Exec Command="$(RunCommand)" />
63:
64: ...
65:
66: </Target>
The only problem I found with this that the csmanage.exe will return exit codes and so the exec command will need to ignore these, or will treat them as errors during the build.
Multiple Deployments
On the current project we are actually deploying the application to a number of different sites for test, performance etc. so have also had to create a number of scripts to ensure that the endpoints are correct for each of the deployments. Added to this we needed to check that the csmangae.exe and the cloud apps configuration (cscfg) are set up correctly using the sdc tasks and their xml setters to get this working.
Now at the end of each day the latest iteration of our application is uploaded and deployed to Azure, leaving us devs to be happy coders and not worry about deployment :) .

Last week saw a new intake of Microsoft Student Partners (MSPs) converge on Microsoft UK, for a 2 day event kicking off the academic year.
During the two days the students had various presentations from people all around the business ranging from talks on Azure, Social Media, Microsoft Surface and presentation training talk from Nicolas Bate.
I had myself had been a MSP whilst I had been in my final year at university (all one year ago :p ) so one thing that I always wanted to do was give back and help out other student partners.
“Today Dom started that off with some excellent analogies and demos as to what you can use Azure for, and to be honest I’m seriously liking what I’m seeing.”
Chris Alexander (MSP)
In doing so I offered to help out by presenting / demoing to the students about my experiences developing with the Windows Azure platform, and spicing it up a little by jumping into some code (I always loved code demo’s during MSP events, so didn’t want to let the new guys down).
During my presentation I talked around a number of subjects that I found useful when I have been developing Azure applications these include:
- Keeping It Simple
- Loose Coupling
- Message Serialization
- Logging and Tracing
- Using GUID to track activities over servers
- Adapting to Load
- Idempotencey
- Use of storage
- Helpful tools
Hopefully these ideas along with the demo gave the students an insight into how they can develop on Azure.
For more information on student partners and upcoming student events visit Microsoft for Students by Ed Dunhill (Microsoft UK - Academic Evangelist).
A couple of weeks ago I managed to get into a real pickle when trying to run a Azure application after upgrading to the latest CTP. After an hour of furiously checking my code and being convinced it was correct, I gave in and Binged to try and find why my program wasn’t running correctly.
Turns out that there has been a bug introduced into dev fabric, whereby you cannot read the app.config any of the Azure worker roles :( However, this handy post from Jim Nakashima shows a workaround.
All we have to do is add the following environmental variable to your system:
AddAppConfigToBuildOutputs = true

Apparently this has already been fixed in the daily builds and will be in the next release.
There are a number of Azure and Cloud Computing events coming up in the UK (mainly based in London) below are a few that I have found:
CloudCamp – London
24/09/2009
CloudCamp is an unconference where early adopters of Cloud Computing technologies exchange ideas. With the rapid change occurring in the industry, we need a place we can meet to share our experiences, challenges and solutions. At CloudCamp, you are encouraged you to share your thoughts in several open discussions, as we strive for the advancement of Cloud Computing. End users, IT professionals and vendors are all encouraged to participate.
www.cloudcamp.com/london
Microsoft Architecture Forum. Cloud: An Architectural Perspective
25/09/2009
Change is the one constant in IT and today is no exception. In a time when economic necessities dictate that we do more with less, faster and cheaper than ever before we are still seeing projects fail at an alarming rate. The not so new buzz is cloud computing that the analysts are falling over themselves to convince us is the next big thing. Well there is no doubt that it is becoming ever more tangible as the main vendors like Microsoft seek to ready their propositions in the cloud space. Since its announcement at PDC08, Windows Azure has set itself apart from the infrastructure as a service crowd offering a full compute platform capability as a service. With another PDC due this year that will herald the launch of Azure with increased features and services, pricing and SLAs we will see the cloud become ever more real! Undoubtedly this is the platform of choice for start-ups and ISVs but is it ready for Enterprise time? What are the opportunities and barriers for forward thinking organisations, is it too early to take to the skies? What is the architecture of the enterprise going to look like? Is it all about private/public clouds, virtualised infrastructures? Or are these just the vestiges of an already overloaded and constrained architecture? Will the cloud really allows us to break up the silos and truly realise service oriented dream? Time will tell.
http://msevents.microsoft.com/CUI/EventDetail.aspx?culture=en-US&EventID=1032425608
David Chappell – Windows Azure World Tour 2009
06/10/2009
Cloud computing looks like the biggest change to hit our industry in many years. The advent of cheap, scalable computing power available over the Internet will affect almost everybody who works in IT. But taking advantage of this shift requires understanding this new approach and how to exploit it.
In this session aimed at decision makers, David Chappell looks at the Windows Azure platform and what it means for ISVs, custom software development firms and enterprises. The topics he’ll cover include:
- An overview of the Windows Azure platform: Technology and business model
- The cloud platform context: Google, Amazon, Salesforce.com, and more
- Using the Windows Azure platform: Application scenarios
Windows Azure World Tour
UK Azure Net - David Chappell, Eric Nelson and David Gristwood
06/10/2009
Cloud Computing looks like the biggest change to hit our industry in many years. The advent of cheap, scalable computing power available over the Internet will affect almost everybody who works in IT. But what is cloud computing and how does one take advantage of this new approach?
In this session, aimed at Developers & Technical decision makers, David Chappell looks at the Windows Azure platform and how it compares with Amazon Web Services, Google AppEngine, and Salesforce.com’s Force.com.
Following on from David Chappell’s talk David Gristwood & Eric Nelson from Microsoft will provide a deeper technical insight & update on Windows Azure & SQL Azure
If you are running or know of any more Azure or Cloud Computing events, let me know and I will repost with the added events.
I’ve recently been doing a bit of work generating images, I have also need to compare the images that I generate with an image that has already exists.
I found a number of web sites that suggested the following way of comparing two images, by cycling through each pixel in an image and returning false if there is a mismatch in the pixels.
1: private bool ImageCompareArray(Bitmap firstImage, Bitmap secondImage)
2: {
3: bool flag = true;
4: string firstPixel;
5: string secondPixel;
6:
7: if (firstImage.Width == secondImage.Width
8: && firstImage.Height == secondImage.Height)
9: {
10: for (int i = 0; i < firstImage.Width; i++)
11: {
12: for (int j = 0; j < firstImage.Height; j++)
13: {
14: firstPixel = firstImage.GetPixel(i, j).ToString();
15: secondPixel = secondImage.GetPixel(i, j).ToString();
16: if (firstPixel != secondPixel)
17: {
18: flag = false;
19: break;
20: }
21: }
22: }
23:
24: if (flag == false)
25: {
26: return false;
27: }
28: else
29: {
30: return true;
31: }
32: }
33: else
34: {
35: return false;
36: }
37: }
This seems as good a way as any to compare two images, however there are a lot of method calls within this method that could slow down the process of image comparison and when comparing a couple of thousand images this may set my computer chugging away.
Another way I have found of comparing two images is saving the image to a memory stream and then converting this stream to a base 64 string as below:
1: public static bool ImageCompareString(Bitmap firstImage, Bitmap secondImage)
2: {
3: MemoryStream ms = new MemoryStream();
4: firstImage.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
5: String firstBitmap = Convert.ToBase64String(ms.ToArray());
6: ms.Position = 0;
7:
8: secondImage.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
9: String secondBitmap = Convert.ToBase64String(ms.ToArray());
10:
11: if (firstBitmap.Equals(secondBitmap))
12: {
13: return true;
14: }
15: else
16: {
17: return false;
18: }
19: }
I have tested the base 64 string / image comparison with a large number of images and changed just a single pixel and got the correct results. So far I have not tested the method with any images over 500 * 600. So, am unsure how it will deal with oversize images at the moment I will be dealing with images in the range of 256 * 256 so this will work fine for me.
Passing the following images, into the method will return true as both images are identical (except for the file name).

In contrast the below images are obviously different and will return a false from the method.


After running both of the method multiple times, the average speed of the image comparison using the base 64 string comparison was on average 0.1 second however, using the array method the image comparison took significantly longer on average 1.8 seconds if the images were identical and only 0.05 seconds if the images were different. For now I will be keeping with the string comparison.
Please leave a comment if you have improvements / alternative ways of comparing images.
Technorati Tags:
code,
images,
compare,
C#

CloudCamp London #5
24th September 2009
Microsoft Offices, Victoria
http://cloudcamplondon5.eventbrite.com/
CloudCamp seems like a great opportunity for any budding Cloud developers to get together and share idea’s, war stories and not to forget a few cheeky beers.
Will be really good to get some of the opinions from some of the guys (and girl geeks) from other cloud camps such as Amazon, Google and IBM.
| About CloudCamp (good ol’ CTL-C CTL-V) CloudCamp is an unconference where early adopters of Cloud Computing technologies exchange ideas. With the rapid change occurring in the industry, we need a place we can meet to share our experiences, challenges and solutions. At CloudCamp, you are encouraged you to share your thoughts in several open discussions, as we strive for the advancement of Cloud Computing. End users, IT professionals and vendors are all encouraged to participate. |
One of the questions that is still being asked by people both within the tech industry and outside is “What is Windows Azure?” to answer this question Steve Marx a Microsoftie who works on Windows Azure has put together this great hand drawn video.
This is a great video giving a high (ish) level overview of Azure, and goes to prove that devs can draw pretty pictures as well. All we need now is a designer to colour everything in. :p
One of the best practices when creating an application on top of the Azure Service Platform is to constantly log your applications activity. This is so that when a worker role inevitably goes down (and it will) you will be view output in your log files to view if there was an error with the code in your application (surely not :p ) or if it was a problem that occurred with the fabric itself.
To write out to the Azure logs you need to use the RoleManager and write to the log as the below code shows:
RoleManager.WriteToLog("Information", "Logging the activity of my web / worker role");
Now, not only can this start to make your code extremely ugly (yes, we all love pretty code) by you take more time deciding what to log, how much information to provide, and creating a string to pass to the WriteToLog method.
There are a number of areas where I can think that logging would be needed these are:
- Tracing In / Out of a method, making us aware of where the error occurred along with some simple performance monitors from your logs timestamps).
- Exceptions, this is vital, every time an error occurs we want to log as much information as possible.
- General Messages, you may just want to log that your application has reached a certain point in its process or the outcome of a given task.
- Variable values, if you change on of your variables throughout a process you may want to keep a log of what its value has been throughout the whole process. This would make it a lot easier to pin point where anything has gone wrong in a process.
With these four key tracing areas in mine, I sat down with a nice cup of tea and pack of digestive biscuits and set to creating my own AzureTrace library that would allow you to handle the above situations with ease. Allowing you to concentrate on getting your app up and running than the finer points of logging.
The library that I have created has the following methods:
TraceIn / TraceOut
Accepts a number of parameters of type object that will be written out to the log.
Will also identify what is the calling method so that you can see the method we are in when the tracing occurs.
TraceException
Given an exception object, the method will write out information to the log identifying the exception, the exception message and the method the exception occurred in.
TreacMessage
This is much like a standard tracing method that allows you to pass in a TraceType argument that gives the an enum of the standard Azure log types (Information, Critical, Error, Warning …) along with a format and a number of string parameters and will be written to the log as is.
Trace (Extension Method)
With the ‘Trace’ extension method you can trace any variable out to the logs. Allowing, you to record the state of a given object as it passes through the system.
All of the above methods have the option of supplying a GUID to identify the process, this makes following the process flow of a given operation over multiple roles and servers much easier. If you generate a new GUID each time a user requests an action you can have a paper trail that you can follow from start to finish. An example of this would be if a user clicks a button on the web role (generate GUID), the web role does some processing (using AzureTrace with the given GUID), passes a message to a worker role via queues (adding the GUID as a property of the message) and then continue to log with the same GUID on the worker role.
HiddenInformation Attribute
When creating these methods I realised that when logging out to these methods may end up supplying the reader of the logs with private information such as a persons national insurance number or other personal identifiable data that you don’t want just anyone looking at, so with this in mind (and another cup of tea) I created an attribute that would allow you to hide properties within an abject and therefore this data would not get written out to the log.
AzureTrace In Action
I have created a quick sample application that uses all of the methods within the library along with the Hidden Information attribute on a property.
1: namespace Azure_WebRole
2: { 3: using System;
4: using AzureTrace;
5:
6: public class TestClass
7: { 8: [HiddenInformation]
9: public string Hidden
10: { 11: get;
12: set;
13: }
14:
15: public string NotHidden
16: { 17: get;
18: set;
19: }
20: }
21:
22: public partial class _Default : System.Web.UI.Page
23: { 24: /// <summary>
25: /// Handles the Load event of the Page control.
26: /// </summary>
27: /// <param name="sender">The source of the event.</param>
28: /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
29: protected void Page_Load(object sender, EventArgs e)
30: { 31: TestClass testClass = new TestClass()
32: { 33: Hidden = "Do Not Show Me!",
34: NotHidden = "Show Me!"
35: };
36:
37: this.TraceTestMethod(testClass);
38: }
39:
40: /// <summary>
41: /// Traces the test method.
42: /// </summary>
43: /// <param name="input">The input.</param>
44: protected void TraceTestMethod(TestClass input)
45: { 46: AzureTraceManager.TraceIn(input);
47:
48: AzureTraceManager.TraceMessage(TraceType.Information, "Formatted text - args(0) {0} args(1) {1}", "first", "second"); 49:
50: input.Trace();
51:
52: try
53: { 54: throw new Exception("Something went wrong. :s"); 55: }
56: catch (Exception ex)
57: { 58: AzureTraceManager.TraceException(ex);
59: }
60:
61: AzureTraceManager.TraceOut(input);
62:
63: }
64:
65: }
66: }
From the above code sample we get the following output displayed in the logs on the dev fabric running on our local machine.
Notice that the only property that is written out to the log for the TestClass is that of the NotHidden property, with the Hidden property being safely hidden with the HiddenInformation attribute.
IsTracingEnabled?
When each of the methods are called I first check to see if the user is wanting to trace all this information out to the logs, this is done by looking at the cloud configuration files. The library looks into the config for a setting called “IsTracingEnabled” and if set to true will start logging. However, by default if tracing is set to false.
The below config shows a web role that has tracing enabled and worker which by default has not enabled tracing.
1: <?xml version="1.0"?>
2: <ServiceConfiguration serviceName="Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">
3: <Role name="WebRole">
4: <Instances count="1"/>
5: <ConfigurationSettings>
6: <Setting name="AccountName" value="devstoreaccount1"/>
7: <Setting name="AccountSharedKey" value="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="/>
8: <Setting name="BlobStorageEndpoint" value="http://127.0.0.1:10000"/>
9: <Setting name="QueueStorageEndpoint" value="http://127.0.0.1:10001"/>
10: <Setting name="TableStorageEndpoint" value="http://127.0.0.1:10002/" />
11: <Setting name="IsTracingEnabled" value="true"/>
12: </ConfigurationSettings>
13: </Role>
14: <Role name="WorkerRole">
15: <Instances count="1"/>
16: <ConfigurationSettings>
17: <Setting name="AccountName" value="devstoreaccount1"/>
18: <Setting name="AccountSharedKey" value="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="/>
19: <Setting name="BlobStorageEndpoint" value="http://127.0.0.1:10000"/>
20: <Setting name="QueueStorageEndpoint" value="http://127.0.0.1:10001"/>
21: <Setting name="TableStorageEndpoint" value="http://127.0.0.1:10002/" />
22: </ConfigurationSettings>
23: </Role>
24: </ServiceConfiguration>
I have uploaded the AzureTrace Library to my Sky Drive in case you want to give it a quick whirl / suggest any improvements that could be made.
Going shopping has just been make a lot easier by the Tesco's IE8 Accelerator, so to explain how easy this made shopping @markjo, @marcholmes and @will_coleman headed off to document the experience :p
Hopefully, more videos will be whizzing their way out of the UK DPE offices soon.
(p.s. check out @markjo ‘s cameo appearance)
On a normal Saturday I would normally end up recovering from a hangover walking around the local shops in Reading, looking at all the cool gadgets that I could buy, cameras, TVs, laptops all the standard geek gear.
However, when ever I get to the computer section a long discussion normally ensues around which netbook I would buy (if I could afford them) and my argument for not buying one has always been that I want to get a tablet pc that is a small as a netbook. Just imagine a small sleek, stylish netbook that you could write on like a pad of paper.
Now, my prayers have been answered with the Acus T91 a tablet netbook, that is also rumoured to be multi-touch. This will no doubt start a whole new wave of tablet netbooks from competitors such as Dell, HP, and Aser.
Take a look at this video I found on YouTube of the Acus T91:
More information on the T91 can be found here, here, and here.
Will have to get me one of these… add Windows 7 and we have a winner.
Over the past couple of weeks I’ve been wanting to get into playing with some
PowerShell for scripting and replacing the old trust cmd (the old DOS prompt is soo Win3.5 :p ).
It wasn't until I admitted this dirty little secret of mine to a friend and colleague
Ben Nunney, that I really started to find out the real power of PowerShell (get it power). Ben took some time out to run through some of the cool features of PowerShell and how it can be used to contact remote machines and servers, both on premise and in the cloud.
However, one of the first things that I really wanted to do as a dev, was to use PowerShell to do everything that I would normally have to load up Visual Studio Command Prompt to do, after all who wants to be switching between prompts all the time.
With a
lot little help from these blogs (
link &
link) I was able to create a method (VsVars32) that when executed would run PowerShell as VSCmd and just because I’m lazy I have added this to my PowerShell profile with a call to the method so that when PS launches it automatically loads into VSCmd mode.
The other addition that I have made is a check to see whether I’m running my shiny VS enabled PowerShell in admin mode or not, due to my continued aggravation if I fail to start VSCmd in non-admin mode and a local build wont run correctly. This method (AmIAdmin) will simply check if I'm running in admin mode, and if not display “Non-Administrator” to the title bar and turn the background a light blue colour so I can instantly see that I don’t have admin rights.
Here is the code that has been added to my PS profile (view using “notepad $profile”):
1: #### Functions Used to Load VS Command Prompt #####
2:
3: function Get-Batchfile ($file) {
4: $cmd = "`"$file`" & set"
5: cmd /c $cmd | Foreach-Object {
6: $p, $v = $_.split('=')
7: Set-Item -path env:$p -value $v
8: }
9: }
10:
11: function VsVars32()
12: {
13: $version = "9.0"
14: $key = "HKLM:SOFTWARE\Microsoft\VisualStudio\" + $version
15: $VsKey = Get-ItemProperty $key
16: $VsInstallPath = [System.IO.Path]::GetDirectoryName($VsKey.InstallDir)
17: $VsToolsDir = [System.IO.Path]::GetDirectoryName($VsInstallPath)
18: $VsToolsDir = [System.IO.Path]::Combine($VsToolsDir, "Tools")
19: $vs90comntools = (Get-ChildItem env:VS90COMNTOOLS).Value
20: $batchFile = [System.IO.Path]::Combine($vs90comntools, "vsvars32.bat")
21: Get-Batchfile $batchFile
22: [System.Console]::Title = "Visual Studio " + $version + " Windows Powershell"
23: }
24:
25: ###### Functions Used to Load VS Command Prompt #####
26:
27: ###### Function Used to Set Background to Light Blue If not Admin ######
28:
29: function AmIAdmin()
30: {
31: $wid=[System.Security.Principal.WindowsIdentity]::GetCurrent()
32: $prp=new-object System.Security.Principal.WindowsPrincipal($wid)
33: $adm=[System.Security.Principal.WindowsBuiltInRole]::Administrator
34: $IsAdmin=$prp.IsInRole($adm)
35: $title = [System.Console]::Title
36: if (!$IsAdmin)
37: {
38: $title = $title + " (Non-Administrator)"
39: (Get-Host).UI.RawUI.Backgroundcolor="Blue"
40: cls
41: }
42: else
43: {
44: $title = $title + " (Administrator)"
45: }
46: [System.Console]::Title = $title
47: }
48:
49:
50: ###### Run Functions on StartuP ######
51: VsVars32
52: AmIAdmin
UPDATE
As I have been doing work with Windows Azure recently I have also added a handy way to access all the features of the Azure SDK Command Line Tool to my PowerShell by adding the following line to my profile:
$env:Path = $env:Path + "; C:\Program Files\Windows Azure SDK\v1.0\bin\"
This will add the folder containing all the Azure utilities (cspack, csrun, etc.) to the PowerShell environment.
Great Channel 9 video featuring Amitabh Srivastava the VP for Windows Azure, talking about Azure, the cloud, cloud services, developing for the cloud and some insights into what's in store for the future.
My favourite quote from this hour long dive into Azure, is when Amitabh say’s that he sees Azure and the current state of the cloud only being only:
“5 minutes into the first quarter”
With such great advances being made from many of the big players in computing to push towards cloud technologies, it will really be an interesting area in the months and years to come.
Microsoft Academy for Collage Hires is Microsoft’s global graduate scheme designed to take the best University graduates from around the world and fast track them into the world of Microsoft’s sales, marketing and service organisations.
The EMEA graduates are a diverse group range from all over Europe from different universities, degrees and backgrounds, all with a common potential (how did I get in?) and passion for technology.

During the first week of March, the graduates from all over EMEA converged on the city of Istanbul, Turkey to take part in on of our first European training sessions, Winter School.
Winter School is a two week (only one if in Services as we get to go to Corp :) ) training program based around personal development and soft skills, not to mention the brilliant night life of drinking, belly dancers, drinking, boat trips, sightseeing and drinking (shhhh) along with the networking opportunities.
The first week provided a couple of days to first familiarise ourselves with Istanbul, getting to know everyone from around the continent and settled into a great (but expensive) hotel.
Winter School kicked off at the newly kitted out Microsoft Turkey office, with a number of presentations from some really great VP’s from around the business. Sharing their experience and stories of being at a company like Microsoft and what we can expect over the coming months and years as we develop our carer's from graduates to the VP of tomorrow. One thing that is surprising as a graduate is how really
approachable these guys are being able to just chat with someone helps seal multi million dollar deals and get insight into how they built their positions to what they are. Along with this the amount of time and respect that these important people give new graduates into the company is truly amazing.
After the kick off event, we spent a day going through personality types and finding what our “true colours” are, as it turns out I appear to be a red (Task oriented, driven, leader etc.). Along, with how we can get each of the different colours, red, orange, blue and green to work best together.
This then really came to light in some group work we carried out in the latter part of the week, where we separated into a number of groups and were challenged to complete the Silver Bullet Runway, a challenging exercise where we needed to maximise profit from a given set of materials by running as many ball bearings through a tube in 30 seconds.
A number of presentations were given by the guys from Duke Education, whereby we discussed how to give the perfect presentation, group skills and got the chance to present on our individual stories of how we got to be working for one of the best companies, Microsoft. The best of these presenters then went forward to present in front of a group of around 200 graduates and professional presenters.
The final day of the first week culminated with us utilizing all of the skill we had learned during the week, from presenting to group skills and selling techniques as we all split into groups and put on a trade show.
During this week, I managed to make many new friends, that I will be meeting up with in a couple of months when we all converge on the Tech Ready later in the year.
This was a truly great week, and just one of the reasons for graduates to apply for a career at Microsoft.