Remote Mac Control

I need to help out my grandmother with her mac occasionally. Now it’s much easier if I can just VNC straight into her machine. Unfortunately, it’s behind a router. But that’s OK. As usual, ssh tunnels to the rescue.

Unfortunately, she’s not really capable of using the command line. So it’s out with the AppleScript!

I wanted a little icon she could click to set up an ssh tunnel. That tunnel should then be torn down when the app closes. This is what I ended up with.

  global pid
  on run
    set sshCmd to "ssh -i ~/.ssh/vnc -R 5900:localhost:5900 -N"
    set pid to (do shell script sshCmd & "</dev/null >/dev/null 2>&1 & echo $!")
    display dialog "Connected to"
  end run
  on quit
    do shell script "kill " & pid
    continue quit
  end quit

There’s a few interesting points about this.

  • You have to redirect stdin/stdout/stderr to /dev/null or do shell script will never return.
  • I didn’t realise, but you capture the output of do shell script by enclosing it in parentheses. Yes, this is basic AppleScript. but it’s all new to me.
  • The on run and on quit handlers let you do Save As... application bundle. So you end up with a clickable application.
    • on quit must call continue quit or you end up with an immortal app…
  • The ssh command itself has a couple of interesting features.
    • -i ~/.ssh/vnc uses a custom key that I set up, instead of having to rely on a password.
    • -R 5900:localhost:5900 forwards port 5900 on back to port 5900 on her computer.
    • -N means “do nothing” instead of firing up some shell on my server.

At some point, I might extend this so that there’s a Window with a connect / disconnect button. But that will involve AppleScript Studio, which I don’t have on this computer.

So now I should be able to help clear up any, errr, “incidents”. Hopefully.


En Fran├žais, s’il-vous plait

I’m in France, visiting my relations. Once upon a time I could speak French fluently. I lived there for a year. Now, my French has detoriated to the point where I can hardly string a sentence together. This is most distressing, but entirely understandable due to lack of practise.

Then, wandering through FNAC on Friday, I saw my salvation: comics! A wall of graphic novels, all in French. I drooled. I picked myself up and started some serious browsing. What better way to practise than enjoying a great story? So I’ve now got a few comics to take back and enjoy, and hopefully by the next time I won’t feel quite so much like a fish out of water.

On another note entirely, I saw a translated version of Alan Moore’s 49’ers for less than the price I paid for the English version. Shocking, I call it!


SkillSwap on Typography

Last Thursday evening, Richard Rutter gave us a talk on Web Typography Sucks. It was a hugely successful event. It turned out that there were nearly 17 of us in the small room. Richard’s talk was essentially a preview of his SXSW talk, so if you can catch it there, I really recommend it.

Richard covered various aspects of what typography applies to the web (hint: it’s not just about fonts), and how we can improve on what we’re doing. He correctly pointed out that if the sun can do it, then so can we.

I was personally really pleased because a lot of the topics that he covered are things that I’ve had to a little bit of at work, but not really clearly got my head around. I now feel ready to go forward and make my next web site far more pleasant to read.

Interestingly, I’ve just noticed this article: Web Design is 95% Typography. How serendipitous.


Dojo IX

Last night was the latest Coding Dojo. It was an astonishing success. Not only did we all manage to enjoy ourselves, we actually produced some working code! We were attempting Kata Four (data munging), which is split into three parts. Admittedly, we only finished the first part, but it still felt like a real achievement.

The task itself was interesting. It’s the kind of task that you’d whip up in a few lines of Perl or Ruby in a few minutes. Yet with Java, it all gets much more complicated. For starters, you get exposed to the morass of Java I/O classes, which confound and bemuse me every single time.

Then there’s the text processing aspect. This actually turned out to be easier in Java, because we were dealing with a fixed width format and the natural instinct is to reach for substring().

What was nice was that with half an hour to go, we decided that we wouldn’t try to start the second part of the Kata. Instead, we focussed on cleaning up the code we had written—a pleqsant experience.

I hope we pick this one up next time. It’ll be interesting to carry on with the rest of the task.


Skillswap is back!

I’m pleased to announce that Skillswap is back. Our first event is Web Typography Sucks by Richard Rutter.

For too long typographic style has been overlooked on the Web. This SkillSwap will show how new technology demands that websites receive the refinement that has been applied in print for centuries. The session will examine what currently sucks about typography on the Web, and how to implement those typographic principles which are so severely lacking. It will also highlight what is being done right typographically, and how that can be carried forward.

