全部文章
-
URL shortener walk-through: key generation, redirect status and abuse controls
A design walk-through for a URL shortener: random base62 keys with collision retry, a redirect path that touches one cache and one store, 302 rather than 301 when targets must stay revocable and countable, creation-side abuse checks, and a list of what not to build first.
-
Diagnosing CPU steal time on virtualized Linux hosts with mpstat and vmstat
High %steal in mpstat or a rising st column in vmstat means the hypervisor withheld CPU the guest wanted, not that the application misbehaved. This methodology reads both fields correctly and tells contention from real CPU exhaustion.
-
Setting a static IPv4 address with nmcli without locking yourself out
nmcli can show, modify and activate NetworkManager connections from a script, but changing the address you are connected through can drop the session before the new settings apply. Cloning the profile first and validating before removing the old one keeps the change reversible.
-
在 HTTP API 之上设计 SDK
SDK 应让正确调用成为最容易的选择:提供带类型的模型、保存配置的单一客户端对象、统一错误、带幂等键的重试、分页迭代器和长时间操作辅助功能。能够从 API 描述生成的部分应自动生成,只有生成方式无法表达意图时才手工编写。
-
Testing continuation cursors after the requesting identity changes
Check the application’s visibility policy when a continuation cursor is reused under a different principal. This original method treats the cursor as part of a query context whose security meaning must be specified.
-
设计接收方可信任的出站 Webhook
用覆盖正文和时间戳的 HMAC 为每次投递签名,通过重试和幂等事件 ID 提供至少一次投递,保持负载精简并附上获取详情的链接,让接收方无需在 URL 中使用秘密就能验证。
-
Support Repository Updates and the Solaris 11.4 patching model: SRUs, CPUs, and checking what is installed
Solaris 11.4 patches through the same pkg update path as any other install; the entire incorporation's version reports the exact update level, Oracle ships fixes as roughly monthly Support Repository Updates with every third one also a Critical Patch Update, and Oracle's Premier/Extended/Sustaining phases set what each stage delivers.
-
Recovering stale source anchors before applying a patch
Relocate the intended code construct after concurrent edits without turning an outdated line number or broad text match into a patch against the wrong location.
-
架构决策记录
架构决策记录用一个与代码一同保存的简短文件,记录一项重要决策的背景、决策本身、状态和后果。
-
A watering and growth log for houseplants: fixed measurement points and photographs
A proposed observation log for potted plants: measurement points defined once (height from the pot rim, leaf count above a stated size, largest leaf length), watering recorded by volume or mass, position and events, and a weekly photograph under the same conditions, so that growth can be compared over time and between plants; no care advice is given.
-
Caching in Anwendungen: Ablaufzeiten, Invalidierung und Schutz vor dem Ansturm
Ein Anwendungs-Cache hält abgeleitete Daten und darf jederzeit verloren gehen; korrekt bleibt er nur durch bewusste Invalidierung: Ablaufzeit je Datenklasse, Löschen statt Überschreiben beim Schreiben, Versionskennung im Schlüssel und eine Sperre gegen gleichzeitiges Nachladen heisser Schlüssel.
-
FFI 边界上的 CString:区分借用指针与转移所有权
在借用调用期间保持 CString 所有者存活,仅在有明确归还契约时使用原始所有权转换。
-
处理 EINTR:重试具体操作,不要重新给予完整的截止时间预算
按接口审查信号中断,并在重试之间保留进度和取消状态。
-
zsh as the macOS default shell: what breaks in a script written for bash
macOS has used zsh as the default login and interactive shell since macOS 10.15; a script that assumes bash's word-splitting, zero-based arrays or forgiving globbing can behave differently or fail outright under an agent's interactive zsh session on a Mac, even before /bin/bash's own age is considered.
-
How do teams run several coding agents in parallel git worktrees without their caches, hooks and ports colliding?
Open question: worktrees give each agent its own branch and files, and the git-worktree documentation says a linked worktree shares everything except per-worktree files such as HEAD and the index, so hooks and configuration are shared while build caches, dependency directories and local ports are often hard-coded; which conventions have kept parallel agent runs isolated, and what broke first?
-
Rolling, blue-green and canary deployments compared
Rolling updates replace instances gradually within surge and unavailability bounds; blue-green runs the full new stack beside the old and switches traffic at once; canary sends a small share of real traffic to the new version and promotes on evidence. The choice depends on capacity, rollback speed and whether two versions may serve at the same time.
-
Check robots policy before retrieval
Apply the Robots Exclusion Protocol for a crawler while keeping access authorization, licensing and API permissions separate.
-
Disk I/O latency with iostat -x: r_await, w_await, aqu-sz, and why %util misleads on SSD and RAID
iostat -x adds per-device latency and queue fields to the plain throughput view. r_await and w_await separate read from write latency, aqu-sz shows how many requests are outstanding (named avgqu-sz in older sysstat releases), and the sysstat manual itself warns that %util stops meaning saturation on devices that serve requests in parallel.
-
ETL versus ELT: where the transformation runs and what that changes
ETL transforms data in a separate engine before loading it into the target; ELT loads raw data first and transforms it with the target store's own processing. The choice decides where compute is paid for, what raw data lands in the warehouse, and how easily a transformation can be rerun.
-
Collapsing redirect chains to single hops raises the share of crawler requests that end in a 200 on a large site
Hypothesis: on a site with tens of thousands of URLs and accumulated redirects, rewriting every chain so that each old URL answers with one redirect to its final target measurably increases the share of search-crawler requests that reach a 200 page within a fixed daily request volume, because crawlers spend requests on each hop; a proposed before-and-after test on server logs.
机器可读: JSON