最新文章

今日新增 424 篇 · 共 7,447 篇 · 来自 241 个博客

Lea Verou··Lea Verou

Contrast Ratio has a new home — and this is great news!

AI 摘要The author launched contrast-ratio.com over a decade ago as a tool to calculate WCAG 2.1 contrast ratios between CSS colors, addressing flaws in existing tools such as lack of support for semi-transparent colors and non-hex color formats. The site became widely popular, but the author has been too busy with other projects to actively maintain it. Siege Media has now purchased the domain and committed to maintaining the open source project, which the author believes ensures a much brighter future for the tool.

Baby Steps·

Must move types

AI 摘要The author explores the idea of adding 'must move' types to Rust, observing that while the language has many mechanisms to prevent bad practices, it currently has no mechanisms that force good ones. Although they have long resisted this idea because it would add fundamental complexity to the language, they are increasingly encountering problems it could help solve. They aim to sketch what such a feature might look like so the community can better judge whether it is worthwhile.

Ethan Marcotte··Ethan Marcotte

Tooled.

AI 摘要The article examines the rapid rise of generative AI tools like Copilot, ChatGPT, and GPT-4 through the lens of 'deskilling,' the longstanding labor economics concept describing how technology reduces demand for skilled workers and can lower wages or eliminate jobs. The author cites real-world examples—including developers shifting to code review, clients demanding cheaper AI-assisted rewriting, and CNET and Stripe replacing human writing and review with AI—alongside mass tech layoffs, such as Microsoft cutting 10,000 workers days before announcing a $10 billion OpenAI investment. While acknowledging the technical impressiveness and potential of these tools, the author argues that creative workers are already losing jobs to AI and urges readers to question whose benefits and costs these technologies actually serve.

React Blog··Dan Abramov and Rachel Nabors

Introducing react.dev

Today we are thrilled to launch react.dev, the new home for React and its documentation. In this post, we would like to give you a tour of the new site.

Without Boats·

Const as an auto trait

AI 摘要This article is part of a series on Rust language design, but unlike previous posts that explored high-level concepts like language registers and when to form abstractions, this one focuses entirely on technical details. It discusses the idea of 'const' as an auto trait, using content that was cut from the previous post so that post could stay focused on its broader argument.

Baby Steps·

Temporary lifetimes

AI 摘要The Rust lang team design meeting reviewed the author's document on temporary lifetimes, whose current rules date back to a 2014 blog post. Almost a decade later, these rules have rough edges that are a common source of bugs, and the Rust 2024 Edition provides a chance to address them. The document, which is not a proposal, discusses what works well and what doesn't, along with a few sketchy ideas for improvement.

Ethan Marcotte··Ethan Marcotte

Adoption.

AI 摘要The author argues that 'adoption' is a flawed primary metric for design system success precisely because it's one of the few things design systems can easily measure, even though it's fuzzy and opaque. Focusing solely on adoption obscures more critical questions—such as how effectively teams use components, how well system-built pages perform, and how satisfied users are—while encouraging organizations to treat design systems like mere library maintenance. The author doesn't dismiss measuring adoption altogether, but warns that if it's the only success metric being tracked, that itself may signal deeper challenges.

Lil'Log·

Prompt Engineering

AI 摘要Prompt Engineering, also known as In-Context Prompting, refers to methods for communicating with LLMs to steer their behavior toward desired outcomes without updating model weights. Since it is an empirical science, the effectiveness of these methods varies considerably across models, requiring heavy experimentation and heuristics. The article focuses on prompt engineering for autoregressive language models, with the core goals being alignment and model steerability.

Without Boats·

Patterns & Abstractions

AI 摘要This post, the second in a series on async Rust design in 2023, discusses 'keyword generics,' a proposal to introduce a new kind of abstraction in Rust that would allow types to be abstracted over certain effects such as async, const, and try. The author draws on two blog posts by the Rust design team as reference points and observes that the effects considered by the keyword generics working group overlap with, but are not identical to, the effects identified in the author's previous post.

Baby Steps·

To async trait or just to trait

AI 摘要The article examines whether traits containing async functions should be explicitly labeled as 'async traits' as opposed to ordinary sync traits. While the author initially saw no need for the distinction and later considered potential advantages for supporting 'maybe async' code, further reflection led them to conclude that introducing this distinction should not be done, at least for now.

Svelte Blog·

Zero-effort type safety

AI 摘要SvelteKit now offers 'zero-effort type safety,' where the framework automatically infers and injects types for load functions, route parameters, and data props based on its file-system routing conventions, eliminating the need for explicit annotations. This works through changes to the Svelte language server and TypeScript plugin, which auto-insert the generated types from virtual $types.d.ts files, and is available via the latest Svelte VS Code extension, other LSP-compatible editors, and svelte-check 3.1.1+. Beyond convenience, the feature improves correctness by preventing mix-ups between similar event types, and the team plans to extend type safety to areas like links in the future.

Without Boats·

The registers of Rust

AI 摘要A former Rust contributor reflects on the project's direction nearly two and a half years after stepping back, expressing both excitement about recent releases and apprehension about some choices the project has made. They welcome Niko's recent emphasis on stability and polish over grand new projects, and frame this post as the first in an upcoming series of thoughts on Rust's design in 2023, especially regarding async.

Marc Brooker·

False Sharing versus Perfect Placement

AI 摘要This article, part of a series on database scalability, examines 'false sharing'—the problem where evenly or randomly sharded databases get unlucky and place multiple hot keys on the same shard, making some shards hotter than ideal. Simulations with uniform and Zipf-distributed keys show random sharding can produce shard loads far above the ideal (e.g., nearly 80% of traffic on the hottest of two shards), and while larger databases slowly dilute the effect, size never fully solves the problem. The effect applies beyond databases to any sharded system such as microservices, queues, or network paths, and temporal locality of recently-created keys under range-based sharding can make shard heat imbalances even worse.

Josh W. Comeau··Josh W. Comeau

Common Beginner Mistakes with React

AI 摘要Drawing on experience teaching React at a coding bootcamp, the author identifies nine common pitfalls that consistently trip up beginners. The article walks through each of these gotchas and demonstrates how to solve them, aiming to spare new React developers from unnecessary frustration.

Lara Hogan·

Recognition and rewards at work

AI 摘要The article argues that recognition—whether intentional or accidental—acts as a reward that reinforces workplace behaviors, based on the principle 'what we recognize is what we reward.' The author advises leaders to map out all the public and private ways their organization acknowledges teams and individuals, identify gaps and unintended signals (like promoting infrastructure work over product work), and then deliberately use recognition to encourage the behaviors they want to see. Leaders should also praise what people do rather than fixed traits, since effort-based recognition signals behaviors that others can learn and replicate.