Benjamin Johnson

  https://www.benjaminjohnson.me Software engineer. Learning every day, one mistake at a time. You can find me online at benjaminjohnson.me.

   



8 Stories by Benjamin Johnson

Refactoring legacy code with Jest snapshots

Snapshot testing is immensely popular for testing React apps or other component-based UIs. However, it’s not exactly drama-free — many people looooove snapshots for their ease...
0 6 min read

3 ways everyone breaks their website’s focus state

No mouse? You’re in serious trouble. Like many things that are incredibly important, accessibility is by no means easy. Not because it’s a mystery or...
0 6 min read

Adding pipelines to JavaScript

Pipelines enable clean chaining of operations, but they’re not quite ready just yet The usage of pipes to transport water, air, gas, or any other...
0 6 min read

What makes ReasonML so great?

What exactly is ReasonML? ReasonML is a syntax extension for the OCaml language created by Facebook. Rather than creating an entirely new language, the...
0 8 min read

How CSS works: Creating layers with z-index

Introduction This post is the third in “How CSS Works” — a series where we dive deep into the fundamental building blocks of CSS that can...
1 5 min read

How CSS works: Understanding the cascade

A few weeks back I got to start a short series on CSS fundamentals. If you’re in the front-end web development space, CSS is...
2 5 min read

Using trampolines to manage large recursive loops in JavaScript

I vividly remember my entrance into the world of functional programming. Ironically, I was learning about class-based JavaScript in ES5. I was assigned some...
3 4 min read

How CSS works: Parsing & painting CSS in the critical rendering path

https://platform.twitter.com/widgets.js CSS often feels like this mysterious, whimsical force governing everything that we see on the web. It can be inherently simple at times,...
3 6 min read