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

change all smart quotes, worth a thorough review #118

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion chapters/OOPs!/outline.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ http://www.openframeworks.cc/tutorials/first%20steps/003_ooops_object_oriented_p
-What is it / what does it mean ?
- example of basic class and object (polymorphism)
- make a simple class (simple particle?)
- make different objects from the same class
- make different objects from the same class
2 changes: 1 addition & 1 deletion chapters/animation/chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Background

The word animation is a medieval term stemming from the Latin animare, which means instill with life. In modern terms, it's used to describe the process of creating movement from still, sequential images. Early creators of animation used spinning discs (phenakistoscopes) and cylinders (zoetropes) with successive frames to create the illusion of a smooth movement from persistence of vision. In modern times, we're quite used to other techniques such as flip books and cinematic techniques like stop motion. Increasingly, artists have been using computational techniques to create animation -- using code to "bring life" to objects on the screen over successive frames. This chapter is going to look at these techniques and specifically try to address a central question: how can we create compelling, organic, and even absurd movement through code?
The word animation is a medieval term stemming from the Latin animare, which means 'instill with life'. In modern terms, it's used to describe the process of creating movement from still, sequential images. Early creators of animation used spinning discs (phenakistoscopes) and cylinders (zoetropes) with successive frames to create the illusion of a smooth movement from persistence of vision. In modern times, we're quite used to other techniques such as flip books and cinematic techniques like stop motion. Increasingly, artists have been using computational techniques to create animation -- using code to "bring life" to objects on the screen over successive frames. This chapter is going to look at these techniques and specifically try to address a central question: how can we create compelling, organic, and even absurd movement through code?

As a side note, I studied fine arts, painting and printmaking, and it was accidental that I started using computers. The moment I saw how you could write code to move something across the screen, even as simple as silly rectangle, I was hooked. I began during the first dot-com era working with flash / actionscript and lingo / director and have never looked back.

