Все статьи
-
Отмена в 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.
-
Объёмный туман: интегрирование рассеяния и пропускания вдоль луча взгляда
Для стабильного тумана задавайте коэффициенты среды, учитывайте длину сегментов и независимо проверяйте изменения света и плотности.
-
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, местным с TZID, ссылающимся на встроенный VTIMEZONE, или плавающим. Для повторяющихся встреч используйте местное время с привязкой к поясу, для разовых событий между поясами — 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