Refactor switch statements to reduce cyclomatic complexity

The concept of cyclomatic complexity is pretty new to me, and when faced with JSHint errors regarding it in the past I've been mostly likely to take the easy way out and skipped over the problem by bumping the maximum complexity. But when faced with a complex switch statement used to add support for directives to Stylperjade 1.2 I decided to solve the problem properly by using a hash table instead.

 Read more of Refactor switch statements to reduce cyclomatic complexity

Authoring critical above-the-fold CSS

Google PageSpeed Insights and my web pages; it was a match made in heaven, until things changed... PageSpeed started telling me I needed to optimise my CSS delivery, that my CSS files were render-blocking, that none of the above-the-fold content of my page could render without waiting for those files to load, and that I should in-line the critical portions of those files directly into my HTML.

 Read more of Authoring critical above-the-fold CSS



Phases (and Mesophases) - a possible addendum to Atomic Design

This Monday I had the absolute pleasure of attending Brad Frost's Reasons to be Responsive workshop (Recap by Jake Ryan). Among the 8 'awesome' hours of RWD gold, Brad introduced us to Atomic Design, a modular approach to responsive design and development, and his brand new tool Pattern Lab for forging websites using the Atomic Design approach.

 Read more of Phases (and Mesophases) - a possible addendum to Atomic Design