Skip to content

Commit 8b44f00

Browse files
committed
Integrate editing for the introduction
1 parent 56758c3 commit 8b44f00

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

00_intro.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,34 @@ and making them do the things you want them to do isn't always easy.
1818
If the task you have for your computer is a common, well-understood
1919
one, such as showing you your email or acting like a calculator, you
2020
can open the appropriate ((application)) and get to work. But for
21-
unique or open ended tasks, there may not be an application.
21+
unique or open-ended tasks, there may not be an application.
2222

23-
That is where _((programming))_ may come in. Programming is the act of
24-
constructing a program—a set of precise instructions, that tell a
23+
That is where ((programming)) may come in. _Programming_ is the act of
24+
constructing a _program_—a set of precise instructions that tell a
2525
computer what to do. Because computers are dumb, pedantic beasts,
2626
programming is fundamentally tedious and frustrating.
2727

2828
{{index [programming, "joy of"], speed}}
2929

30-
Fortunately, if you can get over that, and maybe even enjoy the rigor
30+
Fortunately, if you can get over that fact, and maybe even enjoy the rigor
3131
of thinking in terms that dumb machines can deal with, programming can
3232
be very rewarding. It allows you to do things that would take
3333
_forever_ by hand, in seconds. It is a way to make your computer tool
3434
do things that it couldn't do before. And it provides a wonderful
3535
exercise in abstract thinking.
3636

37-
Most programming is done with ((programming language))s. A programming
38-
language is an artificially constructed language used to instruct
37+
Most programming is done with ((programming language))s. A _programming
38+
language_ is an artificially constructed language used to instruct
3939
computers. It is interesting that the most effective way we've found
4040
to communicate with a computer borrows so heavily from the way we
4141
communicate with each other. Like human languages, computer languages
42-
allow words and phrases to be combined in new ways, allowing you to
42+
allow words and phrases to be combined in new ways, making it possible to
4343
express ever new concepts.
4444

4545
{{index [JavaScript, "availability of"], "casual computing"}}
4646

47-
Language-based interfaces, which at one point were the main way in
48-
which people interacted with computers, have largely been replaced
47+
Language-based interfaces, which at one point were the main method of interacting
48+
with computers, have largely been replaced
4949
with easier, more constrained interfaces. But they are still there, if
5050
you know where to look. One such language, JavaScript, is built into
5151
every modern web ((browser)) and is thus available on almost every
@@ -103,7 +103,7 @@ involved, and to make the whole thing tick, we have to consider the
103103
ways in which these parts interconnect and contribute to the operation
104104
of the whole.
105105

106-
A ((computer)) is a machine that acts as a host for these immaterial
106+
A ((computer)) is a physical machine that acts as a host for these immaterial
107107
machines. Computers themselves can do only stupidly straightforward
108108
things. The reason they are so useful is that they do these things at
109109
an incredibly high ((speed)). A program can ingeniously combine an
@@ -134,7 +134,7 @@ zone.
134134

135135
This is not only boring, it is also ineffective. New problems often
136136
require new solutions. The field of programming is young and still
137-
developing rapidly, and is varied enough to have space for wildly
137+
developing rapidly, and is varied enough to have room for wildly
138138
different approaches. There are many terrible mistakes to make in
139139
program design, and you should go ahead and make them so that you
140140
understand them. A sense of what a good program looks like is
@@ -197,7 +197,7 @@ could be written in English like this:
197197

198198
Although that is already more readable than the soup of bits, it is
199199
still rather obscure. Using names instead of numbers for the
200-
instructions and memory locations helps.
200+
instructions and memory locations helps:
201201

