James O'Neill's Blog

July 27, 2007

Pigs and drugs and naked dwarves …

Filed under: Working at Microsoft — jamesone111 @ 3:46 pm

Yes folks they’re all part of life’s weird tapestry as a British Microsoft employee at a Microsoft event in Seattle.

 After I referred to Snowclones recently it I should point out that blank and drugs and blank blank blank is a snow clone modeled on Ian Dury’s “Sex and Drugs and Rock and Roll”. Dury said he was from Upminster, where I was born, although according to his Wikipedia entry he was actually actually born in Harrow.  There is a an old joke – based on the stations on London Underground’s district line; “You’ve got mad, Barking Mad, and Upminster”… “Upminster ?” “Serveral stops beyond Barking”.

So what of the Pigs, the Drugs and the naked dwarves ?

First the pigs. Seattle has “Pigs on Parade” going on at the moment and wherever I walk in this city there are fabulous decorated pigs. Microsoft is one of the many sponsors I’m pleased to say.  I’ve been grabbing pictures with the camera on my smartphone when I see them. Here are couple

IMAGE_319.jpg IMAGE_315.jpg

Next the Drugs.  Steve and I have ended up doing some unscheduled research into the American Health Care system. He can tell what happened to him for himself. As for me, well for the last five years or so a prescription drug has helped me lead a bit more normal life than would otherwise be the case. I bought a supply with me to the US. Sometime in the last couple of days I lost it. I’m got going to die or  go “Upminster” for lack of my drug, but withdrawal isn’t fun, and it will need a few days of taking it to again to get back to normal. So I called the emergency number we have for just these kinds of things, got referred to a Doctor who could prescribe me enough to see me home. I had to pay for my own, and at £2.30 per tablet my usual prescription charge of £6.50 for 28 looks a real bargain. Our system works. My phone says I made the call at 3:16, and the receipt from the Pharmacy is timed at 5:40, and more than half the time was spent in or waiting for Taxis. I don’t actually inhabit the kind of World that William Gibson writes about – but it reminded me of the the opening of Count Zero, a few sentences in, it has this “Because he had a good agent, he had a good contract. Because he had a good contract, he was in Singapore an hour after the explosion. Most of him, anyway.”  (The very first sentences of Gibson’s books are often great Count Zero starts “They set a Slamhound on Turner’s trail in New Delhi, slotted it to his pheromones and the color of his hair”).

But if you’ve read this far, you want to know about the Naked Dwarves.

There are a bunch of memorable quotes from this week. One was Bill Gates talking about PBX’s as Mainframes “an expensive way of doing things in a rigid way”. One was a product manager talking about a product which is still secret, and referring to the next product which is so hush-hush they’ve code named it “Shshhhh”.  (Which reminds me of a programming language called “KEEP”. The developer was asked what KEEP stood for. “It’s not an acronym” he said “I just found a good way not to have people throw program listings away was if the header page said ‘KEEP’ in big letters” ) However the prize for the best single line of the week (and I have permission from someone in Legal to blog this), is the explanation of how a Microsoft employee, in the context of a legitimate business conversation came to shout down the phone to someone “If you don’t get a naked dwarf in my office by this afternoon, I’m coming over there to get one for myself”.

I will explain the context of this … but in another post 🙂

This post originally appeared on my technet blog.

July 26, 2007

OCS RTM (Office Communications Server Releases To Manufacturing).

Filed under: Uncategorized — jamesone111 @ 8:05 pm

The news is on the Microsoft Press Pass web site.  


This post originally appeared on my technet blog.

I-phone… I don’t like to say I told you so.

Filed under: Uncategorized — jamesone111 @ 7:40 pm

Aargh. I just broke one of the cardinal rules. Never say anything you don’t beleive to be true.

I love to say “I told you so”.

I read Chris Case’s break-up note to his I-phone with great amusment.

I wonder if Ben (who has left a void in a village somewhere to become my blog stalker) will berate him for the violence of saying “that it’s best to sever ties now while we still both have our dignity and I have not smashed you on the sidewalk in frustration”


This post originally appeared on my technet blog.

July 24, 2007

Why I am the one doing this ?

Filed under: Uncategorized — jamesone111 @ 6:51 am

A draft post which ended up  going on the spike referred to Lyn Truss’s book “Talk to the Hand: the utter bloody rudeness of everyday life”. I’m not fan of Ms Truss, or the book – which could have been called “Talk to my bank. An utterly bloody pointless book for Christmas” but I’ll concede she had some decent chapter headings.

  • “Someone else will clean it up”, covers everything from Pollution to people not responding to e-mails sent to lots of people
  • “Was that so hard” covers peoples inability to use words like “Please”, “Thank you” or “Excuse me”.
  • “The universal eff off reflex” speaks for itself

It irks me that her chapter called “Why am I the one doing this ?” doesn’t have a pithy quote. I got Plain words out on Saturday to find a quote and noticed something to the effect of “The people you write to must never feel they are being put to trouble to save you from it”; indeed. Here are some examples.

  • Bad E-mail. Why am I the one who has to organize the writers thoughts into something coherent ?
  • Phones 1. If I’m calling someone from my phone using the number they gave me in an e-mail, isn’t it rude to make me edit it to a format phones can call ?  
  • Phones 2. Phone trees. Don’t make me route my call,  train your staff, to handle more than one thing. One UK credit card company wanted me to key in my 16 digit card number… These days I try not keying anything, because systems are designed to route people who can’t use a keypad straight to an expert operator. I got a shock when the operator knew who I was from caller line ID. They didn’t need me to key in 16 digits at all ! Is any company that can’t identify a customer from, say, name and postcode, and which needs a reference number, a company you want to do business with ?
  • Travel 1 Why do I have to go through so many steps ? e.g. Filling in a form for our Travel agent when they have the information requested in the e-mail I sent them ?
    Travel 2. Why do I need to call 3 numbers to find the person at the travel agency who tells me I have to sort things out for myself ? Couldn’t they transfer me? Couldn’t all their agents have access to the information ? If they are being paid to make arrangements, why am I the one doing it ?
    Travel 3. Why did I have to queue up to talk to someone from BA when my flight was cancelled. They have contact details for many of the passengers. A mail that said Only go to the airport if {whatever} otherwise go home and we will call you. We anticipate this will be approximately X time. –Maybe with updates on time Wouldn’t that have easier for them ?
  • Web sites 1. I’m not signing up for everything on planet. “I’ve posted X on facebook, just sign up to see it”. No. You want to show it me, put it where I can see it. Passport / Live-ID and equivalents aren’t the answer, I value my privacy. I’m not providing any more information than I think is necessary to buy from a site either.

