TLDR Web Dev 2024-05-14

Fixing a bad codebase πŸ› οΈ, GPT-4o released πŸ€–, the Haskell cult πŸ§‘β€πŸ’»οΈ

πŸ§‘β€πŸ’»
Articles & Tutorials

Why React Query? (15 minute read)

React Query is both a data fetcher and an asynchronous state manager designed for handling server state. Unlike client state (managed with useState or useReducer), server state is often asynchronous, persistent, and can be modified by multiple users. React Query abstracts common complexities like cache management, invalidation, and refetching, allowing developers to focus on building their applications without getting bogged down in the complex, nitty-gritty details of data fetching.

Why Patching Globals Is Harmful (20 minute read)

Patching globals, or modifying existing APIs in a language, can lead to maintenance issues, unpredictable behavior due to conflicting implementations, vendor lock-in, and even slow down the progress of the language itself. These issues arise because patched globals are essentially modifications to code that you don't own, making them difficult to manage and predict. There are often better, more explicit solutions to API design challenges that avoid these issues.
🧠
Opinions & Advice

How to salvage a "microservice" system built the wrong way (Reddit Thread)

This author is part of a team that built microservices the β€œwrong way” where everything depends on everything else and thus it's too difficult to make architectural changes. Commenters give their recommendations, such as collapsing the system to an actual monolith if possible and turning remote calls to local calls.

Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code? (Hacker News Thread)

Founders share how they manage code for their free and paid SaaS products. Many products use a plug-in architecture, while others have separate codebases for the open-source product versus the paid product.

At some point, JavaScript got good (7 minute read)

JavaScript has changed a lot since 2015, especially thanks to improvements in the ECMAScript specification. Early JavaScript was difficult to work with due to issues like function-scoped variables and callback hell. Modern JavaScript has introduced features like block-scoped variables, arrow functions, promises, and async/await, which makes development much better. Tooling has also gotten better.
πŸš€
Launches & Tools

Graphql-request (GitHub Repo)

Graphql-request is a minimal GraphQL client that supports both Node and browsers for scripts and simple apps. It has a Promise-based API and first-class TypeScript support.

Hello GPT-4o (8 minute read)

OpenAI has released GPT-4o, an AI model that can reason across audio, vision, and text in real time. Developers can access the GPT-4o API as a text and vision model. It's 2x faster, half the price, and has 5x higher rate limits compared to GPT-4 Turbo.

Pintora (GitHub Repo)

Pintora is an extensible JavaScript text-to-diagrams library that works in both browsers and Node.js.
🎁
Miscellaneous

Inside the Cult of the Haskell Programmer (4 minute read)

Haskell is a functional programming language with elegant syntax but a steep learning curve. Although not widely adopted for practical programming, Haskell has influenced modern programming languages, with many incorporating its concepts to improve bug prevention, code correctness, and parallel processing capabilities.

Binary Search Vs. Prolly Search (7 minute read)

Binary Search is a common search algorithm with logarithmic time complexity, often used on sorted data. Prolly Search is a faster alternative that leverages the uniform distribution of data to make more intelligent guesses than simply dividing the set in half with each iteration. However, Prolly Search is not always applicable because it relies on the assumption of uniform data distribution, and it can regress to linear time complexity in certain cases.

GPUs Go Brrr (26 minute read)

These authors, from Stanford University, focused on optimizing AI's compute usage and developed ThunderKittens, a DSL embedded in CUDA, to write efficient kernels. ThunderKittens simplifies the process of utilizing hardware features like the Tensor Memory Accelerator (TMA) and warp group matrix multiply accumulate (WGMMA) instructions, leading to significant performance improvements in Flash Attention and Based linear attention kernels.
⚑️
Quick Links

Amazon S3 will no longer charge for several HTTP error codes (1 minute read)

Amazon S3 is changing its billing policy so that bucket owners will no longer be charged for unauthorized requests that return a 403 (Access Denied) error and other codes.

Apple and Google deliver support for unwanted tracking alerts in iOS and Android (1 minute read)

Apple and Google have partnered to create a specification for Bluetooth tracking devices that will send alerts to both iOS and Android users if an unknown tracker is detected moving with them.

Colorang! A (slightly) New Way To Visualize RGBA Color (4 minute read)

A color picker that linearly blends RGBA color to a gray value that you can specify on a slider.
Get our free, 5-minute newsletter read by 350,000 frontend, backend, and full stack developers
Join 300,000 readers for