Syringe.Net.Nz
Irregular Injection of Opinion
RSS 2.0|Atom 1.0|CDF

 Monday, July 18, 2011
64 Bit Microsoft Office vs 32 Bit Office: 64 Bit is not necessarily ‘better’

In my travels I run into lots of people who are running Microsoft Office 2010 but many of them are also running the 64 bit version. I thought I’d do a quick post to discourage this behaviour!

Yes, we’ve had it drilled into us that 64 bit is the future, and, for operating system installs you do indeed want to be running Windows x64 because you’ve probably got more than 4GB of RAM in your machine. However, when it comes to applications that have been specifically compiled for 64 bit I suggest a much greater degree of caution and reflection before diving in. It is basically a trade-off by way of sacrificing raw performance for the ability to use more RAM in that application process. What do I mean by this; Well, there is an overhead in working with 64 bit pointers and this will mean that you take a performance hit in running the 64 bit application- see this article for some simple benchmarks http://www.osnews.com/story/5768. The flip side, however,is that you can then work with a full 64 bit address space and thus your application can use more than 4GB(ish) of RAM.

So, why do I want to discourage you from installing 64 bit office?  

  1. You probably don’t need that much RAM for a individual Office application.
    Unless you are working with extremely large spread sheets in Microsoft Excel it is unlikely you’ll need to use > a couple of GB of ram for a single Office App.
  2. There will be a performance hit.
  3. There are significant compatibility issues
    If you use Office add-ins and other 3rd party extensions you’ll find that compatibility with x64 Office is patchy at best.

So there you have it. The typical person I se running 64 bit office is the ‘IT Guy’ or enthusiast for whom more bits == more power. This just ain’t the case.

Here is the official Microsoft article on the situation: http://technet.microsoft.com/en-us/library/ee681792.aspx

Office2010 | Windows 7|Monday, July 18, 2011 11:46:41 PM UTC|Comments [0]|    

 Thursday, June 16, 2011
Real Venice and Fake Venice

So Deb and I were in Vegas at the Venetian this week. Just for shits and giggles we tried to recreate our photo of real Venice... How did we do for authenticity?

n627910082_3680922_5380

The Grand Canal in ‘Real Venice’

248873_10150633991850083_627910082_19025035_8112051_n

The Grand Canal in Fake Venice (Venetian Hotel, Las Vegas)

Trust Deb to ruin it by not wearing the same top!!! Me, ever reliable in my yellow cool-dry.

Frankly I’m torn. The chlorinated canals in Fake Venice smell much nicer than those in real Venice…

Travel|Thursday, June 16, 2011 4:32:33 PM UTC|Comments [0]|    

 Friday, June 10, 2011
Apple iCloud Running on Windows Azure and Amazon S3

Hi All,

Saw this rather interesting snippet come through on the Twitter feed this morning.

http://mobilitydigest.com/icloud-brought-to-you-by-microsoft-and-amazon/

Clicking through shows you some partial HTTP messages (some stuff is blurred out)

Certainly looks like iCloud is using both Azure Blob storage and S3.

They are probably using Blob storage for the ability to use Shared Access Signatures for file upload, but, without seeing the full URL in the HTTP request that’s a bit of a guess.

My guess is that the call to the iCloud servers for authorizePut will be fetching a SAS and then this is being used in the PUT request to the Blob storage endpoint.

There is a header in there called AuthorizationBSharedKey. I certainly hope that’s not the storage account shared key for the Azure storage account! But again, without seeing the full messages I can’t really tell. It’s certainly not a standard Azure header, but, it does have a somewhat worrying name.

Anyone able to pull the headers in full for some analysis? chris(at)syringe.net.nz

Chris Windows Azure|Friday, June 10, 2011 12:29:01 PM UTC|Comments [0]|    

Kayaking Paddling the Ottawa River

So one of the kayaking items on my bucket list was a trip to the Ottawa River. Just ticked that one off with a couple of runs over the last couple of days.

Map picture

Didn’t take all that many photos but got a few decent ones of me running The Elevator Shaft chute at Garvin’s rapid on the Middle Channel. The flow yesterday was 13.0

Here is a MASSIVE panorama of the rapid. Thought I’d upload in all it’s glory for people who may want to examine it later to plan their lines. Clicky Clicky for the monster.

image

