Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: introduce developers convention to use one sentence per line in .md/.rst files #99

Closed
wants to merge 2 commits into from

Conversation

yarikoptic
Copy link
Member

I would really like us to agree on adhering to such a convention.
Inspired by review of

attn @satra @waxlamp but overall all @dandi/dandiarchive people are welcome to chime in.
Voting is also is on -- use 👍 and 👎

docs/40_development.md Outdated Show resolved Hide resolved
docs/40_development.md Outdated Show resolved Hide resolved
Co-authored-by: John T. Wodder II <[email protected]>
@yarikoptic
Copy link
Member Author

@jwodder could you please elaborate on 👎 ?

@satra @waxlamp and other @dandi/dandiarchive - please chime in, or your opinion would not be accounted for.

### Use a-sentence-per-line formatting in .md/.rst files

One sentence per line should be entered instead of wrapping into paragraphs or making one paragraph per line.
Such a convention is used by a number of projects and advocated by others (see, e.g., [nick.groenen's post](https://nick.groenen.me/notes/one-sentence-per-line/)) since it:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I will add it here, but found in https://github.com/executablebooks/mdformat/blob/782cb22f294bc4ce48368ee173de4837fc208ecf/docs/users/style.md?plain=1#L159 the quote from "Brian W. Kernighan. "UNIX for Beginners". 1974" which mentions "Start each sentence on a new line.", although in the sample paragraph quoted there this particular sentence doesn't because previous one was wrapped into it already ;-)

@yarikoptic
Copy link
Member Author

FTR: there is a nice automation https://github.com/executablebooks/mdformat but attempt to use experimental plugin plugin for "one sentence per line" lead to an issue: jspaezp/mdformat-sentencebreak#1

@jwodder
Copy link
Member

jwodder commented Nov 20, 2023

@yarikoptic The 👎 is ultimately just my personal taste, but for an attempt at an objective justication: As I use Vim in an 80-column terminal, one sentence per line means that many sentences will span multiple display lines, which are harder to move between than actual LF-terminated lines. Text should be hard-wrapped at 79 columns. A possible compromise of hard-wrapping all lines but still starting a new line with each sentence would just look ridiculous.

@waxlamp
Copy link
Member

waxlamp commented Dec 6, 2023

@yarikoptic The 👎 is ultimately just my personal taste, but for an attempt at an objective justication: As I use Vim in an 80-column terminal, one sentence per line means that many sentences will span multiple display lines, which are harder to move between than actual LF-terminated lines. Text should be hard-wrapped at 79 columns. A possible compromise of hard-wrapping all lines but still starting a new line with each sentence would just look ridiculous.

I agree with @jwodder on the technical grounds he presents, and I'll go one further and say that markdown is intended to be readable in source form and also machine-renderable to other display formats (mainly HTML I think). So while I understand the motivation for one-sentence-per-line (it makes diffs easier to understand) I think that slight benefit is not worth the unreadability ("would just look ridiculous" as John put it) that it incurs. Furthermore, the GitHub folks seem to have understood this dilemma and their diffs have (for a while now) highlighted word changes in addition to line-level changes, which mitigates the difficulty and blunts the rationale for this idea.

So, for readability and standard editor usage, I would say let's not adopt this convention.

@yarikoptic
Copy link
Member Author

Furthermore, the GitHub folks seem to have understood this dilemma and their diffs have (for a while now) highlighted word changes in addition to line-level changes, which mitigates the difficulty and blunts the rationale for this idea.

FWIW, I saw a good number of cases on my codespell spree when such highlight didn't work due to too long of a line.

So while I understand the motivation for one-sentence-per-line (it makes diffs easier to understand)

not that -- see all those at https://github.com/dandi/handbook/pull/99/files#diff-c0c669082dc761eff768236aa545cfe9cd51ac1afa1bf1f77ee67f8f66765c48R153 .

But ok, since ATM more of 👎 let's just close

@yarikoptic yarikoptic closed this Dec 6, 2023
This was referenced Dec 18, 2023
@waxlamp waxlamp deleted the enh-paragraphs branch January 3, 2024 17: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.

3 participants