すべての記事
-
浮動小数点数:0.1 + 0.2 が 0.3 にならない理由
二進浮動小数点は、多くの十進小数を近似して表すため、計算で丸め誤差が蓄積します。許容誤差で比較し、慎重に合計し、金額や件数には整数か十進型を使い、元の値に戻せるだけの桁数で出力します。
-
Calling the TypeSafe API from an agent: request shape, errors, retries and version pinning
The documented contract an agent needs to call Jev without a chat layer: POST /v1/systemone with a Bearer key, a state, a model name and a map of typed questions; answers keyed like the questions plus a usage block; 401, 422, 429 and 529 with exponential backoff; aliases that move and versioned IDs that do not; SDK defaults for retries and the agent skill for coding agents.
-
運用ダッシュボードの設計:パネルごとに1つの問い、対象者ごとに1画面
対応者が答えなければならない問いから始め、各問いに1つのパネルを割り当てる。全体から詳細へ並べ、単位と軸をそろえ、複製の代わりにテンプレート変数を使い、呼び出しを伴う各アラートを必要なダッシュボードに結び、定義をバージョン管理する。
-
Dry-run modes for agent actions: showing the plan before the change
Give every tool that changes state a mode that computes and returns the concrete plan (which objects, which fields, how many) without applying it, validate the plan on the server side where the system allows it, require the plan to be produced and reviewed before the real call, and compare the real result against it afterwards.
-
統合テストでコンテナ内の使い捨てデータベースを使う
テストの実行ごとに、使い捨てコンテナで実際のデータベースエンジンを起動し、データをメモリー上に置きます。テンプレートデータベースに一度だけマイグレーションを適用し、テストファイルごとに複製します。テストはインメモリーの代替物ではなく、本物のプランナー、制約、分離の振る舞いを検証できます。
-
グレースフルシャットダウン:サービスでの SIGTERM の処理
コンテナーランタイムは SIGTERM を送り、猶予期間を待ってから SIGKILL を送る。サービスは新しい処理の受け付けを止め、実行中の処理を完了するか引き渡し、接続を閉じて期間内に終了する必要がある。シグナルを無視すると、デプロイのたびにサービス中断が起きる。
-
Forms that declare native HTML constraints produce fewer server-side validation rejections per submission than forms validated only in custom JavaScript
Hypothesis: the browser blocks interactive submission of a form whose native constraints (required, pattern, type, min and max) fail, while MDN notes that calling submit() bypasses this and novalidate disables it; the proposal is that forms carrying native constraints that mirror the server rules reach the server with fewer rejections per submission than forms whose checks live only in custom scripts, because the native checks keep working when the script fails to load or errors; a proposed A/B test, with no result claimed.
-
Upsert, row limits and identifier quoting across PostgreSQL, MySQL, SQLite and SQL Server
PostgreSQL's ON CONFLICT, MySQL's ON DUPLICATE KEY UPDATE, SQLite's PostgreSQL-style ON CONFLICT and SQL Server's MERGE are three families of upsert syntax, LIMIT/OFFSET has at least three shapes, and a quoted identifier means double quotes, backticks or square brackets depending on the engine.
-
find and xargs exit codes: find's coarse 0/>0 versus xargs's 123-127 ladder
find only promises 0 for full success and any value above 0 for an error, deliberately without finer detail, while xargs defines a specific ladder for how the invoked command failed: 123 for an ordinary non-zero exit, 124 for exit 255, 125 for killed-by-signal, 126 for not-invocable, and 127 for not-found. Piping find into xargs means checking two different exit-code philosophies in one pipeline.
-
理解を確かめる教え返し:読者を指定して説明し、その後で出典と比較する
知識の少ない具体的な読者に向けて説明を書いたり話したりすると、読み直しでは隠れる理解の穴が表れます。2014 年に報告された実験では、文章を教えるつもりで学ぶだけで、テストを受けるつもりの場合より完全で整理された想起が得られました。書いた説明は、出典と一文ずつ照合できます。
-
エージェントのプロセスが読める、開発者マシン上の認証情報の保存場所
ユーザーとして動作するエージェントは、そのユーザーが読めるものを読めます。環境変数、CLI の認証情報ファイル、コンテナーレジストリのログイン情報、SSH 鍵、シェル履歴、ブラウザーに関連するストアなどです。保存場所を知ることで、オペレーターは何をエージェントから隔離し、インシデント後に何をローテーションするか判断できます。
-
Dependency confusion: when a public package shadows a private one
If a build resolves package names across a private index and a public one, an attacker who publishes the private name publicly with a higher version can get their code installed; pip's documentation calls --extra-index-url for private packages unsafe for exactly this reason. Defences are namespaces bound to one registry, a single proxying index, hash pinning and claiming names.
-
Loading YAML safely
Full YAML loaders can instantiate arbitrary objects from tagged nodes; always use a safe loader, pin the YAML version semantics, and validate the result against a schema before use.
-
Glob pattern dialects: what * and ** mean in .gitignore, .dockerignore, bash, Python and GitHub Actions
The same star and double-star characters mean different things depending on where the pattern is evaluated: a slash-less .gitignore pattern matches at every depth while the same line in .dockerignore only matches at the context root, bash's globstar recursion is opt-in, and Python's fnmatch is not even path-aware.
-
Link ヘッダーとリンク関係型
RFC 8288 は、任意の HTTP レスポンスが Link ヘッダーで型付きリンクを伝える方法を定義する。形式は <target>; rel="relation" で、anchor、hreflang、type、title、media を追加できる。関係名は IANA 登録名(next、prev、canonical、alternate、describedby、preload)または独自拡張用の絶対 URI を使う。HTML 以外の応答から関連リソースを示し、103 Early Hints で先行取得を促す仕組みである。
-
現在の方法でサードパーティーAPTリポジトリを追加する:deb822 .sourcesファイルとSigned-Byキーリング
apt-keyは非推奨である。署名付きサードパーティーリポジトリを追加する対応済みの方法は、/etc/apt/keyrings内のキーリングファイルをSigned-Byオプションで参照することだ。従来の1行形式、またはDebian 12/13と現在のUbuntuリリースが解釈できる新しいdeb822 .sources形式で記述する。
-
Reviewing command wrappers with an argument-recording substitute
Check how a coding agent’s command wrapper turns user-controlled values into executable intent. This original method substitutes a harmless argument recorder for the real program and examines the boundary directly.
-
Planning an in-place major upgrade of RHEL with Leapp
Leapp upgrades RHEL 8 to 9, or 9 to 10, in place, but only after every upgrade-blocking finding in its preupgrade report is resolved. This methodology covers running the assessment, recording answers to its prompts, and why a backup comes before the actual upgrade step.
-
GPU-Driven Indirect Rendering: Building Draw Workloads on the Device
Use GPU visibility results to generate indirect draws, with explicit buffer capacity, counter resets, synchronization and a CPU reference for validation.
-
A small swap area with low swappiness reduces OOM kills of the primary service on memory-tight servers
Hypothesis: on single-purpose servers whose working set nearly fills RAM, a modest swap area combined with a low vm.swappiness lets the kernel page out cold anonymous memory during short spikes, so the primary service is OOM-killed less often than on the same host without swap, at the cost of occasional latency.
機械可読: JSON