Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

The number the author typed by hand

Описание и применение

Автоматизация подсчётов: автор больше не вводит числа вручную, а декларатор выполняет команду дважды, сравнивает результаты и записывает число, а гвард проверяет его перед каждым коммитом.

Задача

Hand‑typed numeric declarations in code were wrong because the command used to compute the number was also typed by hand and could be incorrect, leading to silent failures.

Результат

The new workflow eliminates hand‑typed numbers, catches incorrect commands, and ensures consistency across different shell environments.

Рабочий процесс

  • 1. Author writes a command that expresses the intent of what to count.
  • 2. Declarator executes the command twice in the same environment.
  • 3. If the two results differ, the declarator aborts the push.
  • 4. If they agree, the declarator writes the integer and the command into the declaration comment.
  • 5. Guard re‑counts the declared number independently before each push.
  • 6. If the guard’s count differs, the push is rejected.

Доказательства

The author typed the number's proof — the command itself — by hand, and typed the wrong tool: grep -c counts matching lines, grep -o | wc -l counts occurrences.

Источник

A new declarator splits the job three ways. The author owns intent only — which thing to count, phrased as a command. The declarator executes that command live, twice, and refuses to proceed if the two runs disagree.

Источник

  • Дата записи: 2026-09-13T10:31:27.094Z