Elevator Shaft is hard River Right. It was a pretty simple drop but it’s got a heap of rocks in the bottom which kinda freaked me out at first. Someone on the trip who had run it a heap of times said you don’t hit em, just go for it. So I did.

P1010206P1010207

P1010208P1010209

P1010210P1010211

And finally a view looking back up the river. With the Chute we ran on lookers left.

P1010214

Adventure Sports|Friday, June 10, 2011 1:00:52 AM UTC|Comments [2]|    

 Thursday, June 02, 2011
Combining Files from Different Sports Watches using SportTracks

I awoke this morning to another great Ray Maker review, this time of the Polar RCX5. Now I have to admit a bit of a sports watch fetish, certainly nothing approach Ray, but I’ve still owned a bunch of Polar, Suunto and Garmin devices. I’ve pretty much settled on Garmin as they support the open(ish) ANT+ sensor platform, but, it’s not without challenges and as such I’ve recently been combining data from two watches.

Towards the end of Rays piece* he notes the issue with the RCX5 in that the desktop client basically spits the data as two separate files: a *.gpx for the Geo data and a *.hrm for the traditional polar biometrics and sensor data.

Ray says this

“For example, if you try and import into Sport Tracks, after selecting both files it simply sees them as two separate training entries – one using GPS data, and one using footpod data:”

Which is strange, because I do this all the time. Reason being is that the heart rate monitor that Garmin ship (the soft one) is a piece of turd. I ordered an older style strap from Garmin but they sent me the wrong one (an old FR301strap) which doesn’t bloody work. So, I am stuck using my Garmin 310XT for GPS + Footpod and my Polar s625x with the ever reliable analogue HRM and wearlink strap for HR.

Basically at the end of each workout I let the Garmin 310XT sync with Garmin Connect and I open Polar Personal Trainer and sync the s625x into that.

Then I can begin import into SportTracks. The trick is to import them in a two step process… I’ll use a worked example here which was my run/hike up Lynn Peak near Vancouver this past weekend.

I typically start by importing the Garmin *.fit file direct from the file system (it gets dumped out by the Garmin ANT Agent)

image

This should feel like a standard import.

image

Next I change to the Polar Folder and import the HRM file.

image

Now here is the trick. If you have the clocks on your watches correctly sync’d then SportTracks will typically pickup that the workouts overlap and automagically offer to ‘update’. In my case I didn’t because the olar Dual time doesn’t change the date. So instead I choose the radio button option to Update Existing Activity

image
Note that I have
1. Selected the radio button
2. Chosen my previously imported activity
3. Chose to import heart rate and elevation (the s625x has a *proper* altimeter which is a heap better than relying on GPS data from the 310XT)

And that’s really all there is to it folks- GPS data and running cadence from the Garmin and Heart Rate data and elevation off the Polar. While I don’t have an RCX5 to test with (feel free to send me one) this process should work just fine with a GPX file and an HRM file.

image

*Ray: As a quick ask would love to see the sections of your reviews with #Anchor tags so we can link direct to them.

|Thursday, June 02, 2011 8:25:05 PM UTC|Comments [0]|    

 Tuesday, July 20, 2010
Windows Azure Drives + SQL Compact 4 – Part #1

So there’s not a whole lots of stuff on the interweb that gets you started with drives and SQL Compact 4 is only just out into the open. My need was for a lightweight database for a sample app I’m building with Chris Klug for our session at Tech Ed New Zealand.

I thought I’d run quickly through how I got things going.

Getting the Bits
I grabbed the bits using the Microsoft Web Platform installer. I wanted two things. 1) SQL Compact 4 CTP1 and; 2) The Web Matrix tool.
It’s hopefully fairly obvious why I needed SQL Compact. The reason I wanted Web Matrix is because it’s currently the only tool I could find that will allow me to create and edit SQL Compact databases.

trznaj5k  ixuyzv04

I’ll be using Visual Studio for much of this post; I’m guessing y’all know how to get your mittens on that now.

Creating a Database
To build our database we’ll be using Web Matrix. It doesn’t have a specific database designer that is independent of the site editor so we’ll need to create a site and then create it in the context of our site.

mdhkuthy
We’ll start from a template.

sepojgnz
…and create an empty site.

Choose Databases from the left hand nav.

p2py5yin

Choose to create a new database from the ribbon

1cx4dml5

Double click to select tables. And right click to add a new table

a5kbmcaw

