Revisiting a Windows GUI for CurrentCost

July 28th, 2008

tweaking the CurrentCost GUII spent a couple of evenings last month knocking together a quick example of a Windows GUI for the data you get from CurrentCost home electricity use monitors. And then promptly put it to one side and kinda forgot about it.

As a quick recap, I created a Windows app which grabbed the history data from the CurrentCost serial output, and drew a few bar graphs from it – to represent the hours, days, and months data. The app also persisted the history data in the user’s “Application Data” folder, so that older data is kept by the GUI even after it is lost by the CurrentCost meter itself.

I’m thinking about picking it up again, so spent a bit of time idea-storming what I could do with the code. These aren’t all my own ideas – they’re a random collection of ideas and notes taken from discussions with others. I’m posting them here for feedback – new ideas are welcome, as are comments on the usefulness of the stuff I’ve suggested.

Read the rest of this entry »

Improving TwitToday – more Today Screen coding

July 23rd, 2008

Twitter client for Windows MobileApart from adding the ability to initiate an internet connection, my Twitter widget for Windows Mobile Today screens is still virtually the same code as I wrote in a few hours overnight at the Over The Air hackday.

Which isn’t great – as I know there have been a bunch of people waiting for me to make some fixes and add some basic features.

Tonight I had a bit of time to spare, so I finally dug out the code to start making a few improvements:

  • Background worker thread
    Today screen widgets are compiled into DLLs. They aren’t a separate executable, and are run by the Today Screen in the Today screen’s (i.e. explorer.exe’s) flow of execution. When the code tries to post to twitter.com, explorer can’t do anything else until that’s finished.

    That might even be tolerable with most websites, but with twitter – which is known to fall over from time to time! – it means TwitToday could effectively hang your phone for ages until the HTTP post timed-out.

    Not good. Now it does all the HTTP work in a background thread, so you can get on with other stuff while it tries to send your tweet.

  • SIP support
    This was asked for a lot. The Today screen doesn’t include the button to show/hide the on-screen stylus/finger keyboard. So if your mobile doesn’t have a keyboard, TwitToday wasn’t much use.

    I’ve added a setting now that lets you programmatically show the SIP keyboard when you tap on the text box.

If you want to try the new version, you can download it from here. If you want to see how I did it, read on.

Read the rest of this entry »

Who can we trust with children?

July 20th, 2008

I took Grace to a birthday party yesterday morning for one of her friends. It was at a soft-play centre in Southampton – in many ways, an ideal place to have a birthday party for a group of excited three and four year olds. Except, as we went in, I noticed a sign:

“In the interest of CHILD PROTECTION, photography is NOT PERMITTED”

It’s such a shame – because when it’s your own child’s birthday party, of course you want to get photos of them playing with their friends on their big day. But his parents weren’t allowed to do that. Because of “child protection”.

It’s not to say that I’ve not seen this before – all of the soft-play centres I’ve taken Grace to have the same rules, and we had the same thing at Grace’s birthday party in the Marwell centre. But I noticed it more because it reminded me of a discussion from Thursday night. Thursday night was a training session for a youth mentoring programme that I’m a volunteer with, and someone mentioned something they’d seen discussed in an interview with Esther Rantzen on GMTV. The story goes that a parent was arrested for taking photographs of their own children in a public playground. It sounded pretty shocking – over the last few years, I’ve probably taken hundreds of photos of my girls in our local park, and I wouldn’t think of that as being even suspicious, let alone something warranting arrest!

Read the rest of this entry »

Fun with MQTT

July 18th, 2008

I’ve been quiet for the past month or so, as I was keeping my head down to finish a project at work. It’s done now, so now is a good time to crawl back out of my cave and share a bit about what I’ve been up to. This was for a customer who outsourced a software development project to us.

Some quick background: MQTT is a publish/subscribe messaging protocol that IBM products like WebSphere Message Broker can speak.

Our customer wanted an MQTT library written for the real-time embedded firmware that runs on their products. This client library needed to provide the API of the MQTT specification, implemented within the constraints of an embedded platform with significant resource constraints, and only a subset of the standard C OS functions (e.g. no multi-threading, no dynamic memory allocation, no malloc/realloc/calloc, etc.).

Read the rest of this entry »

Paying for a charity

June 24th, 2008

a prize from Mashed

I’ve mentioned a few times here before that I am a trustee of a youth volunteering charity. We started it a few years ago, and do a lot of very cool stuff with thousands of young people across the region.

And this isn’t cheap. Staff are the biggest expense, followed by rent and an array of other bills.

A common question I get from friends not familiar with charity funding is “where do you get the money from?”.

The short answer is “anywhere we can!”.

Read the rest of this entry »

Our Mashed 08 hack: CurrentCost Live

June 23rd, 2008

Yesterday was the end of Mashed 08 – the annual London hackday from BBC Backstage.

I saw last week that there was going to be a “social responsibility” category in the hack challenge, and decided that a CurrentCost hack was in order!

Together with Rich, we spent a day trying to hack together a competitive challenge based around CurrentCost, encouraging people to reduce their home electricity usage by making it into a game they can play with their friends.

Here are a few notes based on the presentation I gave at the end.

Read the rest of this entry »

Haven’t we aged well?

June 23rd, 2008

I’ll write a proper post about Mashed08 once I’ve caught up with work, but in the meantime I wanted to quickly share a couple of pics.

Sylvester McCoy was on stage as compere for the presentation of our hacks, and each of us who presented got to meet him briefly for a pic. This was actually the second time I’ve met him – fourteen years ago, I got to meet him with a couple of others from my school when we won an award for an environmental project at school.

There’s a nice symmetry there… meeting him aged 14 to collect a prize for a environmental project, then aged 28 to collect a prize for a project to help people reduce home electricity usage. Wonder what will happen when I’m 42? 🙂

Before (December 1994)
meeting Doctor Who

After (June 2008)
meeting Doctor Who again!

Tweaking the CurrentCost app

June 16th, 2008

tweaking the CurrentCost GUI

I spent a bit of tonight tweaking last night’s CurrentCost app.

Not a lot to say about it, as it’s more or less the same as it was last night…

Read the rest of this entry »