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: edit for concision #17891

Closed
wants to merge 7 commits into from
Closed

doc: edit for concision #17891

wants to merge 7 commits into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Dec 28, 2017

This removes some wordy phrases (notably "it is important to note that")
and a few instances of typographical excess (a bulleted list where
separate paragraphs for each bullet item suffice, unneeded italics,
etc.).

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

This removes some wordy phrases (notably "it is important to note that")
and a few instances of typographical excess (a bulleted list where
separate paragraphs for each bullet item suffice, unneeded italics,
etc.).
@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Dec 28, 2017
*Note*: It is important that `before`/`after` calls are unwound
in the same order they are called. Otherwise an unrecoverable exception
will occur and the process will abort.
`before` and `after` calls are unwound in the same order they are called.
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be ..calls must be unwound... since it's a note for the implementers.

An easy way to send the `SIGINT` signal is with `<Ctrl>-C` in most terminal
programs.

`SIGUSR1` is reserved by Node.js to start the [debugger][]. It's possible to
Copy link
Member

Choose a reason for hiding this comment

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

I actually prefer the list, it would also be easier to read if these are listed in a table.

Copy link
Member Author

Choose a reason for hiding this comment

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

Restored the bulleted list. A table is a great idea if we can do it in a way that the information is still readable in raw markdown. If someone reading this wants to pick that piece up and make a separate PR, go for it. :-D

Copy link
Member

@gibfahn gibfahn left a comment

Choose a reason for hiding this comment

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

LGTM modulo @joyeecheung 's suggestions.

@BridgeAR
Copy link
Member

@Trott i know you dislike the "note" parts a lot but I wonder if we might just discuss this again in general:

If I read docs I want to know immediately what is important. Having a highlight per individual part makes therefore sense to me because I know what to expect, even when just glancing over the documentation.
I do not feel like the individual note loses it's importance because there are many of them. But it can of course be me alone who feels that way.

signal `0` can be used to test for the existence of a process. Sending `SIGINT`,
`SIGTERM`, and `SIGKILL` cause the unconditional termination of the target
process.
An easy way to send the `SIGINT` signal is with `<Ctrl>-C` in most terminal
Copy link
Contributor

Choose a reason for hiding this comment

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

In this fragment we have:
<Ctrl>-C
CTRL+C
<Ctrl>+<Break>
Do we need to unify this?

Copy link
Member Author

Choose a reason for hiding this comment

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

The two mentions of Ctrl-C are redundant, so I'd be inclined to remove this one. Which I'll do.

I made the other two instances consistent. Probably worth figuring out what (if any) universal standard there is for such things (like maybe see what RFCs do), document it in the style guide, and apply it across all docs. But not in this PR. :-D

install a listener but doing so will _not_ stop the debugger from starting.

`SIGTERM` and `SIGINT` have default handlers on non-Windows platforms that
resets the terminal mode before exiting with code `128 + signal number`. If
Copy link
Contributor

@vsemozhetbyt vsemozhetbyt Dec 28, 2017

Choose a reason for hiding this comment

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

resets -> reset ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, changed, thanks!

@Trott
Copy link
Member Author

Trott commented Dec 28, 2017

If I read docs I want to know immediately what is important. Having a highlight per individual part makes therefore sense to me because I know what to expect, even when just glancing over the documentation.

