Fig 1.
The “one tool to rule them all” (or: how programming languages do not work).
Table 1.
A noninclusive discussion of programming languages.
A shell is a command line (i.e., programming) interface to an operating system, like Unix operating systems. Low-level programming languages deal with a computer’s hardware. The process of moving from the literal processor instructions toward human-readable applications is called “abstraction.” Low-level languages require little abstraction. Interpreted languages are quicker to test (e.g., to run a few lines of code); this facilitates learning through trial and error. Interpreted languages tend to be more human readable. Compiled languages are powerful because they are often more efficient and can be used for low-level tasks. However, the distinction between interpreted and compiled languages is not always rigid. All languages presented below are free unless noted otherwise. The Wikipedia page on programming languages provides a great overview and comparison of languages.
Fig 2.
Anatomy of an error message, Part 1 (or: How to write more than one line of code).
Here we show an example of the debugging process in R using the RStudio environment, with the goal of concatenating two words.
Fig 3.
Anatomy of an error message, Part 2 (or: Just because it works, doesn’t mean it’s right).
Here we provide more examples of the debugging process. Examples shown in Figs 3–5 are conducted in Python using a Jupyter notebook. Environments like RStudio (in Fig 2) and Jupyter notebooks are two examples of integrated development environments; these environments offer additional support, including built-in debugging tools. First, we show an error that does not induce an error message, but the user must debug nonetheless.
Fig 4.
Anatomy of an error message, Part 3 (or: Trace your way back to the problem).
Here we show an explicit error message.
Fig 5.
Anatomy of an error message, Part 4 (or: Debugging a solution).
Lastly, we show how to debug a solution to understand a line of code found on the internet.
Fig 6.
“How to exit the vim editor?” (or: We all get stuck at some point).
Now viewed >1.33 million times; see: http://stackoverflow.com/questions/11828270/how-to-exit-the-vim-editor.