By explaining how everyone involved in a website can and should take typography to heart, the session will provide a blueprint for introducing typography at all stages of a project, thus ensuring that sound typographic principles and techniques become an integral part of the future of Web.

Richard Rutter is Production Director at Clearleft in Brighton, UK. He curates where he slowly battles to improve typographic style across the Web.

Please come along—just drop us an email at

Now, I just wish that I had managed to organise all this earlier… Mea culpa. I’m just grateful to Andy Budd for allowing us to pick up his excellent work. And also to my cohorts, Ribot, Rosie Sherry, Danny Hope and Glenn Jones who have really helped to pull all this together.



I’ve been using postgrey for a while now in order to cut down on my spam. However, a few days ago, I realised that I hadn’t also killed my backup MX. So the greylisting, whilst helping, wasn’t being as effective as it could.

A few days ago, I decided to get rid of the backup MX and have my own mailserver handle the load on it’s own. After all, it’s been pretty reliable and I didn’t see much need for it.

I only connected the two events yesterday when I suddenly realised that my spam volumes were far, far lower than usual. But it makes sense. Backup MX’s reduce the effectiveness of greylisting. Doh.

Thinking about why, it’s because greylisting particularly hurts those clients (like zombie spam engines) which don’t implement proper queueing for mail. But a backup MX is much more likely to use correctly implemented software (like exim in my case). So it’s quite happy to wait the requisite 5 minutes until the greylisting wears off.


Subverting Word Processors

I don’t think it’s unreasonable to want to store my documents in subversion. But what to do? Word processors all seem to produce ugly binary documents. Even though’s odt files are basically just zip files, it’s still putting zipfiles into your subversion repository.

Why is this a problem? Because you can’t see what’s changed. And if I make a change in two places, the tool can’t merge the changes for me. Not automatically and not without some hassle, anyway.

Having grappled with this a little bit over the last couple of weeks, I’m coming to the conclusion that the only safe format for storing files in is RTF. Thankfully, not only is it plain-text, but it’s also understood by the vast majority of word processors out there, including the lowly TextEdit and WordPad.



I’ve tried iTerm a few times before, and not really got on with it. I wandered past today however, and noticed that the new version has a full screen option. Yummy.

So I’m giving it a trial run. It’s taken a little bit of setup to work correctly with the damned Linux boxes at work. Mostly this is ensuring that the backspace key sends a backspace instead of a delete1. I also had to turn on option translating to ESC+key, as my emacs-ingrained fingers know that Option-F is forward-word.

Oh, and turning off the tabs as much as possible. I like tabs in my browser, but in a terminal, I’d rather use screen.

But apart from those (minor) quibbles, it seems to be a good little program. I’ll keep going with it for now. And the full screen mode works a treat. It’s just like PuTTY.

1 I hate doing this, but I can’t be bothered to mess around with the Linux boxes.


Cycle Helmets

Yes, they look daft. But when you fall on your head (like me this afternoon), it means you get up and walk away. Particularly if the speedo was clocking 40mph at the time.

Please wear a helmet cycling.



Last night was the 8th Coding Dojo. Joh kindly allowed myself and Jay to try out one based on Ruby instead of the usual Java. Sadly, Jay was ill and couldn’t make it. Get well soon, Jay.

We started late because I was installing all the necessary bits (ruby + eclipse) on Joh’s laptop…

Having done that, I gave a quick presentation comparing Ruby to Java. I had been under the impression that most people there would be familiar with Java (based on previous experiences). Unfortunately, because it was Ruby it attracted a very different crowd. Thankfully, nobody seemed to mind too much.

After that, we started on the task: write a Sudoku solver. This was the point where I realised that whilst I’d brought along code for a board, I hadn’t actually brought a puzzle to solve. Ooops. So we hopped over to Wikipedia to grab a sample puzzle. And we then realized I needed an importer… So we knocked one up fairly quickly. Whilst I did feel quite embarrassed about lacking such a crucial part of the problem (bad prep! no cookie!), it turned out to be an interesting example of coding something simple. The fact that I was with Andy, who I know well helped a lot.

Unfortunately, as the evening progressed, it became rapidly clear that none of us had much clue about how to solve a Sudoku puzzle algorithmically. So most of the time ended up being spent discussing the problem as opposed to coding. Afterwards, it was suggested that a “time out” be taken so we could discuss the strategy as a group—that might have helped quite a bit.

Finally, the last pair on the keyboard started making real headway. Andy and James came up with an algorithm for listing the “opportunities” for a given cell and were in the middle of implementing it when the final whistle blew.

So we didn’t get very far at all towards a solver. But as usual the journey was interesting and entertaining.