Working with regular expressions written by others is difficult. This article covers techniques that can help you set up your coworkers for success when they encounter your work in the future.

We’ve been refactoring code to handle new regions, and while working on a class that handles phone number behaviour I was reminded of some nuances of regular expressions.


Naming based on the visual appearance can be tempting when working with regular expressions:

const numberStartingWithFourFour = /^\+?44/;

Instead, name things based on their intent and context. …

Templates make up 60% of your Ember app. Now what?

Heads up, we’ve moved! If you’d like to continue keeping up with the latest technical content from Square please visit us at our new home

Update: Ember’s base performance has improved a lot since this article was first published! Ember 2.10 shipped with a new rendering engine that makes some of these optimizations unnecessary. If you’re working on an older app, 2.9 or less, keep reading!

When source code goes through a compiler or transpiler, it’s easy to create a disconnect between the perceived weight of a piece of…

Terrill Dent

Creator. Engineer at Square. Web/Server developer. Passion for elegant code, JavaScript, good design, security, and economics.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store