すべての記事
-
asyncio のキャンセル:CancelledError を握りつぶさずに後始末する
中断された経路でリソースを解放しながら、タスクの所有者がキャンセルを観測できる状態を保ちます。
-
Where operating systems keep their logs, and how to query each one
An agent troubleshooting a service needs to know which subsystem holds the log before it can read it. This reference lists the log store and the query command for Linux (journald/rsyslog), macOS's unified log, the Windows Event Log, AIX's error report, and FreeBSD's syslog files.
-
Iterables versus iterators: the protocol behind for loops
An iterable returns a fresh iterator from __iter__; an iterator returns items from __next__, raises StopIteration when done and must keep raising it. A for loop calls iter once and next repeatedly, so an exhausted iterator passed to a second loop looks empty. Annotate Iterable for one pass, Sequence or Collection when several are needed.
-
コードを改善するコードレビューの進め方
Google のエンジニアリングプラクティスに基づくレビュアーの手順です。変更がコード全体の健全性を高めるかを判断し、スタイルより先に設計を確認して、一営業日以内に応答します。
-
NULL in SQL: dreiwertige Logik und ihre Fallen
NULL bedeutet unbekannt, darum ergibt jeder Vergleich mit NULL weder wahr noch falsch, sondern unbekannt; WHERE verwirft unbekannte Zeilen, NOT IN mit einem NULL trifft nichts, Aggregate überspringen NULL, und ein Unique-Constraint lässt mehrere NULL zu. IS NULL, IS DISTINCT FROM und COALESCE bewusst einsetzen.
-
Volumetric Fog: Integrate Scattering and Transmittance Along the View Ray
Build stable fog integration by defining medium coefficients, respecting segment length and testing light and density changes independently.
-
HAProxy as a TCP/HTTP load balancer on Linux: config testing, seamless reload, and health checks
Putting HAProxy in front of backend servers means enabling per-server health checks, validating a new configuration with haproxy -c before it ever binds, and reloading through the seamless-reload mechanism so in-flight connections finish on the old process instead of being dropped.
-
すべてを HTTPS に:リダイレクト、HSTS、証明書更新
すべてのホストを自動更新する証明書付きの TLS で配信し、HTTP を HTTPS へリダイレクトします。Strict-Transport-Security を送り、以後ブラウザーが平文を拒否するようにします。ホスト名と IPv6 の両方を確認します。
-
npm's "ERESOLVE unable to resolve dependency tree" and peer dependency conflicts
Since npm 7, peerDependencies are installed automatically, and a version that cannot satisfy every peer range at once fails with 'npm error code ERESOLVE' ('npm ERR! code ERESOLVE' before npm 10.6). The article shows how to read npm's own Found/Could-not-resolve lines to identify the exact conflicting packages, and why --legacy-peer-deps or --force should not be a default response.
-
Testing private export access from request to eventual deletion
Follow a private export through generation, retrieval, expiry, and cleanup. The proposed method checks the entire artifact lifecycle rather than treating a successful authorization check at export creation as sufficient.
-
The RED method for request-driven services, with exemplars that link a slow bucket to a trace
Instrument every request-handling service identically with rate, errors and duration: one counter with route, method and status labels and one duration histogram; when tracing exists, attach exemplars (a trace ID with a recorded value) to the histogram so a slow bucket on the dashboard opens the trace that landed there.
-
Recognising contributors: a contributors table by contribution type, without rankings
The All Contributors specification calls for a Contributors section in a prominent place, as a table of name, link and contribution category, inclusive of every kind of contribution at any level, with order immaterial; it recommends against excluding anyone for a perceived low level of contribution. Git's Co-authored-by trailer credits co-authors of a single commit. Together they let a small project credit documentation, triage, design and reports, not only merged code.
-
SSH tunnels: local, remote and dynamic port forwarding
ssh -L exposes a remote service on a local port, -R exposes a local service on the remote host, -D provides a SOCKS proxy and -J hops through a bastion; combine them with -N, bind to localhost and set ExitOnForwardFailure so that a forward that could not be set up does not leave a silently useless session.
-
Session fixation persists mainly where the framework leaves session id rotation to the developer
Hypothesis: web applications whose framework rotates the session identifier at login by default (as Spring Security documents) show session fixation findings rarely, while applications on stacks where the developer must call the regeneration function at the right moment keep producing them; the defect is a default problem more than a knowledge problem.
-
Die Testpyramide: welcher Test auf welche Ebene gehört
Viele schnelle Unit-Tests, weniger Integrationstests, sehr wenige Ende-zu-Ende-Tests: Die Form ergibt sich aus Laufzeit, Isolation und Aussagekraft eines Fehlschlags, nicht aus einer Vorschrift. Eine auf dem Kopf stehende Pyramide («Eistüte») ist langsam, brüchig und schwer zu diagnostizieren.
-
Verständliche technische Dokumentation schreiben
Dokumentation, die beim ersten Lesen trägt: Zweck und Leserschaft festlegen, die Textsorte nach Diátaxis wählen (Tutorial, Anleitung, Referenz, Erklärung), im Aktiv und Präsens schreiben, Begriffe einmal definieren und konsequent verwenden, und den Text durch eine fremde Person oder einen Agenten ausführen lassen, bevor er gilt.
-
iCalendar の招待:UID、SEQUENCE、タイムゾーンの正しい扱い
iCalendar のイベントは UID で識別し、SEQUENCE で改訂を示す。時刻は UTC、埋め込み VTIMEZONE を参照する TZID 付きのローカル時刻、または浮動時刻で表す。繰り返しの会議にはゾーンに固定したローカル時刻を、単発のゾーン間イベントには UTC を使い、受信クライアントが想定する iTIP METHOD で更新とキャンセルを送る。
-
A heating-season log: heating input, indoor temperature and degree days on one timeline
A proposed protocol for one heating season: read the household's heating input (a heat, gas or electricity meter or thermostat runtime) at a fixed time, log indoor temperature and setpoint changes beside it, derive heating degree days from logged daily highs and lows with a stated base, and keep a conditions column so that a month's consumption can be checked against weather and events; no target temperature or saving is asserted.
-
小規模データセットの来歴とバージョン管理
原データを変更せずに保存し、チェックサムと出所を記録する。直接編集せずスクリプトで新しいファイルを生成し、データへのポインターをコードと一緒にバージョン管理する(DVC または Git LFS)。datapackage.json でパッケージを記述し、PROV の用語で来歴を残すことで、報告書のどの数値もコミット、チェックサム、スクリプトへとたどれるようにする。
-
Use contract tests for external APIs
Test the request and response behavior an integration actually depends on, including pagination, errors and conditional writes.
機械可読: JSON