Friday, 22 March 2013

The world's easiest guide to installing cpanm

A lot of the software I write is in Perl, and the easiest way to install it is almost always using cpanm. Here I present to you the world's easiest guide to getting cpanm up and running.

If you're in a hurry, just run these and you're done.
curl -L | perl - --self-upgrade
~/perl5/bin/cpanm local::lib
perl -I ~/perl5/lib/perl5 -Mlocal::lib >> ~/.bashrc
Now start a new shell, and you're done.

Gamifiy your command line with HabitRPG

So, you're using HabitRPG to gamify your life, right? You should be; what could be better than collecting XP and gold for fixing bugs and doing chores and flossing your teeth, and developing a totally kick-arse character you'd want to show off to all your friends?

Oh yeah, doing all that from the command-line. ;)

So, I present to you hrpg, a command-line tool to integrate with HabitRPG.  It's still new, but it's very full featured.

Saturday, 9 February 2013

Reimplementing the iDoneThis memory service

Photography by wadem, CC-BY-SA
There's an excellent website called, which implements the most simple yet brilliant of services. Every day, you record the list of things you've done, and it gives you a check-mark for that day. This was motivating in two ways: firstly, the desire to keep that chain of check-marks running (what's known as a 'chain calendar' or a 'Seinfeld calendar'), and secondly by emailing you your memories of what you were doing a year (or a week, or a month) ago.

For me, knowing what I was doing a year ago was really good. I loved waking up each morning to be reminding of something I might otherwise not think of again. The good memories I was emailed would make me feel good again, and bad memories? Well, they'd often make me feel good that I wasn't going through that anymore, or they'd be insightful if I was encountering similar issues now.

I loved the memory service, and so did my friends, even if they didn't use it. I'd often send them messages about what awesome adventures we were up to a year ago, and that would often make their day.

Unfortunately, a few months ago, iDoneThis discontinued their memory-posting service. I don't know why; I can only assume they're focusing on the more corporate part of their service, and the network costs of all the personal emails wasn't worth it.

Today, as part of a productivity spiral, I reimplemented the old memories service. The code isn't pretty—unfortunately iDoneThis doesn't (yet) provide an API—but I have a bot that can log-in and fetch a day's worth of data.  Best of all, that code is open source, and available from the CPAN, so you can download and use it yourself.