Archive for April, 2007

Turning C# programs into PowerShell scripts

Tuesday, April 17th, 2007

I mentioned PowerShell – the new Windows command shell and scripting language – last year when I first tried it out. But other than playing with it a little, I kind of put it to one side and forgot all about it.

Yesterday I picked it up again and started playing with it again – using it to develop functions for WebSphere MQ (accessing it through the .NET DLLs that come with WMQ). The idea was to start and produce something which expands on the command line administration tools that come with WMQ – adding features that perhaps we don’t already provide.

You can see a walkthrough of what I’ve come up with so far on a post I wrote for the Hursley WMQ blog, but I thought I’d quickly draw out some of the more interesting bits that I learnt in doing it.

(It’s worth pointing out that if you’ve come to this page from Google looking for PowerShell tips and best practice, that I’m very much a beginner. As I highlight in the WMQ post, this is the product of an evening’s playing around – pretty much just trial and error and seeing what tab-complete suggests. It seems to work, but whether it’s the best way to do it… dunno πŸ™‚ )


RE: Where am I?

Friday, April 13th, 2007

I mentioned yesterday that I never got round to writing the bit of code for my location service client which would look for known wi-fi access points.

To recap, the idea is that my phone should be able to look for the access points within range, comparing the SSIDs against a list of known locations. If a match is found, it looks up the name and GPS coordinates of the location from the known store, and uses an HTTP request to send the update to the server.

It was really easy – the interesting bit of the code looks like this…


Where am I?

Thursday, April 12th, 2007

I first come across Plazes a few months ago. The idea is pretty neat – you update a service to let people know where you are.

I’m not a big fan of the implementation though. It’s too tied to using the network you’re connected to to identify where you are – which means it can’t seem to tell the difference between any IBM site in Europe. And as I spend the majority of my time connected to an IBM network, that leaves Plazes thinking that I’m somewhere in Germany half the time. Not very impressive.

It has an API which is always a good thing, but that won’t let you create any new ‘Plaze’ which it doesn’t already know about. Which makes it a little useless for many circumstances.

And it relies on me being at my laptop. This is a bit limiting as I don’t always have my laptop with me. What would be really cool would be a service which actually updates where I am. (Okay, so they have a mobile client, but that’s for Symbian only so that’s no use to me πŸ™‚ )

With this in mind (and my newly rediscovered love for PHP after having to do some work on the SYA database on Tuesday), tonight I decided to have a go at knocking together a solution that would better suit my needs…


A fun Second Life glitch

Sunday, April 8th, 2007

I had two windows open – one in front of the other. Second Life was open in one window, and gaim instant messaging in another.

I switched from gaim to Second Life, but thanks to a glitch the gaim window image stayed on top. But instead of just staying on top as a 2D window, gaim ended up getting used as the texture for the moving elements on the Second Life window. In this case, my avatar. So I got to walk around with stylish instant-messaging trousers!

I can only apologise to Alan – who I was chatting to at the time – for posting a picture of me with his name on my butt.

But it amused me. πŸ™‚

Strategic rebranding

Saturday, April 7th, 2007

One Community logoThis week saw a change at ECS House. To start with a little history, Eastleigh Community Services was where my charity, Solent Youth Action, started. We began as a project ran by ECS, and we’re still physically based in ECS House – renting some office space from them since we became independent. So even though we are now independent, we still watch what happens to ECS with interest.

This week was the launch of their rebranding – including a change of name to “One Community”. I’d heard of the planned name change a little while ago, but I hadn’t seen the new logo or tagline yet.


T-Mobile Ameos kill tube tickets

Wednesday, April 4th, 2007

I keep my PDA in my inside jacket pocket – so I can get to it quickly. For the same reason, I keep other things there that I need to grab in a hurry.

Like London Underground Travelcards.

Apparently they don’t work so well after sitting next to to T-Mobile Ameo PDAs. Or, to be more precise, the ridiculously strong magnet that is in the base of the Ameo to hold the screen to the keyboard. (See this animation if you are curious about how this works).

I ended up having to ask the nice Underground staff to let me through manually at every station I went through for the rest of the day, because my ticket was trashed.


Slightly worryingly, I had my credit card in there, too. I’m guessing that is probably trashed now as well. (So far, all the shops I’ve used it in since have used the chip rather than the magnetic strip, so I don’t know for sure.)

Lesson of the day – keep my PDA away from magnetic strips… πŸ™‚

Giving £920,000 to charity

Monday, April 2nd, 2007

At the Solent Youth Action trustees meeting tonight, one interesting fact-let that got noted was that young people have volunteered over 172,000 hours in SYA projects and activities since we started.

I’m not normally a fan of endless statistics, but I thought this was an interesting one.

172,000 hours


7,167 days
(more if you consider ‘working days’)


nearly 20 years

Or… if you consider their time worth at least the minimum wage, then


(Okay, so many of the young people we work with are too young to be elegible for the full £5.35 minimum wage but humour me – I’m playing with numbers. πŸ™‚ )

Wow, that’s pretty cool. πŸ˜€

RE: T-Mobile Ameo… first impressions

Monday, April 2nd, 2007

HTC promo photo of my PDAI’ve been using the T-Mobile Ameo for a couple of weeks now – so now I’ve given it a proper try I thought I’d post my conclusions. (And then shut up about it πŸ™‚ )

Feature-wise, the Ameo is hard to argue with – it has pretty much everything that I might want. The question is more about whether it’s a good device to use, particularly considering it’s size. The answer – perhaps somewhat predictably – depends on how you use a mobile device.