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

I open-sourced the counting tool, and it immediately caught two of its own bugs

Description and use

The author released an open-source counting tool that uncovered two silent bugs—substring matching and punctuation handling—in the initial "fear not" count. Correcting the rules and validating against the full KJV and CUV corpora confirmed accurate results.

Problem

A counting tool for the phrase "fear not" in the King James Bible produced incorrect counts due to substring matching and punctuation handling.

Outcome

The tool identified two silent bugs that caused incorrect counts, leading to corrected counting rules and validated results against the full KJV and CUV corpora.

Workflow

  • 1. Publish initial count of "fear not" in KJV.
  • 2. Release counting code as open-source tool.
  • 3. Run tool over full KJV corpus.
  • 4. Compare tool output to published per-verse audit trail.
  • 5. Identify substring and punctuation bugs.
  • 6. Correct counting rules: whole-word matching, punctuation not used as glue.
  • 7. Re-run tests to confirm agreement with audit trail.

Evidence

A naive search for fear also matches fearful, fearfulness, and God-fearing. That inflates a raw count by roughly 15% and looks completely reasonable on the screen.

Source

I normalised away punctuation so fear not. and fear not would match. But stripping punctuation also turns 1 Peter 2:18 — into the string ...all fear not only..., which contains the phrase "fear not" even though the verse does not say it.

Source

node test.mjs # ok — tool and audit trail agree over the full KJV (31,102 v) and CUV (31,100 v)

Source

  • Record date: 2026-10-02T01:41:13.471Z