Saturday, December 1, 2018

The Hour Of Processing & SAGE 2018!

The Hour Of Processing & SAGE 2018!

Every year, around Admiral Grace Murray Hopper's birthday, we celebrate CS Education Week aka CSED Week, and participate in The Hour Of Code. The Hour Of Code started a few years ago and has grown by leaps and bounds! Last year it was estimated that thousands of schools participated world wide. Further, 100s of thousands of students wrote millions of lines of code during their Hour Of Code, many for the first time ever!

I like to tell my students, "Grace Hooper's why we have nice things!" Back in the day of the first electronic computers using Vacuum Tube technology in the 1940s, she invented the concept of coding and programming languages. First, she developed the language A, then she created B, and finally COBOL which is still used today in banking and on Wall Street! So, if it weren't for Gracey, you wouldn't have apps on your SmartPhones! We'd have DumbPhones! 

Admiral Hopper also worked in Naval Intelligence during WWII. For example, top secret files were made public in the late 1990s describing her work on the Manhattan Project. She used some of her first programs on a computer called the Harvard Mark I to solve some really pesky equations leading to the development of the Atomic Bomb. If it weren't for Grace, the war in the Pacific would have lasted many more years. She singlehandedly shortened WWII by several years and saved many allied lives! 

In many ways, Grace's story parallels that of Alan Turing, a mathematician who worked for British Military Intelligence during WWII. He built a computer named Christopher out of gears and pulleys, reminiscent of Babbage's Analytical Engine and Ada Lovelace's first programs, and cracked the Enigma Code used by the Nazis in the European Theater! Alan is also credited with saving millions of lives and shortening WWII by several years!

Many of the activities at the Hour Of Code website are based on the Blockly or Scratch programming languages using online IDEs and target younger students. I've used these in the past but thought I'd do my own this year based on Python and SAGE (see above) as well as Java and Processing tailoring my presentation to a High School audience. 

Python is a very popular programming language used to teach Mathematics and to do real Science. SAGE was a supercomputer at Washington State University funded by the NSF free for you to use where ever you have an internet connection. Now, SAGE runs on the Google Compute Platform (GCP) so we are computing in the cloud! You can use SAGE on your cellphone or tablet using an app and you can use SAGE on your cellphone, tablet or PC using an internet browser. Recently, a commercial version of SAGE has been made available at https://cocalc.com with many more options such as Jupyter Notebooks and LaTEX document support..

I ran my Hour Of SAGE with all my classes on Monday 12/5/2016 and with all the remaining Honors Math classes on Wednesday 12/7/2016 as an in-school field trip. So, here's what I did on Wednesday:

STEP01: I went to each class and spoke about taking AP CompSci next year. I gave out the following letter too. The CSAP (Computer Science AP) letter I gave to every class except for my current AP CompSci students. I gave them the CSI (Computer Science Independent Study) letter. We used to have an intro programming course based on Python called CSH (Computer Science Honors aka Computer Math) but we don't have the enrollment to justify it anymore. I hope we have the enrollment for CSH next year so students may benefit from 2 years of coding experience before taking the AP Exam. 

In prior years, we also had a class called CRL (Calculus Research Lab aka Scientific Computing Lab) as a co-requisite for AP Calculus using SAGE to complement Calculus class and to introduce the concepts of Scientific Computing aka Computing Science.





STEP02: I then march the whole class to my PC Lab-Classroom to have them do some coding all period! Put yourself in the students' shoes. Most of these students have never coded before and never saw my Lab before (see picture of my room in the banner of this blog). Imagine walking into a dark room. The only source of light was from 24 student PCs and a SmartBoard. On the SmartBoard you see the HourOfCode website masthead with the Game Of Thrones original sound track playing in the background. Sorry, I tend to be a little dramatic.


STEP03: Then I show the following motivational video about coding as a profession.


STEP04: In AP CompSci we used SAGECELL to do some coding. I start very simply with the basic arithmetic operators in Python: +, -, *, /, //, % and ** aka ^. We follow by using the same operators algebraically. I finish with coding a simple python script or two related to the math the students are learning tailored to algebra, geometry, precalculus or calculus (please see the second screencast at the top of this post). With my Math students I introduced the Processing IDE instead based on Daniel Shiffman's Processing Hour Of Code (please see first screencast at the top of this post). This year we used OpenProcessing for the first time in Processing.js (Java based) mode computing on the Amazon Wed Services (AWS), computing in the cloud!

BTW, when you are computing in the cloud, you are really using someone's super computer. We usually use HAC or HPC cloud servers:

High Availablility Clusters (HAC) like DropBox and Google Drive are basically tons of redundant storage space for your files and photos. Not to worry, if one server goes down, another of several redundant servers still has you files! 

High Peformance Clusters (HPC) like GCP and AWS are made up of several processors so you can run complex code faster! Applications that need a lot of computing power to solve problems in a timely manner include: Weather Simulations, DNA and Genome Sequencing, 3D Movies, Animated Video, Fractal Decryption Algorithms, etc.

STEP05: We finished with a pep talk from President Obama himself! Gotta luv those guest speakers!


STEP06: Last, but not least, I gave out Certificates Of Completion! Alas, our In-School Field Trip has come to an end, as all good things must.

Well, that's all folks!
A. Jorge Garcia

 

Applied Math, Physics & CompSci

2 comments: