PHP Font Ligatures in Atom

If you’re a user of the Atom programmer’s text editor and you’ve installed a font which uses ligatures, such as the excellent Fira Code, you’ll have found that although they work fine in most languages and even with plain text files, they don’t work with PHP. Here’s a simple solution which I found here.

Open the stylesheet for editing (Atom -> Stylesheet… on MacOS, File -> Stylesheet… on Windows) and add the following, remembering to save it when you’re done:

// Enable ligatures
* {
    -webkit-font-feature-settings: "liga" on, "calt" on;
}
 
// Turn off ligatures inside strings and regular expessions.
atom-text-editor.editor .syntax--string .syntax--quoted,
atom-text-editor.editor .syntax--string .syntax--regexp {
    -webkit-font-feature-settings: "liga" off, "calt" off;
}

You should now find programming ligatures working in PHP.

The Gooseberry Harvest

A little while back I bought a couple of plants at a local garden centre, one of which was a gooseberry bush. Over the weekend I decided, having noticed that there were plenty of ripe berries, that it was time to pick them. Now, bearing in mind that it is, at present, quite a small bush, I reckon it’s a pretty good little harvest. Not enough this year to turn into jam or anything, but definitely plenty for a tasty snack.

Holiday Booking Blues

Last night I finally got around to booking our family holiday to Exmoor. I found a really beautiful self-catering house in Exford and booked it for the only week that was available, the first week in September.

This morning I realised just how stupid I’d been. I’d got it into my head somehow that Max wasn’t starting school until the second week in September, goodness knows why. It is, of course, the first week.

To cut a slightly involved story short, I contacted the agency I’d booked through and they were extremely helpful. Because it was within twenty four hours of the initial booking they can rearrange things without penalty. I’ve told them exactly what we’re looking for and they’re going to see what they’ve got on their books that’s free over the last week in August and get back to me. Problem solved, but I do feel like an idiot.

Could Brexit End the Monarchy?

Something that has occurred to me recently is that if the appalling rise in xenophobia in the U.K. continues, one of the major justifications that monarchists use for maintaining the royal family, that they bring in tourist money, disappears. After all, if the environment we have created here is so hostile to foreigners that they don’t want to come here for a visit, let alone to live and work, then clearly our whole tourist industry will suffer.

Incidentally, I don’t believe in the tourism justification for the monarchy. We have plenty of other attractions, and the whole unelected head of state thing is, in my opinion, simply wrong. It’s long past time we ditched massive hereditary privilege and focused on improving people’s lives.

Also incidentally, this is not an argument in favour of Brexit. I voted to remain in the EU and I haven’t changed my opinion on that.

Software Is Never Done

Software Is Never Done

This is all too true. I’ve worked on a fair few different projects in my time and, apart from those that were only ever designed to be used once to produce some very specific output, not one of them has ever reached a state that could be described as ‘finished’. Even the small personal projects I’ve embarked on over the years, although to be fair that’s largely because I’m an inveterate tweaker and twiddler. I suspect that most programmers are the same.

Max Likes Moths

Last night there was a small moth in the house, which had alighted on the wall in the hall. On his way up to bed I showed it to Max, who took one look at it and declared, “I don’t like moths.”

So Juliet and I explained a bit about what moths are and how pretty their wings can be (“a bit like a small butterfly,” we said, which Max really latched on to). I touched it gently to make it move and flutter its wings. All this clearly had the desired effect, because Max then turned and said, “I like moths.”

Gosh, at this rate I might become a half decent parent.

Scary Motorcycle Near-Accident

James Hillier having a bit of a moment at this year’s TT. This is why I love motorcycle racing so much. It’s simultaneously exciting and scary, especially if you ride a bike yourself.

Trump Not Coming to UK

Trump has put his state visit to the UK on hold. According to the article it’s because he fears widespread protests. He’s right. Whenever he comes there’ll be protests aplenty. Big ones. I plan to be at as many as possible myself.

A Self Cleaning Child

This morning Max was eating a bowl of Coco Pops and had chocolate stains all around his mouth and on his hands, in the usual manner of small children. He asked me for a sweet and I told him he could have one if he’d let me wipe him clean. He agreed and by the time I’d fetched the sweets so he could choose one he’d found the wet wipes, got one out and done a pretty reasonable job of cleaning himself up.

I know it may not sound like much to some people but I felt like such a proud father. Every little step he takes as he grows up has the same effect on me. Now, if we can just crack potty training…

Not So Wow After All

It looks like the famous 1977 ‘Wow!’ signal’s origin has finally been determined. Sadly but not unexpectedly it’s not aliens. It turns out it’s probably comets. I guess we’ll have to keep looking and trying to answer the question, “Where is everybody?”

Not Quite Vegan

I’ve recently been trying to cut down on the crap I eat and drink, and also to think more carefully about the ethics of the food I consume. To that end, I’ve been choosing vegan food quite often. It’s healthy, tasty and no creatures (cute and fluffy or otherwise) had to die to produce it. Of course, I know it’s not as simple as that. Intensive farming, mistreatment of labour and a whole raft of other dodgy practices can still produce food which is labelled ‘vegan’ but I’m doing the best I can with the information at my disposal.

