Dutton's blog

Wild Arena - Big Cats 2 Workshop and Experience

I've just myself booked onto Wild Arena's Big Cats 2 Workshop and Experience day in September. Although the actual venue visited seems to be kept a bit of an online secret, I have a rough idea (not too many 'big cat' collections in Kent) and will get the exact location details in the post.

I've heard great things about these big cat experience days. You get to go right up to the enclosures (which you can't generally do in zoos) and so take 'bar-free' photographs.

It's a while off yet but that was the soonest date with spaces, so fingers crossed the weather is good and I'll make sure I post my results!

Merging Folder Contents in OS X

Although I've been an Apple convert and dedicated OS X user at home for a reasonable amount of time, I still get caught out occasionally by making assumptions with my "Windows" brain, and the one that has recently cropped up and bitten me in the arse is Finder's folder copy function.

I have two Canon cameras; a dSLR 40D and a compact IXUS85, both of which I used to take pictures of our recent snow and both of which it turns out store their photos in a folder called "100CANON" on their respective memory cards.

I didn't really think anything of it when I plugged both cards in my USB reader, the first folder copied to the desktop fine. Then when I went to copy the second, I got the following dialog:

OS X Folder Replace Dialog

Being used to various Windows platforms in the past and at work, I just clicked 'OK', assuming that I'd end up with a single folder on my desktop containing both sets of files. I knew there wouldn't be any filename conflicts as my 40D produces .CR2 raw files and my IXUS85 .jpgs, but once the operation had completed, I opened the folder and found no sign of my .CR2s! The copy had in fact done exactly what the dialog said; it had replaced the old folder with the new one! The original CANON100 folder containing my CR2s had gone completely, no Trash bin, no nothing!

After some furious web searching, this actually turns out to be quite a contentious issue in Mac-land and has in fact been a 'feature' of OS X's Finder all along. The web is full of horror stories of people losing gigs of carefully organised mp3s, photos, whatever, when they decided to copy an indentically named folder from their usb key, expecting the contents to merge with their existing collection.  Due to the fact that OS X treats all files and folders as objects, this behaviour makes sense, it's just not what I initially expected.

Luckily, Apple do provide an application to merge folders called FileMerge as this MacWorld tip from 2006 points out. To use it you'll need to install Xcode, and it is intended to be used for comparing files, but as the article points out, it can also be used to compare folders and will happily point out any discrepancies between the contents of the two and allow you to merge them.

So I guess the lessons I learnt from this are;

  • Never 'Move', always 'Copy' and check my files are where I want them before deleting the originals, and
  • Use FileMerge to merge the contents of directories.

Fortunately, I didn't lose too much, the flurry of snow balls flying about at the time meant I was quite reluctant to bring my 40D out from under my coat!

DoshTracker Update #1 - Let's Get Cracking!

I know glaciers have been observed moving faster than the current re-development of DoshTracker but this is the first blog post of many in this new DoshTracker category.

If you've arrived here straight from www.doshtracker.co.uk then welcome to my blog, please feel free to have a look around and find out more about me, who I am and what I do. If you are already a reader of dutton.me.uk then I'll be using postings in this category to provide progress updates on the re-development of DoshTracker, a UK currency tracking site I developed back in 2001 which ran for five years (check out its Wikipedia entry for more info here).

I plan to utilise both the Google Maps API and Ext JS framework in the re-design so I will be posting lots of my findings on getting these two playing nicely. I'm still 100% committed to getting DoshTracker back up and running and from all of the positive feedback I've had from the old user-base you guys want it too, so watch this space.

Trust issues working on a network share in Visual Studio 2008

An unfortunate combination of my rear-wheeled drive car and the mini-ice age which hit us here in Northamptonshire left me stranded and working from home earlier this week. Not a problem I thought, as I had previously taken the liberty of backing up my current source onto the USB stick I carry with me and already had a VMWare Fusion image with XP and MS Visual Studio 2008 on my MacBook.

