Author Archive > mrtom, dijits and the FB Graph API (part 1)

» 27 February 2011 » In development » 1 Comment

I’ve spent a few hours this evening checking out the new dojo object store implementation, looking to see if I could hook it up to the Graph API.

Getting id/identity and basic query data back from the Graph API took all of five minutes – using to automate handling the callbacks from the Graph APIs JSONP responses. The new store is much simpler to implement than the old interfaces. Big win there.

I’ve not managed to get full querying working just yet, as the Graph API is pretty big and the range of connections available for each of the different types in the Graph API isn’t documented particularly clearly.

I’ve also run into some snags wrapping my object store in a store. I’ve successfully got a ComboBox populated from my friend list if I take the output from my object store, use that as the constructor for a store and then pass that into the constructor of the, but it’s a bit messy. I’m sure there’s something I’ve just missed out as this definitely shouldn’t be necessary.

Still, not a bad effort so far. Hopefully I’ll have a full object store and data store implementation ready to roll soon, meaning you’ll be able to populate all your favourite dijits with data from your favourite social network :)

I’ll get an example online soon and put the code up on github with create a patch for dojo trunk once I’m happy with the results. Things are a bit hectic at the moment tho so it might take a few weeks…

Continue reading...

Tags: , , , , , ,

Learning to Fall

» 21 November 2010 » In climbing » 1 Comment

You should read my disclaimer before reading this article…

Probably the largest single blocker for most people wanting to move from the F6s to the F7s, or into the Extremes, is footwork. I’ll be writing about that at some point soon. Fear of falling, on the other hand, is usually the second biggest blocker and waaaay more fun to fix! So tonight I’m going to discus tactics for dealing with that.

But Tom, I’m not afraid to fall

Sorry kiddo, I don’t believe you. At least, if you’ve not gone through the steps below, or something similar, then I don’t. Let me explain.

New climbers seem to fall into two categories, those who don’t think they’re afraid of falling and those who really, really know they are. What’s interesting for me is seeing how almost everyone I’ve climbed with flip from whichever category they start in to the other one within 6 – 12 months of starting the sport. I guess it’s not that surprising. Those who were originally scared tend to make continuous but small advances until they’re comfortable. Those who were originally bullish push themselves harder and harder until the scare themselves silly and force themselves to be more cautious!

Being scared of falling off is natural. It’s primal. So much so that ‘getting over it’ requires a lot of practise – enough practise in fact that by the time you’ve put that much effort into training for climbing you’re probably pushing the lower Extremes or F7s. Which leads me back to my original statement. Basically you’re either already scared, practised at falling and thus aware of how hard it is to really let go or you’ve just not scared yourself enough yet :)

OK, maybe you’re right. How should I fix this then?

Good question! And the answer, alluded to above, is simply to practise. Indoors at first then outdoors on bolts and then, when you’re ready, on trad gear. The aim is to get yourself into a position where you can climb close to your physical limit and be totally and utterly involved with the moves, without any part of your brain even contemplating falling (assuming it’s safe to do so). Any time spent thinking about falling is taking up precious brain power that should be thinking about climbing!

The BMC advocates a technique known as ‘clip-drop climbing’ – UKC did a good video demonstration of this here. For me, whilst I see what they’re getting at, it doesn’t really make sense. Why fall off when you’re right by the clip? You’re essentially on a top rope by then anyway. Why faff with clipping when you’re trying to practise falling? Instead, what you need to do is build up gradually, and then keep at it.

Step One: Less clip, more drop

Start at your local indoor wall. Obviously, before leaving the ground, make sure your belayer knows what you’re up to and and you’re happy with all your knots (although you should be doing that every session anyway!). Before you do any falling practise, it’s sensible to make sure there’s nobody climbing the lines on either side of you too. It’s also better if you can get yourself a more experienced belayer (or at least someone who understands dynamic belaying) as you’re less likely to injure your ankles this way. Get yourself on a slightly steep wall, bolt to bolting if you’re not used to climbing steep stuff, until you get 5 or so clips up. Get your belayer to take in and simply hang. Just sit there for 20 seconds or so and get calm.