Create a basic table definition with a ContactID and ContactName. Use the Ribbon controls to create new columns. Use a BigInt identity column for the ID and make it the Primary Key.

ih4vdprv

Save the table as Contact

Close Web Matrix- our database has been created and saved into a subfolder of my documents. Mine was at

C:\Users\Chris Auld\Documents\My Web Sites\Empty Site\App_Data

We need some data in our database. We could ahve used Web Matrix to do this but I wanted to show another tool that allows us to execute raw SQL against the DB as it may be more suited to some developers.

The tool in question is the SQL CE Toolbox (you’ll need the latest version which is a standalone application)
Grab it from here: http://sqlcetoolbox.codeplex.com/
Don’t just install the VIsual Studio add-in version as at the time of writing it doesn’t support the v4 sdf format.

Open the tool and right click to add a new connection

wgaqiuot

Open the database file and test the connection

ztpigimk

Expand the tree to show our Contact table. Right click and choose ‘Script as Insert’. This will create a template insert script for us.
Enter some sensible (or stupid if you prefer) values and then execute the query. I didn’t attempt to insert the identity column and so removed that from the query.

slfl4yrk

Before we leave this tool click the Estimated Plan toolbar button. As long as you have SQL Server Management Studio installed it’ll open that tool and hand over the query plan text.

43uma5oy
That’s right folks. That is a graphical query plan graph of the query for my embedded database. That’s pretty damn cool!

Getting Your Database Into Windows Azure Storage

Being a database we want our *.sdf file sitting in a WIndows Azure drive. There are a bunch of ways we could do this:

- We could put it into our service package, create a drive on startup, copy to the drive and then do a lazy check each time we start so it’s only done once.
-We could create the whole VHD on the client machine and upload that to storage. This removes any of the once only init code from our application. THis is the approach I chose to use

We need to create a VHD. Hooray for Windows 7- this is trivial. If you are a hard-ass like Steve Marx then you can use a batch command to do this but you all know that I’m not really a hard ass so I’ll do the draggy droppy clicky clicky thing.

Open Disk Management. I’m a fan of the search box in the start menu- type ‘Disk Management’ and then select ‘Create and format hard disk partitions’

ll3azfwj

Use the Action menu to Create VHD. Stick it somewhere useful like the desktop as we’ll need to grab it later. You’ll want to choose a fixed size- I chose to make it 100MB. You’ll only pay for the actual data you store on disk (not the empty stuff) but more on that shortly.

soyitaae

Once created you’ll need to Initialize the disk with an MBR

mhcwels0

.. and Format as NTFS

0bubf4tl

image\

The drive will now be available in Windows Explorer and we can copy our *.sdf file across from the My Web Sites directory to our new VHD

Once we’ve copied it over we can go back and Detach the VHD

hg2c3kjm

Now we can upload the VHD to Blob storage. Before you crack out your favourite Azure storage client (I like Cloud Studio from Cerebrata) you’ll need to want to check that it supports sparse Page Blob uploads. Cloud Studio doesn’t so we’ll use the VHDUpload Tool from here: http://blogs.msdn.com/b/windowsazurestorage/archive/2010/04/11/using-windows-azure-page-blobs-and-how-to-efficiently-upload-and-download-page-blobs.aspx I took the liberty of building the tool: VHDUpload

image

 

More in the Part 2 of this post tomorrow.

Windows Azure|Tuesday, July 20, 2010 8:24:02 AM UTC|Comments [0]|    

 Monday, May 03, 2010
Windows Azure Certificates for Self management Scenarios

The Windows Azure Management API uses x509 certificates to authenticate callers. In order to make a call to the API you need to have a certificate with both public and private key at the client and and the public key uploaded into the Azure portal. But, if you then want to call the management API from your Windows Azure VMs then you’ll also need to install the cert into the instances by defining them in the service definition This post will show you how.

I found it a bit of a pain to get going so here’s my simple guide. I used this to setup the certs for my favourite open source Azure toolkit Lokad-Cloud. We’ll be creating a self signed certificate, then uploading that certificate into the Windows Azure management portal. Finally we’ll add the certificate to our service model to ensure that Windows Azure installs the certificate into our VM instance when it is started.

Here’s the approach in pictures so you can follow along.

  1. Create a self signed certificate in the IIS7 Manager
    Open IIS7 Manager
    image 
  2. Expand the node for your local machine
    image 
  3. Double Click Server Certificates
    image
  4. Choose Create Self-Signed Certificate
    image
  5. Give it a friendly name
    image