202202
```{lang: "text/plain"}
203203
Set “total” to 0.
@@ -222,7 +222,7 @@ of the number that we are currently looking at. The lines using
222222
`compare` are probably the weirdest ones. The program wants to see
223223
whether `count` is equal to 11 in order to decide whether it can stop
224224
running. Because our hypothetical machine is rather primitive, it can
225-
only test whether a number is zero and make a decision (or jump) based
225+
only test whether a number is zero and make a decision based
226226
on that. So it uses the memory location labeled `compare` to compute
227227
the value of `count - 11` and makes a decision based on that value.
228228
The next two lines add the value of `count` to the result and
@@ -273,7 +273,7 @@ console.log(sum(range(1, 10)));
273273
{{index readability}}
274274

275275
The moral of this story is that the same program can be expressed in
276-
long and short, unreadable and readable ways. The first version of the
276+
both long and short, unreadable and readable ways. The first version of the
277277
program was extremely obscure, whereas this last one is almost
278278
English: `log` the `sum` of the `range` of numbers from 1 to 10. (We
279279
will see in [later chapters](data) how to define operations like `sum`
@@ -300,15 +300,15 @@ JavaScript was introduced in 1995 as a way to add programs to web
300300
pages in the Netscape Navigator browser. The language has since been
301301
adopted by all other major graphical web browsers. It has made modern
302302
web applications possible—applications with which you can interact
303-
directly, without doing a page reload for every action. But it is also
303+
directly without doing a page reload for every action. JavaScript is also
304304
used in more traditional websites to provide various forms of
305305
interactivity and cleverness.
306306

307307
{{index Java, naming}}
308308

309309
It is important to note that JavaScript has almost nothing to do with
310310
the programming language named Java. The similar name was inspired by
311-
marketing considerations, rather than good judgment. When JavaScript
311+
marketing considerations rather than good judgment. When JavaScript
312312
was being introduced, the Java language was being heavily marketed and
313313
was gaining popularity. Someone thought it was a good idea to try to
314314
ride along on this success. Now we are stuck with the name.
@@ -342,7 +342,7 @@ point them out to you.
342342

343343
This flexibility also has its advantages, though. It leaves space for
344344
a lot of techniques that are impossible in more rigid languages, and
345-
as you will see (for example in [Chapter ?](modules)) it can be used
345+
as you will see (for example in [Chapter ?](modules)), it can be used
346346
to overcome some of JavaScript's shortcomings. After ((learning)) the
347347
language properly and working with it for a while, I have learned to
348348
actually _like_ JavaScript.
@@ -358,14 +358,14 @@ used language in such a radical way turned out to be politically
358358
difficult, and work on the version 4 was abandoned in 2008, leading to
359359
a much less ambitious version 5, which only made some uncontroversial
360360
improvements, coming out in 2009. Then in 2015 version 6 came out, a
361-
major update which included some of the ideas planned for version 4.
361+
major update that included some of the ideas planned for version 4.
362362
Since then we've had new, small updates every year.
363363

364364
The fact that the language is evolving means that browsers have to
365365
constantly keep up, and if you're using an older one, it may not
366366
support every feature. The language designers are careful to not make
367367
any changes that could break existing programs, so new browsers can
368-
still run old programs. In this book, I will use the 2017 version of
368+
still run old programs. In this book, I'm using the 2017 version of
369369
JavaScript.
370370

371371
{{index [JavaScript, "uses of"]}}
@@ -374,15 +374,15 @@ Web browsers are not the only platforms on which JavaScript is used.
374374
Some databases, such as MongoDB and CouchDB, use JavaScript as their
375375
scripting and query language. Several platforms for desktop and server
376376
programming, most notably the ((Node.js)) project (the subject of
377-
[Chapter ?](node)) provide an environment for programming JavaScript
377+
[Chapter ?](node)), provide an environment for programming JavaScript
378378
outside of the browser.
379379

380380
## Code, and what to do with it
381381

382382
{{index "reading code", "writing code"}}
383383

384-
Code is the text that makes up programs. Most chapters in this book
385-
contain quite a lot of it. I believe reading code and writing ((code))
384+
_Code_ is the text that makes up programs. Most chapters in this book
385+
contain quite a lot of code. I believe reading code and writing ((code))
386386
are indispensable parts of ((learning)) to program. Try to not just
387387
glance over the examples—read them attentively and understand them.
388388
This may be slow and confusing at first, but I promise that you'll
@@ -422,14 +422,14 @@ if}}
422422
{{index "developer tools", "JavaScript console"}}
423423

424424
If you want to run the programs defined in this book outside of the
425-
book's website, some care is required. Many examples stand on their
425+
book's website, some care will be required. Many examples stand on their
426426
own and should work in any JavaScript environment. But code in later
427427
chapters is often written for a specific environment (the browser or
428428
Node.js) and can run only there. In addition, many chapters define
429429
bigger programs, and the pieces of code that appear in them depend on
430430
each other or on external files. The
431431
[sandbox](https://eloquentjavascript.net/code) on the website provides
432-
links to Zip files containing all of the scripts and data files
432+
links to Zip files containing all the scripts and data files
433433
necessary to run the code for a given chapter.
434434

435435
## Overview of this book
@@ -447,7 +447,7 @@ robot](robot), a [programming language](language), a [platform
447447
game](game), a [pixel paint program](paint), and a [dynamic
448448
website](skillsharing).
449449

450-
The language part of the book starts with four chapters to introduce
450+
The language part of the book starts with four chapters that introduce
451451
the basic structure of the JavaScript language. They introduce
452452
[control structures](program_structure) (such as the `while` word you
453453
saw in this introduction), [functions](functions) (writing your own

0 commit comments

Comments
 (0)