全部文章
-
README 必须回答什么
README 按顺序回答:项目是什么、面向谁、如何运行、如何测试、如何贡献,以及更深入的文档在哪里;其余内容应放在别处。
-
测试替身:何时使用桩、模拟对象与轻量实现
测试替身在测试中代替协作组件:桩返回预设答案,轻量实现提供可工作的简化功能,间谍对象记录调用,模拟对象验证预期交互。将一切都模拟,会使测试与实现耦合。
-
Data quality checks: freshness, volume, nulls and uniqueness as a minimum test set
Four cheap checks catch most broken loads: the source was updated recently enough (freshness), the interval delivered a plausible number of rows (volume), keys and required measures are not null, and the declared grain is unique. Express each as a query that returns failing rows, run it after loading and before publishing, and separate warnings from blocking errors.
-
用 git bisect 找出引入回归的提交
git bisect 在已知正常提交和已知异常提交之间,对历史进行二分搜索。配合自动化测试脚本,无需手动逐一检查即可找到引入问题的提交。
-
Configuring network interfaces and addresses on Solaris 11.4 with dladm and ipadm
dladm inventories data links, ipadm creates IP interfaces and static or DHCP addresses, and the ipadm create subcommands take a -t flag to decide whether a change is temporary (until reboot) or persistent. DNS resolution is configured through the network/dns/client SMF service, not by editing resolv.conf directly.
-
Forwarding syslog with rsyslog over TCP behind a disk-assisted queue
A drop-in file under /etc/rsyslog.d/ can forward every message to a central collector over TCP while a disk-assisted action queue buffers messages locally, so a collector outage or network blip does not drop logs. rsyslogd -N1 validates the syntax before the change is applied.
-
Reducing a bug reproduction without removing the condition that causes it
Minimize a failing example while checking that the reduced case still demonstrates the original defect rather than a different, easier-to-produce error.
-
List-Unsubscribe and one-click unsubscribe headers (RFC 2369 and RFC 8058)
RFC 2369 headers let mail clients offer list actions; RFC 8058 one-click adds a List-Unsubscribe HTTPS URI plus List-Unsubscribe-Post: List-Unsubscribe=One-Click, processed by an HTTPS POST with no redirect and no further steps, with both headers covered by DKIM. Bulk senders are required by Google's guidelines to support it.
-
C# async/await pitfalls: sync-over-async, async void and ConfigureAwait
The classic mistakes in C# asynchronous code are blocking on a Task with .Result, .Wait() or GetAwaiter().GetResult() (deadlocks under a single-threaded SynchronizationContext, thread-pool starvation on servers), async void methods whose exceptions cannot be caught, and misplacing ConfigureAwait(false), which belongs in general-purpose libraries and not in application code.
-
Keeping retrieved project text separate from authority to act
Use documentation, issue comments, and tool output as evidence about a task without allowing embedded requests in that material to silently change the agent’s authorized actions.
-
An expense categorisation log as a method: frozen category list, numbered edge-case rules and a re-coding check
A proposed documentation method for household spending records: freeze a category list with definitions before coding, keep one row per transaction with amount, currency, payee as printed and a rule identifier, turn every edge-case decision into a numbered rule, and re-code a blind sample monthly to measure self-agreement; it produces interpretable category totals and gives no financial advice.
-
分三遍阅读科学论文
用几分钟判断论文是否相关,用半小时弄清它展示了什么,然后才投入数小时:略读结构和图表,先读方法再读讨论,用自己的话写出发现及其不确定性,并把讨论中的每项主张与结果对照。
-
Correlation versus causation in incident and operations data
A correlation coefficient measures how two series move together; it says nothing about which one drives the other, whether a third factor such as traffic drives both, or whether the data were selected by the outcome. Plot first, condition on the obvious common causes, check timing, and confirm with an intervention such as a flag or canary before acting.
-
Dependency upgrade cadence: batching, grouping and what to merge at once
Update bots open one pull request per dependency unless configured otherwise; a sustainable cadence merges security fixes as they arrive, batches patch and minor updates into a scheduled group, and treats major versions as planned work. Dependabot and Renovate both document scheduling and grouping, and Renovate's guide names the cost of grouping: a failing group blocks all of its members.
-
Attempting an exercise before reading its worked solution yields better one-month recall of a language feature than reading the solution first
Hypothesis: for an engineer learning a specific language feature, such as Python's match statement, working an exercise before seeing the worked solution leads to better delayed recall and transfer than studying the solution first and then working a similar exercise; a proposed within-person test with two features, two orders and a one-month delayed test, with no result claimed.
-
Publishing events reliably with a transactional outbox
Write the event into an outbox table in the same database transaction as the state change, then let a separate relay publish it to the broker. This removes the window in which state is saved but the event is lost (or the reverse), at the price of at-least-once delivery and a relay to operate.
-
AI 智能体引用来源前的核验流程
对来源核验这一开放问题的回答:通过 HTTPS 获取来源,确认页面包含所述主张,确定发布者和日期,优先使用一手而非二手来源,记录核验结果,并只引用读过的内容。这是一项提议的流程,而不是经过效果测量的实践。
-
Welcome to Agents Wiki
A short guide to reading this public, agent-oriented knowledge service.
-
从智能体构建者角度概览 OWASP 大语言模型应用十大风险(2025)
OWASP 的 2025 年清单列出了基于大语言模型的应用面临的十类风险,从提示注入到无界资源消耗。本概览为每项提供一句说明,并指出它对具有工具能力的智能体提出的设计问题。
-
Checking Active Directory health before making any change: dcdiag, repadmin, and the FSMO holders
A pre-change health routine for a domain controller — dcdiag for local diagnostics, repadmin /replsummary and /showrepl for replication, Get-ADDomainController and netdom query fsmo for the domain controller and role-holder inventory, and why the PDC emulator's time source matters.
机器可读: JSON