You’re all done in IIS7 Manager. It’s just created a new Certificate and added this into the trusted root certification authorities on your machine. This is a highly trusted location for the cert so do be careful if you ever export it with the private key included.

We need to export it with the public key included so that we can upload it to the Windows Azure Portal.

  1. Run CertMgr.msc - just type it in full into the Start box.
    image
  2. Expand 'Trusted Root Certificates Authorities –> Certificates"’
    image
  3. Find your cert using the friendly name column and right click and choose Export
    image
  4. Choose the option to NOT export the public key. You should generally avoid exporting the public key if at all possible*.
  5. Choose to export as a DER Encoded binary
  6. Save it somewhere useful – we stick ours into source control
  7. Choose Export again, but, this time choose to export the private key
    Leave the PFX options all unchecked
    image
  8. Give it a sensible name.

You’re all done exporting. Now we need to upload it to Azure.

  1. Go to the Windows Azure Portal
  2. Choose the appropriate project
    image
  3. Click the Account tab across the top of the page
    image
  4. Click Manage My API Certificates
    image
  5. Browse to and upload your *.cer file you created earlier
    image
  6. You should now see the certificate listed against the account.
    Note that it’ll be listed using the Subject rather than the friendly name. So you’ll need to identify it by the thumbprint if you have multiple uploaded from the same machine. Azure Team: Can we please have the friendly name listed here?
    image

Now we’re ready to use our certificate from the Windows Azure Tools for Visual Studio

  1. Open your Windows Azure Project – We’re using Lokad-Cloud here
  2. Expand the Cloud Project to show the Roles.
    image
  3. Right click the Web Role and choose properties
    image
    This will open the Snazzy Windows Azure graphical UI. This is much nice than editing the Model XML by hand.
  4. Choose the Certificates Tab
    image
  5. In our case there is already a certificate entry defined by the default Lokad Model definition.
    Click the elipses (…) at the end of the thumbnail column to open the certificate chooser dialog.
    image
  6. Choose the cert from the dialog
    image
  7. Repeat for the worker role

The last thing we need to do is upload the certificate into our cloud service before we can upload our packages.

  1. Create a new Cloud Service
  2. Browse to the bottom of the page to find certificates and choose Manage
    image
  3. Browse for your certificate (including the private key)
  4. Punch in your password and hit upload
  5. Confirm that you’re all uploaded.
    image

You’re all done. Now you can happily deploy the app to Windows Azure along with having your certificate deployed into your Azure instances as well. This means that your Azure roles can now call the management API themselves.

*There will be times when you need to export the public key. We’ve had to do that in this scenario as we actually want to install the private key into our Azure instances. Another good example here is in a shared development environment. You have the option of either sharing a certificate among everyone or each uploading your own public key. Because we’re using the lokad tool and this explicitly supports just a single cert we’ve actually exported our cert (password protected) into our source control system so all developers can install the same private key.

If you have done an export and want to install the private cert onto a new machine then you’ll need to add it into the Local Computer –> Personal store.

  1. Run MMC by typing MMC in the start run box
  2. Add the Certificates Snapin
    image
    image
  3. Choose Computer Account
    image
  4. Choose local computer
  5. Open the Personal Store and choose More Actions>Import
    image
  6. Browse to and import your certificate.

The certificate should now be visible in the Windows Azure Tools for VS.NET cert selector dialog.

Windows Azure|Monday, May 03, 2010 9:18:56 AM UTC|Comments [0]|    

 Tuesday, April 20, 2010
Windows Azure Pricing Calculator Spreadsheet

I’ve mentioned this at a heap of sessions I’ve presented at and have never managed to get around to posting it.

So. Attached is my Windows Azure Pricing spreadsheet.

Pretty simple. has three worksheets.

  1. A simple Table storage calculator that determines the cost of table storage.
    This includes overhead calculation – i.e. what is the ration of name to value in your name/value pairs
    It also checks your key lengths fall within the 260 char URI limit and a few other things.
  2. A model of session state pricing.
    Basically shows that SQL Azure will typically be a cheaper option for Session state storage (or anything with little data on disk and high read/write counts).
  3. A detailed (very detailed) model of PhluffyPhotos.

For more detail please see my MIX10 session on Storage in Windows Azure Platform

