JavaScript

91 articles · all categories

May 2017

Counting web sessions with JavaScript

How many touch points does your sales process require? Do you need 2 ad clicks or 5? Two shiny demos or one fat video? As an engineer, you might not care, but this is the stuff that keeps your CEO and growth lead and head of product up at night. A business owner that can answer that 👆 question reliably is god.

November 2016

How to waste hours of life with fetch() and a bit of brainfart

Both superagent and fetch() enable you to talk to a server. The first produces clean code that gets nesty if you need many things. The second produces clean code that is Promis-y and sometimes cumbersome. The difference between superagent and fetch() isn't that one sends your headers as-given and the other lowercases their names. The difference is that superagent sends a cookie and fetch() doesn't!

September 2016

Livecoding #23: Slackbots and OAuth

Object clone performance: preliminary results

A puzzle in JavaScript objects

This is a puzzle you can run into if you’re not careful, and sometimes, despite your best efforts, even if you are careful. It happened to me when I had a settings object that I passed into a view. The view then did things. When I made a new view from the settings object, it looked like the view I had just cleared.

July 2016

Livecoding #16: canvas.drawImage performance is weird but magical

Livecoding #15: Reaching the limits of canvas redraw speed

March 2016

Animating with React, Redux, and d3

December 2015

Don't Worry; It's a Compiler Bug

November 2015

A day is not 60*60*24 seconds long

Days aren't 60*60*24 seconds long. They are 1 day long, which on most days maps to 60*60*24 = 86400 seconds. But not on all days.

There's a "bug" in ES6 modules

October 2015

React+Flux can do in just 137 lines what jQuery can do in 10

August 2015

React components as jQuery plugins

June 2015

Webpack lazy loading on Rails with CDN support

March 2015

How to wait for DOM elements to show up in modern browsers

January 2015

How to run JavaScript tests in Chrome on Travis

Javascript debugging [slightly] beyond console.log

My favourite tool for javascript debugging is `console.log`. I mean, I love `console.log`. If I ever get a programming tattoo, it's going to be `console.log` or some variation thereof. Simple to use, works every time, and every programming language I've used since I was 9 has had some variation of it.

November 2014

Kids, always remember to clear your intervals

June 2014

My new favourite Javascript trick

Using returns and callbacks in the same function. Sounds like crazy talk I know, but hear me out, I have good reason. I think.

January 2014

Mixing mixpanel into backbone

October 2013

About achieving polymorphism in Javascript

September 2013

Are map, reduce, and filter turing complete?

July 2013

Writing modular Backbone with Backbone.SubRoute

May 2013

Dynamic languages have jumped the shark

Videos from first Javascript meetup in Ljubljana

March 2013

Bring Ruby VCR to Javascript testing with Capybara and puffing-billy

Sexy animated spirographs in 35 sloc of d3.js

January 2013

My very own daily WTF

November 2012

Testing socket.io apps

Cool thing Thursday: alertify.js