12 kilometre Dublin death march

in ireland
The Blue Light pub, Barnacullia The Fairy Castle Eadaoin at Two Rocks View from Two Rocks toward the Great Sugarloaf Ballybrack Eadaoin photographing toward the Great Sugarloaf Suddenly, backcountry Eadaoin caught a shower of pine needles at Ballyedmonduff wedge tomb Ballyedmonduff wedge tomb

Eadaoin and I gave my life a lot of thought after my rant about goals in June. So my Quetelet Index is north of 30, and from there it only gets better. My measured cholesterol levels, if I told you them, would raise your eyebrows, and my levels of physical are low enough to describe as statistical artifacts. Put together, this makes my weight a good target. Dublin doesn’t help; the city is as bad as Las Vegas when it comes to easy ways to put on and keep weight. While the city isn’t a grid with fast food on every junction, the Luas has the city center at one end and Dundrum at the other. If I wanted, I could just get the train everywhere, live off crap and enjoy a short, rich life as a land whale.

I don’t want that.

With the resolution made, I understand that Rome wasn’t built in a day, and abrupt changes fail. Eadaoin and I have adopted more incremental strategy: change one thing, see if it sticks and repeat. Weekends have been our first target; I go stir crazy at home, so we try to get far away from the house at the weekend. Last week we went to Bray and today we hiked through the Dublin Mountains from Stepaside. Next week we will both be on the road, but in two weeks we’ll be doing the Colour Dash in Phoenix Park with our families.

The Cairn of Theseus
Our route took us through the grounds of Fernhill to the Blue Light, and thence to Sliab Lecga. The cairn on Two Rocks is a good example of the Ship of Theseus. Passersby often add or remove rocks on cairns, and this cairn dates to the Bronze Age. With those in mind, how many rocks now on the cairn were there six thousand years ago? Is is the same cairn if none of the original rocks remain? Put your rocks down! The questions were rhetorical, food for thought for our hike down.

Tors and Passage Graves, Oh My
Eadaoin and I hiked down from the peak and cairn at Two Rocks to the eponymous tors at Three Rock. It was past one o’clock at this stage and rain threatened from the west, so we hurried to the forest at Ballyedmonduff. There is an old wedge tomb in the dell. At least three thousand, five hundred years old, the Ballyedmonduff tomb is…generic? Ordinary? People’ve been in Ireland for about nine thousand years. By the time someone built this tomb for a rich dead person, Ireland was already littered with half-forgotten tombs. Fuck, Newgrange would have already been around for fifteen hundred years. I said this in April after I met Eadaoin’s family: Ireland’s landscape is so stamped human history that the tomb is just another random artefact.

Bad Food, and Home
We walked the main road from Ballyedmonduff to Eadaoin’s old local, the Step Inn at Stepaside. It was a pub that offered pub food so I shouldn’t complain, but lunch was fucking awful. My tuna melt was some sort of aborted half-breed fish pizza; dry tuna on soda bread smothered in enough cheese that I couldn’t see the sandwich for the cheddar. Eadaoin’s turkey sandwich looked like it came from the snack shelf in Tesco (and tasted liked the wrapper, according to Eadaoin). I’m a fat bastard; I’ll eat almost anything, anywhere. I had three bites of the sandwich.

Bleah. On the topic of cairns, we finished our walk with a stroll down to the Glencairn and then the Luas back home. Great day: fifty calories burned, pictures taken, walk had, relationship strengthened.

Bray Head 2015

in friends
Bray Head The Welsh coast from Wicklow Eadaoin at Bray

So holy shit, Eadaoin and I have been together for almost a year. We have completely failed to manage to kill one another, which is great; it’s a real step up from my marriage. Our first trip together was to Bray and Greystones in Co. Wicklow, where we walked the cliff trail from the former to the latter. Last Saturday we went back, but went in the opposite direction and took the path over the top of the head than along the cliffside.

The weather was the same as last year: warm and cloudy, with some sunlight breaking through toward evening. We saw the Welsh coast again! Snowdonia stood out clearly through some quirk of the atmosphere, to the point that we could count peaks and see what looked like Holyhead in the foreground.

Panorama taken from Bray Head

I hate PHP

in code

Gerry sent me a link to PHP: a fractal of bad design after I posted a Facebook rant. My problem is this: PHP has several functions that fetch date. Two “big” one are date() and strftime(), which have different date format syntax. WordPress uses the syntax for date(). I’m sure there are good historical reasons for this divide-somebody imported either function from an older programming language.

The Tuairisc website is presented in Irish, but administered in English. WordPress’ date_i18n() function works by the WordPress locale, not the theme or system locales. This makes sense (think about a French site on an English multisite installation), but it makes my life harder. So because of the language divide, I need a needed a way to get a date of a post based on the locale of the system. Here it is.

