JavaScript

91 articles · all categories

8 articles from 2021 · show all

December 2021

pg-mem and jest for smooth integration testing

The cult of TDD leads you down a dark and stormy path towards brittle code with a false sense of security. But there is a better way. A sweet spot between unit and heavy integration.

Why null checks are bad

Every null or undefined check doubles the number of tests you need 😱

Small choices can wreck your codebase

wanna see the strangest looping construct I've found in production code?

November 2021

Finding unresolved promises in JavaScript

JavaScript is a fantastic server-side language because it's async. That also makes it tricky. 💩 What happens when you swallow errors? Forget to resolve promises? Or run into a number of other anti-patterns

October 2021

Learn TypeScript in 5 minutes

TypeScript solves many of JavaScript's sharpest edges. You don't need much to get started ✌️

September 2021

Stop SHOUTING = 'shouting'

A hill I will die on 👉 global CONSTANT = 'constant' are bad

June 2021

A surprising feature of JavaScript optional chaining

This blew my mind, thought you'd like it too. You can do more with ?. than you thought.

April 2021

2 quick tips for 250% better Lighthouse scores – CodeWithSwiz 28

Your site may be fast for users, but Google don't care. Official metrics or bust.