OK. Now it’s time to go. Simply get your feet on the wall, hands on some holds, lift the weight off the rope and let go. Your belayer won’t have paid at any slack so you should just slump down to where you were before. Easy right? Great. Now do the same again, but move an inch higher. Maybe your belayer has to give out a little slack. Now just slump again. This time you’ll fall maybe 3 or 4 inches. Great. Easy.

Repeat, and move a little more. 2 inches, then a full move, then 2 moves. Then reach the next clip. Don’t increase the distance until you’re comfortable at the previous height, and by comfortable I mean you climb up and just let go. No stopping, no thinking, no checking your belayer is watching (you’re doing falling practise – if there’s any doubt your belayer isn’t watching you need a new sodding belayer!). The aim is to get happy at clip 7 (i.e. missing one clip, climb to the next one) then do a dynamic move into space. You’ll fall most of the length of the wall. This will probably take several sessions.

Lesson one accomplished. I guarantee the next time you go climbing you’ll push yourself harder and be better than you were before.

Step Two: Make falling part of your routine

Once you’re happy falling, do more of it! Falling practise as described above takes some commitment, but the session only need last half an hour. Making falling part of your routine takes considerably more commitment (and money, unfortunately. Don’t use your best ropes for this). I use a combination of the following three techniques:

  • Fall off every route: This is one of my favourites, but it does eat ropes. Never clip the top chains, ever. When you get to the top of every route, simply let go. Again, no stopping, no thinking, no checking. Force yourself to just let go and push with your feet. (If you get good at that, start missing the last clip too. That’s really fun :) ).
  • No stopping after the penultimate clip: You’re near the top. One last clip to go, then the chains. You’re pumped to all hell, and your brain is screaming for you to take. Not a chance. 6 moves to go, no chance of hitting the deck, what’s the point? Go for it, and you’re not allowed to stop no matter what. Can’t make the last clip? So what. Keep moving, what’s the worst that can happen? I do this for every single sport route I climb*, as a matter of course.
  • There is no take: This is kinda similar to the last one, but it counts for the whole route. We usually do a session of this every few months. The idea is to get warmed up, then pick routes either at or a half grade above your on-sight max. If you ask your belayer to take, they ignore you. That’s the rules. And if you fall off you immediately get lowered right back down to the ground, so you don’t want to be doing that either!

*unless I’m bolt to bolting a redpoint project, but that’s different, m’kay.

Step Three: Learn to keep moving whilst pumped

The next part of the process (and not really part of learning to fall) is to learn to keep moving up when you’re totally knackered. This really is the key, if you’re comfortable with falling you can keep moving without stopping to worry about falling off and who knows, maybe that next hold is better than it looks and you’ll get a good rest.

No stopping after the penultimate clip and There is no take are good for this. In addition, I use a couple of easy exercises to beat my body into submission:

  • Circuits sessions, which are great for endurance as well, but (and here’s the trick) make sure you end each circuit with a series of vertical moves. You want to be as pumped as you can be, sure you’re going to fall, but you know the sequence and you know you can climb it. Get used to the feeling of your forearms burning but keeping on moving.
  • Pace. Force yourself to up the pace through steep sections so you don’t get as pumped. This is much easier if you’re not afraid of falling. I can’t give any advice here as I’m terrible at it, if you’ve got some tips, get in touch and let me know.

Step Four: Push your limits

Now you’re well practised and not afraid of falling, push your climbing. Start onsighting a grade or two harder than you’ve ever managed to climb. Start redpointing, and go for the redpoint before you’re sure you can make it. Get yourself totally involved and totally committed to the route and just see what happens. You’ll be amazed at how much better you climb just by not worrying about falling off and letting the moves and the intensity of the climb wash over you. For me, this is as good as it gets!

Continue reading...

Climbing Disclaimer

» 21 November 2010 » In climbing » Comments Off

