Skip to content

Commit

Permalink
Merge pull request #16 from waldoluisribeiro/master
Browse files Browse the repository at this point in the history
fixed typos; version 6.1.7
  • Loading branch information
ChrisMayfield authored Aug 5, 2017
2 parents e60217e + 986ddfa commit 941add5
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions thinkjava.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
\newcommand{\thetitle}{Think Java}
\newcommand{\thesubtitle}{How to Think Like a Computer Scientist}
\newcommand{\theauthors}{Allen B. Downey and Chris Mayfield}
\newcommand{\theversion}{6.1.6}
\newcommand{\theversion}{6.1.7}

%%%% Both LATEX and PLASTEX

Expand Down Expand Up @@ -404,7 +404,7 @@ \chapter{The way of the program}

The single most important skill for a computer scientist is {\bf problem solving}.
It involves the ability to formulate problems, think creatively about solutions, and express solutions clearly and accurately.
As it turns out, the process of learning to program is an excellent opportunity to develop problem solving skills.
As it turns out, the process of learning to program is an excellent opportunity to develop problem-solving skills.
That's why this chapter is called, ``The way of the program''.

On one level you will be learning to program, a useful skill by itself.
Expand Down Expand Up @@ -461,7 +461,7 @@ \section{What is computer science?}

Designing algorithms and writing code is difficult and error-prone.
For historical reasons, programming errors are called {\bf bugs}, and the process of tracking them down and correcting them is called {\bf debugging}.
As you learn to debug your programs, you will develop new problem solving skills.
As you learn to debug your programs, you will develop new problem-solving skills.
You will need to think creatively when unexpected errors happen.

Although it can be frustrating, debugging is an intellectually rich, challenging, and interesting part of computer programming.
Expand Down Expand Up @@ -809,7 +809,7 @@ \section{Formatting code}
%These characters, which are called {\bf whitespace}, affect the format of the code, but they don't affect its behavior.

%You have a lot of freedom in how you arrange your code.
%However with that freedom comes responsibility, both to yourself (when you look at the code in the future) and others who will be reading, understanding, and debugging it.
%However, with that freedom comes responsibility, both to yourself (when you look at the code in the future) and others who will be reading, understanding, and debugging it.

\index{Google style}

Expand Down Expand Up @@ -874,7 +874,7 @@ \section{Debugging code}

Finally, programming sometimes brings out strong emotions.
If you are struggling with a difficult bug, you might feel angry, despondent, or embarrassed.
Remember that you are not alone, and most if not all programmers have had similar experiences.
Remember that you are not alone, and most, if not all, programmers have had similar experiences.
Don't hesitate to reach out to a friend and ask questions!


Expand Down Expand Up @@ -2931,7 +2931,7 @@ \section{Adding new methods}
\item Introducing new methods can make a program smaller by eliminating repetitive code.
For example, to display nine consecutive new lines, you could invoke \java{threeLine} three times.

\item A common problem solving technique is to break tasks down into sub-problems.
\item A common problem-solving technique is to break tasks down into sub-problems.
Methods allow you to focus on each sub-problem in isolation, and then compose them into a complete solution.

\end{itemize}
Expand Down Expand Up @@ -7974,7 +7974,7 @@ \section{Garbage collection}

If there are no references to an object, there is no way to access its attributes or invoke a method on it.
From the programmer's view, it ceases to exist.
However it's still present in the computer's memory, taking up space.
However, it's still present in the computer's memory, taking up space.

\index{garbage collection}

Expand Down Expand Up @@ -11225,7 +11225,7 @@ \section{Exercises}

\index{override}

Think of other ways you can minimize penalty points, such as playing the highest ranking cards first.
Think of other ways you can minimize penalty points, such as playing the highest-ranking cards first.
Write a new class that extends \java{Player} and overrides \java{play} to implement your strategy.
\end{exercise}

Expand Down Expand Up @@ -11362,7 +11362,7 @@ \section{Command-line interface}
One of the most powerful and useful skills you can learn is how to use the {\bf command-line interface}, also called the ``terminal''.
The command line is a direct interface to the operating system.
It allows you to run programs, manage files and directories, and monitor system resources.
Many advanced tools, both for software development and general purpose computing, are available only at the command line.
Many advanced tools, both for software development and general-purpose computing, are available only at the command line.

There are many good tutorials online for learning the command line for your operating system; just search the web for ``command line tutorial''.
On Unix systems like Linux and OS X, you can get started with just four commands: change the working directory ({\tt cd}), list directory contents ({\tt ls}), compile Java programs ({\tt javac}), and run Java programs ({\tt java}).
Expand Down Expand Up @@ -11394,7 +11394,7 @@ \section{Command-line testing}
And after you've completed programming an algorithm, it's important to test that it works correctly on a variety of inputs.

Throughout the book, we illustrate techniques for testing your programs.
Most if not all testing is based on a simple idea: does the program do what we expect it to do?
Most, if not all, testing is based on a simple idea: does the program do what we expect it to do?
For simple programs, it's not difficult to run them several times and see what happens.
But at some point, you will get tired of typing the same test cases over and over.

Expand Down Expand Up @@ -11786,7 +11786,7 @@ \section{Graphics methods}
\index{bounding box}

The four parameters specify a {\bf bounding box}, which is the rectangle in which the oval is drawn.
\java{x} and \java{y} specify the the location of the upper-left corner of the bounding box.
\java{x} and \java{y} specify the location of the upper-left corner of the bounding box.
The bounding box itself is not drawn (see Figure~\ref{fig.circle}).

\begin{figure}[!ht]
Expand Down Expand Up @@ -12492,7 +12492,7 @@ \subsection*{No, I really need help.}

It happens.
Even the best programmers get stuck.
Sometimes you need a another pair of eyes.
Sometimes you need another pair of eyes.

Before you bring someone else in, make sure you have tried the techniques described in this appendix.

Expand Down

0 comments on commit 941add5

Please sign in to comment.