Programming · Latest articles
30 new today · 2,696 articles · from 79 blogs
Leapfrog Probing
AI summaryThe article introduces leapfrog probing, a new hash table probing strategy developed for the Junction library and inspired by hopscotch hashing, which stores two delta values per cell to form explicit probe chains for each bucket, reducing average search length compared to linear probing at a cost of only 12.5–25% extra memory. It describes how insertion works by following the probe chain, then linearly searching for a free cell and linking it to the chain, and how the concurrent Leapfrog map handles racing operations by reserving cells via CAS and linking them with relaxed atomic stores. Benchmarks showed Leapfrog was the fastest concurrent map tested up to a modest number of CPU cores, partly due to low write contention and resizing based on failed inserts rather than tracked population.
A Resizable Concurrent Map
AI summaryThe article describes the Linear map from the Junction project, a concurrent hash map that improves on the earlier 'Crude' lock-free hash table by supporting both deletion and resizing. It explains how resizing works by atomically replacing a root pointer with a new, larger table and safely migrating entries using Redirect markers to prevent concurrent updates from being lost, along with a jobCoordinator that lets multiple threads participate in migrations. The author notes that Junction's Leapfrog and Grampa maps build on the same design, and shares the implementation as an educational example of concurrent programming.
Animating the Unanimatable
An in-depth look at the surprisingly complicated problem of animating the transition when two items in a list swap positions. Keep reading.
Introduction to the Zig Programming Language
AI summaryThis article introduces Zig, a new programming language created by the author as a more pragmatic alternative to C, built around the priorities of pragmatism, optimal runtime performance, safety, and readability. It explains key design decisions including widely diverging debug and release builds, complete C ABI compatibility with @cImport for direct C interop, and the use of optional types instead of null pointers. The article also details Zig's error handling strategy using error sets and error unions, along with constructs like catch, try, orelse, defer, and errdefer that keep code both safe and concise.
New Concurrent Hash Maps for C++
AI summaryThe article announces Junction, a BSD-licensed C++ library offering several new concurrent hash maps—Linear, Leapfrog, and Grampa—whose fastest variants outperform all other concurrent maps tested on the author's hardware. These maps support atomic operations such as get, assign, exchange, and erase from multiple threads without locks, relying on quiescent state-based memory reclamation (QSBR) for safe memory management while requiring users to handle object lifetimes manually. The code is experimental alpha software, and the author invites feedback, bug reports, and contributions such as porting the Turf dependency library to additional platforms.
New ways to make your web app jank with Houdini – An introduction
Setting up HTTP/2
Elixir v1.2 released
Elixir v1.2 brings enhancements, bug fixes, performance improvements and more into Elixir.
My positive experience as a woman in tech
AI summaryThe author shares her positive experience as a woman in tech, arguing that stories like hers deserve to be heard alongside accounts of sexism so the overall picture doesn't become so bleak it scares women away from the field. Across all her roles — student, speaker, author, open source maintainer, W3C participant, and researcher — she never felt unfairly treated because of her gender, even though she remains sensitive to noticing sexism. She attributes this partly to genuine progress in the industry, partly to her preference for not assuming sexist intent, and partly to her confident, assertive personality.
Introducing Bliss: A 3KB library for happier Vanilla JS
AI summaryThe author introduces Bliss, a lightweight 3KB helper library for Vanilla JS that evolved from personal helper code (formerly called Utopia) accumulated over eight years and used across many of their open-source projects. After using it in their MIT research project and expecting collaborators who mostly know jQuery, they spent over a week polishing and documenting it. The docs stand out by recommending plain Vanilla JS alternatives where appropriate and including a 'Show Implementation' button, reflecting the philosophy of favoring small, understandable abstractions over big black-box libraries.
Maelstrom Gaming and 12 fps
Elixir v1.1 released
Elixir v1.1 brings enhancements, bug fixes, performance improvements and more into Elixir.
Copying object properties, the robust way
AI summaryThe article explores how to write a robust extend() helper for copying properties between objects in JavaScript. The author shows that a naive for...in loop fails with accessors defined via Object.defineProperty(), while blindly copying property descriptors can break native properties like CSS style properties. The final solution combines both approaches, using defineProperty() only when the descriptor reveals accessors or non-default attributes, and notes that neither jQuery's extend() nor ES6's Object.assign() handles accessors properly.
On the blindness of blind reviews
AI summaryThe author argues that blind reviews are fundamentally flawed for industry conference talk selection because, unlike academia where full papers are judged, committees must evaluate talks from short abstracts while balancing multiple factors like content and speaker skill. This leads to conservative selections that reject challenging topics requiring skilled presenters, penalize great speakers who lack abstract-writing skills, and strip all personality from proposals, as illustrated by the author's own highly successful border-radius talk that would never have survived a blind review. Rather than dismissing anonymization entirely, the author suggests an initial blind review round that filters without rejecting could preserve fairness while avoiding these flaws.
Stretchy: Form element autosizing, the way it should be
AI summaryThe author, while working on a Web-related open source research project at MIT that involves editing Web content, created Stretchy, a standalone JavaScript utility for autosizing form controls such as inputs, textareas, and select menus. Unlike existing solutions, it automatically handles newly added controls without requiring API calls or custom events. The script is available on GitHub and can also be used as a bookmarklet to autosize form controls on any existing page.
Spot the unsubscribe (link)!
AI summaryFrustrated by promotional emails and newsletters with hard-to-find unsubscribe links, the author created a Tumblr blog called 'Spot the Unsubscribe!' to highlight examples of this widespread dark pattern. They argue that unsubscribe links should be immediately obvious, noting that Google even added a Gmail feature to make such links more visible. The author hopes others will submit examples, though new posts may otherwise be infrequent.
Conical gradients, today!
AI summaryConical gradients (conic-gradient()) have remained unimplemented in browsers despite being specced in 2012, largely because few developers know they exist and thus browsers see no demand, while the earlier technical barrier in Cairo's graphics library has since been resolved. The author demonstrates their usefulness—such as creating pie charts with a single line of CSS—and has publicly released a polyfill during a CSSConf talk. The article urges developers to speak up about the features they want, for example by commenting on or voting for the bug reports filed with major browser vendors, since browsers prioritize implementing features based on developer demand.
Idea: Extending native DOM prototypes without collisions
AI summaryThe author proposes a technique for extending native DOM element prototypes without risk of naming collisions: instead of adding many methods to Element.prototype, a library adds a single namespaced property (e.g., element.yolo.foo()) under which all its methods hang. The naive implementation fails because `this` inside the namespaced methods refers to the namespace object rather than the element, so the solution uses an ES5 accessor defined with Object.defineProperty that returns an object holding a reference to the element. To avoid recreating that object on every property access and to keep the library dynamically extensible, the getter creates a single instance of a dedicated constructor and overwrites the property with that cached value on first use.
jQuery considered harmful
AI summaryThe author argues that while jQuery was instrumental in advancing the Web, most developers today no longer need it since modern browsers natively support the functionality it provided. Beyond redundancy, the core problem is that jQuery's wrapper objects get mixed with native DOM elements and NodeLists, making code confusing, prone to defensive $() wrapping, and extremely difficult to understand or refactor, effectively locking codebases into jQuery. The author proposes a pragmatic approach: avoid using jQuery directly in your own code, reclaim the $ variable with jQuery.noConflict() for lightweight selector helpers, and consider alternatives like Zepto if you prefer the jQuery API.