Please note that any advice given about climbing should not be treated as coming from a qualified guide, as I’m not. In addition, all readers should be familiar with the BMC participation statement and risk and safety advice:

The BMC recognises that climbing and mountaineering are activities with a danger of personal injury or death. Participants in these activities should be aware of and accept these risks and be responsible for their own actions.

Specifically, and I repeat, I am not a guide, or qualified in any way! As with all aspects of climbing you should read, understand and make your own mind up before attempting any advice given here.

Happy climbing :)


Continue reading...

Climbing status

» 08 November 2010 » In climbing » Comments Off

I realised recently that I know quite a bit about climbing these days. I don’t know why this realisation hit me now. I’ve been giving out more advice than receiving for a number of years now, spent a fair amount of time introducing (coaching?) newbies into the sport and dedicated a large portion of my life to getting better at it so I suppose it’s only fair I learn a few things along the way :)

The airy traverse of Outer Space, Washington. Photo by Alasdair Turner Photography ::

‘Climbing’ was one of the original categories in this blog. The astute amongst you will note there haven’t been any posts in there yet. This marks the first, and a decision to start writing about clambering as well as coding.

But why a post about me? Well, firstly, climbing is both dangerous and popular. If I’m going to be giving out advice I think it only fair I disclose my own ability and experience first. Even with all the time and effort I’ve put into climbing I’m by no means top class – I’m sure plenty of people out there will find this advice redundant. I suspect the advice I have to give is most useful for people in the mid F6s looking to break into the F7s (sport) or people looking to break into the lower Extremes (trad).

Continue reading...

bit.lyify – A extension for Safari 5

» 09 June 2010 » In development, tech » 4 Comments

Safari 5 was released yesterday, and with it came extensions – YEY. So I decided to see how easy it would be to create a simple extension for everyone’s favourite URL shortening service –

Turns it it was super-dooper simple. In fact, the obligatory home page took about twice as long to build as the extension!

