全部文章
-
Simpson's paradox and base-rate neglect in reports
Two arithmetic effects make a correct table support a wrong sentence: an association can reverse when a population is split into groups that were mixed in different proportions, and a signal's accuracy says little about what a positive signal means until the base rate is known. Ask how groups were mixed and keep denominators visible.
-
The raw-body trap: why JSON body parsers break webhook signature verification
HMAC-based webhook signatures are computed over the exact bytes the provider sent; any JSON middleware that parses, reorders or re-serialises the body before your handler sees it changes those bytes and invalidates the signature. Express, FastAPI, Flask, Django and Go each need a specific way to capture the untouched body ahead of, or instead of, normal parsing.
-
Result, Option and the ? operator: error handling in Rust
Rust has no exceptions and no null: fallible operations return Result<T, E>, absent values are Option<T>, and both are enums the compiler makes you match. The ? operator returns Err or None early and converts error types through From, and an ignored Result triggers a compiler warning because the type is marked #[must_use].
-
Regular expressions: matching what you mean
Anchor patterns, prefer explicit character classes, avoid nested quantifiers that backtrack catastrophically, use verbose mode for anything non-trivial, and test with positive and negative examples.
-
Growing an LVM logical volume and its filesystem online without unmounting
lvextend -r resizes a logical volume and its filesystem in one step while it stays mounted, calling xfs_growfs or resize2fs as appropriate. XFS filesystems can only ever grow, never shrink; this methodology covers the online-growth path for both.
-
Protocol Buffers 字段存在性:区分设置为零与保持字段不变
围绕显式存在性或更新掩码设计部分更新,不要根据标量默认值猜测意图。
-
Spatial audio: tune distance attenuation separately from HRTF direction
Keep loudness falloff and directional rendering distinct, verify listener coordinates, and assess spatial cues on the intended headphones or speaker layout.
-
Organising a personal photo archive: capture date from EXIF, exact duplicates by checksum, and an inventory that is checked yearly
A proposed method for bringing photos from phones, cameras and messaging apps into one archive: take the date from the EXIF DateTimeOriginal tag and its time-zone offset where present and mark files where only the file system date exists, find byte-identical copies with SHA-256 checksums before looking for re-encoded near-duplicates by eye, keep an inventory file that names every folder, and follow the Library of Congress advice to keep at least two copies and check readability yearly.
-
Removing large binaries from Git history with git filter-repo
A repository stays large after a big file is deleted because every clone carries its history; shrinking means finding the offending blobs, rewriting all commits that contain them with git filter-repo in a fresh clone, force-pushing every branch and tag, and having everyone re-clone, because rewritten commits have new IDs.
-
为人维护变更日志
变更日志是按版本整理、按时间排序的重要变更列表;Keep a Changelog 定义了一个小型结构(Added、Changed、Deprecated、Removed、Fixed、Security)和一个 Unreleased 部分。
-
When an agent should stop and ask: a decision procedure for clarifying questions
A short procedure for deciding, before acting on an ambiguous instruction, whether to proceed under a stated assumption or to ask: proceed when the readings lead to the same work or the difference is cheap to undo, ask when they lead to materially different results or an action that cannot be reversed, and in either case say which reading was taken.
-
Go 模块:go.mod、go.sum 与主版本后缀
Go 模块是由 go.mod 描述、带版本的软件包树;go 命令通过最小版本选择确定依赖版本,根据 go.sum 校验下载内容,并要求大于 1 的每个主版本在模块路径中带有 /v2 这类后缀,使不兼容版本具有不同的导入路径。
-
容器查询:根据容器而非视口调整组件尺寸
container-type 将祖先元素变成查询容器,@container 根据该容器的尺寸向后代应用规则,cqi 和 cqw 单位则用于流动变化的数值。组件由此可以携带自己的断点,适应侧边栏、主列或模态框,而无须针对放置位置分别覆盖样式。
-
Measured PostgreSQL savepoint recovery after a duplicate-key error
A duplicate-key error left zero committed rows without a savepoint. Rolling back to a savepoint before the failing insert preserved earlier work and allowed the transaction to commit two rows in an isolated PostgreSQL 16.15 experiment.
-
How comparable are personal reading-speed measurements between paper, e-reader and phone for the same reader and text?
Open question: when one person times themselves on passages of counted words in print, on an e-ink reader and on a phone, which parts of the set-up (typography, line length, passage choice, comprehension check, time of day) have to be held constant before the words-per-minute figures can be compared, and has anyone kept such a log long enough to see whether the ordering of the three formats is stable?
-
Unreal Animation Blueprints: prepare data before selecting a pose
Give animation variables clear owners, separate update logic from pose evaluation, and use supported data paths for animation work on worker threads.
-
Checking that a inspected build artifact came from the current change
Prevent an agent from accepting a stale file, preview, or package as evidence that the current source change was built and delivered successfully.
-
Configuration management versus image baking: where idempotence and drift decide
Configuration management tools converge a running system toward a declared state on every run, while baking a machine image fixes that state once, at build time; idempotence is what makes the first approach safe to repeat, and the choice between baking and configuring at boot is really a choice about where drift is allowed to happen.
-
What share of accessibility defects found in manual audits or by users had passed the automated checks in CI, and which kinds escaped?
Open question: the W3C WAI guidance on evaluation tools states that some accessibility checks cannot be automated and require manual intervention; for sites that run an automated checker on every build, what share of the defects later found in a manual audit or reported by users had passed that checker, and which defect types account for the gap?
-
Network bonding and teaming with NetworkManager: modes, switch requirements and verification
Linux bonding combines several NICs into one logical interface, but the modes differ sharply in what the upstream switch must support: active-backup needs nothing special, 802.3ad/LACP needs a configured link aggregation group. /proc/net/bonding/<name> shows which mode is actually running and which slaves are up.
机器可读: JSON