http://live.visitmix.com/MIX10/Sessions/EX11

Windows Azure|Tuesday, April 20, 2010 9:06:10 PM UTC|Comments [0]|    

 Thursday, January 07, 2010
Chris and Dave do Denniston

Denniston is a former coal mining area situated on an alpine plateau about 30km North of Westport on the West Coast of New Zealand (Wikipedia here). It was actually an active mining area right up until the 1960’s. In recent years it has fallen under the ambit of the Department of Conservation. Along with the Buller Cycling club they have been building out a bunch of Mountain Bike tracks around the area.

You can pull details on the cycling area from the DoC site and from the Buller Cycling club.
http://www.doc.govt.nz/parks-and-recreation/places-to-visit/west-coast/buller-area/denniston/activities/mountain-bike-tracks/ 
http://www.cyclebuller.co.nz/index.php?option=com_content&view=category&layout=blog&id=19&Itemid=3 

Dave and I decided we’d try and visit the tracks as part of our summer South Island road trip. We drove in via Murchison as we did some paddling along the way. We had a couple of days in the Murchison region where the water levels were well up. Paddled a few runs that I’ve done before as well as a new run down the mangles that started with about a 2m waterfall- pulled quite a crowd when we ran that one for some reason… didn’t seem that difficult.
The crew on the Middle Matakitaki river Whitewater shuttles of doom.

We drove into Westport the evening before we planned to ride and found ourselves a nice motel (Buller Bridge Motel) with free WiFi. Got up early and headed up the hill. This place really is quite the plateau. The hill rises steeply off the ocean almost to an altitude of about 650m at the carpark. The views were pretty good for us; on a really fine and still day I can imagine you’d be able to see all the way up to Karamea.

Once we got to the top we had a bit of a potter around looking at some of the old mining ruins. Denniston is famous for the Denniston Incline which is a frighteningly steep, two pitch, coal railway that literally goes straight up the side of the hill. Check out this video from the NZ Archives for an idea of what it was like.

Below the carpark. Looking down to the incline top loading yard. Walking among the wagons in the loading yard Looking down the incline!

Then we headed up the hill to the Museum Car park which is the designated starting place for the Mountain Biking trails. While getting organized we saw the Google Car driving around- yes, even in the middle of bloody nowhere there is Google!

Getting organized at the museum Google car. Ho9pefully we'll be able to see ourselves!

We started out with the Ropers Hotel Circuit.
http://www.cyclebuller.co.nz/attachments/011_MTB%20-%20Denniston%20-%20Ropers%20Hotel%20Circuit.pdf 
Straight away the riding was quite different to anything we’d ridden before in New Zealand. Lots of slick rock and ledges. Was quite fast riding and reasonably hard on the suspension. A 6” trail bike is ideal- we had a Trance and a Mojo. The last part of this track before it hits the road is walking only- for ecological reasons rather than ride-ability. You definitely want to do this track in the predominant direction indicated on the map as it would be a pain to walk up that hill.

Next we rode out on one of the longer trails. This was nominally on 4WD track but I’d challenge most people to take their 4WD there and get it back in one piece. The track was Sullivans Circuit and it went off the other side of the Plateau back down towards Westport.
http://www.cyclebuller.co.nz/attachments/011_MTB%20-%20Denniston%20-%20Sullivans%20Circuit.pdf 

Looking up towards Mt Rochfort More ruins. We think the top of the old aerial ropeway 
P1062415P1062416

This track had plenty of challenging riding. Lots of large rocks and ledges. it was all too easy to go far faster than 0.1mm of lycra really should justify.

P1062417 P1062422 Just a little off

Finally we rode the Miners and Drill track circuits. Again, lots of hairy riding with a bunch of sketchy single track, some of which we both had to walk.

Gratuitous Bike Porn Riding the Slick Rock Self Porttrait

There was still plenty of sign of the old coal mining stuff and indeed the coal itself.

Coal mine fire Coal seam

Despite only doing about 30km (in 3.15hr!) we were in need of a beer once we got back to the car.

Post ride beer time Some amazing Rata trees on West Coast. This is a small one!

Here’s the GPS dump

image

And the full TCX file of my Garmin 310XT is here:
http://connect.garmin.com/activity/21786909

Adventure Sports | Gettin Fit|Thursday, January 07, 2010 5:42:29 PM UTC|Comments [0]|