Getting Around The Book¶
This page will help you learn how to get around this interactive textbook and use the embedded tools.
ActiveCode Windows¶
One of the most important things that you can do when you are learning a programming language is to write programs. Unfortunately, typical textbooks allow you to read about programming but don’t allow you to practice. We have created a unique tool called ActiveCode that allows you to write, modify, and execute programs right in the text itself (right from the web browser). Although this is certainly not the way real programs are written, it provides an excellent environment for learning a programming language since you can experiment with the language as you are reading.
Take a look at the ActiveCode interpreter in action. If we take a simple program and make it active, you will see that it can be executed directly by pressing the Run button. Try pressing the Run button below.
The CodeLens Tool¶
In addition to ActiveCode, you can also execute code with the assistance of a unique visualization tool. This tool, known as CodeLens, allows you to control the step by step execution of a program. It also lets you see the values of all variables as they are created and modified. The following example shows CodeLens in action on the same simple program as we saw above. Remember that in ActiveCode, the source code executes from beginning to end and you can see the final result. In Codelens you can see and control the step by step progress.
Try clicking on the Forward button below.
Many CodeLens examples will link to an external page, like this or that.
Self-Check Questions¶
Finally, it is also possible to embed simple questions into the text. These questions provide a way for you to check yourselves as you go along. The questions also provide feedback so that you can understand why an answer may or may not be correct.
Check your understanding
- Python
- Python is a great language, but is not covered in this course.
- Java
- Java is a good object oriented language but
- C++
- Yes, this couse will teach you C++. Specifically, *Modern* C++
- Haskell
- No, Haskell is a functional programming language. You can use C++ to write functional programs as well.
sc-1-2: What programming language does this course help you to learn?
This next type of question allows more than one correct answer to be required. The feedback will tell you whether you have the correct number as well as the feedback for each.
- red
- Red is a definitely on of the colors.
- yellow
- Yes, yellow is correct.
- black
- Remember the acronym...ROY G BIV. B stands for blue.
- green
- Yes, green is one of the colors.
sc-1-3: Which colors might be found in a rainbow? (choose all that apply)