This last one cost Expedia my business. After Friday’s disaster BA fixed me with a flight, 2 days later and via Vancouver. They didn’t book the connecting flight to Seattle. I’ve flown that hop on one of those cosy Fokker-50s, but since that was years ago I went to Expedia to find what flights there were choices exist. But when I want to book a flight on the little Fokker, Expedia demanded I set up me to set up an account. Sorry guys, I can book on Alaska’s site; it’s well designed with the bonus of  Tim the Moose.


This post originally appeared on my technet blog.

July 21, 2007

Trains, planes and automobiles.

Filed under: General musings — jamesone111 @ 2:12 pm

The last person I punched was a schoolboy. Before you report me for child cruelty, I should point out that I was a schoolboy myself at the time, and that makes it at least a quarter of a century ago. As befits someone who went on to work in IT punching people was something I wasn’t very good at, which may explain this long period of non violence. Only the presence of some very large policemen, a timely phone call and a man called Rod Green prevented that record coming to an end on Friday night.

Over the next week or so Microsoft employees descend on Seattle for the “Tech ready”. This brings me back into  contact with the Microsoft Travel portal. Steve has talked about,and I I said of it “this tool is to Web Usability what Scrapheap Challenge (or Junkyard wars in the US) is to automotive styling”. To add to its other faults I discovered it dies if the IE7-Pro add in is installed. I don’t know what acceptance tests we did on it but it won’t book travel to Seattle.

So I called the people I know as “American Excuse”,  The agent asked if I was going to tech-ready “We can’t book that  you have to e-mail another office”. So I did that. They sent me a form to complete with my contact details (all of which are in my e-mail signature) and booked me on Friday’s  BA flight, I’d rather fly SAS but hey.

I decided to leave my car at home and take the train to the airport. But on Friday we had more rain than even a British summer is used to. Seconds after my wife left me at Didcot station I found that the subway leading to the London bound platform was flooded. Station staff, were using a wheel chair to ferry passengers from the last train which was allowed to stop through the floods. Passengers for London were told to go 25 miles the other way change trains at Swindon and come back. But by the time I’d traveled 50 miles to avoid what was basically a large puddle the rest of the journey into London was looking a uncertain. I told one of the staff: if their use of the wheelchair was remarkable, then the response to this was astonishing. “if you hold on a moment while we sort out a form, we’ll pop you in a Taxi”. Major customer service brownie points for First Great Western.

Two minutes into the taxi ride my phone buzzed; I love Exchange push mail and Windows Mobile 6.  The message read.

From: British Airways Customer Services

To: James O'Neill

Sent: 20 July 2007 13:37

Subject: Cancellation - BA0053 LHR to SEA on 20 Jul 2007 : ref [deleted]


Dear Customer,

We regret to inform you that flight BA0053 from Heathrow (London)
to Seattle on 20 Jul 2007 has been cancelled.

Please accept our apologies for any inconvenience this may cause.

We have sent you this information as quickly as possible by automated
email and hope it reaches you in time to allow alternative arrangements to be made.

Please do not respond to this email as we will be unable to reply.

It may be possible to view your options and rebook or cancel your flights on ba.com.
To check please click the link below:


Alternatively, please call us on:

- United Kingdom 0800 727 800

We suggest you also contact your booking agent for any further changes to your travel plans.

We park the taxi while I call BA – busy.  Call the Microsoft travel emergency number – a recorded message tells me to it’s an out of hours only, and to redial the normal number. I do (why not do the re-routing for me ?). “Oh” says the agent “We can’t access that booking from here You need to call the group people”, at which point we get cut off. I use the Search Server feature of Windows Mobile 6 to find the mail with their number-it’s not in a dialable format.  Mobile 6 – unlike my previous phone – lets me fix it. The agent at the group bookings place promises to ring BA right away and get back to me. Twenty minutes later I call again. Another agent says they’ve compiled a list of people on the same flight and will be calling BA soon. I try to access the BA’s web site from my phone but it never leaves a “please wait” screen. The taxi driver and I decide to head for Heathrow airport even if we end up turning round and coming home. I forward the mail to my wife who tries to rebook the flight on BA’s web site. Errors Occur. The travel agent calls back and says they can’t rebook my flight (why not ?), and to continue to the airport. They suggest rebooking my flight at Terminal 1 rather than 4 where I was due to depart. 

The situation at T1 merited the description of  “a large crisis” hours before I got there:141 flights canceled, with BA hardest hit. The rebooking queue snakes round the terminal, and most of the way along the link to Terminal 2. Heathrow’s own website has some harsh things to say T1 and T2 so chose to wait in T4 – though it turned our I’d be waiting for 5 hours in a tent outside; things are so bad so often that BA have two Marquees permanently set up outside. My phone’s call history tells me the call I made when I joined the queue was at 15:55. Its Internet connection sharing let me try the BA web site from my laptop, it can’t handle substitute routes (via New York, Chicago, Atlanta etc)  never mind a change of airline are beyond it,and direct flights are all full. I try BA’s executive club who answer and sound helpful, but can’t change route either. Aargh. An American next to me needs to be in Paris, and has no cell phone – so we get onto Eurostar to confirm the trains are running. It’s 16:45 and we work out that he can probably get to Paris by 20:20 London time – before he’ll be at the front of the queue.

I mail the cancellation note to Steve who blogs about things to do if stuck at Heathrow.  These assume you are checked in and not stuck outside in big tent. Things get so bad that BA bring us some sandwiches; and people eat them. I don’t want to talk to anyone round me so I start on the book I’ve brought  and plug my headphones into the phone and put some music on. I can’t help laughing when Monty Python’s “Always look on the bright side of life” comes on.

