• Configuring automated WordPress PHP coding standards fixing with tooling and Sublime Text

    Let’s face it we all start of with the best of intentions, but ensuring your PHP code confirms precisely to a given code standard is hard. It just isn’t what humans are good at. We miss semi-commas, we forget those pesky spaces between parens. What is worse is that all of the fixes to these tiny style … Continued

  • Automattic’s interview process – getting hired as a Code/JavaScript Wrangler at Automattic

    As I recently posted, I’m joining (or if you’re reading this after Nov 12th 2018 – have joined) Automattic as a JavaScript Engineer. For those who don’t know, Automattic (abbreviated to A8c for the remainder of this article) is a fully distributed company, meaning it’s employees work remotely from all over the world. As a … Continued

  • Joining Automattic

    I’m excited to announce that as of November 12th 2018, I will be joining Automattic – the company behind WordPress.com, Akismet and more – as a JavaScript Engineer. This is the culmination of a 3 year journey to focus more deeply on JavaScript, and my new role provides me with the opportunity to work in … Continued

  • What is the JavaScript Event Loop?

    If you’ve been working on significant JavaScript applications for a while, you’ve likely heard engineers using terms like “non-blocking”, “single threaded” and “the event loop”. If you’re anything like me, for a long time I had only a superficial understanding of what those terms meant and even less of an idea how JavaScript worked under … Continued

  • What is a closure in JavaScript?

    If you are working with JavaScript it is critical that you understand the definition of a closure. Closures are widely employed in JavaScript code, for example: as callback functions for information hiding in currying or partial application As a result, without a firm grasp of how closures work you will struggle to produce high quality … Continued

  • Demystifying JavaScript Function Expressions vs Declarations

    I was recently asked to explain the difference between a JavaScript function expression and a function declaration. This one always caught me out until I created a mental model to allow me to understand it. Firstly though, let’s clear up which is which: A function expression looks like this var expressYourself = function() { // … Continued

  • Introducing FetchPjax – PJAX (PushState + Ajax) navigation functionality using the native Fetch API

    For the past couple of weeks I’ve been working on a new JavaScript library to handle PJAX using the native Fetch API that’s build right into modern browsers. As a result of these efforts I’m pleased to announce the release of FetchPjax. TDLR; you can grab fetch-pjax on npm or view the source on Github. What is … Continued

  • A brief intro to Redux

    Recently I’ve been learning a lot about React and it’s associated ecosystem. If you have any awareness of React, you’ll probably be aware that it’s primarily concerned with the View layer. As a result, if you’re looking to build anything beyond the most simple application you’ll need a (sane) way to manage state. One solution to this … Continued

  • Animating CSS text alignment

    This week, a colleague of mine asked whether it was possible to animate the CSS text-align property using CSS transitions. My immediate response was of course “no!”, but despite having said that I had a nagging suspicion it was in fact achievable in some (as yet unknown) way. Given that the animation was fairly critical to … Continued

  • SVG Transitions not working in IE11

    I’ve recently been working a lot with animating SVG graphics. In order to do this I’ve been using CSS3 Animations. By inlining SVGs directly in my HTML document, I simply use CSS to target SVG nodes and apply @keyframe animations as required. This technique has worked well across all my target platforms with one exception – Internet Explorer 11. … Continued