Archive for April, 2008

Programmatically making an Internet connection in Windows Mobile in C++

Tuesday, April 29th, 2008

Although a lot of people seem to be finding my Twitter widget for Windows Mobile useful, it seems that there are also a few people who noticed that it was hacked together in a few hours overnight!

One of the more noticed issues was the fact that the widget reused the mobile’s existing Internet connection.

It was described in emails such as:

Some times I have to invoke a data session with PIE or another networked app before it will let me send a twit. Anyway to make it start it’s own network session if one doesn’t already exist?

and in tweets such as

ooh i'm liking cetwit. But not you, twittoday

oh and a side note to data apps everywhere: if you want a connection, REQUEST IT YOURSELF. I have better things to do than holding your hand

The issue is that when you use the web services APIs, this is all handled for you. But I rolled my own HTTP POST code using the wininet API. And these low-level calls aren’t so helpful.

It wasn’t a problem for me, because my phone is always connected anyway. But enough people have mentioned it, so I figured it was worth looking into!

If anyone is interested in how you start a connection programmatically in C++, read on.


The costs of selling on Ebay

Monday, April 28th, 2008

My first experience as an eBay seller is nearing an end. I stopped off at the Post Office on my way home this afternoon, and put the item I was selling in the post.

I knew there would be a cost involved, but had no idea what to expect as to how much it’d be.

For those people like me who have never sold anything on eBay before, here is an entirely unscientific and unrepresentative anecdote. Make of it what you will. 🙂

I was selling an unwanted gift. It was new, still boxed and in it’s original shink wrap. It sold for £730.

  • Fees to eBay – £46.23
  • Fees to Paypal – £25.02
  • Postage – £5.80
  • Packing – £1.00

Total fees : £78.05

Nearly 11% of the sales value. Feels like a lot.

I dunno… I guess it’s hard to justify sounding too aggrieved. I was selling something that I’d not spent any money on, so even after 11% in costs, I’m still getting a lot of money (a sum that will be a *big* help).


HackDay – writing a Twitter dictionary

Sunday, April 27th, 2008

As I said on Friday, Friday was IBM Hackday 5. I didn’t really explain what HackDay is, but if you’re not familiar with it, Kelly has posted a good description.

I made all my excuses in my last post, so with them out of the way, here is my hack.

The idea is an old one – but I’ll summarise it again here.

The hack was to extend the website to provide additional context for people’s tweets.

Every twitter user can maintain their own personal dictionary of terms, that describe their personal significance when they use them in tweets. When one of these terms is used in a tweet, it is highlighted in some way, and if the user hovers their mouse over them, the full description is shown in a pop-up.

For example, my twitter dictionary might include entries like:

  • Grace – my three-year old daughter
  • Faith – my baby girl
  • Hursley – IBM Hursley Park, the site where I work
  • SYA – a youth charity that I started and am now on the board of trustees for

an example - screenshot of my hack in action

The idea isn’t to say what something means (why try and replace people’s ability to use Google?) but to say what it means to the tweeter.

Other uses could include to provide ‘disclosure’. For example, when I see posts by James Governor, I often see a few lines at the end such as:

…IBM is a client. RedMonk runs Google Docs. Google and Salesforce are not clients. We don’t currently use Salesforce apps…

But in the twitter world where thoughts fit into 140 characters, there isn’t the space to include this sort of context with every tweet. So James’ twitter glossary might include entries like:

  • IBM – IBM is a client


Snap Circuits Jr

Sunday, April 27th, 2008

My latest Maplin purchase – an electronics set for Grace. My plan to turn her into a mini-geek continues!

I still remember my first electronics set. It was good, but this one – ‘Snap Circuits Jr‘ – is so much better.

Firstly – the ease in which the bits snap together. Each component is mounted on thick chunky pieces of plastic, that snap onto a plastic board. The pieces clip together very easily – the idea is that you can connect stuff without needing fine motor controls, so my three-year old can put the pieces in roughly the right place and give them a push to click them together.

Secondly – the quality of the kit. It all feels very solid – you don’t get the feel that it’s cheap plastic or spend your time worrying that Grace is going to break it.

The manual that comes with it includes 101 different project ideas, with large colour diagrams that she was able to copy. Before long, she was putting together circuits by herself just from the plans – which was so cool!


playing with gPhoto2

Saturday, April 26th, 2008

There was no putting it off any longer – the grass needed cutting.

The first cutting of the year is always a bit of a pain. So I thought I’d make it more interesting by setting up my camera to take pictures of it for a time-lapse video. I found some good instructions to get started here – the idea being to keep the camera connected to a Linux laptop in the garden, with a shell script using gPhoto2 to periodically take pictures.

Stitching some of the pics together with Camtasia produces:

I was planning on using this as a first chance to play with Flickr Video, but it turns out you need to have a pro account to upload video. Spoilsports. 🙁