I’m not laughing at 21:10. Two of the metropolitan Police’s biggest firearms officers stroll through our tent as nonchalantly as is possible when you have a semi-automatic weapon strapped across your chest. Someone from the airport (not BA) announces that after 5 hours 15 minutes waiting, we won’t be “processed”, because the BA staff want to go home.  I shout at him – why didn’t someone figure that out hours ago and save hundreds of us some of the wait. He doesn’t give me a proper answer and I want to punch him.  He’s only the messenger. I bet those policemen were sent by an Inspector who’s seen this before. “Remind ’em that you’re their to provide protection from passengers as well as protection of passengers”. Rage rolls in and I know why people call it a red mist. What I want most in the world is to punch someone from BA, I’m imagining the punch (a right hook) I wonder if other passengers will join in. The policemen make me hesitate- I picture myself defying them, and more (only later do I realize getting into a fight while traveling on company business could get me fired). Then the phone rings and the moment for punching people is gone.

I hang up the phone call and find myself asking a BA chap who I complain to – they didn’t have to wait so long before telling us they were going to stop processing. The man’s name badge bears the name Rod Green. He’s volunteered to come down from the BA office to do what he can. 20 or 30 like him could have made a noticeable difference in the last 5 hours. They’ve had half a dozen. Rod makes a phone call, and finds me a substitute flight which works. If he worked for Microsoft I’d get him a customer service award.

BA has a problem. They have plenty of people who could do what Rod did, but when they needed them to show some passion for customer service, all but a very few went home.

Now I had to get home. Avis have earned my loyalty with a couple of great bits of customer service, their people really have justified their “We try harder” badges. A sign at their desk said get straight on the courtesy bus… Across the airport – a customer is shouting at an Avis rep who is trying to stay calm.”I’m not arguing with you” he says, “I’m the customer. You have to argue with me” comes the reply. The lady dealing with me makes that slight sucking sound when I say I haven’t reserved a car. I know that noise – and I picture myself losing it – in the style of Steve Martin in the film “Planes Trains and Automobiles”. Then she said “I can’t offer you much choice…”. And for the first time since “Always look on the bright side of life” I smile.

I thread my way home avoiding places I know are flooded.The neighbouring village to mine was badly hit, with the fire brigade pumping out the pub. We had our drains rebuilt after being flooded with “foul water” twice around 2000, and the system held up. It only takes a small amount of water to cause chaos. I draft this post and go to sleep. In the morning I read Hugh has been flooded; grim. We had clean-up people out the next day, but they’re going to maxed out for a while.


Technorati tags: , , ,

This post originally appeared on my technet blog.

July 20, 2007

How not to be read…

Filed under: Exchange,General musings,Outlook — jamesone111 @ 11:55 pm

Eileen asksSo how do I get my team to read my emails ?

Actually, she overlooks something very simple and important. Rule one: the nearer the author is to the reader in the company hierarchy the more likely the message will be read. If someone at the very top of Microsoft wants something done I could ignore their mail and wait for the reminders which come from someone nearer me. (In practice I don’t because Messrs Gates and Ballmer follow the rules below).  Eileen’s only one hop from me so it’s nearly certain I’ll read her mail, even if she breaks all these rules. What could she do to stop me reading what she has to say ?

Don’t get to the point . Typically short term memory is about 7 seconds. Rule two is Give the reader a reason to read the whole message in the first 7 seconds reading. Otherwise they may not bother. If the first 2 dozen words contain “Please can you …”, “It would be great if we…”, “I’d like to see…”  that makes it clear action is required, but – it’s amazing the number of messages that don’t start with the WHAT, but give lengthy WHY – a review of the  state of the world. Their 7 seconds is up  before their closing “Call to action” is read. Messages with PLEASE READ in the subject line beg to be deleted on sight, because it’s a fair bet the author doesn’t give you anything in the message to make you want to read it.

Only use Outlook. We have IM, SMS texting, Phones, face to face “coffee meetings”. Rule Three Choose the Medium which suits your message.Eileen mixes her media more than most people.

Assume I always read in Outlook if I get a message where the key part is in an attachment I can’t read on my smartphone, or is text in a graphic which Outlook voice access can’t read then the best it can hope for is that it stays in the pile of stuff to come back to. It may just get deleted. Rule four Make sure your message is in the message (body).

Mail the world. Douglas Adams had the idea of a “Someone Else’s Problem” (SEP) Field. Behavioural scientists have found When people won’t deal with things they think can be left to others. Rule Five. The probability that any reader will act on your mail declines with the other number of readers of the mail.  Of course is there is also the serial forwarder – the person who forwards everything to everyone. Sometimes with the prefixing “Filling your inbox” or FYI.

Write clumsy English. This has got worse with Outlook voice access, which uses punctuation intelligently. Long sentences with little punctuation are even harder to understand when read by a machine. Here’s an example: The first 99 words of a mail. 3 sentences 1 comma, and NO IDEA WHAT HE WANTS.

Further to blank’s email to all employees I wanted to follow-up with a UK specific reminder and call to action about [blank] ’07.  In FY06 we introduced some significant changes to the annual blank blank process as part of the launch of the blank initiatives.  In FY07 we are consolidating those changes and making further adjustments based on feedback received from across Microsoft – all with the continued aim of ensuring our blank blank process is world class and focuses on driving business results through quality blanks, transparency in our approach to blank blank and greater manager empowerment & responsibility.

Note the use of “Introduced some significant changes to” where the word “Changed” would have done. I recently pointed my Dad to my post about this kind of writing. He worked for a big American company too, and bought people copies of Gowers’ Plain Words. Maybe I should follow his lead. My copy of the 1986 edition has this quote from George Orwell

A Scrupulous writer in every sentence he writes will ask himself … what am I trying to say ? What words will express it … and he probably asks himself can I put it more shortly. But you are not obliged to go to all this trouble. You can shirk it by simply throwing open your mind and letting the ready made phrases come crowding in. They will construct your sentences for you – even think your thoughts for you to a certain extent – and at need the will perform the important service of partially concealing your meaning, even from yourself.

Even with out the text, I evangelize Gowers’ message. Be brief; be clear; be human. Eileen is. Gates and Ballmer are, so is Gordon Frazer. It’s not universal.

This post originally appeared on my technet blog.

July 16, 2007

When Specs go bad …

Filed under: Uncategorized — jamesone111 @ 11:44 am

Something has puzzled me for years now. If I look at the properties for a JPEG image from my camera, it keeps telling me that the Flash was settings were “Flash not fired; Compulsory flash mode” – even though the flash was off. I was sure Windows XP and Vista both gave this but when I looked at my fully patched versions the field was blank. [I’m also sure some extra properties have appeared on the details page as well – Maximum aperture and digital zoom ratio for example]