Here’s the code (a bit stripped down), which is placed in a script block within the global HTML file. Feel free to poach, abuse or point out improvements:

    // Handle context menu command
    function handleCommand(/* Command */ event) {
        if (event.command === "net.telliott.bitlyify")
            var currentTab = safari.application.activeBrowserWindow.activeTab;
            var url = currentTab.url;
            if (typeof url !== "undefined") {
            else {
                alert("There was an error processing your request. Could not find the URL of the current tab.");
    function minimize(/* String */ url) {
        var request = new XMLHttpRequest();
        var login = safari.extension.settings.getItem("login");
        var apikey = safari.extension.settings.getItem("apikey");
        if (login == null || apikey == null) {
            alert("You must have an login name and API Key to use this extension. See for more information");
            alert("login: " + login + " apikey: " + apikey);
        else {
            var encodedUrl = escape(url);
            var showInfoTab = safari.extension.settings.getItem("showInfoTab");
  "GET", "" + login + "&apiKey=" + apikey + "&longUrl=" + encodedUrl + "&format=txt");
            request.setRequestHeader("Cache-Control", "no-cache");
            request.onload = function() {
                var status = request.status;
                switch(status) {
                    case 200:
                        var minUrl = request.responseText;
                        if (showInfoTab === true) {
                            var newTab = safari.application.activeBrowserWindow.openTab();
                            newTab.url = minUrl+"+"
                        alert('Your minified URL is ' + minUrl);
                        alert('Oh Noes, there was a problem with your request: We received status ' + status + ", " + request.responseText);

    // Listen for the context menu command
    safari.application.addEventListener("command", handleCommand, false);

There are a few extensions I’d like to add to this, particularly getting rid of all the alert()‘s, but for half an hours work I’m pretty pleased :)

The API seems really nice and well thought out (so far, I’ve not tried to do anything complicated) – particularly adding settings. Really simple and works really well IMO. Setting up auto-updating extensions should be a breeze too, although I’m not convinced I’ve got it working quite yet (for once Apple have failed at UX design here. The extensions section in Safari preferences has a box which tells you if updates are available for your extensions, but doesn’t seem to give any indication of if and when it’s gone off to find an update, if it failed to parse the update.plist file or to allow you to force look for an update. So I’m left in the dark as to whether or not it’s actually working – but I’ve had an update sitting there for half an hour without being told about it).

Also I think I’ve found a bug. On any Google site (and only Google sites, out of the 10 or so big name sites I’ve tried) the SafariBrowserTab instance doesn’t have it’s page or url properties set, meaning you can’t sniff the URL or access the SafariWebPageProxy. Very weird. I’m going to do some more investigations and will raise a bug with Apple if I think it’s needed.

Until then, enjoy bit.lyify, but don’t try and use it for Google sites :(

Continue reading...

Tags: , ,

Exciting Times!

» 24 March 2010 » In rambles » Comments Off

So, I think I’ve yet to mention in this blog where I work. This hasn’t been a particularly concious decision, there just wasn’t any need.

Ironic, then, that I mention it now – at a time when I’m not entirely sure!

That’s right kids, MX Telecom – my home for the last four and a half years – has been acquired by Amdocs and is to be merged with OpenMarket.

This is a really exciting time for me. As I juggle both tech and management hats there is going to be a tonne of new stuff to see, learn and experience over the coming months. Definitely exciting times! The first few things to come to mind:

  • What changes will managing a team separated by 6 timezones and nearly 5000 miles bring?
  • What toolchains do they use? How will they differ to what we do here?
  • Where we have similar products, how we will determine which one is better? What metrics will we need? How will we test these? How will we migrate from one to the other?
  • OpenMarket are smart guys. So are we. We’ve solved similar problems. How are our approaches different? How are they similar? Why?
  • What about culture? Sure, we’ve got a US office, but development has been very UK-centric. How will that change?

Of course, nothing has been decided yet. That list is a list of things going around in my head and not a list of things I’ve been told to think about. As always, the opinions represented here are mine and not my employers.

Continue reading...

Dojo Build System Example

» 02 March 2010 » In development, tech » 2 Comments

So one of the questions that comes up time and time again on the Dojo mailing list is how to get a build working.

Like most things Dojo, it’s not that hard, but the system is designed to be flexible enough to fit around your workflow as well as providing the bells and whistles needed to optimise for more advanced use cases. This has a couple of problems:

  1. Writing documentation is tricky – it’s hard to get the basics down and cover all the extras in the same document, and
  2. there’s a steep learning curve – as a newbie it’s hard to know which knobs to turn, which to ignore, and which to tinker with

Additionally in my experience working examples are easier to understand than written documentation. They allow you to play with the options and convert them incrementally to your project.

So I created a simple example, and added it to the Dojo wiki. You can find it here (new site) or here (old site). Hope it helps!

Continue reading...


Meh… Or, why does IE suck SO FUCKING MUCH

» 24 February 2010 » In rambles » 2 Comments

I just had the misfortune to check out this blog in IE. Figured it would be a good idea as I’m enjoying using Typekit to add some typographic flair to my theme and hadn’t checked to see how much it would break IE.

Turns out, totally independently of Typekit, the blog is hosed. Completely. In IE 6,7 & 8. GRRRRRRRRRR.

I should point out that:

  1. I checked the theme when I first installed it, and confirmed it worked in IE
  2. I’ve done very, very little to my blog since then other than adding a few basic plugins to wordpress and actually writing some things
  3. A cursory disable/enable of my most recent plugins didn’t make any difference, so I can’t figure out what broke it quickly

So, instead, I’ve stuck on a boring basic theme until I have time to look into this properly. Apologies all.

What really annoys me about this is that I don’t own a Windows computer. The only way I can check this is using the VMs at work. I regularly check on all browsers I actually use/can install on either my Ubuntu or OS X boxes (Safari, Firefox, Chrome, Opera, OmniWeb) and none of them has had any trouble at all. I spend enough sodding time at work dealing with IEs shitness, I don’t want to have to fuck around with it at home too!

Right. Enough. This is going to turn into the full blown, vehement rage against IE I’ve been threatening to write for months if I don’t stop now.

Does anyone know if you can specify browser specific themes in WordPress?

Continue reading...

Tags: ,

Topless Dining

» 23 February 2010 » In rambles » Comments Off

It’s funny. I’ve never been one for TV dinners and during my childhood eating was always a family affair. But recently both Christina and I found ourselves bringing our laptops to the dinner table.

It happened organically without any conscious decisions being made, and as such initially went unnoticed and unchecked. Perhaps because we are both interested in our jobs and both work (too) hard. Perhaps because we’re both permanently attached to the internet (we cook a lot from the most amazing smitten kitchen, so it actually makes sense to have a laptop around as we’re preparing dinner).

Either way what was initially just catching up on blogs or a quick way to convert between metric & Christina’s funny Canadian units quickly became a real problem. We stopped talking. I kept working. If I was coding, I’d barely notice what I eating, who I was eating with or what they were saying.

This all happened a few months ago, and after a bit of a chat we figured what had changed and fixed what was becoming a problem for us without any drama. Tonight however I had my laptop out at the table whilst cooking – watching the winter olympics in the kitchen as Christina wasn’t back from rowing yet. But as soon as she arrived home I automatically closed the lid and we started talking. For some reason it reminded me of what things had been like, and how much happier we both are now.

It still bemuses me how easily we got sucked into something which, when written down, seems so obviously dysfunctional. Yet another example of technology and modern society taking over.

Speaking of which, I’m currently lying on my bed typing into my laptop, reading about grails, checking out my IRC and gmail and listening to music streamed from my media server downstairs – whilst my girlfriend sleeps next to me. Time to kill the technology! :)

Continue reading...


» 30 December 2009 » In rambles » Comments Off

It was just before Christmas and I was up late, waiting for a call from Christina who’s back in Canada. On a whim and needing something to do to keep me awake I purchased, with a view to setting up Google Apps for your Domain and provider agnostic email addresses for my family.

I figured I should create a splash/home page for the domain as well, but what to put on it (and more importantly, how to make it keep my attention long enough to code it).

First things first, what does it need to do?

  • Look modern/pretty. I’m not going to put my name & time into something I’m not proud of,
  • Provide links to the various Google apps, so my family don’t have to remember all the subdomains,
  • Provide links for randoms to contact people in the family, without giving out their email addresses – this will probably never be used but provides additional purpose for the site.

The finished result is now at I’m pretty pleased with it. The little bird image was stolen from a template in Pages and provided the inspiration for the rest of the page. To my eye it’s clean, modern, simple and kinda cute.

Things I don’t like:

  • The menu is too hidden. Not a problem for my family (as they can be shown how to access it), but I doubt anyone will find it without being shown. That’s easily fixable by having the menu ‘open’ by default, but I don’t want to. And seeing as I don’t really expect anyone else to ever use this, I’m not sure it’s that important. I may change my mind about this :)
  • My original idea for the menu was to have the little flock of birds trailing it behind them on a banner, with the animation showing them ‘flying’ across the screen (like this). But there are difficulties here. The banner doesn’t want to be as wide as the menu when opened. So I ignored this for now as not worth the effort designing a flying banner background image.
  • I’ve cheated a bit on the CSS, using overflow:hidden on the html and body elements. This breaks when the window is small (or you’re on a mobile device). I should fix this up at some point.
  • I’d like to use a nicer font all round on the site, removing the text-as-image from the central image. The only cheap & reliable way of doing this that I’m aware of is to use Typekit, but I already use them for my own domain and I’m not sure I can justify the cost of upgrading to a ‘portfolio’ account for this. But I might :)

This was really only a tiny project (about 3 hours of coding) and more of an exercise in design than engineering. But I don’t get enough time playing with design these days so I’m glad I put the effort in.

Have a look and let me know what you think.

Continue reading...