Babel Plugin to Add Function Names  

Have you ever been working with those sweet new ES6 arrow functions, run into a problem, and noticed that now your stack trace is all anonymous functions? Yeah, that's not so great. That's why this Babel plugin is so useful. You can add names to your ES6 arrow functions, and it makes debugging a lot more simple.

Sponsored Posts  

We do advertising here on CSS-Tricks! We like it. It's part of the wheel of life on the web. Products and services co-existing with publishers in a global ecosystem, where everyone focuses on what they are good at.

We actually try to make advertising better here. Nothing obtrusive, no garbage products or services, no tracking, sponsors are marked as such. Besides allowing us to sleep at night, it makes the advertising more effective.

One of the most effective types of advertising here is sponsored posts. I can work with you directly on the post to help get at the heart of how your product or service could benefit us front end developers and designers around here. You should book one.

Trusting SSL Locally on a Mac

I run most of my production sites with forced SSL, including CSS-Tricks. But locally, I've avoided getting SSL working properly. I've always avoided it, perhaps because it's not immediately obvious how to do it. It's also not that big of a deal since it's just local traffic. But hey, might as well make local work as close to production is possible eh?

(more…)

What the heck is the event loop anyway?  

In 2014, Philip Roberts gave a great talk at JSConf EU, walking through the event loop and breaking down what JavaScript is doing under the hood for those of us without CS degrees. I came across this talk the other day in my Twitter stream, and really enjoyed it. Even though it's a couple years old, it has stood the test of time and remains a great resource.

How To Use WebPageTest and its API

While the richness and interactivity of the average website has changed dramatically over the last decade, the same can be said about the expectations of those who consume it. This page has a list of reports that show how businesses were able to establish a direct correlation between the their website's performance and conversion/revenue figures. For example, the engineering team at the Financial Times conducted a test which showed that an increase of just one second in load time caused a 4.9% drop in article views.

The underlying cause is pretty simple and it affects projects of all sizes (yep, including yours): users are becoming more demanding, less patient and not tolerant towards slow websites or applications. If your content takes too long to load, people will go somewhere else. Visiting a site that takes ages to open and navigate is a terrible user experience, especially on the dominant mobile environment where immediacy is crucial and battery life is precious.

For that reason, website performance optimisation plays an increasingly important role in the success of any online property. All major browsers ship with tools that allow developers to keep an eye on some important performance metrics as the build progresses, but these are measured from the developer’s own standpoint, which is not enough to see the full picture.

Factors like geographic location, connection type, device, browser vendor or operating system can heavily influence perceived load times, so testing all these variables is the only way to get a (mildly) accurate representation of how a website is experienced by a broader audience.

There are various tools and services to approach that problem, but this article will focus specifically on WebPageTest. We will look at it from a developer’s perspective, in particular at using its RESTful API to extract vital information you can use to optimise the performance of your site.

(more…)

#149: A Quick Intro to Pattern Lab Node with Brian Muenzenmeyer

In this screencast I pair up with Brian Muenzenmeyer who, among other things, works on Pattern Lab. Specifically, the Node version of Pattern Lab, along with Geoff Pursell.

I should point out: this screencast barely scratched the surface of what Pattern Lab offers. It's not a comprehensive overview. Brian said a recent 8 hour workshop couldn't even cover it all. The topics covered in this screencast are:

  1. What is Pattern Lab?
  2. Why would I use it?
  3. Getting it
Watch Video →

We have a pretty good* newsletter.