My recent poking round with EXIF data shows that on my pictures the field is set to 16. Great. What does 16 mean ? Only one thing for it. Off to http://www.exif.org/specifications.html and lets have a look.

This tag indicates the status of flash when the image was shot. Bit 0 indicates the flash firing status, bits 1 and 2  indicate the flash return status, bits 3 and 4 indicate the flash mode, bit 5 indicates whether the flash function is present, and bit 6 indicates “red eye” mode
Tag = 37385 (9209.H)
Type = SHORT
Count = 1

Values for bit 0 indicating whether the flash fired. 
0b = Flash did not fire.
1b = Flash fired.

Values for bits 1 and 2 indicating the status of returned light.
00b = No strobe return detection function 
01b = reserved
10b = Strobe return light not detected.
11b = Strobe return light detected.

Values for bits 3 and 4 indicating the camera’s flash mode.
00b =  unknown
01b =  Compulsory flash firing
10b =  Compulsory flash suppression
11b =  Auto mode

Values for bit 5 indicating the presence of a flash function.
0b =  Flash function present
1b =  No flash function 

Values for bit 6 indicating the camera’s red-eye mode.
0b =  No red-eye reduction mode or unknown
1b =  Red-eye reduction supported

So 16 would be all bits except bit 4 set to zero. Bit 4=1 and Bit 3=0 “Compulsory flash suppression” – switched off. The other bits mean the flash was present, it didn’t fire and we didn’t have red-eye, or return detection. So what’s all this nonsense about Compulsory flash mode.

Lets read on the spec has a section on Resulting Flash tag values: here’s an extract

0000.H =   Flash did not fire.
0001.H =   Flash fired.
0005.H =   Strobe return light not detected.
0007.H =   Strobe return light detected.
0009.H =   Flash fired, compulsory flash mode
000D.H =   Flash fired, compulsory flash mode, return light not detected
000F.H =   Flash fired, compulsory flash mode, return light detected
0010.H =   Flash did not fire, compulsory flash mode
0018.H =   Flash did not fire, auto mode
0019.H =   Flash fired, auto mode
001D.H =   Flash fired, auto mode, return light not detected
001F.H =   Flash fired, auto mode, return light detected

Most match the information we have above but 0x0010 (16 decimal) doesn’t. That explanation belongs to 8 not 16.  Oops. Or may it should say Flash did not fire, Compulsory flash Suppression mode. Interestingly those people who used this second table stay pretty true to the text in it.

Technorati tags: ,

This post originally appeared on my technet blog.

July 13, 2007

Exploring Photographic EXIF data (using PowerShell, of course)

Filed under: Photography,Powershell — jamesone111 @ 5:34 pm

My PowerShell project for the last few days has been to get into the EXIF data which is embedded in Pictures. It turns out to be a bit easier than I imagined.

The first thing I found is that the .NET framework has a “BITMAP” object-class which gives access to these properties. Just get a new instance of the object passing it the file name: this works for JPEGs and TIFFs. It doesn’t work for RAW files from my camera (presumably because Windows doesn’t see those as bit maps)

The Second thing I found is Powershell doesn’t load the required assembly by default – which spawned the earlier post about VB complementing PowerShell. So before I can get the object I need to do this 

[reflection.assembly]::loadfile( "C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll")

Then I can do this

$foo=New-Object -TypeName system.drawing.bitmap -ArgumentList "C:\Dump\Unsorted Pictures\Tour\RAW\TdF23760.JPG"

The object has an array of propertyItems . Each PropertyItem object has an ID, a type, a size, and a value. This is pretty flexible but it is also a darn nuisance for anyone wanting to code for the first time, because you have to know, for example that field ID 271 (or 0x010F in hex) means “Maker name”, and type 7 means string.  or ID 41996 (0xA40C hex) means “Subject distance” and type 3 means 16 bit integer; but the value isn’t in feet or meters but  a value of 1 Means “Macro”, 2 means “Close” and 3 means “Distant”. Worst of all 37380 (0x9204) means “Exposure compensation” and type 10 means “Expressed as the Ratio of 2 32 bit signed integers”. 

$foo.GetPropertyItem(271) will get the Maker name property (if it exists – it will return an error if the property hasn’t been set), but before we can get properties we’re interested in we need to find a list of IDs. I’ve already got EXIF UTILS from HUGSAN and it’s documentation covers ID, so does the competing EXIFTOOL and there are others. Here are the main fields – not an exhaustive list.

Type Name Name Notes
40091 9C9B 1 Byte Title (unicode)  
40093 9C9D 1 Byte Author (Unicode)  
271 10F 2 String Make  
272 110 2 String Model  
305 131 2 String Software Version  
36867 9003 2 String Date Time Taken YYYY:MM:DD HH:MM:SS
34850 8822 3 Integer Exposure Program 1=Manual, 2=Program Normal , 3=Aperture Priority, 4=Shutter Priority, 5=Program Creative, 6=Program Action ,7=Portrait Mode , 8=Landscape Mode
37383 9207 3 Integer Metering Mode 1=Av, 2=Centre, 3=Spot, 4=Multi-spot, 5=Multi-Segment, 6=Partial,255=Other
37385 9209 3 Integer Flash 0=Not Fired,1=Fired,5=Strobe return not detected. 7=Strobe return detected, 9=Flash fired; Compulsory flash mode 13=Flash fired; Compulsory flash mode, Return light not detected, 15=Flash fired; Compulsory flash mode; Return light detected, 16=Flash not fired; Compulsory flash mode, 24=Flash not fired; Auto mode
40961 A001 3 Integer Colour Space 0=sRGB,2=Adobe RGB, 65535=Uncalibrated
41986 A402 3 Integer Exposure Mode 0=Auto,1=Manual,2=Auto Bracket
41987 A403 3 Integer White Balance 0=Auto,1=Manual
41990 A406 3 Integer Scene Capture Mode 0=Standard,1=Landscape,2=Portrait,3=NightScene
41992 A408 3 Integer Contrast 0=Normal,1=Soft,2=Hard
41993 A409 3 Integer Saturation 0=Normal,1=Low,2=High
41994 A40A 3 Integer Sharpness 0=Normal,1=Soft,2=Hard
41996 A40C 3 Integer Subject Range 0=Unknown,1=Macro,2=Close,3=Distant
37384 9208 3 Integer Light Source 0 =Auto ,1=Daylight , 2=Fluorescent, 3 =Tungsten, 4=Flash,9=Fine Weather ,10=Cloudy Weather,11=Shade, 12=Daylight Fluorescent , 13=Day White Fluorescent , 14=Cool White Fluorescent, 15=White Fluorescent 17=Standard Light A , 18=Standard Light B , 19=Standard Light C , 20=D55 , 21=D65 , 22=D75 , 23=D50 24=ISO Studio Tungsten , 255=Other Light Source
34855 8827 3 Long Integer ISO  
40962 A002 4 Long Integer Width  
40963 A003 4 Long Integer Height  
33434 829A 5 Rational:2 Longs Exposure time  
33437 829D 5 Rational:2 Longs F-Number  
37386 920A 5 Rational:2 Longs Focal Len  
37381 9205 5 Rational:2 Longs Max Apperture  
41988 A404 5 Rational:2 Longs Digital Zoom Ratio  
37380 9204 10 Rational:2 Signed longs Exp-bias  
37500 927C 7 Undefined Maker Note {This is vendor specific and needs a whole post of its own}

 For completeness here’s a table of type codes.