@BridgeAR You are right to caution against throwing out the proverbial baby with the bath water. I think we have four inter-related problems with our Note stuff.

  • A lot of them are not important. Many are edge cases or trivia. They might be important to a few people but they are not important to most people. Having lots of notes like that ends up diluting the notes that actually matter. (For example, the fact that fs.rmdir() returns different errors if it is used on a file instead of a directory is an edge case, not an important note. Worth documenting? Yup. Worth emphasizing? Nope.)

  • Typographically, we don't do anything that helps our notes stand out. They look more like footnotes and seem de-emphasized. Without using your browser's search function, try to scan https://nodejs.org/api/fs.html quickly for Note instances and see how many you can find. There are 29. Good luck finding more than one or two. (Probable counterargument: One doesn't scan the whole doc typically. More typically, one scans a single event or method. The notes are more findable that way. I would argue, though, that most of our entries are sufficiently short that using Note for emphasis isn't helpful in those instances anyway. In any event, typography is easy to change so this is fixable.)

  • There are too many of them. What would entail "not too many" is a good question. I would counter that the answer lies with...

  • There is no clear criteria for what warrants a Note. The fact that fs.utimes() does not work on AIX gets a Note, but the fact that recursive fs.watch() does not work on AIX does not get a Note. Basically, what gets a Note is left entirely up to author discretion, and people's ideas about what belongs in a Note seems to vary wildly. If we could come up with a short allow-list of things that are permissible to treat with Note in our style guide, it would probably be the way to go. Then, if there are things that warrant Note but that aren't covered, we can update the style guide. I'm not sure how much we can establish concrete rules here, but IMO it would be nice if there was less discretion on these.

@Trott
Copy link
Member Author

Trott commented Dec 28, 2017

@BridgeAR By the way, if you had your druthers, which of the four instances of Note this change set would be restored? I'm thinking the async_hooks is pretty important (common pitfall worth noting) so maybe that one could/should be restored, but the others not so much.

@BridgeAR
Copy link
Member

I agree that not all entries here are necessary but I do not see a negative impact of those "unnecessary" ones either. And I agree that reverting at least the async_hooks part would be good.

@gibfahn
Copy link
Member

gibfahn commented Dec 28, 2017

I agree with @Trott that Note is only useful if it highlights something you're likely to want to be warned about, if we're exhorting the user to make sure to read this paragraph, it should be something particularly important or surprising.

If I read docs I want to know immediately what is important. Having a highlight per individual part makes therefore sense to me because I know what to expect, even when just glancing over the documentation.

This is exactly what I'd expect Note: to be used for. However I think if they're mostly minor details then scanning through and just reading the Note: part becomes a bit pointless, you're just accumulating trivia about the APIs rather than understanding their gotchas.

For example:

Note: Windows does not support sending signals,

This whole API is mostly non-applicable to windows, seems like something you'd want to push in the user's face.

Note: An easy way to send the SIGINT signal is with <Ctrl>-C in most terminal programs.

Seems like a useful hint, but not something that needs to be specially called out here.

Typographically, we don't do anything that helps our notes stand out. They look more like footnotes and seem de-emphasized.

If we reduce the Note:s to those that are actually worth emphasizing, then why not put them in bold?

Note: seems to stand out a bit better.

@jasnell
Copy link
Member

jasnell commented Dec 28, 2017

Btw... the entire point of moving the *Note*: syntax in the notes was to first get a consistent style for all of these kinds of sidebar type notes so that they could be more easily found and replaced with something better later on when a better approach was determined.

@Trott
Copy link
Member Author

Trott commented Dec 30, 2017

@BridgeAR I've restored three of the four Note annotations that were originally removed. I removed the Cntl-C tip one entirely because that information was already in the bulleted list. PTAL.

@Trott
Copy link
Member Author

Trott commented Jan 1, 2018

Trott added a commit to Trott/io.js that referenced this pull request Jan 4, 2018
This removes some wordy phrases (notably "it is important to note
that").

PR-URL: nodejs#17891
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@Trott
Copy link
Member Author

Trott commented Jan 4, 2018

Landed in 26607b8

@Trott Trott closed this Jan 4, 2018
MylesBorins pushed a commit that referenced this pull request Jan 8, 2018
This removes some wordy phrases (notably "it is important to note
that").

PR-URL: #17891
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 9, 2018
This removes some wordy phrases (notably "it is important to note
that").

PR-URL: #17891
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 9, 2018
This removes some wordy phrases (notably "it is important to note
that").

PR-URL: #17891
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Jan 10, 2018
MylesBorins pushed a commit that referenced this pull request Jan 24, 2018
This removes some wordy phrases (notably "it is important to note
that").

PR-URL: #17891
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants