Every language is fast

Runtimes
  • 1.8k words
  • 9 mins

Rust is obviously fast. C’s performance is second-to-none. Assembly is probably even faster. But I’ve also heard Node.js described as fast too, while others say none of this even matters because I/O.

Can all these claims be true?

read more

Benchmarking JavaScript is hard

Runtimes
  • 1.2k words
  • 6 mins

Benchmarks try to measure the performance of a bit of code in isolation. Using them in JavaScript can have some pretty misleading results.

To see why, let’s take a closer look at how JavaScript engines work.

read more

Conditional overloads that work when conditional types fail

TypeScript
  • 1.4k words
  • 8 mins

How can we define methods that have different signatures depending on a type parameter?

Let’s take a look!

read more

Exposing utility types

TypeScript
  • 900 words
  • 5 mins

What do you do when you have a bunch of utility types that are closely related to a class or interface? Should you expose them or not?

read more

Fixing type inference in generic rest parameters

TypeScript
  • 700 words
  • 4 mins

It turns out that combining generics with rest arguments is kind of tricky in TypeScript. Let’s see where the normal approach fails and how we can use tuples to fix it!

read more

Scalability is not performance

Architecture
  • 1.4k words
  • 8 mins

Scalability is sometimes confused with performance, but it’s not at all the same thing.

In this post, we’ll take a closer look at what both of those things mean, with the help of a simple model!

read more

Debugging the debugger to inspect pages with code

Web
  • 1.6k words
  • 8 mins

Using the right approach, you can get past the Chrome inspector’s UI and call its internal API directly.

This lets us debug live webpages using JavaScript instead of buttons!

read more

Treating types as values with type-level maps

TypeScript
  • 1.6k words
  • 8 mins

With a shift in perspective, we can view complex type declarations as another kind of code. Code where types are values.

There’s no better example of this than the type-level map. Let’s take a closer look!

read more

iframes and when JavaScript worlds collide

Web
  • 1.5k words
  • 8 mins

Every iframe gets a complete copy of the JS web environment, down to every prototype chain.

Let’s see what horrifying things can happen when we interact with it!

read more

How can you make a synthetic iframe?

Web
  • 1000 words
  • 5 mins

A synthetic iframe is one that doesn’t have web address. It's filled by its parent page instead.

Let’s take a look at every single way you can create one.

read more

What is a DOM node? A peek under the hood

Web
  • 1.1k words
  • 6 mins

What makes an object a DOM node? Is it the prototype or something else?

The answer turns out to be surprisingly complicated!

read more

What is an iframe? An overview

Web
  • 1.3k words
  • 7 mins

Iframes are omnipresent and very useful, yet they're also complicated and confusing.

Let’s take a broad look at how they work.

read more

How many types of script tags are there?

Web
  • 2.0k words
  • 10 mins

There used to be just one type of script tag, but after decades of web standards development, we have tons of them.

Let’s take a look at every single one!

read more