Programming · Latest articles

29 new today · 2,701 articles · from 79 blogs

Marc Brooker·

Atomic Commitment: The Unscalability Protocol

AI summaryThe article explains why atomic commitment (typically solved by two-phase commit) makes sharded transactional databases surprisingly hard to scale: maximum throughput equals the sum of per-node capacities divided by k, the mean number of shards each transaction touches, and with uniformly distributed keys and transactions touching multiple rows, adding shards yields almost no throughput gain. Concurrency makes things worse, since two transactions contending for the same shards under near-capacity load can both fail, causing goodput to drop as shards are added. Because scale-out depends on avoiding coordination while atomic commitment is inherently a coordination protocol, the author concludes it is 'the anti-scalability protocol.'

Lea Verou··Lea Verou

State of CSS 2022 now open!

AI summaryThe State of CSS 2022 survey is now open, featuring 30 new CSS feature questions added based on community feedback, along with redesigned freeform pain-point questions and the new ability to attach freeform comments to any question. This year's survey aims to reach a broader range of developers beyond the JS developers who have historically dominated responses, and includes a question to gauge how much time respondents spend writing CSS versus JavaScript. The results directly inform what browser vendors prioritize for implementation, making thoughtful responses valuable for the entire developer community.

Svelte Blog·

What’s new in Svelte: October 2022

AI summaryThis October 2022 Svelte update covers the two-day Svelte Summit, where Rich Harris announced the first Release Candidate of SvelteKit 1.0 with no planned breaking changes remaining. SvelteKit gained features like use:enhance for progressive form enhancement, improved build performance, and Cloudflare adapter support, while Svelte 3.50.0 added new accessibility warnings and type improvements. The post also highlights the new Svelte Discord forum, editor tooling updates, community projects, tutorials, and new libraries.

Baby Steps·

Rust 2024...the year of everywhere?

AI summaryThe author reflects on what Rust will feel like by 2024, arguing it will be the year of 'everywhere.' While Rust already has many nice features, they currently only work in certain contexts. By 2024, these features will work everywhere developers want to use them, which the author believes will significantly change how the language feels.

Baby Steps·

Dyn async traits, part 9: call-site selection

AI summaryThe author revisits an alternative previously dismissed for Rust's dyn async traits: allowing the choice of how to manage a future to be made at the call site. The post explores what call-site-based dispatch would require and what its ergonomics might look like, concluding that the approach is fairly appealing despite some limitations.

Baby Steps·

What I meant by the "soul of Rust"

AI summaryThe author clarifies that the 'soul of Rust' is not about explicitness in allocation, but rather about the tension between key values—particularly productivity and versatility versus transparency. Rust's goal has been to feel like a high-level language while offering the performance and control of a low-level one, and the community often finds 'third ways' that resolve these tradeoffs, though such solutions take time. It is precisely when difficult decisions must be made that questions about the 'soul of Rust' arise, prompting the author to explore the role of transparency and the tensions surrounding it.

Baby Steps·

Dyn async traits, part 8: the soul of Rust

AI summaryThe author and Tyler Mandry have been sharing a proposed design for async functions in traits, described in a 'User's Guide from the Future.' This blog post takes a deep dive into one aspect of that proposal: handling dynamic dispatch, with particular attention to the tricky question of how explicit the design must be about the possibility of allocation. The author frames this discussion as touching on a core question about the fundamental identity—or 'soul'—of Rust.

Raph Levien·

Parallel curves of cubic Béziers

AI summaryThis article presents a practical approach to approximating parallel (offset) curves of cubic Béziers using curve fitting, seeking the cubic Bézier closest to the true offset curve by employing numerical techniques such as cusp detection, Green's theorem, Gauss-Legendre quadrature, quartic root finding, and error measurement via Bézier/ray intersections. The claimed result has O(n^6) error scaling, producing visibly more accurate curves and fewer subdivisions than existing published algorithms. The author also discusses refinements like handling near-miss roots and degenerate control point configurations, and provides open-source (Apache 2) code implementations.

Marc Brooker·

Histogram vs eCDF

AI summaryThe article argues that the empirical cumulative distribution function (eCDF) is nearly always a better choice than histograms for presenting data such as latency or throughput distributions. Using a bimodal latency example, it shows that eCDFs make it easy to read percentiles and quantiles directly off the graph, assess the relative contribution of different modes, zoom into details without bucketing artifacts, generate random samples from a measured distribution, and convert into a histogram—whereas the reverse is impossible because bucketing discards information. The author also clarifies terminology, distinguishing the eCDF (an empirical estimate) from the CDF (the true underlying distribution) and noting that 'histogram' can refer either to the graph or to a bucketed data structure for summarizing streams.

Svelte Blog·

What’s new in Svelte: September 2022

AI summaryThis September 2022 Svelte update highlights the final chance to get tickets for Svelte Summit Stockholm (Sept 8-9) and covers SvelteKit's newly merged filesystem-based router, including a migration guide and several breaking changes like the removal of named layouts in favor of groups. It also lists new SvelteKit features such as Link header support with Cloudflare's Automatic Early Hints, virtual $env modules, and improved TypeScript support in language tools. The post rounds up a community showcase of apps, learning resources like podcasts and tutorials, and numerous new libraries, UI kits, and starter templates.

Josh W. Comeau··Josh W. Comeau

Understanding useMemo and useCallback

What's the deal with these two hooks?! Lots of devs find them confusing, for a whole host of reasons. In this tutorial, we'll dig deep and understand what they do, why they're useful, and how to get the most out of them. Keep reading.