Links list - 2024-03-30

Hello, and welcome to a new post of Links lists! I hope you will find today’s links interesting.

How large is your website?

Unsurprisingly, it turns out that many websites are stupidly bloated and large. This is thanks to the ridiculous amount of advertisement, tracking, and all other bullshit that we need to endure in exchange for having tons of content for free. If only the content you pay for didn’t have these sorts of things…

Terrifying example: opening LinkedIn makes you download 31 MB of stuff!

JavaScript Bloat in 2024

What is the average size of JavaScript code downloaded per website? Fuck around and find out!

Java GC at Netflix scale

Interesting article from the fantastic Netflix tech blog about the modern Java GCs from Java 21 and their effects on pauses, efficiency, and latency.

Bending Pause Times to Your Will With Generational ZGC

The surprising and not so surprising benefits of generations in the Z Garbage Collector.

Sharding Figma’s database

Figma is another company with a great tech blob. In one of the latest posts, they talk about how they implemented horizontal sharding of databases. Interesting approach, and well written article.

How Figma’s Databases Team Lived to Tell the Scale | Figma Blog

Our nine month journey to horizontally shard Figma’s Postgres stack, and the key to unlocking (nearly) infinite scalability.

Trying to polyfill globalThis in JavaScript

Some things in JavaScript are a bit crazy. globalThis is one of those - nowadays it is natively supported more or less everywhere, but trying to polyfill it is not trivial. This is a fun article with a lot of details.

A Horrifying GlobalThis Polyfill in Universal JavaScript · Mathias Bynens

The globalThis proposal introduces a unified mechanism to access the global this in any JavaScript environment. It sounds like a simple thing to polyfill, but it turns out it’s pretty hard to get right. I didn’t even think it was possible until Toon blew my mind with an unexpected, creative solution.

Avoiding primitive obsession in Go

A nice article from the super smart Matteo Vaccari about something I blogged about before: the many benefits of wrapping primitives in their own tiny wrapper types.

Avoid Primitive Obsession in Go

Primitive Obsession is a code smell. Consider this code: type User struct { FirstName string LastName string Email string } We’re using the type string everywhere. If we wanted a function to create a new user, its signature would be obtuse: func NewUser(first, last, email string) User { … } It’s easy to get confused and swap first and last name, or worse. The smell is called “primitive obsession” because we tend to use primitive types such as strings or integers for everything.

Another crazy interview

Yet another super fun satire about a technical interview. This time it is about solving fizz-buzz with Tensorflow. Enjoy! 😂

Joel Grus – Fizz Buzz in Tensorflow

Posts and writings by Joel Grus