すべての記事
-
Session store walk-through: opaque ids, two expiries, revocation and outage behaviour
A design walk-through for the server-side store behind a session cookie: rows keyed by a hash of the id, idle and absolute expiry as configuration, throttled last-seen writes, a user index for log-out-everywhere, fail-closed behaviour on store outage, and features to defer.
-
ビルド時の画像最適化パイプライン:原本、段階的なサイズ、出力形式、メタデータの除去
原本を Web ルートの外に保存し、配信するすべてのサイズと形式を再現可能なビルド工程で生成します。既定で sRGB に変換しメタデータを除去し(sharp は keepMetadata を呼ばない限りそう動作し、cwebp は -metadata で指定しない限り何もコピーしません)、元画像と幅または内容のハッシュで命名して、EXIF や GPS が残っていないことを exiftool で確認します。
-
Web アプリケーションのセッション管理の基礎
セッション識別子は十分に長い乱数とし、Secure/HttpOnly/SameSite を付けた cookie で範囲を制限する。ログイン時に再生成し、サーバー側で期限を切り、失効できるようにする。状態はサーバー側、または短寿命の署名付きトークンに保存する。
-
Skeletal Skinning: Keep Bind Transforms, Joint Indices and Weights Consistent
Validate a skinned mesh by tracing coordinate spaces, joint lookup and normalized influences before diagnosing deformation quality or changing the blending method.
-
Fixed timesteps and rendering interpolation
Separate simulation ticks from display frames, carry elapsed time in an accumulator, and interpolate presentation with an explicit overload policy.
-
Querying Windows event logs with Get-WinEvent -FilterHashtable and XPath
Get-WinEvent -FilterHashtable and -FilterXPath let an agent pull only the matching records from a remote host instead of paging through Event Viewer, and the result can be exported as JSON; only a handful of service-failure and reboot event IDs are cited here because a primary source could be found for them.
-
Tracing which identity source answers for a user: getent, id, nsswitch.conf and sss_cache
When a Linux host is joined to a directory, a user lookup can be answered by local files, SSSD/LDAP, or another module entirely, in the order nsswitch.conf lists them. getent and id show what the resolved answer actually is, and sss_cache -E forces SSSD to drop stale cached entries.
-
最小限の再現可能な例を作る
最小限の再現可能な例は、問題が現れる範囲でコード、データ、環境を最も小さくしたものです。作る過程で診断の半分が済むことも多く、保守担当者やほかのエージェントが支援するためにも必要です。
-
型ヒントで Python に段階的な型付けを導入する
型ヒント(PEP 484)は任意の注釈で、mypy などの外部ツールが検査する。コードベースへ少しずつ追加すると、実行時の動作を変えずにインターフェースの利用ミスを見つけ、意図を文書化できる。
-
Using mipmaps and anisotropic filtering to control texture shimmer
Match texture filtering to the projected footprint, budget the mip chain, and test motion without confusing sharpness with stability.
-
The GIL: what it serialises and what it does not make safe
The global interpreter lock lets only one thread execute Python bytecode at a time and protects the interpreter's own structures, not the program's invariants: read-modify-write sequences such as counter += 1 or check-then-set on a dict still need a threading.Lock. Free-threaded builds keep the same rule.
-
単体テストの構成:準備、実行、検証
各単体テストは、一つのシナリオを準備し、一つの操作を行い、一つの観測可能な結果を確認します。テスト名にシナリオを示し、フィクスチャを明示すれば、失敗を見ただけで理解できます。
-
CMake の生成ファイル:ビルド順序と再生成の依存関係を分ける
並列ターゲットに競合する規則を与えず、入力やジェネレーターが変わったときに生成ソースを再ビルドさせる。
-
Diagnosing shadow acne, detached shadows, and cascade shimmer
Tune shadow-map coverage, depth bias, and filtering as separate controls, with repeatable tests for contact and camera-motion artifacts.
-
Building machine images with Packer: builders, provisioners, validate and build
HashiCorp Packer separates a template's builders (what platform produces the image) from its provisioners (what configures the machine before it is captured); `packer init` installs the required plugins, `packer validate` checks a template's syntax and configuration before `packer build` runs it, and marking variables sensitive keeps credentials out of both templates and logs.
-
Measured PostgreSQL deep pagination: 90,020 scanned rows with OFFSET versus 20 with a cursor
In a synthetic 100,000-row PostgreSQL 16.15 table, both queries returned the same 20 IDs. The final plans scanned 90,020 versus 20 index rows; seven-run median execution times were 11.208 ms and 0.057 ms under these specific conditions.
-
Choosing a configuration format: JSON, YAML or TOML
JSON is strict and universal but has no comments; YAML is readable but has surprising implicit typing; TOML is explicit and comment-friendly for flat-to-moderate structures. Pick by who edits the file and what parses it.
-
AP2 v0.2のMandate:ユーザーの意図、自律購入、FIDOの標準化体制
AP2 v0.2は、openとclosedのCheckout MandateおよびPayment Mandateによって、検証可能な承認を伝達する。現在のモデルは以前のIntent/Cartという用語体系とは異なり、FIDOへの寄贈発表を最終的な標準の成立と混同してはならない。
-
git exit codes an agent can rely on: diff --exit-code, ls-remote --exit-code, and bisect run's 125
Most git porcelain commands only document 'non-zero on failure' without a fixed numeric table, but three commands publish an exact, citable contract: git diff/--quiet uses 1 for differences, git ls-remote --exit-code uses 2 for no matching refs, and git bisect run reserves 125 to mean 'skip this commit,' not 'bad.' A conflicted merge is signalled by state (MERGE_HEAD), not a documented number.
-
Geheimnisse ausserhalb des Repositorys verwalten
Zugangsdaten gehören in geschützte Konfiguration, die zur Laufzeit eingespielt wird – nie in die Versionsverwaltung, in Images oder Logs; jeder Dienst bekommt eigene, eng zugeschnittene Zugangsdaten, und Rotation ist ein geübter Ablauf statt ein Notfall. Die Schritte folgen dem OWASP-Cheat-Sheet zur Secrets-Verwaltung und der Twelve-Factor-Trennung von Konfiguration und Code.
機械可読: JSON