Initial Publication Date: October 3, 2017
Computational teaching tools in the classroom: GUI vs Command Line
Alain Plattner, Earth & Environmental Sciences, California State University-FresnoComputational tools in the classroom are becoming increasingly popular for good reasons. Instead of being handed down wisdom by the lecturer who makes claims about how physical, chemical, or geological processes work, students can use computational tools to simulate such processes and adjust parameters to study their influence on the outcome.
Some computational teaching tools use graphical user interfaces allowing students to simulate processes by clicking on buttons. These user interfaces have the advantage that they require minimal prior computational experience but they also remove the user from the internal processes that happen between entering a variable, clicking on a button, and seeing an outcome. In particular for complex simulations involving several steps and a range of variables, a GUI user will not be able to see which variable influences which step and which outputs from one step enter into the next step. This can lead to a misunderstanding of the sequentiality of the involved steps. For example, when processing data from a ground penetrating radar survey (see https://github.com/NSGeophysics/GPR-O/blob/master/doc/GPR-O.pdf) it is of great importance that the students understand that correcting for the topography must happen after removal of horizontal bands because what is horizontal before topographical correction will not be horizontal anymore afterward. From a GUI it may not be clear what the difference is between pressing one button before the other and vice versa.
Command line based teaching programs (including the Matlab command line) on the other hand require the students to explicitly enter the input variables of a function and to define the function output. When setting the output variable of one step as the input variable for the next step, the sequentiality becomes immediately clear. An apparent disadvantage of command-line based teaching programs is that the students first need to get acquainted with using the command line. However, this apparent disadvantage can be a chance for students to become more familiar with scientific computation and basic computational topics such as organization of folder structure.
When teaching students with no prior experience in scientific computing, I notice that in the beginning these students struggle with understanding basic folder organization (paths, creating folders, saving files into the folders, switching between folders). By using command-line based teaching programs, the students are forced to understand in which path they currently are with their command line, and which files and programs are saved in that path. When running programs from the command line, a typo will lead to an error. As a result, running a program becomes like writing a line of code. The students have to know with which variables they are working and which program turns these variables into the desired result. Finally, reading the source code of a program without a GUI is much simpler as that program contains no lengthy overheads for the GUI setup.
The initial effort required to introduce command-line calls in classes where I use computational teaching tools pays off as the students practice their computational thinking skills and become more comfortable with scientific programming.