Why the hell does PHP have two different, incompatible date syntaxes?

 * Get Date Using System Locale Files
 * -----------------------------------------------------------------------------
 * This function mirrors get_the_date(), except it uses strftiime(), and any
 * localization supported by your system.
 * @param   string      $format      Format to use for the date.
 * @param   int         $post        ID of post whose date is needed.
 * @param   string      $locale      Locale to be used. Must be present on system!
 * @return  string                   Date in desired locale, with fallback to default locale.
 * @link https://secure.php.net/manual/en/function.strftime.php
 * @link http://www.bhalash.com/archives/13544804637

function get_the_date_strftime($format = null, $post = null, $locale = null) {
    $post = get_post($post);

    if (!$post) {
       return $false;

    if (!$locale) {
        $locale = get_option('tuairisc_fallback_locale');

    if (!$format) {
        $format = get_option('tuairisc_strftime_date_format');

    $locale = array(
        // Try to match common variants of the locale.
        $locale . '.utf8',
        $locale . '@euro',
        $locale . '@euro.utf8'

    $time = mysql2date('U', $post->post_date);

    // @link http://stackoverflow.com/a/19351555/1433400
    setlocale(LC_ALL, '');
    setlocale(LC_ALL, $locale[0], $locale[1], $locale[2], $locale[3]);

    return strftime($format, $time);

All hail the glorious vim master race

in code

OR: “Moving from Sublime Text 2 to vim.”

Click here to revel in my glorious vim master race desktop.

Dual head vim setup

I have used Sublime Text since 2011. I don’t know when I first used it, beyond clear memories of it open in class during my first year at I.T. Sligo. I asked “suggest a prettier editor than Notepad++” on Facebook, and received a link to Sublime. The rest, as the cliché goes, is history.

I have used vim alongside other GUI editors since ~2001. I have used:

  1. gvim.
  2. Kate in vi mode.
  3. Sublime Text in vintage mode.
  4. Vimium in Google Chrome.

And so on, ad infinitum; vim-style modes and bindings are both popular and easy to shoehorn into any software at all with an API.

Sublime Text is awesome; Sublime is flexible, extensible and packed with all sorts of great features. I have relied on Sublime and the Sublime SFTP plugin since I began work on with Tuairisc in August 2014. Sublime SFTP is, like Sublime, awesome: not only has it support for FTP, but also SFTP, FTPS and straight SSH connections. It can sync files and folders in both directions. It’s easy. The problem I have is that, in the end, my dependence on vintage mode and Sublime FTP has led to bad habits:

  1. Why version control and sandbox the test code when I can just upload shit and see what runs?
  2. Why bother to learn vim in depth when Sublime Does a Good Enough Job?

Both these and other things have led me to reassess Sublime over the past few weeks:

  • Many of Sublime’s keybinds aren’t friendly on my wrist in OS X. I fucked my right arm with RSI when I was bedridden during my 2012 illness. I have been careful about mouse use since then, to the point that I keybound everything in World of Warcraft. While I know I’m free to change every keybind in Sublime Text, that is a time-intensive exercise I don’t relish.
  • Sublime Text and Sublime SFTP are nagware and I’m cheap.
  • Sublime has become an intermediary between my true workspace and I. When I work, I feel like I am building a ship in a bottle while I wear oven mitts. Chris Hadfield’s tales of working in thick spacesuit gloves is a good allegory.

So as of Monday I went all-vim, all the time. I now work on my server through SSH, screen and tmux. I dove in headfirst as I yodeled “YOLO”. These tools allow me to now work on my code with vim, manage commits with tig and save a large amount of time. Neither do I have to fuck around with GUI applications anymore.

Here is what I have learned:

  • Having a keyboard and mouse with which to copy and paste makes one lazy, but it is also slow. You can see what you need to copy and where you need to paste it, but you don’t look at their positions. You click first on one and then the other. vim-for lack of a better description-forces you to be aware of the spatial position of characters in the file. What do I need to copy? What are its line and column numbers? Where is the target area in relation to this? How many lines and columns away is the destination?
  • vim isn’t as scary as I feared. I mean, fuck, whenever I think of vim, I conjure up a hoary veteran of the of the kernel mailing lists. But additions to the .vimrc (here’s mine) have proved straightforward. Adding new plugins and colour schemes (oxeded) has proved to be as simple as untarring them into the respective folder.
  • Macros are a lifesaver. To give an example, I use the phpdoc style of code comments. I am able to save and then paste the same boilerplate over and over without having to type it out for the nth time.

vim has been good to me and this move has proven good for me.



in design

Ciaran at Tuairisc.ie is on holdiays so I have been handling adverts for the site in his absense:

Department of Foreign Affairs and Trade
Gnó Mhaigh Eo
University College Cork

It’s been a different kind of challenge to do this (you try to track down vector branding for regional companies!), although quite fun.