All articles
-
Designing an on-call rotation and its handover
An on-call rotation needs a primary and a backup, a bounded share of each engineer's time, shift lengths and swap rules that people can plan around, a pager budget that triggers corrective work when exceeded, and a written handover at every shift change; the Google SRE book and PagerDuty's public response documentation describe the constraints.
-
Naming identifiers: by role, in domain vocabulary, as long as their scope
A name says what a thing is or does in the problem domain, not what type it has or how it is implemented. Length grows with scope, a concept gets exactly one word, booleans read as statements, and collections are plural. Language conventions (PEP 8, Effective Go) take precedence over personal taste, and renaming is cheap as long as it is done with tooling and in its own commit.
-
Testing code that depends on time and randomness
Inject a clock and a random source instead of calling time.time() or random directly; tests then pass fixed values, and the code stays deterministic and reproducible.
-
Deserialisation of untrusted data: pickle and Java serialization
Native object serialisation formats instruct the receiver to construct arbitrary objects, and constructing objects runs code; Python's pickle documentation says outright that the module is not secure. Never deserialise these formats from untrusted input; where a legacy interface forces it, restrict the classes the stream may name and sign the payload.
-
Log rotation and retention limits
Logs must be bounded in size and age at every layer (application, container runtime, proxy, system journal), with retention chosen for debugging and legal needs rather than 'keep everything'.
-
Updating FreeBSD: freebsd-update for the base system, pkg upgrade for packages, and pkg audit for known vulnerabilities
FreeBSD splits patching into two independent tools: freebsd-update fetch/install for the base system (with upgrade -r for a major release change), and pkg upgrade for installed packages. pkgbase — installing the base system itself as pkg(8) packages — is documented as experimental on FreeBSD 14 and a technology preview for FreeBSD 15.0, not yet the default path.
-
The Linux boot chain for troubleshooting: firmware, bootloader, kernel, initramfs and systemd
A Linux boot passes through firmware, a boot loader, the kernel, an initramfs and finally the system manager, each stage handing control to the next. Knowing what each stage does and where it logs lets an administrator narrow down a failed boot to one stage before touching anything.
-
Access logs for personal data: recording who read which record
An access log for personal data records reads, not only writes: actor, subject, object, reason and time, emitted at the application read path and reconciled with database-level statement logging for paths that bypass it; it must answer subject-centric questions such as who looked at this person's record in the last year.
-
Learning an unfamiliar codebase in a day: an exploration protocol with a written map
A time-boxed protocol for a first day in a codebase: build and run the tests before reading, read the history with git shortlog and git log to find where the activity is, follow one request or command end to end, and write a one-page map with entry points, data model, invariants and open questions; the map, not memory, is the output.
-
Open redirects: validating where a next parameter may send the user
A redirect whose target comes from the request lets an attacker mint links on your domain that end on their site; redirect only to relative paths or to an allowlist of origins, or map short identifiers to targets server-side. Checking a URL's host is harder than it looks: Python's documentation warns that urlsplit does not validate its input.
-
RICE and ICE scoring: what the numbers mean and where they stop
RICE multiplies reach, impact and confidence and divides by effort; ICE drops reach and keeps impact, confidence and ease. Both are useful to make prioritisation arguments explicit and comparable, and both break when the inputs are guesses dressed as numbers or when dependencies and strategy are ignored.
-
Do prompt-injection test suites predict how an agent behaves against injections written after the suite?
Agents are often evaluated against fixed collections of injection attempts. It is unclear how well a good score transfers to new phrasings, new carriers and adaptive attackers, and what a test suite would need to contain to be predictive.
-
Distinguishing denied access from a broken negative-test fixture
Prevent an agent from treating any error as proof that an access-control test passed. The proposed method uses matched controls to identify whether the application actually reached the intended authorization decision.
-
Schema migrations run with a short lock_timeout and automatic retry cause fewer deploy-time incidents than migrations without one
Hypothesis: because most ALTER TABLE forms take an ACCESS EXCLUSIVE lock that queues behind any long transaction while blocking every later query, migrations executed with a lock_timeout of a few seconds and a bounded retry loop produce fewer and shorter deploy-time outages than the same migrations run with the default unlimited wait, at the cost of a few migrations that need a manual rerun.
-
JCL and batch basics: JOB/EXEC/DD statements, return codes, submitting from USS, and reading output
A JCL job is a JOB statement, one or more EXEC steps each naming a program, and DD statements binding files/datasets to that program's I/O; each step ends with a return code where 0 is clean and higher values signal warnings or errors, and a job can be submitted from the USS shell with submit and its output read through SDSF or the z/OSMF jobs REST API.
-
Rolling out a service worker safely: scope, versioned caches, the waiting worker and a kill switch
A service worker that caches HTML can pin users to old code after a deploy. Register it with an explicit scope, fetch the script fresh on every update check, version caches per build and delete old ones on activate, choose per-resource strategies, decide how the waiting worker takes over, and ship a tested kill switch before the first release.
-
Incremental learning with partial_fit: stable features, class lists and honest evaluation
Incremental estimators update a model from small batches without loading the complete dataset into memory. A reliable workflow also preserves feature meaning, defines the class set and evaluates predictions before learning from their outcomes.
-
AddressSanitizer triage: fix the first invalid access before trusting later behavior
Turn an AddressSanitizer report into a minimal ownership or bounds regression case without treating a clean run as proof.
-
Running external commands safely from Python
Use subprocess.run with an argument list and shell=False, set timeouts, capture output explicitly, check return codes and never build a command line from untrusted strings.
-
Retrieval practice as a study protocol: close the source, produce the answer, then check
A protocol for studying by recall instead of rereading: after each unit, close the source, write what you can reproduce, compare against the source, mark the gaps and schedule the gaps for a later recall attempt; classroom and laboratory research summarised in a 2021 systematic review reports benefits across levels and formats.
Machine-readable: JSON