PHPNW12: Effective code reviews

A really entertaining talk, with great slides, by Sebastian Marek at PHPNW12 on Code Reviews. As usual, the notes below are a mix my understanding of what Sebastian said and what I was thinking as he said it. If I’ve misunderstood or misheard, just let me know in the comments.

Introducing the characters (cute little character drawings in the slides):
Tom “I want it done” the owner
Harry “just get it done” the manager
…I missed the others :)

Take a process: design, coding, code review, testing. But do we really need to review the code? “Surely the testing covers the testing, and you guys already know how to code, right?”

“We’re nearly done, just need to review the code”
“But we’re busy, we have no-one spare, let’s just push it out…”

“I need John Senior to review my code.”
“He’s busy, you can have Bob Junior”
“But…”

“We do all these code reviews, it’s still buggy, we’re spending all this time, it’s just not working. We’re abandoning the reviews.” Continue reading “PHPNW12: Effective code reviews”

PHPNW12: Catching opportunities in Open Source

Christian Schaefer and Stefan Koopmanschap talking about Open Source and community. It’s nice every so often to sit in a talk which you’re in broad agreement with, and obviously as a keen proponent of a Open Source this talk was right slap bang in the middle of my interests. The notes below are a combination of what Christian and Stefan said and my thoughts as they spoke.

“What caused England, the colonial power to fritter away it’s head start within the span of a century, while the under developed agrarian state of Germany caught up rapidly, becoming an equally developed industrial nation by 1900?”

It seems that copyright was holding back the spread of knowledge in England. Continue reading “PHPNW12: Catching opportunities in Open Source”

PHPNW12: Don’t reboot, debug!

Some notes from Joshua Thijssen’s talk, which focussed on the knowledge and methods needed to deal with problems in production in a measured way. I was at the back of the room, and some of this is outside my wheelhouse, but here’s the notes; just bear in mind I might have either misheard or misunderstood stuff and feel free to correct me in the comments.

Deal with the problem now. Don’t reboot. Don’t reboot your system every night on a Cron job to solve a slowdown! Listen to your problems, sort them out and save yourself some future pain.

If you’re rebooting every night to solve some system slowdown, but your visitors suddenly increase 200% then you’re now rebooting at night AND at lunchtime. Not good. Not sustainable.

Continue reading “PHPNW12: Don’t reboot, debug!”

PHPNW12: Ade Oshineye on Dev Experience, API Design and Craft Skills

These are the notes I made not so much of what Ade was saying, although some of the following was said by Ade, but also of my thoughts as he spoke. Really great talk, thank you Ade.

Apprenticeship patterns: acquisition, transmission, growth.

We are all API designers, we all write functions we ourselves use later or that others use. Typically the response is “what the hell was he smoking?”. Continue reading “PHPNW12: Ade Oshineye on Dev Experience, API Design and Craft Skills”

Issues with embedding Vimeo videos with HTTPS URLs

As documented in WordPress trac ticket #20102, there is an issue with oEmbeds from some services which have started allowing/using https URLs rather than http URLs. The ticket documents an issue with the oEmbed functionality, oEmbed is the technology which allows you to paste a YouTube URL into your blog and have that converted to an embedded YouTube video when someone looks at the post. The problem is that the list of “safe services to embed from” does not account for URLs prefixed with the secure https protocol (as opposed to the non-secure http which is used for most web traffic which simply does not need the security).

The solution from ticket #20102 should be included in the next release of WordPress (hopefully), but in the meantime you can use this quick plugin I wrote which implements the new providers list, I’m waiting on WordPress.org plugin approval but in the meantime here’s the Github URL: HTTPS oEmbed Providers on Github

Download the files as a “zip”, unzip on your computer, then upload to your WordPress plugins directory; or upload the zip through the plugins page in your WordPress admin area.

The plugin is designed to warn you when the next version of WordPress is released, when hopefully you can deactivate and delete it.

The plugin only enables HTTPS for the providers which are already listed by WordPress, it does not add new providers (i.e. if you want an extra oEmbed provider then you need to look elsewhere, sorry).

(Post updated after publication to, hopefully, make the problem clearer.)

Speeding myself up on the commandline

I tend to find myself in the terminal.app on my Mac more often than not, SSHing into servers, checking whois, host, and any number of other things. My most frequent incantation is searching the command history so I don’t have to re-type a previous command, something like this:

grep curl ~/.bash_history

I’ll then copy and paste the command and hit return. It’s pretty quick, and I’ve got the muscle memory right down now… but there’s got to be more elegant commands, right? Or course there are. Continue reading “Speeding myself up on the commandline”

Economies of abundance

This really struck a chord with me:

“Making money from open source is a hack though, as our currencies are based in scarcity and our peer economies are based in abundance. In the latter, the more people participating means the more everyone benefits.”
Daniel Bachhuber – an economy of abundance

A quick custom plugin to import redirections into Safe Redirect Manager

At Code for the People we’ve just imported a load of blogposts from Drupal into WordPress. One of the differences is that Drupal encodes fancy characters, like typographically nice “quote marks”, into the URL whereas WordPress mostly drops them. We ended up with about 80 URLs which had changed and the need for a redirections plugin… enter Safe Redirect Manager by Taylor Lovett at 10up. I didn’t want to manually type in 80 redirects though, I wanted to get them in automatically and to this end I wrote a quick custom plugin which hooked into Safe Redirect Manager in a couple of places. Continue reading “A quick custom plugin to import redirections into Safe Redirect Manager”

Alfred extension: Convert clipboard to plain text

Update: Well, what do you I know? It turns out that Andrew, developer of Alfred, has already got this covered and my weak Google-Fu didn’t turn it up: plain text paste in Alfred. So don’t use my version, use his.


I got tired of copying formatted text from a web page, pasting into a text editor, copying again, then pasting into a formatted email to get the clean, default, styling. The Alfred App extension linked below allows you to launch Alfred, type “pt”, hit return and boom anything in your clipboard is plain text.

Download: Convert clipboard to plain text.alfredextension (zip file) (Don’t download, use the method on Andrew’s blog post.)

For those interested, this is was the (very simple) command inside the extension:

pbpaste | textutil -stdin -stdout -convert txt | pbcopy;
echo "Converted to plain text: ";