Anyway, one very nice thing I’ve discovered is Pret’s coconut hot chocolate, which has more or less completely replaced the lattes I was drinking before. It’s unbelievably sweet, which appeals to me as I really go for extremes of flavour, but doesn’t contain the huge amount of caffeine that I was ingesting until recently.

So now some kind person is going to tell my why I shouldn’t drink it and I’ll feel bad. Right?

The Smallest Room

I’m staying at my in-laws’ place for a few days and I couldn’t help but notice that the airing cupboard in the spare room has a handle on the inside of the door. Maybe it used to be a room for a goblin.

How Lego clicked: the super brand that reinvented itself

How Lego clicked: the super brand that reinvented itself

Oh, how I love Lego. It’s easily the best toy for both children and adults. Endlessly creative and virtually indestructible. I can’t wait till Max is old enough to graduate from Duplo to Lego proper.

Stewart Lee On the Election

It’ll take more than cheese and ceramics to reunite our divided country says the ever funny Stewart Lee. Worth a read if you need something to make you smile today.

My Wildlife Friendly Lawn

I’ve just been outside strimming my lawn. Most people, I know, use a lawn mower. I do have one of those but I quickly found, after buying it, that my garden is way too lumpy and bumpy to make it anything other than a real hassle to use. So, I have an electric strimmer that does the job much better. It’s never going to produce a nice neat lawn but, even if my garden was flat and the grass was uniform and of good quality and not full of ‘weeds’ I’m just not that interested. Besides, leaving the grass longer, rougher and full of wild plants helps to provide a good home for wildlife.

The only down side of using the strimmer is that the battery doesn’t last long enough to do the entire garden in one go. On the other hand, its running out usually coincides nicely with my energy and ability to continue doing the same.

A Green Memorial

Gooseberry bush
A few weeks ago I visited my local garden centre and bought a couple of plants in memory of my mother, who died last year. She was always a very keen gardener, so it seemed an appropriate thing to do and I’m sure she would have approved.

One of the plants I chose was a gooseberry bush, because I have very fond memories of the one in our garden when I was little and because I absolutely love gooseberries. Anyway, it sat outside the back door for a while in its pot while I kept saying, “I really must plant that.” Then, one morning the urge became overwhelming and I did the dirty (well, my hands did get a bit grubby) deed.

This afternoon I went out to check on it and I was really quite excited to see that it’s doing surprisingly well. I am not, by any means, a gardener but I feel really, properly and unjustifiably proud of myself.

So, what piece of garden magic to attempt next? I’m open to suggestions.

All Change Again

For the few who care about such things, I’ve recently moved this site to a Virtual Private Server, which gives me a lot more control over how things work. In the spirit of change which this has brought on in me, I’m contemplating changing the WordPress theme to something a little more interesting and, dare I say it, modern. Hopefully it’ll encourage me to write here a bit more often.

I know I’ve said it before but I really do intend to post here more frequently. It just seems that life gets in the way sometimes, and then I’m so tired that it’s hard to find the mental energy to compose posts. If I had it in me I could, for instance, tell you about the KT Tunstall gig at the Barbican last Monday, which was fantastic, by the way, or the visit to the Harry Potter Studio Tour on Tuesday, which was wonderful and breathtaking and fun and just thoroughly enjoyable.

So, I’m going to try to do better. Promise.

A Kilt!

This morning I was having a bit of a poke around online, as is my wont, when I stumbled upon Utilikilts. Now I think these look rather smart but they’re not cheap and, when you add in international shipping and duty I’m not likely to see much change from £300 for even the least expensive one.

That’s a lot of money to spend on something I don’t know whether I’ll be entirely happy wearing, but a bit of searching brought me to this. So, I’ve ordered one and am expecting it to arrive tomorrow. If I like it enough then maybe I’ll splurge on a more expensive one sometime. In the meantime I’ll try living with one for a bit and see how it goes. Photos to follow in due course.

Where’s the Teletubby Enclosure?

My son, Max, who will be three in March, has decided that he’d like to see monkeys, so we’re planning to take him to the zoo tomorrow. This is the conversation I had with him about it.

Me: So, are there any other animals you’d like to see at the zoo?

Max: Teletubbies!

Me too, Max, me too.

Back to the Blog

I’m becoming increasingly fed up with social media, Facebook in particular. All I really want is a reverse-chronological list of updates from people I know, together with some handy ways of filtering it. What I actually get is certain updates only, picked and ordered by an algorithm that doesn’t do a particularly good job. I see the same posts over and over again as new comments are added and miss others completely.

I can’t do a lot about that, but I can make things a tad easier for anyone out there foolish enough to be interested in the minutiae of my life and thoughts. I’m planning to start using my blog a lot more, even for very short posts. As a small bonus, it’ll be good writing practice for me, too.