April 2018

April Fools

This year I did something of my own.

In early March, at work, while pairing, we typo’d PHP’s ?? Null Coalesce operator into ???. That was pretty hilarious. We couldn’t stop ourselves from imagining what such a symbol could mean.

One idea stuck, as being both on point, completely overpowered, and yet utterly practical. As April was coming up, I floated a ridiculous idea: what if we proposed it for real?

Ultimately, work keeps us busy, so we don’t really have time to spend on frivolous bullshit like that. Instead, I quietly worked at it in spare hours.

As part of my initial research, I found that PHP has a fairly well-delimited process for proposing changes, and it all starts with a posting on the mailing list to gauge interest. I couldn’t do that! It wouldn’t be an April Fools if I had to disclose it prior to April. Also, I didn’t think it would be nice to annoy the PHP developers with this. People on Twitter (or Slack, or wherever you came from) at least are already wasting their time.

So I skipped that step, and wrote up a PHP RFC as seriously as I could. I included motivations, discussions of why existing features weren’t enough, use cases, examples, sample code, comparisons to other languages.

I even checked out PHP’s source and coded up a very nasty hack of an implementation of the feature. And I added tests.

This was meant to be a complete joke, something that could not exist in a thousand years, and yet I fell into my own trap. As I wrote it, as I described it, as I defended it, I came to appreciate just how useful the feature might be.

I still don’t think it will ever get accepted, and certainly not with its ??? syntax. Even if I see many places I could use it, it’s still very outlandish.

But for you, dear reader, if you haven’t come here from the proposal itself, I leave you with a proposal that captured my attention for the best part of a month. Here is ???: The Exception Coalesce Operator.

Keyboard practice

Practicing every 2-3 days (sometimes every day) for 20 minutes on Keybr, I clocked up 5 hours of practice which got me at acceptable speed over half the keyboard (lowercase letters only at this stage).

So guesstimating, that should mean that in another 5 hours or so I’ll have the entire alphabet down, and I’ll be able to switch uppercase on, then symbols. After that, I’ll start using the keyboard for minor works. With a bit of perseverance I hope to always use my Keyboard.io at work in July/August.