Expand Down
16 changes: 8 additions & 8 deletions chapters/cplusplus_basics/chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ You will see a slightly different editing configuration but the same template co
// your code goes here .
```

A line beginning with a double forward slash is called a comment. You may type anything you need to in order to annotate your code in a way you understand. Sometimes a it's useful to comment out code by placing two forward-slashes before it, because that deactivates the C++ code without deleting it. Comments in C++ can also take up multiple lines, or insert like a tag. The syntax for beginning and ending comment-mode is different. Everything between the `/* and the */` becomes a comment:
A line beginning with a double forward slash is called a comment. You may type anything you need to in order to annotate your code in a way you understand. Sometimes a it's useful to "comment out code" by placing two forward-slashes before it, because that deactivates the C++ code without deleting it. Comments in C++ can also take up multiple lines, or insert like a tag. The syntax for beginning and ending comment-mode is different. Everything between the `/* and the */` becomes a comment:


```cpp
Expand Down Expand Up @@ -104,7 +104,7 @@ int main(){
}
```

Now press the green *ideone it!* button at the bottom right corner and watch the output console, which is the bottom half of the code editor, just above that green button. You will see orange status messages saying things like Waiting for compilation,” “Compilation, and Running. Shortly after, the program will execute in the cloud and the standard output should show up on that web page. You should see the new message in Figure 8.
Now press the green *ideone it!* button at the bottom right corner and watch the output console, which is the bottom half of the code editor, just above that green button. You will see orange status messages saying things like "Waiting for compilation," "Compilation," and "Running". Shortly after, the program will execute in the cloud and the standard output should show up on that web page. You should see the new message in Figure 8.

![Figure 8](images/hello-world.png "Figure 8: Hello World appears in output window")

Expand Down Expand Up @@ -151,16 +151,16 @@ Let's do an experiment. In the code editor, please comment out the include direc
The syntax coloring will change to all green, meaning it's now just a comment. Run the code by pressing the big green button at the bottom right, and you'll see something new in the output pane.

```
prog.cpp: In function int main():
prog.cpp:5:2: error: cout was not declared in this scope
prog.cpp: In function 'int main()':
prog.cpp:5:2: error: 'cout' was not declared in this scope
cout << "Hello World" << endl;
^
prog.cpp:5:27: error: endl was not declared in this scope
prog.cpp:5:27: error: 'endl' was not declared in this scope
cout << "Hello World" << endl;
^
```

The compiler found an error and did not run the program. Instead, in attempt to help you fix it, the compiler is showing you where it got confused in attempt to help you fix it. The first part, *prog.cpp*: tells you the file that contains the error. In this case, ideone.com saved your code into that default file name. Next, it says `In function ‘int main()’`: file showing you the specific section of the code that contains the error, in this case, between the {curly brace} of a function called *main*. (We will talk about functions and curly braces later). On the next line, we see `prog.cpp:5:2:`. The 5 is how many lines from the top of the file, and 2 is how many characters rightward from the beginning of the line. Next, we see `error: ‘cout’ was not declared in this scope`. That is a message describing what it believes it wrong in the code. In this case, it's fairly correct. iostream.h is gone, and therefore no `cout` is provided to us, and so when we try to send "Hello World", the compile fails. On the next couple of lines, you see the line of code containing the fallacious `cout`, plus an extra little up-caret character on the line beneath it, and that is supposed to be an arrow pointing at a character in the code. In this case, the arrow should be sitting beneath the 'c' in `cout`. The system is showing you visually which token is at fault. A second error is shown, and this time, the compiler complains that there is no endl. Of course, we know that in order to fix the error, we need to include `<iostream.h>` so let us do that now. Please un-comment line 1 and re-run the code.
The compiler found an error and did not run the program. Instead, in attempt to help you fix it, the compiler is showing you where it got confused in attempt to help you fix it. The first part, *prog.cpp*: tells you the file that contains the error. In this case, ideone.com saved your code into that default file name. Next, it says `In function 'int main()'`: file showing you the specific section of the code that contains the error, in this case, between the {curly brace} of a function called *main*. (We will talk about functions and curly braces later). On the next line, we see `prog.cpp:5:2:`. The 5 is how many lines from the top of the file, and 2 is how many characters rightward from the beginning of the line. Next, we see `error: 'cout' was not declared in this scope`. That is a message describing what it believes it wrong in the code. In this case, it's fairly correct. iostream.h is gone, and therefore no `cout` is provided to us, and so when we try to send "Hello World", the compile fails. On the next couple of lines, you see the line of code containing the fallacious `cout`, plus an extra little up-caret character on the line beneath it, and that is supposed to be an arrow pointing at a character in the code. In this case, the arrow should be sitting beneath the 'c' in `cout`. The system is showing you visually which token is at fault. A second error is shown, and this time, the compiler complains that there is no endl. Of course, we know that in order to fix the error, we need to include `<iostream.h>` so let us do that now. Please un-comment line 1 and re-run the code.

```cpp
#include <iostream>
Expand All @@ -187,7 +187,7 @@ It's a very similar error as before, where it cannot find `cout` or `endl`, but
```
prog.cpp:5:2: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/4.8/iostream:61:18: note: std::cout
/usr/include/c++/4.8/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^
```
Expand Down Expand Up @@ -303,7 +303,7 @@ There are a few advantages to using C++ over the other options (mostly scripting

## Variables (part 1)

> A thing is a think, a unit of thought
> A "thing" is a "think", a unit of thought
>
> -- Alan Watts

Expand Down
20 changes: 10 additions & 10 deletions chapters/cplusplus_basics/unabridged.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ You will see a slightly different editing configuration but the same template co
// your code goes here .
```

A line beginning with a double forward slash is called a comment. You may type anything you need to in order to annotate your code in a way you understand. Sometimes a it's useful to comment out code by placing two forward-slashes before it, because that deactivates the C++ code without deleting it. Comments in C++ can also take up multiple lines, or insert like a tag. The syntax for beginning and ending comment-mode is different. Everything between the `/* and the */` becomes a comment:
A line beginning with a double forward slash is called a comment. You may type anything you need to in order to annotate your code in a way you understand. Sometimes a it's useful to "comment out code" by placing two forward-slashes before it, because that deactivates the C++ code without deleting it. Comments in C++ can also take up multiple lines, or insert like a tag. The syntax for beginning and ending comment-mode is different. Everything between the `/* and the */` becomes a comment:


```cpp
Expand Down Expand Up @@ -102,7 +102,7 @@ int main(){
}
```

Now press the green *ideone it!* button at the bottom right corner and watch the output console, which is the bottom half of the code editor, just above that green button. You will see orange status messages saying things like Waiting for compilation,” “Compilation, and Running. Shortly after, the program will execute in the cloud and the standard output should show up on that web page. You should see the new message in Figure 8.
Now press the green *ideone it!* button at the bottom right corner and watch the output console, which is the bottom half of the code editor, just above that green button. You will see orange status messages saying things like "Waiting for compilation," "Compilation," and "Running". Shortly after, the program will execute in the cloud and the standard output should show up on that web page. You should see the new message in Figure 8.

![Figure 8](images/hello-world.png "Figure 8: Hello World appears in output window")

Expand Down Expand Up @@ -149,16 +149,16 @@ Let's do an experiment. In the code editor, please comment out the include direc
The syntax coloring will change to all green, meaning it's now just a comment. Run the code by pressing the big green button at the bottom right, and you'll see something new in the output pane.

```
prog.cpp: In function int main():
prog.cpp:5:2: error: cout was not declared in this scope
prog.cpp: In function 'int main()':
prog.cpp:5:2: error: 'cout' was not declared in this scope
cout << "Hello World" << endl;
^
prog.cpp:5:27: error: endl was not declared in this scope
prog.cpp:5:27: error: 'endl' was not declared in this scope
cout << "Hello World" << endl;
^
```

The compiler found an error and did not run the program. Instead, in attempt to help you fix it, the compiler is showing you where it got confused in attempt to help you fix it. The first part, *prog.cpp*: tells you the file that contains the error. In this case, ideone.com saved your code into that default file name. Next, it says `In function ‘int main()’`: file showing you the specific section of the code that contains the error, in this case, between the {curly brace} of a function called *main*. (We will talk about functions and curly braces later). On the next line, we see `prog.cpp:5:2:`. The 5 is how many lines from the top of the file, and 2 is how many characters rightward from the beginning of the line. Next, we see `error: ‘cout’ was not declared in this scope`. That is a message describing what it believes it wrong in the code. In this case, it's fairly correct. iostream.h is gone, and therefore no `cout` is provided to us, and so when we try to send "Hello World", the compile fails. On the next couple of lines, you see the line of code containing the fallacious `cout`, plus an extra little up-caret character on the line beneath it, and that is supposed to be an arrow pointing at a character in the code. In this case, the arrow should be sitting beneath the 'c' in `cout`. The system is showing you visually which token is at fault. A second error is shown, and this time, the compiler complains that there is no endl. Of course, we know that in order to fix the error, we need to include `<iostream.h>` so let us do that now. Please un-comment line 1 and re-run the code.
The compiler found an error and did not run the program. Instead, in attempt to help you fix it, the compiler is showing you where it got confused in attempt to help you fix it. The first part, *prog.cpp*: tells you the file that contains the error. In this case, ideone.com saved your code into that default file name. Next, it says `In function 'int main()'`: file showing you the specific section of the code that contains the error, in this case, between the {curly brace} of a function called *main*. (We will talk about functions and curly braces later). On the next line, we see `prog.cpp:5:2:`. The 5 is how many lines from the top of the file, and 2 is how many characters rightward from the beginning of the line. Next, we see `error: 'cout' was not declared in this scope`. That is a message describing what it believes it wrong in the code. In this case, it's fairly correct. iostream.h is gone, and therefore no `cout` is provided to us, and so when we try to send "Hello World", the compile fails. On the next couple of lines, you see the line of code containing the fallacious `cout`, plus an extra little up-caret character on the line beneath it, and that is supposed to be an arrow pointing at a character in the code. In this case, the arrow should be sitting beneath the 'c' in `cout`. The system is showing you visually which token is at fault. A second error is shown, and this time, the compiler complains that there is no endl. Of course, we know that in order to fix the error, we need to include `<iostream.h>` so let us do that now. Please un-comment line 1 and re-run the code.

```cpp
#include <iostream>
Expand All @@ -185,7 +185,7 @@ It's a very similar error as before, where it cannot find `cout` or `endl`, but
```
prog.cpp:5:2: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/4.8/iostream:61:18: note: std::cout
/usr/include/c++/4.8/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^
```
Expand Down Expand Up @@ -334,7 +334,7 @@ Sometimes I say C, and sometimes I say C++. Since they are closely related, perh

## Variables (part 1)

> A thing is a think, a unit of thought
> A "thing" is a "think", a unit of thought
>
> -- Alan Watts

Expand Down Expand Up @@ -2158,8 +2158,8 @@ int main() {
The output is a compiler error.

```
prog.cpp: In function void addOne():
prog.cpp:5:10: error: ‘i’ was not declared in this scope
prog.cpp: In function 'void addOne()':
prog.cpp:5:10: error: 'i' was not declared in this scope
cout << i;
^
```
Expand Down
Loading