Using Computer Programming As an Effective Complement To
Total Page:16
File Type:pdf, Size:1020Kb
Using Computer Programming as an Effective Complement to Mathematics Education: Experimenting with the Standards for Mathematics Practice in a Multidisciplinary Environment for Teaching and Learning with Technology in the 21st Century By Pavel Solin1 and Eugenio Roanes-Lozano2 1University of Nevada, Reno, 1664 N Virginia St, Reno, NV 89557, USA. Founder and Director of NCLab (http://nclab.com). 2Instituto de Matemática Interdisciplinar & Departamento de Didáctica de las Ciencias Experimentales, Sociales y Matemáticas, Facultad de Educación, Universidad Complutense de Madrid, c/ Rector Royo Villanova s/n, 28040 – Madrid, Spain. [email protected], [email protected] Received: 30 September 2018 Revised: 12 February 2019 DOI: 10.1564/tme_v27.3.03 Many mathematics educators are not aware of a strong 2. KAREL THE ROBOT connection that exists between the education of computer programming and mathematics. The reason may be that they Karel the Robot is a widely used educational have not been exposed to computer programming. This programming language which was introduced by Richard E. connection is worth exploring, given the current trends of Pattis in his 1981 textbook Karel the Robot: A Gentle automation and Industry 4.0. Therefore, in this paper we Introduction to the Art of Computer Programming (Pattis, take a closer look at the Common Core's eight Mathematical 1995). Let us note that Karel the Robot constitutes an Practice Standards. We show how each one of them can be environment related to Turtle Geometry (Abbelson and reinforced through computer programming. The following diSessa, 1981), but is not yet another implementation, as will discussion is virtually independent of the choice of a be detailed below. concrete programming language. Therefore, in the interest of simplicity, we will use a well-known educational Summarizing, in Turtle Geometry the graphic cursor programming language named Karel the Robot based on (denoted “turtle”) can move forward and backward any (Pattis, 1995) which is freely available online in NCLab number of steps and can turn clockwise and counter (NCLab, 2019). The visual character of this language will clockwise any angle. Therefore, the corresponding allow us to provide more illustrative examples than would be commands (FD, BK, RT, LT) have an input. This input can possible with a standard programming language such as be either an integer or a (finite) decimal representation or Java, C++ or Python. finite decimal approximation of a real number. There are many implementations of Turtle Geometry 1. INTRODUCTION available. The programming language directly related to Turtle Geometry is Logo. An updated comprehensive list of The U.S. Common Core's Mathematical Practice Logo implementations and related software, including more Standards are strongly influenced by the mathematics than 300 references to different dialects, can be found in standards of top-performing countries, and they are of Logo Tree (2019). Among them we could underline international interest - see, for example (Common Core Berkeley Logo (Harvey, 2008), FMSLogo (FMSLogo, n. a.) Standards, 2019; TeacherStep, 2015; DreamBox Learning, and NetLogo (Wilensky, 2019). Nevertheless the Logo 2013; Everett, 2013). However, none of these standards language is not widely used today. mentions computer programming. The purpose of this paper is to suggest that computer programming can be an attractive In the 1980s and 1990s, Turtle Geometry and highly effective complement to mathematics education implementations were included in programming languages (this is one of the different possible approaches to STEM, such as Turbo Pascal and Turbo Prolog. The second author like the use of dynamic geometry systems (Budinski, 2017), was one of the authors of an improved version for Turbo computer algebra systems (Rosa and Petrášková, 2017) or a Pascal (Roanes-Lozano and Roanes-Macías, 1994a) and a dynamic geometry system with computer algebra capabilities version for the computer algebra system Maple (Roanes- (Kovács, Recio and Vélez, 2018)). This claim has been Lozano and Roanes-Macías, 1994b). confirmed by many K-12 schools in the U.S. and other countries which use NCLab to teach computer programming. But implementations of Turtle Geometry can also be NCLab (2018) is a free public cloud computing platform found in “modern” computer languages such as Scratch 3 which provides K-12 schools with easy access to computer (Scratch, n. a.), Python (Rachum, 2015), Haskell programming and related activities which include (Graphics.X11.Turtle, n.a.); Vera Ruiz, 2011) or Java (Haas, mathematics, statistics, geometry, 3D modeling, that belong st 2016). The computer algebra system Xcas also includes an to critical 21 century STEM skills (Solin, 2017). implementation of Turtle Geometry. Also, the One Laptop per Child project includes turtle activities. www.technologyinmatheducation.com International Journal of Technology in Mathematics Education, Vol 27, No 3 [148 Solin and Roanes-Lozano Meanwhile Karel the Robot movement commands have calculus. Therefore, the previous paragraph in its entirety no input: one step forward and 90 degrees clockwise and applies to computer programming as well as to mathematics. counter clockwise turns are considered (go, right, left). To solve a problem, students need to understand it well, and Therefore we could say that the turtle lives in a continuous persevere in solving it. The student’s perseverance is often world meanwhile Karel the Robot lives in a discrete world. more heavily tested in computer programming because the smallest glitch in syntax or logic means a complete failure – Moreover, Karel the Robot can interact with his world in the program crashes with an error message, or just delivers ways that do not exist in Turtle Geometry. For example, as an incorrect outcome. seen above, there are commands for picking and dropping objects, more related to robotics than to geometry. For illustration let us solve a relatively simple task where Karel (the yellow robot) needs to move three books on These characteristics make Karel the Robot really the marks (Figure 1). The students must understand the task, appropriate for beginners in programming, especially in a and figure out the correct sequence of operations which will beginners friendly environment such as NCLab. lead to the desired outcome. Interestingly, the same two approaches mentioned above (continuous / discrete) can be found in educational robots such as Pro-Bot (continuous) (Pro-Bot, n.a.) and Code and Go Mouse (discrete). Let us mention that, originally, the turtle was a mechanical device because, when Logo was developed in the 1960s (Logo, 2019), the computers usually only had text monitors. Figure 1 Karel needs to move three books on the marks. 3. NCLAB The students know the commands go (make one step forward), get (collect an object which is beneath the robot), NCLab (NCLab, 2019) is a free public cloud computing put (drop an object on the ground) and repeat N (repeat platform which provides a large number of free apps related something N times). They also know that they should write to mathematics and computing. These apps include one command per line, and that the commands inside the computer programming in several languages including Karel repeat loop must be indented. Anyway, most of them the Robot, Python, Java, Javascript and others. It also need three or more attempts to solve this task. To get a better provides 3D modeling apps based on the open source idea of what it takes, try it yourself! The solution is provided libraries PLaSM (PlaSM, 2019) and OpenSCAD at the end of the paper in the Appendix. (OpenSCAD, 2019). It provides the widely used typesetting system LaTeX (The LaTeX Project, 2019), a computer In general, computer programs hardly ever work the first algebra system named Sympy based on Python (Sympy, time. Students learn quickly that trying to solve a problem 2019), computing with GNU Octave (GNU Octave, 2019), without understanding it well does not work, and that trying SciPy and NumPy (SciPy.org / NumPy, 2019), statistical without thinking does not help either. They learn to go back, computations with R (R, 2019) etc. analyse where their thinking was wrong, and make adjustments. This strengthens their perseverance skills through “try and try” (Capraro et al, 2012; Shaheed Hartley 4. COMMON CORE’S MATHEMATICS PRACTICE and Treagust, 2014). STANDARD #1 “Make sense of problems and persevere in solving them.” 5. COMMON CORE’S MATHEMATICS PRACTICE STANDARD #2 The first Common Core mathematical practice standard is found in almost every mathematics problem across the “Reason abstractly and quantitatively.” board. It means that students must understand the problem, figure out how to solve it, and then work until it is finished. When trying to problem solve, it is important that Common Core standards (that cover from Kindergarten to students understand there are multiple ways to break apart Grade 12) encourage students to work with their current the problem in order to find the solution. Using symbols, knowledge bank and apply the skills they already have while pictures or other representations to describe the different evaluating themselves in problem-solving. This standard is sections of the problem will allow students to use context easily tested using problems with a tougher skill level than skills rather than standard algorithms. already mastered. While students work through more difficult problems, they focus on the process of solving the Let’s use an example