TLDR Web Dev

TLDR WEB DEV 2024-05-14

5 sections15 entrieslinks blockcomplete parse

Parse notes

  • Subscription/account footer truncated before parsefooter_truncated

01ARTICLES & TUTORIALS

WHY REACT QUERY?

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.

ui.dev15 min read

WHY PATCHING GLOBALS IS HARMFUL

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.

kettanaito.com20 min read

02OPINIONS & 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.

bit.ly

AT SOME POINT, JAVASCRIPT GOT GOOD

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.

jonbeebe.net7 min read

03LAUNCHES & TOOLS

Sponsored

🆕 SUPABASE + SENTRY

If you're building on Supabase, the new Sentry integration [9] is a powerful way to find slow queries and errors in your database. Join Thorsten from Supabase and Lazar from Sentry for a live developer workshop [9], where they'll demo the integration on a Next.js project. Sign up for the session this Thursday! [9]

sentry.ioSponsor

HELLO GPT-4O

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.

bit.ly8 min read

GRAPHQL-REQUEST

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.

github.comGitHub repository

PINTORA

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

github.comGitHub repository

04MISCELLANEOUS

INSIDE THE CULT OF THE HASKELL PROGRAMMER

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.

wired.com4 min read

BINARY SEARCH VS. PROLLY SEARCH

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.

dolthub.com7 min read

GPUS GO BRRR

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.

hazyresearch.stanford.edu26 min read