So in went the USB key, project folder copied to my "Documents" folder and the XP virtual machine opened. But after browsing to the network drive which VMWare maps onto my OS X "Documents" folder and opening the solution file, I was greeted with something that looks like this:

Visual Studio 2008 - Network Share Project Not Trusted Dialog

A quick google search for this error message brought me to this MSDN article which looked promising, but despite having a full VS 2008 SP1 install on my machine I couldn't find Mscorcfg.msc anywhere, and the suggested Caspol.exe command just didn't work!

According to this article, I needed to install the .NET Framework 2.0 Software Development Kit (SDK) (x86) from here to then get the "Microsoft .NET Framework 2.0 Configuration" tool which should help. Once all 300+mb of it was downloaded and installed it then appeared in my Control Panel -> Administrative Tools, progress at last!

In the tool, expand "My Computer" and select "Runtime Security Policy" to get the following:

Microsoft .NET Framework 2.0 Configuration Tool

From here I was then able to select "Adjust Zone Security" to be taken to the "Security Adjustment Wizard". After selecting whether I want to make changes to the computer or current user only (I chose computer) and clicking "Next", I was taken to the important part, the zone security level settings. The problem with trusted network shares appears to be caused by the "Local Intranet" zone defaulting to one "notch" below "Full Trust", causing all sorts of havoc to my VS2008 security. By moving the slider up to "Full Trust" for the "Local Intranet" zone and clicking "Next" and then "Finish" to close the wizard I was then able to successfully load, compile and debug VS2008 projects located on a network share.

I must admit that I'm still not 100% convinced that this is either the correct or even a safe solution so please exercise caution when changing zone security settings, especially on networks with internet access, and feel free to set me straight in the comments if this is far off the mark, but in the meantime it has at least enabled me to perform the tasks I have been able to carry out with every other IDE I've ever used and develop code on a network share!

Using Time Machine with a normal network share

It's no great secret that OS X supports Apple's shiny (and slightly overpriced, IMHO) Time Capsule straight out of the box as a backup volume for Time Machine, but trying to get it working with a normal network share takes a bit more fiddling, even with Leopard (10.5.6). After finding a few slightly conflicting "how-to"s on various blogs here's what I did to get it working with my D-Link DNS-323 NAS.

  1. First, configure Time Machine to use "unsupported" network shares by typing the following into a console window:
    defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
  2. Now, under normal circumstances you'd expect this to just work, as long as you have mounted the network share you wish to use as a backup destination, it should now appear in the "Change Disk..." listing in Time Machine Preferences, but try to run with this and it will sit "Preparing" for a bit then fail with a “The Backup Disk Image could not be mounted.” error message.
  3. Start Time Machine off again trying to backup but this time watch your network share.
  4. You will see that a file is created in the following structure:
    ComputerName_MACAddress.tmp.sparcebundle, copy this filename. Once the backup attempt fails, this file will disappear so try again if you don't manage to catch it. It appears that Time Machine has a problem creating this file and so the whole thing bombs out. So, let's give it a helping hand and create one for it!
  5. Open Disk Utility on your Mac. Click “New Image" and use the following settings, in the following order:
    1. Save as ComputerName_MACAddress (that you copied above, minus the "tmp" part)
    2. Set whatever you want as the Volume Name.
    3. Skip over Volume Size for the moment.
    4. Change Partition to "No Partition Map".
    5. Change Image Format to “Sparce Bundle Disk Image”.
    6. Now set the Volume Size, select "Custom Volume Size" and set it to the maximum size you want to use for your backup volume. Don't worry if you don't have the hdd space as this is a maximum size only, it won't immediately create an image file that size. For example I created one set to 900gb which resulted in an image file around 200mb initially.
    7. Create the image.
  6. Now copy this image file to your original backup destination network share.
  7. Start Time Machine off again, and this time it shouldn't fail.

As I type I've now got both my MacBook and Mac Mini backing up to a single network share on my DNS323 "toaster" NAS, I'll report any problems.