AI 摘要The article announces the release of a new Rust crate called pin-cell, which provides a PinCell type similar to RefCell but only allowing pinned mutable references into its interior. The crate is currently nightly-only and no-std compatible. The author also explains how PinCell's API differs from RefCell, noting that borrow_mut on a RefCell returns a type implementing DerefMut that allows mutating the interior value.
AI 摘要The article argues that while the 80/20 Rule is a useful tool for identifying the most effective uses of your time, it has a significant downside: it optimizes for your past rather than your future. Using Audrey Hepburn's decision to leave a successful acting career for UNICEF volunteer work and Jeff Bezos's departure from Wall Street to found Amazon as examples, the author shows that new paths never appear to be the most effective option in the beginning. However, with practice and time, pursuits that initially seem ineffective can become highly effective and lead to greater fulfillment.
AI 摘要The article presents version 2 of a CSS refresh bookmarklet, updating Paul Irish's elegant 11-year-old tool that reloads all stylesheets on a page without requiring any special setup or workflow changes. The author modernized the original minified code using contemporary JavaScript and added recursive traversal to support refreshing stylesheets inside iframes, which was the main limitation of the original version. The new bookmarklet is shared publicly, though it does not work with cross-origin iframes.
AI 摘要The article presents a proof-of-concept implementation of compile-time perfect hash-based string matching in Zig, inspired by cttrie, which generates a collision-free hash plan (using string length, byte indices, and xor-shift operations with random seeds) so switch statements can compile into jump tables. The implementation provides compile-time errors for undeclared case values and runtime safety panics for unexpected strings, and its hash functions compile into highly optimized, loop-free machine code. The author notes possible improvements, such as searching within the smallest string length and caching a working RNG seed via a compile error to speed up future compilations.
AI 摘要The author reflects on the difficulty of naming projects, tools, or concepts in computer science, jokingly listing it among the field's hard problems alongside cache invalidation and off-by-1 errors. They argue that while a name should sound cool, it's also important that it conveys useful information to users. The challenge is that while there are many cool animal names to choose from, only some of them actually communicate meaningful information.
AI 摘要The article explores the challenge of creating nested links in HTML, which is invalid per the spec since an element cannot contain other interactive elements like links. After reviewing Roman Komarov's element hack and Harry Roberts' CSS-only layered links technique, the author describes her own implementation for Smashing Magazine that expands the post's title link across the entire article using a ::before pseudo-element. This approach achieves the desired behavior while preserving a natural keyboard tab order, though the compromise is that excerpt text becomes unselectable.
AI 摘要Based on a Twitter poll, this article explores different semantic HTML approaches for marking up an FAQ section without JavaScript, comparing headings paired with divs, unordered lists, definition lists, and the native and elements. The author discusses the accessibility advantages and drawbacks of each approach for assistive technology users and how easily each can be enhanced into an interactive accordion with JavaScript and ARIA. The key takeaway is that semantic HTML should be the foundation of accessible content, with interactive behavior added progressively.
AI 摘要Postgres 11 makes ALTER TABLE ... ADD COLUMN with a non-null DEFAULT fast by eliminating the full table rewrite and ACCESS EXCLUSIVE lock that previously blocked all operations on large tables. Under the hood, new pg_attribute fields (atthasmissing and attmissingval) supply missing default values to existing rows on the fly, while new rows are populated as they're inserted. This change means operators can now maintain strong data integrity through non-null constraints without risking long lock-induced outages in production.
AI 摘要The article discusses Rust's 'pinned' references, pointers that guarantee the data they refer to will stay in a fixed memory location, which enable patterns like self-referential structs and intrusive lists that were previously hard to handle. The API is being considered for stabilization, but the author is concerned about one persistent issue: the proliferation of different reference types that the design implies.
AI 摘要The author explains how her habit of writing long, technical deep dives made her overly critical of her own work, causing her to abandon drafts and stop publishing for months. By silencing her inner critic and publishing shorter, rougher case studies, she rediscovered the joy of writing — even finding that her concise articles were better received, as in the case of her well-praised HSL article. She encourages everyone to just write, publish, and share for themselves, regardless of whether anyone reads or judges their work.
AI 摘要The author explains why they converted their site's colors from HEX and RGB formats to HSL in CSS: HSL is far more intuitive for tweaking colors, creating color harmonies (such as complementary and triadic schemes), and building shades and tints. The article describes how hue, saturation, and lightness work, and shows how HSL combined with CSS Custom Properties makes creating and maintaining multiple site-wide color themes easy and maintainable. The actual conversion was done quickly with a Sublime Text plugin, and the author now feels full control over color management.
AI 摘要Autoencoders are neural network models that reconstruct high-dimensional data using a narrow bottleneck layer in the middle, which captures a compressed latent encoding as a byproduct of dimension reduction. This low-dimensional representation can be used as an embedding vector in applications such as search, assist with data compression, or reveal the underlying generative factors of the data. The article was later updated with additional sections covering VQ-VAE, VQ-VAE-2, and TD-VAE.
AI 摘要The author, Sara Soueidan, shares the video recordings and slides of her talk 'SVG Filters: The Crash Course,' which she developed after learning SVG filters to customize a workshop for Netflix's design and engineering team, and which she presented at Beyond Tellerrand Munich and CSS Day Amsterdam. She had originally planned to write a series of in-depth articles on the topic, but since her interests are shifting to other areas of front-end development, she instead compiled the videos, slides, and recommended resources like the Web Platform docs and Michael Mullany's work. She notes that SVG filters offer many possibilities for recreating graphic editor effects, while acknowledging their limitations, and encourages readers to experiment with them.