TLDR Web Dev

TLDR WEB DEV 2024-09-18

5 sections16 entrieslinks blockcomplete parse

Parse notes

  • Subscription/account footer truncated before parsefooter_truncated

01ARTICLES & TUTORIALS

YES, YOU SHOULD USE SQLITE: NOTION'S CREATIVE SQLITE USAGE FOR 20% FASTER LOADS

Notion implemented WebAssembly (WASM) SQLite in its web app. This resulted in a 20% reduction in page navigation latency. To achieve this, its team used Web Workers to offload database operations to background threads and a SharedWorker with the Web Locks API to fix data integrity issues. They also addressed issues of slow disk reads by implementing a "race" between disk cache and network requests.

stacksweep.substack.com6 min read

HOW INFINITE QUERIES WORK

Infinite queries in React Query, often used in paginated lists or infinite scrolls, allow for continuous data fetching. A bug found in this feature caused queries to restart from the beginning if a page fetch fails during a retry. This article explains how infinite queries work in order to explain how the bug happened, along with the fix, which involves modifying the infinite query behavior to retain the state of the loop, preventing it from restarting from the beginning during retries.

tkdodo.eu5 min read

02OPINIONS & ADVICE

A DIFFERENT WAY TO THINK ABOUT TYPESCRIPT

This post proposes a new way to understand TypeScript's type system. It suggests thinking of types as sets of possible values they can construct. This means a string type represents the infinite set of all possible character permutations, and a number type represents the infinite set of all possible digit permutations. TypeScript's features like intersection, union, and type introspection can be understood as operations on these sets.

rob.directory13 min read

CORRELATION DOES NOT IMPLY CAUSATION

Simply because two variables move together doesn't mean one directly influences the other. For example, ice cream sales and sunburn rates correlate, but the actual cause is a third variable: temperature. The same applies when making decisions in engineering teams: charts can be helpful, but they shouldn't be taken as the sole representation of reality, as the real world is far more complex.

read.perspectiveship.com4 min read

BEING AN ENGINEERING MANAGER AT AMAZON

This engineering manager learned three things from his time at Amazon: solve problems through mechanisms, communicate with precision, and give teams full autonomy. He misses the deep technical talks at Amazon but doesn't miss the inconsistent management culture before Andy Jassy's leadership changes.

open.substack.com6 min read

03LAUNCHES & TOOLS

YAZI

Yazi is a terminal file manager written in Rust, based on non-blocking async I/O. It offers features including built-in image support, code highlighting, a plugin system, and integration with popular command-line tools.

github.comGitHub repository

ESLINT-PLUGIN-DEPEND

An ESLint plugin for suggesting optimizations in choice of dependencies, native equivalents, and more. It detects dependency tree bloat and redundant polyfills.

github.comGitHub repository

04MISCELLANEOUS

THE FIRST RULE OF MACHINE LEARNING: START WITHOUT MACHINE LEARNING

The first rule of machine learning is to start without it. It's best to initially tackle problems using simpler methods like heuristics and rules. This approach provides a baseline understanding of the data and problem and can even outperform machine learning models in certain cases.

eugeneyan.com8 min read

THE PRAGMATIC ENGINEER: THREE YEARS

The Pragmatic Engineer newsletter, started by ex-Uber engineer/manager Gergely Orosz, is now three years old. Looking ahead, Orosz will continue his deep dives into interesting tech companies and technologies. The Pragmatic Engineer podcast will also launch next week, featuring interviews with experienced engineers and tech professionals.

newsletter.pragmaticengineer.com17 min read