全部文章
-
GOAP: search for an action sequence, then validate its execution
Represent goals and actions explicitly, keep hypothetical effects separate from the live world, and replan when a valid sequence becomes impossible.
-
Network configuration tools compared: nmcli, netplan, systemd-networkd and their Windows and macOS equivalents
Reading the current network configuration, setting a static address, and setting DNS servers — the same three tasks across NetworkManager's nmcli, Ubuntu's netplan, systemd-networkd, Windows PowerShell's networking cmdlets, and macOS's networksetup.
-
Columnar storage basics: how a Parquet file is laid out and why analytical reads touch less data
A Parquet file is a sequence of row groups, each holding one column chunk per column, each chunk split into pages that are the unit of encoding and compression; the metadata sits at the end so that a reader opens the footer, picks only the needed columns and skips row groups and pages by their min/max statistics. Column-wise layout is what makes dictionary and run-length encodings effective.
-
利用返回的修订号验证写后读取
通过稳定标识符和修订号确认写入结果,避免将并发产生的较新更新误认为自己提交内容的精确副本。
-
MSAA and Alpha-to-Coverage: Distinguish Coverage From Shading and Opacity
Use multisample coverage for geometric and cutout edges while avoiding accidental double attenuation and unsupported assumptions about sample masks.
-
数据库连接池及其限制
每个 PostgreSQL 连接都是一个消耗内存的进程。应用应根据实际并发量保持较小的连接池,设置获取连接的超时,并禁止请求处理程序临时自行打开连接。
-
Screen-Space Ambient Occlusion: Interpret GTAO as a Visibility Estimate
Integrate ambient occlusion into the intended lighting term and distinguish sampling noise from errors caused by incomplete depth geometry.
-
Default HTTP client timeouts by language and library: none, 5 seconds, or 100 seconds
Python's requests and Go's net/http.Client wait forever unless a timeout is set explicitly, httpx defaults to 5 seconds, .NET's HttpClient defaults to 100 seconds, and axios and curl's total-transfer timeout both default to unlimited — one universal safe default does not exist.
-
Choosing and layering performance profiles with tuned on RHEL
tuned applies a named bundle of kernel and system tunables as one profile switch, and a custom profile can inherit from an existing one and override only what differs. This methodology covers listing, recommending, applying and building on top of profiles.
-
使用 Problem Details 统一 API 错误响应
RFC 9457 为 HTTP 错误响应定义了 JSON 结构,包含 type、title、status、detail 和 instance,使客户端能够统一处理错误;任何采用稳定机器可读代码的一致响应封装都能实现同样的目标。
-
用图遍历确定依赖顺序:BFS、DFS 与拓扑排序
将依赖建模为有向图,用广度优先或深度优先遍历找到变更影响的所有项,再用 Kahn 算法或 DFS 后序遍历生成构建或迁移顺序,并显式报告环,而不是隐藏它;graphlib 和 tsort 提供这种排序。
-
Cherry-picking: when it fits and what it costs the history
git cherry-pick replays the change of a commit as a new commit with a different ID; it is the right tool for backporting a fix to a maintenance branch or salvaging one commit from an abandoned branch, but each pick creates a duplicate that merges cannot recognise, so record the origin with -x and merge instead of picking when the whole branch is wanted.
-
Dark mode with prefers-color-scheme, color-scheme and light-dark()
Dark mode has three parts: the prefers-color-scheme media query to detect the user's choice, the color-scheme property (and meta tag) to tell the browser which schemes the page supports so form controls, scrollbars and the canvas follow, and light-dark() or custom properties to swap palette values without duplicating rules.
-
The test-driven development loop
Write a failing test, make it pass with the simplest change, then refactor with the tests green; the loop keeps design decisions small and gives every line a reason to exist.
-
管理 firewalld 区域和规则,避免将自己锁在 SSH 之外
firewalld 将运行配置与永久配置分开;普通 firewall-cmd 更改若未永久保存,就会在下次重新加载时丢失。本方法涵盖区域、运行时/永久配置之分、富规则,以及如何在更改导致远程 SSH 会话无法恢复之前进行测试。
-
Scheduled jobs that do not silently fail
A scheduled job needs a lock against overlap, a timeout, explicit logging, an exit status that reflects success, and a monitor that notices when it did not run at all.
-
Alert hygiene for host monitoring: rate over threshold, failed units, and duration windows
A page should mean a human must act now; a host disk approaching full should page on its fill rate, not a fixed percentage that a slow-growing partition can sit near for months, and a threshold crossed for an instant should not page at all. Google's SRE materials on paging discipline and multiwindow alerting give the reasoning; this article applies it to the host signals covered in this series.
-
MCP-Werkzeuge gestalten, die Agenten sicher benutzen können
Werkzeuge nach dem Model Context Protocol brauchen einen engen Zweck, typisierte Eingabe- und Ausgabeschemata, wahrheitsgemässe Annotationen (nur lesend, destruktiv), begrenzte Ergebnisse und Fehler, die die Ursache nennen; Beschreibungen gehören in den Code, nicht in Inhalte, die Nutzende bearbeiten können. Die Spezifikation verlangt zudem, dass Clients Annotationen als nicht vertrauenswürdig behandeln und ein Mensch Aufrufe ablehnen kann.
-
在一次工作会议中用 STRIDE 为功能建立威胁模型
将功能画成带信任边界的数据流图,按 STRIDE 的六个类别逐项检查每个元素,对每个威胁决定缓解、消除、转移还是接受,并将结果写成可测试的要求;《威胁建模宣言》的四个问题就是议程。
-
Checking the identity of a suggested package before adding it to a project
Verify that a package name suggested during coding corresponds to the intended maintained dependency before changing the project’s dependency files or executing installation hooks.
机器可读: JSON