Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
eliminating personal pronouns
  • Loading branch information
timotew authored Jan 4, 2018
commit 5427e5ad97dc07e64acc907e0840a5cd9216f803
52 changes: 22 additions & 30 deletions doc/api/synopsis.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,26 @@ different options and ways to run scripts with Node.js.
An example of a [web server][] written with Node.js which responds with
`'Hello World!'`:

We’ll be displaying a number of commands using a terminal, and those lines

start with `$` or `>`. You don’t need to type in the `$` and `>` character;

they are there to indicate the start of each command.

You’ll see many tutorials and examples around the web that follow this
Commands displayed in this document are shown starting with `$` or `>`
to replicate how they would appear in a user's terminal.
Do not include the `$` and `>` character they are there to

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Period after character.

indicate the start of each command.

There are many tutorials and examples that follow this
convention: `$` or `>` for commands run as a regular user, and `#`
for commands that should be executed as an administrator.

for commands you should be running as an administrator.

Lines that don’t start with `$` or `>` are typically showing the output of

the previous command.
Lines that don’t start with `$` or `>` character are typically showing
the output of the previous command.

Firstly, make sure you have downloaded Node.js from [Node.js Official website](http://nodejs.org/#download).
Firstly, make sure to have downloaded Node.js from [Node.js Official website](http://nodejs.org/#download).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please move the link itself down to the end of the document


If you want to install Node using a package manager, see [this guide](https://nodejs.org/en/download/package-manager/).
To install Node using a package manager, see [this guide](https://nodejs.org/en/download/package-manager/).


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: multiple lines are actually going to be shown as a single line in the output. The same applies to line 67.

Now, create an empty project folder called `projects`, navigate into it:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you make it more clear that your folder doesn't have to be called projects? Maybe:

Create a directory to put your code in, for example to create a projects folder in your home directory you can run these commands in a terminal:


You can name your folder as you like or base on your current project title but

we choose to use `projects` for the purpose of this example.
Project folder can be named base on user's current project title but
this example will use `projects` as the project folder.

Linux and Mac:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

May be UNIX rather than Linux and Mac ?

@Trott Trott Jan 5, 2018 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We usually go with POSIX but people might not know what that means. UNIX is technically incorrect because that refers to a specific trademarked operating system. UNIX-like is often used instead. Maybe Unix/macOS to conform with BUILDING.md even though I don't like that personally. This gets tricky. Maybe leave it as Linux and Mac after all. :-D

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

doc/api> grep -i "UNIX" * | wc -l
      40

We seem to be using UNIX abundantly to refer UNIX-like systems.

If we use Linux and MAC, it leaves an impression of either:

  • Only Linux and MAC are supported
  • The example holds good only for Linux and MAC

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@gireeshpunathil I'm convinced. Let's go with UNIX (or Unix or UNIX-like) and consolidating terminology/typography across documents can happen some other time. Certainly "Linux and macOS" would explicitly exclude (for example) AIX which certainly is incorrect in this case.


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you include something like this:

We’ll be showing off a number of commands using a terminal, and those lines all start with $. You don’t need to type in the $ character; they are there to indicate the start of each command. You’ll see many tutorials and examples around the web that follow this convention: $ for commands run as a regular user, and # for commands you should be running as an administrator. Lines that don’t start with $ are typically showing the output of the previous command.

(taken from https://doc.rust-lang.org/book/second-edition/ch01-01-installation.html#installation, feel free to reword it).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@gibfahn Note my previous comments about personal pronouns. I wonder if this should really be a guide so that we don't have to worry about that sort of thing. Link to it from the docs?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you include something like this:

We’ll be showing off a number of commands using a terminal, and those lines all start with $. You don’t need to type in the $ character; they are there to indicate the start of each command. You’ll see many tutorials and examples around the web that follow this convention: $ for commands run as a regular user, and # for commands you should be running as an administrator. Lines that don’t start with $ are typically showing the output of the previous command.

(taken from https://doc.rust-lang.org/book/second-edition/ch01-01-installation.html#installation, feel free to reword it).

Expand All @@ -58,20 +52,17 @@ Windows PowerShell:
> cd $env:USERPROFILE\projects
```

Next, create a new source file in the `projects` folder

Next, create a new source file in the `projects` folder
and call it `hello-world.js`.

If you’re using more than one word in your filename, use an hyphen (`-`) or

If filename has more than one word, use a hyphen(`-`) or
an underscore(`_`) to separate them for simplicity and avoid using

the space character in file names.

For example, you’d use `hello-world.js` rather than `hello world.js`.
For example, use `hello-world.js` rather than `hello world.js`.
Node.js files always end with the `.js` extension.

Open `hello-world.js` in your favorite text editor and paste in the following
Open `hello-world.js` in any preferred text editor and paste in the following
content.


Expand All @@ -91,19 +82,20 @@ server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});
```
Save the file, go back to your terminal window enter the following command:
Save the file, go back to the terminal window enter the following command:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: As above: a blank line before and after code blocks is always good. There are more of these cases below.


```txt
$ node hello-world.js
```
you should see an output like this in your terminal to indicate Node.js
an output like this should appear in the terminal to indicate Node.js

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

s/an/An

server is running:
```
```txt
Server running at http://127.0.0.1:3000/
````
Now, open your favorite browser and visit `http://127.0.0.1:3000`.
Now, open any preferred web browser and visit `http://127.0.0.1:3000`.

You should see the string `Hello, world!`.
If the browser displays the string `Hello, world!`, that indicates
the server is working.

Many of the examples in the documentation can be run similarly.

Expand Down