1 One or Bytes
2 An array of byte objects encoded as ASCII
3 An unsigned integer (16 bits)
4 A unsigned long integer (32 bits)
5 Rational, an array of two long integers that represent a rational number
6 Not used
7 Undefined
8 Not used
9 Signed Long integer
10 Signed Rational

All these types might make you want to scream but we can cheat. Since all the integers seem to be padded with zeros, we can treat them as long integers. In practice no long integers are used to represent numbers greater than 2^31 so we can treat unsigned Long integers (and ordinary integers) as signed. Finally, Rational numbers are sometimes written as 0,0 to mean 0, but this will cause a divide by zero error. To avoid this we can change the second number from 0 to 1. Since the single number like 123 is  padded with zeros to take the same space as a long, if we treat it like a rational well get 123 / 0 which we convert to 123/1. So we can treat ALL numbers as ratios of signed longs.  I’ll add one more refinement. If the value is 1/123 then it’s probably representing a shutter speed which I want to see in that form, not 0.00813. So I just need to write [fanfare] my first PowerShell function. I can type this in at the prompt (deja Vu for commodore and Applesoft basics which I mentioned recently)

function MakeNumber {
$First =$args[0].value[0] + 256 * $args[0].value[1] + 65536 * $args[0].value[2] + 16777216 * $args[0].value[3] ;
$Second=$args[0].value[4] + 256 * $args[0].value[5] + 65536 * $args[0].value[6] + 16777216 * $args[0].value[7] ;

if ($first -gt 2147483648) {$first = $first  - 4294967296} ;
if ($Second -gt 2147483648) {$Second= $Second - 4294967296} ;
if ($Second -eq 0) {$Second= 1} ;

if (($first –eq 1) -and ($Second -ne 1)) {write-output ("1/" + $Second)}
else {write-output ($first / $second)}

The first two lines, smash the two sets of 4 bytes together,  the next two lines convert large-enough numbers to two’s compliment negative ones, the 5th line ensures we don’t divide by zero but divide by one, and the 6th makes sure if the result is 1/ something it comes back as a fraction.   

PS C:\Users\Jamesone> "Shutter speed= " + (makenumber $foo.GetPropertyItem(33434))
Shutter speed= 1/160

PS C:\Users\Jamesone> "Apperture= f/" + (makenumber $foo.GetPropertyItem(33437))
Apperture= f/3.5

PS C:\Users\Jamesone> "ISO= " + (makenumber $foo.GetPropertyItem(34855))
ISO= 100

PS C:\Users\Jamesone> "Width= " + (makenumber $foo.GetPropertyItem(40962))
Width= 3872

Now, it might be my naivety with Powershell but I couldn’t find away to turn an array of bytes into a string, so I had to write my Second powershell function

function MakeString { $s="" ; for ($i=0 ; $i -le $args[0].value.length; $i ++) {$s = $s+ [char]$args[0].value[$i] }; Write-Output $s}

Which is just a for next loop to convert the array to a string; here’s the result  

PS C:\Users\Jamesone> "Model= " + (makestring $foo.GetPropertyItem(272))
Model= PENTAX K10D
Technorati tags: , , ,

This post originally appeared on my technet blog.

What’s your job title ?

Filed under: Events,General musings,Working at Microsoft — jamesone111 @ 12:01 pm

imageI hate it when a web site demands you register and asks you for everything from your date of birth to your shoe size.  And I’m painfully aware that some Microsoft sites are part of this tendency. We do try group people in some broad buckets either to send them the right information in the future, or to get an idea of who we reached with a particular item. Job title helps with that, some people either  get exasperated with the forms or have a sense of humour or have very strange business cards.  I should talk ! Some people think “Evangelist” is quite a funny thing to have on your card

Here’s the list of some of the titles we’ve seen 

  • Big Chief Computer Dude
  • Binman
  • Cabin Crew
  • Carpenter
  • Chief Snoggable Officer
  • Cross Stitch Pattern Designer
  • Emperor
  • Evil Genius
  • Fish Buyer
  • God
  • Head on a Stick
  • Infrastructure Dude
  • King of the World
  • Laxative
  • Layabout
  • Locksmith
  • Parking Attendant
  • Part-time Pimp
  • Skiver
  • Skivvy
  • Village Idiot


 I do wonder if “Cross Stitch Pattern Designer” is a reference the Jacquard loom. And I think I met the Chief Snoggable Officer  

This post originally appeared on my technet blog.

July 11, 2007

Why Visual studio helps PowerShell

Filed under: Powershell — jamesone111 @ 4:27 pm

The next proper PowerShell piece I write should be on using  it to get at EXIF Data in images. I want to share a couple of things I’ve learnt along the way. The fGoirst is around finding libraries. If you find anything that is written for Visual Studio to work with EXIF fields, it use the system.drawing.bitmap object. So lets fire up powershell and create one of those shall we ?

Windows PowerShell
Copyright (C) 2006 Microsoft Corporation. All rights reserved.

PS C:\Users\Jamesone> $foo=New-Object -TypeName system.drawing.bitmap
New-Object : Cannot find type [system.drawing.bitmap]: make sure the assembly containing this type is loaded.
At line:1 char:16
+ $foo=New-Object  <<<< -TypeName system.drawing.bitmap

PS C:\Users\Jamesone>

Click for a bigger view  Oh dear, powershell doesn’t load the assembly by default – you’ve got to be a lot more of an expert in PowerShell than me to know what’s loaded and what isn’t – until you try.  People working in Visual studio take it for granted so the examples out there don’t tell us what to load.

At this point I fire up Visual Studio – and you see from the picture I only have the free Express version. You don’t even need to create a project, just go to the object browser, and browse to the object you want, and work up from there until you can see the DLL. Then you can copy and paste this to load the assembly, and try again.

PS C:\Users\Jamesone>[reflection.assembly]::loadfile( "C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll")

GAC    Version        Location
---    -------        --------
True   v2.0.50727     C:\Windows\assembly\GAC_MSIL\System.Drawing\\System.Drawing.dll

PS C:\Users\Jamesone> $foo=New-Object -TypeName system.drawing.bitmap
New-Object : Constructor not found. Cannot find an appropriate constructor for type system.drawing.bitmap.
At line:1 char:16
+ $foo=New-Object  <<<< -TypeName system.drawing.bitmap

PS C:\Users\Jamesone>

Click for a larger versionOh dear. It turns out anywhere I see  one of thee objects being invoked it’s being passed parameters. I can go and look at the Object’s .NEW method in the object browser to find out what the arguments should be  – there are several ways to Invoke new but the one I want is with the Filename. So I invoke it like this (and see what I got) 

PS C:\Users\Jamesone> $foo=New-Object -TypeName system.drawing.bitmap -ArgumentList "C:\Tour\RAW\TdF23760.JPG"
PS C:\Users\Jamesone> $foo

Tag                  :
PhysicalDimension    : {Width=3872, Height=2592}
Size                 : {Width=3872, Height=2592}
Width                : 3872
Height               : 2592
HorizontalResolution : 72
VerticalResolution   : 72
Flags                : 77960
RawFormat            : [ImageFormat: b96b3cae-0728-11d3-9d7b-0000f81ef32e]
PixelFormat          : Format24bppRgb
Palette              : System.Drawing.Imaging.ColorPalette
FrameDimensionsList  : {7462dc86-6180-4c7e-8e3f-ee7333a7a483}
PropertyIdList       : {271, 272, 274, 282...}
PropertyItems        : {271, 272, 274, 282...}


So what else can I do with new ?

It turns out that I was writing database code in about the most long winded way possible. It went like this

  1. Create a connection object
  2. Set it’s connectionString property
  3. Open it
  4. Create a command object
  5. Set it’s connection to be the connection object you made in 1-3
  6. Set’s CommandText string property
  7. Create an data adapter object
  8. Set it’s SelectCommand object, to the Command object you made in 4-6
  9. Create a dataset object
  10. Fill the the dataset using the data adapter

A little poking round looking at the New methods for these objects shows me I can just create an adapter and give it the connection string SQL command text.  Now the process becomes

  1. Create a data adapter specifying the connection and SQL
  2. Create a dataset object
  3. Fill the the dataset using the adapter

Simpler, more elegant. I can’t help feeling rather more PowerShell. Even if I need VB to get there.

Technorati tags: ,

This post originally appeared on my technet blog.

Why I really bought an Xbox-360

Filed under: Xbox — jamesone111 @ 2:48 pm

I know my wife reads my blog. (Hello dear). So I hope I’m not going to surprise her. zzzzzz7654198There are a bunch of reasons why I like the Xbox-360

Great is too small a word to describe what’s coming. At E3 we showed a new trailer for the Halo. It looks… superb. I like the Halo themed X-box on that page but I can live with my white non-HDMI one for now.  Have a look at the “ARMS Race” video linked to further down the page from Neill Blomkamp who is working on the Halo Movie (apparently).

Not withstanding, media, marble games, driving games and general living-room experience of the 360, the prospect of Halo 3 is just too exciting, and the real game play (as opposed to the X-box rendered cut-scenes) looks stunning. I can’t wait.



Technorati tags: , ,

This post originally appeared on my technet blog.

July 10, 2007

Vista’s desktop index and PowerShell.

Filed under: Photography,Powershell,Windows Vista,Windows XP — jamesone111 @ 11:38 pm

Vista’s desktop index has changed the way I work. I’ve stopped worrying about folders, any more than I worry about URLs for Internet content.  It’s either obvious or I find it with search.

So… since I have all of my stuff indexed. I should be able to tap into it … shouldn’t I ?

Time to fire up powershell and Live search and have a poke around. There’s quite a good article here which explains Windows Desktop search and the same the database connection strings and SQL syntax work with both the downloadable Windows XP version and the Vista Version.

It’s not rocket science. The first bit is the connection string. “Provider=Search.CollatorDSO;Extended Properties=’Application=Windows’;” . Then it’s the usual SQL stuff. SELECT fields FROM source WHERE conditions

The source bit is always the same: FROM SYSTEMINDEX. Most of the examples I’ve found aren’t very expansive when it comes to the fields.  For example:
SELECT System.filename FROM SYSTEMINDEX where system.fileExtension = “.wma”.

The list of fields is huge, and the best place to start is with the shell properties on MSDN, there’s a core set, a set for documents, a set for mail messages, one for music, one for recorded TV, and the list goes on. So there are are a few useful core ones.


System.kind is particularly useful for narrowing a search down – it groups file extensions into Music, Pictures, documents, etc so you can narrow a search down to Pictures or Documents or Calendar items, e.g.
SELECT system.filename, system.title FROM SYSTEMINDEX WHERE system.kind=”picture”
You can see how the extensions map onto the Kinds in the registry at HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Kindmap .

Of course the major use of search is for free text searches and there are two predicates, CONTAINS and FREETEXT. FREETEXT is a blunt instrument it give it the word “Swimming” and it will all find all it’s forms “SWIMS, SWIMMING, SWAM” give it swimming pool and it will find anything with either of those words or any of their forms (put quotes round to search for a phrase). Sometimes you can’t see the wood for the trees with FREETEXT it’s a bit of a chainsaw. CONTAINS is like keyhole surgery. You can ask it for FORMSOF(“SWIM”) NEAR (“POOL” or “BATHS”) AND “LESSONS”. With CONTAINS the risk is you don’t get the document you want.

So Lets put a query together in powershell; I’m going to look for photos of the racing driver Nigel Mansell on my PC, and I want the camera details at the same time – this isn’t as daft as it sounds. It lets me sort my scanned film photos from my shot-on-digital ones. Here’s the query and the IndexProvider (a smarter man than me might have that permanently in a variable)  

$IndexProvider  = “Provider=Search.CollatorDSO;Extended Properties=’Application=Windows’;”
$SQL=(“SELECT System.FileName , System.Photo.fnumber , System.Photo.exposureTime, system.photo.focallength, system.photo.isoSpeed, System.photo.dateTaken, system.photo.cameramodel, system.author, system.title, system.keywords,system.size,System.ItemFolderPathDisplay
FROM SYSTEMINDEX WHERE Contains(* ,’Mansell’) “)

Contains (*, ‘Mansell’) looks in all the fields – important if I’m searching for Pictures. I’ve found that when you’re working with Powershell objects, the Object browser from Visual Studio (I’m using the FREE Express edition) and I’ve found the parameters that you can pass to the NEW method of an object can save a a few lines of code – I don’t need to create connection and command objects as I did in this earlier example.

$adapter= new-object system.data.oledb.oleDBDataadapter -argumentlist $sql,  $IndexProvider
$ds = new-object system.data.dataset

$ds.tables[0] shows me results like this (notice the blank fields on the first one giving away it’s a film scan).

SYSTEM.FILENAME              : GP91-23.jpg
SYSTEM.PHOTO.DATETAKEN       : 14/07/1991 18:48:35
SYSTEM.AUTHOR                : {© James O’Neill}
SYSTEM.TITLE                 : Nigel Mansell Williams Renault FW14, Ayrton Senna, British GrandPrix, Silverstone
SYSTEM.KEYWORDS              : {Portfolio}
SYSTEM.SIZE                  : 2992373
SYSTEM.ITEMFOLDERPATHDISPLAY : C:\Users\Jamesone\Pictures\Motor Racing

SYSTEM.FILENAME              : GPM15834+.JPG
SYSTEM.PHOTO.DATETAKEN       : 13/08/2006 11:31:26
SYSTEM.AUTHOR                : {© James O’Neill 2006}
SYSTEM.TITLE                 : Nigel Mansell, GrandPrix Masters, Silverstone
SYSTEM.KEYWORDS              : {Portfolio}
SYSTEM.SIZE                  : 2797880
SYSTEM.ITEMFOLDERPATHDISPLAY : C:\Users\Jamesone\Pictures\Motor Racing


This post originally appeared on my technet blog.

New Virtualization blogger

Filed under: Virtualization — jamesone111 @ 11:00 am

After the response I got from people who wanted to be on the Windows server 2008 Virtualization TAP programme I know a fair few readers will be interest to know that the Virtualization team’s blog at http://blogs.technet.com/virtualization/ looks set for revival. Jeff Woolsey who I’ve mentioned and quoted before a few times in my Virtualization posts – he’s a source I quote quite often, and he has started to post on the team blog. So you should be able to get information straight from him instead of waiting for me to post a summary of it.


This post originally appeared on my technet blog.

Digital Image Suite. RIP.

Filed under: Beta Products,Photography — jamesone111 @ 10:51 am

I’ve mentioned Digital image suite before. I always felt I needed to apologise for not using Adobe Photo shop. As several people commented, Photoshop was overkill. Digital image suite let me

  • Straighten Pictures which had been taken at an angle
  • Clone or blend out stray telephone lines, spectators, skin blemishes etc
  • Apply nice black and white effects (mixing red, green and Blue channels, tweaking contrast and toning in one go).
  • Apply “Glow” to portraits, and paint effects.
  • Sharpen the image, or apply selective blur to the background.
  • Stitch Panoramas together.

Vista has some token editing built in. It can rotate 90 degrees, crop, it can adjust levels and colour balance. It can fix red-eye. There’s talk of a “Windows Live” branded version of Vista’s photo gallery which will upload to Live Spaces. But this isn’t expected to offer a lot more. So the news that we’d quietly killed off Digital Image suite was greeted with some dismay by a good handful of the photographers inside Microsoft, one of whom passed on a quote from Directions on Microsoft.

[Digital Image Suite] occupied an uneasy niche between the free photo editing and management software bundled with most digital cameras and Adobe’s more full-featured products for serious amateurs, such as Photoshop Elements …

With the release of Windows Vista, Microsoft incorporated many of the features of the Digital Image product line into a free bundled application called Windows Photo Gallery, similar to the way that Apple bundles its iPhoto application with every Macintosh computer. This further reduced the market for a stand-alone version of Digital Image Suite.

… The cancellation of Digital Image means good news for Adobe, which now faces one less competitor in the low end of the imaging software market.

I’m not sure who’s saying Vista incorporates MANY of the features of Digital image suite, when I make it 5 at most. For anyone who thought we wanted to fight Adobe on every front here’s proof that things are rarely that simple.

Update: I forgot this Bonus Link Paul Thurrott has post some information about what’s in the Live Gallery Beta.

This post originally appeared on my technet blog.

Moving from VB to PowerShell

Filed under: Powershell — jamesone111 @ 9:42 am

I’m continuing to fiddle with PowerShell.

I have 28 years of BASIC under my belt Starting with a DEC PDP 8/f moving onto Microsoft Basic with the Commodore PET (hands up who remembers Poke 59468,14 and ,12 ?) , through the AppleSoft version of it, and Sinclair Spectrum (with it’s one touch expansion of tokens, M was pause – my mnemonic – PAWS on a Mouse.)  Through Access Basic, Word Basic, VB version 1 and so on…. So when I what to convert a number to it’s ASCII character I know it’s CHR$(x) – or in these enlightened times where we don’t put $ on string variables and functions any more than we use line numbers and Goto – simply CHR(x). So what’s the Powershell equivalent ? (1)

If you’re at the same stage of learning Powershell as I am , a technet page called Converting VBScript Commands to Windows PowerShell Commands is a fantastic resource. Enjoy.


Technorati tags: , , ,

(1) [Char]$x does it.

This post originally appeared on my technet blog.

July 8, 2007

Tech-ed in Barcelona. Book early to avoid disappointment.

Filed under: Events — jamesone111 @ 7:31 pm

When I see “Book early to avoid disappointment” I always wonder “Yours or Ours ?” but last year Tech-Ed sold out 6 weeks before the conference. I remember asking the organizer if that meant it was too cheap or the venue was too small 🙂

I had a message on Friday

This is just an FYI, but with Super Early Bird ending on 31st July we are in great shape.
The registration trend for this year is that overall the numbers are double compared to the same time last year.

If you want to go to now would be a great time to head over to the registration site for Tech-ed IT forum (or Tech-ed Developer). There were some disappointed people last year, and it looks like there will be more this year.

This post originally appeared on my technet blog.

July 4, 2007

Imagine having 580 Terabytes of data you can’t access.

Filed under: Office,Virtualization — jamesone111 @ 1:45 pm

I’ve given some clue of the problems I have managing all the photos and Videos, but I realised my problems are pretty small when I read this

The National Archives, which holds 900 years of written material, has more than 580 terabytes of data – the equivalent of 580,000 encyclopaedias – in older file formats that are no longer commercially available.

Yikes ! That’s a lot of documents.  Their Chief Executive calls it a “ticking time bomb”,  and if modern PCs can’t open old formats there’s a risk of “losing years of critical knowledge”, and their research suggests Europe loses 3bn euros each year in business value because of issues around digital preservation. Ouch.

We have to put our hands up and say this is partly our fault, and the roots of the problem go back to the 1980s. The designers of Word, WordStar, Word Perfect and Ami-pro didn’t worry about these things. We  managed to stop mucking about with the formats after Office 97. But unless we stuck to that forever that wasn’t an answer. One of the things about putting the format into XML is it makes it a lot easier for a future archivist to deal with.  IBM and others saw this with “Open Document Format” except that

  1. It doesn’t have the richness to represent everything that we can do in word (never mind Excel and Powerpoint)
  2. Two applications which use ODF can render the same document in different ways
  3. Applications strip off tags they don’t understand.

Points 2 and 3 rather defeat the objective an open format. So the office 97 format was no good. ODF is no good. Hence the need to come up with a new format for Office 2007 – Open XML. And it would be self defeating to produce an XML standard without publishing it and ideally handing it over to a standards; which we’ve done. As I’ve written before, IBM opposes the adoption of Open XML as an ISO standard and we have a petition for people to show support for adoption.

All that is great for the future.But what about the 580 Terabytes that the National archive has. We’ve just announce a memorandum of understanding with the National Archive under which we will help them to access old files – it’s an elegant solution using Virtual PC to run VMs with the old Operating systems and the old applications. They’re also contributors to the to the Open XML process. The National Archive isn’t the only body to get Involved, Adam Farquhar, Head of eArchitecture at the British Library is co-chair of the Office OpenXML standards committee.

Gordon Frazer is the third MD we’ve had in Microsoft UK since I joined, but I can’t recall either of his predecessors doing demos for the camera. He shows what the system is all about. I didn’t expect to see my MD doing an Demo of Windows for Workgroups 3.11 in 2007.



From BBC News

This post originally appeared on my technet blog.

Good news.

Filed under: General musings,Working at Microsoft — jamesone111 @ 9:25 am

For nearly half my life I’ve been woken in the mornings by the Today Programme on BBC radio 4. So much of the news seems bad that to wake up and hear that Alan Johnston has been freed was fantastic. 

I’m having a bit of a mixed up week because my 3 year old son has Chicken Pox. My wife and I are taking turns to look after him. One of the good things about working for Microsoft is an employment contract which lets me take time off to look after sick children and treats it as if I were sick. By contrast, my wife has to use holiday time. I talked about how technology and our working culture are family friendly and here’s another example. I’m doing this morning and she’s doing this afternoon;  she’s doing all of tomorrow so I can go to the big internal conference that marks the roll-over of financial years (Microsoft years run July 1 – June 30). The early statistics we’ve had for the year just ended seem pretty good too – we’ll get the detail tomorrow and hopefully there will be  some interesting non-secret snippets which I’ll be able to share. We now have more than 10 million UK users of MSN Messenger; we were awarded the ‘Child Exploitation and Online Protection’ (CEOP) Safer by Design Groundbreaker Award for our contribution to child safety online. I blogged before about our work with CEOP, and the other reunion we all hope to see.

Today’s been split in half because I have my annual review meeting with Eileen this afternoon. I expect that she’ll mention that I don’t always stick to my technology areas with this blog. Guilty as charged. But I looked at the readership stats, the comments and the links I’ve had in the 14 months I’ve been doing this and there seem to be a lot of you reading what I have to say – even if I do say it at length sometimes. It’s felt like a good year for me, but blog readership has hard numbers, so a quick thank you to the “People behind the numbers” seems in order.

This post originally appeared on my technet blog.

July 2, 2007

We’re not afraid.

Filed under: General musings — jamesone111 @ 10:10 am

We are not afraidConsidering it was less than 2 years ago, I have relatively few memories of the London bombings of Thursday, 7th of July. One is that the following Monday the travel information ran roughly as follows:
“The Circle, District and Hammersmith & City lines metropolitan lines are partially closed following explosions at Edgeware Road and Aldgate, and the Piccadilly Line is badly affected by the explosion near Kings Cross. London Transport will be operating a near normal service“.

I don’t know who wrote that, and what mixture of Dunkirk spirit, Gallows Humor  and cynicism about public transport spawned it. Something of that spawned the web site We’re not afraid.com. Somewhere in the 770 galleries on the site is my small contribution. I quoted it when Colleagues in the US asked if we were OK. London, I told them, withstood everything the Luftwaffe could throw at it. It withstood a sustained campaign from the IRA. It takes far more than that to scare us into changing how we live [sometimes when I see where our Civil liberties are going I worry that that is just wishful thinking].  London, I told them, is one of the worlds great cities, and when the worst happens, Great cities recover: ask Madrid; ask New York.

For all the Bravado, and the “Is that all you can do ?” defiance, I’m heartily glad that whatever was being attempted in London and Glasgow over recent days came to naught. And it’s not surprising that some people are jittery. At times like this large companies – especially prominent American ones – send security advisory mails to their employees. Our’s went out on Sunday afternoon and it’s all good sense but I must share one line of it.  

If you know of a threat to national security contact the Security Service (www.mi5.gov.uk) or MS Corporate Security via the Security Operations Centre at Reading

I always thought our security guys were good 🙂   


Sorry for the diversion, a near normal service will be resumed soon. 

This post originally appeared on my technet blog.

Create a free website or blog at WordPress.com.