TLDR Web Dev

TLDR WEB DEV 2024-08-20

5 sections18 entrieslinks blockcomplete parse

Parse notes

  • Subscription/account footer truncated before parsefooter_truncated

01ARTICLES & TUTORIALS

STRIPE'S MONOREPO DEVELOPER ENVIRONMENT

The developer environment at Stripe has tools and infrastructure built to support a large Ruby monorepo. Code is run on cloud-based devboxes instead of local machines. The company's team team invested heavily in automated code synchronization and a unified command-line tool called "pay" to manage devbox interactions. This post discusses the importance of organizational scale and codebase characteristics in shaping the design and success of the developer tooling.

blog.nelhage.com20 min read

AN APPROACH TO OPTIMIZING TYPESCRIPT TYPE CHECKING PERFORMANCE

You can optimize TypeScript's type-checking performance by first diagnosing inefficiencies using tools like --extendedDiagnostics, --generateTrace, and benchmarking libraries. You should iteratively test hypotheses by grouping related operators and refining overload order.

edgedb.com16 min read

PARSING PROTOBUF AT 2+GB/S: HOW I LEARNED TO LOVE TAIL CALLS IN C

This blog post discusses a novel technique for optimizing interpreter loops and protobuf parsing using tail calls in C. The author discovered that by utilizing the `[[clang::musttail]]` attribute, they got a huge performance boost, achieving protobuf parsing speeds exceeding 2 GB/s. The key benefit of tail calls is the elimination of function call overhead, resulting in more efficient control flow and reduced stack usage.

blog.reverberate.org16 min read

02OPINIONS & ADVICE

GOOD REFACTORING VS BAD REFACTORING

Good code refactoring is incremental and preserves functionality while avoiding any new unnecessary complexity. Bad refactoring practices include drastic style changes, unnecessary abstractions, inconsistency in code patterns, refactoring without fully understanding the existing code, and ignoring the business context.

builder.io12 min read

TIPS FROM 8 MONTHS OF TANSTACK/ROUTER IN PRODUCTION

After using TanStack Router in production for eight months, this author believes in organizing code into vertical modules, using loaders for page-level data and suspense queries for component-specific data, and avoiding premature code generalization. He promotes a “go gardening approach” that involves abstracting code only when clear patterns show up.

swizec.com5 min read

TYPES -> SETS

You can think about TypeScript's type system as a functional programming language that operates over sets of values. By imagining types as sets of all possible values they can construct, it becomes easier to reason about features like intersections, unions, and type mappings.

rob.directory8 min read

03LAUNCHES & TOOLS

SRCBOOK

Srcbook allows developers to create TypeScript and JavaScript notebooks to prototype quickly. These notebooks can run code locally with a web interface, export to Markdown, and be shared easily.

github.comGitHub repository

PARALLEL DOM

The parallel-dom npm package offloads heavy DOM operations to parallel iframes for faster rendering. It supports both plain JavaScript and React.

github.comGitHub repository

PRAGTICAL

Pragtical is a lightweight, highly extensible cross-platform text editor that prioritizes performance, ease of use, and open-source principles.

pragtical.devTool

04MISCELLANEOUS

ECMASCRIPT SAFE ASSIGNMENT OPERATOR PROPOSAL

This proposal introduces the ?= operator, which makes error handling easier by transforming function results into a [error, result] tuple. It also supports recursive handling of promises and objects implementing Symbol.result, making error checking streamlined across various JavaScript APIs.

github.com9 min read

LLMS KNOW MORE THAN WHAT THEY SAY

An approach called Latent Space Readout (LSR) can improve the accuracy of AI application evals. LSR uses interpretability research by projecting evaluation model activations onto meaningful linear directions, which makes it more sample efficient than fine-tuning. This means that much less human feedback is required for these evals to be more accurate.

arjunbansal.substack.com11 min read

THE GIGANTIC AND UNREGULATED POWER PLANTS IN THE CLOUD

There's a dangerous lack of regulation for cloud-based management platforms controlling millions of solar panels across Europe. These platforms, mostly run by companies outside of Europe, have the power to shut down vast amounts of power, potentially causing grid collapse. While individual solar panels pose little threat, their concentrated control creates a huge risk, especially due to recent hacking attempts.

berthub.eu12 min read