TLDR Web Dev 2024-02-21

How ChatGPT scaled 🚀, $14k GCP charge in two hours 🛑, web UIs in Python ⚡️

Articles & Tutorials

Bloom Filters (12 minute read)

Bloom Filters are a probabilistic data structures useful for checking membership in a set with efficient space usage. They store information using bits and hash functions and offer fast membership checks. They can give false positives (claiming an item exists when it doesn't), but they never give false negatives (missing an item that exists). In the real world, Bloom filters are commonly used for caching and distributed databases.

Modern client-side routing: the Navigation API (16 minute read)

SPAs (Single Page Applications) are defined by a core feature: they dynamically rewrite their content as users interact with them instead of the default method of loading entirely new pages from the server. SPAs are able to provide this feature via the History API, a clunky API developed long before SPAs were the norm. The Navigation API is a newly proposed API that completely overhauls this space that promises to be easier to adapt. This page describes the Navigation API at a high level with code examples on popular usages.

Scaling ChatGPT: Five Real-World Engineering Challenges (21 minute read)

100 million people were using ChatGPT weekly by November 2023. Scaling ChatGPT to such a large user base was not an easy feat. OpenAI faced a few key challenges when scaling: managing GPU RAM, avoiding cache misses, finding the right batch size, measuring the right metrics, and handling a shortage of GPUs. The company found that taking a system-wide approach to optimization and being adaptable in the face of changing constraints allowed it to scale efficiently. Many of the lessons learned are applicable to general software systems.
Opinions & Advice

In defense of simple architectures (9 minute read)

Simple architectures can be surprisingly effective, even for large-scale applications. For example, Wave is a $1.7B fintech company with a CRUD app built on a Python monolith and Postgres database. The benefits of this simple architecture include lower cost, easier maintenance, and faster development. There are some areas where complexity is unavoidable, such as telecom integrations. Simple architectures are a good choice for many businesses, especially those that are not ad-supported or businesses without high traffic levels.

Planner programming blows my mind (7 minute read)

Picat is a research language that combines logic programming, imperative programming, and constraint solving. “Planning" in Picat is when the program finds variable mutations to reach a desired end state. Instead of defining algorithms, Picat defines starting states, actions, and final states, allowing the program to find solutions through mutations. Planning helps minimize cost and is best used for applications in AI, robotics, and video games.

Coding interviews are effective (2 minute read)

Coding interviews are effective for companies despite their limitations because they help minimize the risk of hiring bad candidates. While there are downsides to coding interviews, like pressure and filtering out good candidates who don't perform well, they can be useful for assessing a candidate's problem-solving skills and their potential as a future teammate. Automated assessments aren’t as reliable as they lack human interaction and can’t always catch cheating.
Launches & Tools

Dax (GitHub Repo)

Dax is a collection of cross-platform shell tools for Deno and Node.js. It allows users to export the shell’s environment to the current process. Dax has support for a global configuration. It brings extra features to Windows that are natively available on Unix-based systems.

Hyperdiv (GitHub Repo)

Hyperdiv is a Python framework for developing reactive browser UI apps. It features built-in components, terse immediate-mode syntax, and minimal tool boilerplate. Hyperdiv supports Markdown, charts, styled web components, local storage, and forms.

Valve Makes All Steam Audio SDK Source Code Available Under Apache 2.0 License (1 minute read)

Valve has made the Steam Audio SDK fully open-source, with plug-ins included. Steam Audio is an immersive audio solution for games and VR. It has real-time sound propagation, VR integration, and 3D audio capabilities. There are plug-ins to make it compatible with Unity, Unreal Engine, and other game engines.

SSDs Have Become Ridiculously Fast, Except in the Cloud (4 minute read)

Cloud storage performance lags far behind the advancements in SSD technology. Major cloud vendors are offering read/write speeds 10x slower than high-end SSDs available on the market. The reasons for this big difference are unclear but could be due to concerns about SSD durability, lack of demand, or potential disruption to existing cloud storage services.

You should be playing with GPTs at work (11 minute read)

This article provides twenty examples of how people are using custom GPTs in the workplace to make their teams more productive. It walks through how to create a custom GPT and demonstrates some interesting real-world use cases, such as figuring out internal ownership and technical dependencies, learning from past user research studies, and grading the relevance of search results.

Adding Keyboard Shortcuts to a 24 Year Old Government Website with Userscripts (7 minute read)

This author spent a year cleaning medical device data from the FDA's 510k database website. The website's interface was outdated and lacked functionalities like fuzzy search and keyboard shortcuts. To save time and improve their workflow, the author wrote userscripts to automate repetitive actions by adding shortcuts for opening search, focusing on search input, and copying device ID.
Quick Links

Warning: $14,000 BigQuery Charge in 2 Hours (3 minute read)

Someone ran a script on BigQuery for historical HTTP Archive data and racked up a $14,000 bill for accessing 2.5 petabytes of data.

Why is Prettier rock solid? (1 minute read)

Prettier, a code formatter, never breaks JavaScript/TypeScript code during formatting. This durability comes from its use of prior research by a prominent Haskell developer.

Node.js Community Debate Intensifies Over Enabling Corepack by Default and Potentially Unbundling npm (10 minute read)

Node developers are wrestling with the decision to enable Corepack (a tool for managing package managers that lets you use npm/yarn/pnpm without having to install them) by default. This has sparked a debate about the possibility of even removing npm from the Node.js binary.

Ask HN: How many of you Apple developers still use Objective C? (Hacker News Thread)

Various iOS and macOS developers chime in on the value of Objective C. Many believe it’s still useful to know Objective C even if their apps are primarily written in Swift.
Get our free, 5-minute newsletter read by 350,000 frontend, backend, and full stack developers
Join 300,000 readers for