Introduction to MATLAB in Geosciences: avoiding computing frustration is key to a happy coder

Robert Moucha, Syracuse University

As an Earth science teacher, I like to connect with the students to draw on their own experiences; naturally, the paradigm of Earth science is established through "real world" examples that students can relate to. With this philosophy I emphasize concepts, theory, and hands-on experience rather than simple memorization of terminology. Moreover, the science that is geology is changing. In the last few decades it has evolved from a largely qualitative, observational science to a more quantitative science. Subsequently, the geoscience industry, government and academia are demanding a skillset of their prospective employees that is more broad and quantitative than ever before. To meet this challenge and to better prepare students for employment in the industry or for admission to graduate studies, I designed a capstone course, Numerical Methods in Geosciences, in which a variety of quantitative examples from different fields in Earth science are used. Students are exposed to the use of quantitative methods that include data analysis and numerical modeling through lectures and hands-on exercises.

In my opinion, MATLAB is an ideal first computing language for students to learn. It is an accessible software that has a familiar layout and allows for an easy progression from simple line-by-line real-time commands to procedural scripting to coded development. In my course, the first couple of lectures and the first assignment, only utilize the command window. Students learn how basic functions work, the idea of input and output, and the concept of variables. With this approach, students are introduced to linear programming without their knowledge. This is key to putting students at ease and by not overwhelming the students at first sight with a blank screen when they start a program, as is the case, for example, with C or FORTRAN. However, I do find that the comfortable transition time from command window to scripting differs from student to student. Some students require a more hands-on-approach and positive encouragement and reinforcement that they can't damage the computer or software by doing something wrong. I believe the greatest challenge for me is to put myself in the students' proverbial shoes; I cannot remember a time when I did not know how to program and this presents difficulty in developing new and exciting projects that can be completed by students in a reasonable time frame without much frustration. Avoiding frustration with code development in an introductory class is also a formidable challenge. Even though seasoned coders can and do experience frustration during development, they have past successes to encourage them. But, with a beginner coder, frustration can lead very quickly to a general dislike of coding.