Update: Looks like I’m not the only one who made the most of a sunny afternoon 🙂

Another four day work week

Friday, April 25th, 2008

This week was another chance to get away from my desk for a day.

some of my slides

Support U 2
Last Thursday, I spent the day in Hursley House running a careers training day for young people. The morning was spent on how to write CVs, and the afternoon focused on interview skills. It was a part of the current phase of my mentoring project, Support U 2. I’ve written about Support U 2 already (both before and after), which is why I didn’t post about last week at the time – although the project has continued to be been refined and improved, the aims and general ideal is still much the same as I’ve written before.

Still, the day was a big success – in particular a couple of hours in the afternoon where young people each received one-on-one interviews from IBMers. Each interview was about ten minutes long, after which they’d get feedback on their interview technique before moving on to an interview with another IBMer. Very tiring – for both the young people, and the volunteer interviewers! – but I think it went well. There was a noticeable improvement in the young people’s interviews as the afternoon went on.

(And a big thanks to Nick, James and Andy for being amongst the fantastic volunteer interviewers. There were several others – I’d link to them all, but couldn’t find them online anywhere… 🙂)

That was last week’s day away from my desk.


IBM HackDay 5
Today, I spent the day in Hursley House again! This time for our latest internal HackDay. (It seems that a lot of the cool things I do at work are happening in the House… it’s conditioning me in a Pavlov’s Dog kinda way to really like being in Hursley House! 🙂 )

Unfortunately, I got quite distracted by a few customer issues – my day job is a service role, responding to customer problems with our software. It seems that Friday is the day when a lot of customers will report problems that they’ve run into – I guess that if they’ve still not something working by Friday, then it’s time to call IBM Support!

Even if I spent a lot of time doing normal work, it was still fun to do it in the House, and get to talk in-person to a few people that I normally only communicate with through blogs or Twitter. And excuses aside, I did get a chance to write a small hack of my own, which I even managed to get working before heading home. I’ll have to post about it soon.

Looking at my diary, I’m gonna have to work every day next week. It’s so unfair…

Using a 3 mobile broadband dongle with the EEE PC

Thursday, April 24th, 2008

I’ve been loaned a USB mobile broadband modem by 3 to try out for a few months. I’ll write a proper post about why I’ve got it and what I think of it later. First, I wanted to share how I got it working with my EEE PC.

What am I talking about?
The modem is a small USB dongle – not dissimilar in appearance from a USB memory stick. You put a SIM card in, and the small mobile phone radio inside gives an Internet connection to any computer that it’s plugged into.

The dongle is a Huawei E169G.

So what’s the problem?
The dongle is supported on Windows and Mac OS. Not Linux. My EEE PC still runs the original Xandros Linux.

Should it work on Linux?
Posts on the eeeuser forum suggested that it wouldn’t be possible.

Other dongles seem to have caused less trouble, but the E169 wouldn’t work.

The consensus seemed to be that:

Huawei 169 requires a patch to usb-storage driver to recognize the hardware similarly to 220… I think that ASUS is on a way to produce a small upgrade package to fix the issue for E169.

And a little Googling failed to turn up anyone who has got the Huawei E169 to work with an EEE PC on Linux.

Still… how hard could it really be, eh? 🙂


But, I like transcoding!

Sunday, April 20th, 2008

screenshot - Image Hosted by ImageShack.usMobile transcoding – services which turn a webpage into something better suited for a mobile web browser – is an often contentious topic. It’s a topic which has come up several times recently, and at best people will begrudgingly describe it as a necessary temporary evil.

Don’t get me wrong – it hasn’t been without problems. It has been used in inappropriate ways, and I know web-developers whose sites have been broken by poor (and inflicted!) uses of mobile transcoding.

But as a practical, day-to-day tool – I kinda like it.

I started using Google’s transcoder (GWT) because when you use the mobile version of Google’s RSS reader, any links you click on are transcoded by GWT for you. And I find it very useful.

It creates efficient pages which render well in Pocket Internet Explorer. Plus it stops my phone trying to download some ridiculously large webpages over GPRS (argh… curse web-developers who have 1MB webpages on the front of your sites!).

It also adds a link to any RSS feeds it finds in a page at the top – clicking on which will take you to the feed in Google Reader (my RSS reader of choice at the moment), from where you can subscribe to the feed. (Slightly roundabout, but the only way I know to subscribe to new feeds from Google Reader Mobile).

I like.

But it’s a bit of a faff getting a page transcoded by GWT if you aren’t already given a link to a transcoded page. So (in the tiny window between tonight’s screaming fits… gah – when will the baby start sleeping through the night?!) I added a new tool to my set of Pocket Internet Explorer (PIE) extensions: one that will re-open the current page using Google mobile transcoder.