Motivation: The Hero's Journey

Feb 26, 2014 • Mark Stacy

Motivation to learn and understand the ability to script and write code can be looked at as a daunting task. I like to think of each and everyone as a HERO who is about to embark on an amazing  journey.  The journey begins with a student given the task to calculate the mean temperature readings from the sensors out at the research station. ahhhh..yes, I will put all my data in Excel and be able to calculate the values that are needed. The sensor has been recording temperature data for twenty years and records individual data values every 5 seconds. The student pushes on and starts to record values in excel and spends approximately 45 minutes to enter one days worth of data. He is humbled by the process and calculates the time needed to attain a result. 45 minutes x 365 days  x 20 years equals 328,500 minutes , 5475 hours, or  228 days to calculate the mean temperature.  He pushes on and talks to the professor and other students which are in similar circumstances. Script writing and Python programming language was talk about and the need to quickly calculate values from text files. The student reads the quick python tutorial and sets off to write his first script. He feels lost not sure what he is doing, but pushes on and works hard at the process. A new email arrives from his Professor: how the calculation of the mean temperature? He was wondering because he would like it calculated by month and also include rainfall, and relative humidity. The student is shocked and upset with what he has done and upset for what is still expected. He stumbles across a sign up sheet for Software Carpentry bootcamp that is scheduled for this weekend. The SC bootcamp explained not only python but basic concepts like version control, for loops, conditionals and gave the student knowledge and a network of others that are in similar circumstances. This knowledge brought the student out of the doldrums and into the light. This cycle of knowledge acquisition is a continuos cycle. We leave our ordinary world and dive into the unknown. We fall to the dark place of indecision. We climb out with new knowledge. Thus you can look at it as the journey never ends or the quest is the process of acquiring new knowledge. Back to the story….. The student was able to produce a script that could loop through the files on disk. Open and read the text elements required to calculate the results. While he was at the SC bootcamp he was introduced to the ‘numpy’ Library. His first script did not include this library, but he had already started to investigate and find that he could produce a better script to calculate statistics for the entire dataset. Thus the Journey Continues …..