Skip to content

style: comments carry the measurement, not the essay around it - #34

Merged
sotashimozono merged 1 commit into
mainfrom
style/comments-carry-the-fact-not-the-essay
Sep 9, 2026
Merged

style: comments carry the measurement, not the essay around it#34
sotashimozono merged 1 commit into
mainfrom
style/comments-carry-the-fact-not-the-essay

Conversation

@sotashimozono

Copy link
Copy Markdown
Member

Measured before touching anything: 1479 comment lines over 6207 of code — 15% in src, 21% in
test. 102 blocks were four lines or longer, with 646 lines inside them.

The rule applied: keep the number, the version it was measured on, and the fact that is not
visible from the code.
Drop the narration, the restatement of what the code does, and the
paragraph explaining why it matters — that last belongs in the commit that made the change, which
is where it already is.

before after
blocks of 6+ lines 23 12 (mostly file headers)
comment lines 1479 1259
src 15% 13%
test 21% 19%

Example:

# before — 6 lines
# The documented-and-marked definition is the shape this package asks for — `audit` wants
# a docstring on every public name AND a mark on the unfinished ones — and it was the one
# shape whose coverage came back `missing`, because no sibling started on `mk.line`. The
# span is still this sibling's; only where it starts moved.
(_is_doc_call(st) && a < line <= b) && return (line, b)

# after — the reason lives on `_is_doc_call`, two lines, once
(_is_doc_call(st) && a < line <= b) && return (line, b)

Nothing carrying a measurement was deleted. 1.03x / 0.985x / 3.76x, 0.601s vs 0.039s,
2/4 segmentation fault, 1916 candidates and 11026 methods, the three Julia versions the
world-counter claim was checked on, and the --depwarn=error inversion are all still there — in
fewer words.

1253 assertions, green; docs build clean.

🤖 Generated with Claude Code

Measured before: 1479 comment lines over 6207 of code — 15% in `src`, 21% in `test`. 102 blocks
were four lines or longer and 646 lines sat inside them.

Rewritten: keep the number, the version it was measured on, and the fact that is not visible from
the code; drop the narration, the restatement of what the code does, and the paragraph explaining
why it matters. That last part belongs in the commit that made the change, which is where it
already is.

    blocks of 6+ lines   23 -> 12 (of which most are file headers)
    comment lines      1479 -> 1259
    src                 15% -> 13%
    test                21% -> 19%

Nothing was deleted that carried a measurement: `1.03x` / `0.985x` / `3.76x`, `0.601s` vs `0.039s`,
`2/4 segmentation fault`, `1916 candidates and 11026 methods`, the three Julia versions the
world-counter claim was checked on, and the `--depwarn=error` inversion are all still there, in
fewer words.

1253 assertions, green; docs build clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

📚 Docs preview: https://codes.sota-shimozono.com/ExperimentalAPI.jl/previews/PR34/

(updates on each push to this PR)

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sotashimozono
sotashimozono merged commit b6f2036 into main Sep 9, 2026
14 checks passed
@sotashimozono
sotashimozono deleted the style/comments-carry-the-fact-not-the-essay branch September 9, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant