Friday, December 21, 2018

AP CompSci A 2018-2019: Conditional Statements (December)

AP CompSci A 2018-2019:
Conditional Statements
(December)

LAB05 ScreenCasts



We finally finished LAB05 which was all about Conditional Statements: if, then and else! We also talked about boolean expressions and predicate methods. Boolean expressions evaluate to true or false. We use these expressions in the if clause to ask a question during execution of a program. Predicate methods are accessors which return a boolean result. Also, predicate methods can usually be written very elegantly without resorting to long winded if then else or else if clauses! LAB06 will be about Iteration, aka loops. LAB07 will be about 1D and 2D, static and dynamic arrays! Fun was had by all. Of course, we went CompSci Caroling the day before break!

BTW, we're loving our new cs50.io, aka c9.io, ide from the Amazon Cloud (AWS)! Don't forget about the Processing IDE! We just started using OpenProcessing online as they've just added Processing.js which is more compatible with Processing's IDE. The default mode is P5.js (javascript) but we switch to Processing.js (java) and all is well! So, we're computing in the cloud even when we use Processing! IDK, is OpenProcessing is on AWS or the Google Compute Platform (GCP)?


RECOMMENDED AP COMPSCI REVIEW:

CRIB SHEET (given during exam)
REVIEW BARRONS BOOK (see me)
REVIEW BARRONS ONLINE 
REVIEW APCENTRAL (past FRQs)
REVIEW EDX REVIEW MOOC01 
REVIEW UDEMY REVIEW MOOC02 
REVIEW CODING_BAT 
REVIEW PRACTICE_IT 
REVIEW RUNESTONE 
AUDIT CS50


XTRA CREDIT FILKS RUBRIC 
(1 video = up to 5 bonus points):
1) Use a recognizable tune.
2) Karaoke entire song changing up the words (about STEAM).
3) You are Singing, Dancing or Playing an instrument.
4) You upload your video to YouTube and provide the url.
5) YouTube Description includes the lyrics.

XTRA CREDIT ARTICLES RUBRIC

(up to 5 articles = 1 bonus point each):
1) Cover Sheet is a Summary of the article.
2) FullPage, 12 pt, DoubleSpaced, 1" Margin.
3) Article has to be STEAM related
4) Article has to be a current event.
5) Copy of entire article is attached.

Well, that's all folks!
Teaching with Technology, 

Beautiful Mind Soundscape:

AP Calculus BC 2018-2019: Transcendental Functions (December)

AP Calculus BC 2018-2019:
Transcendental Functions
(December)

UNIT07 ScreenCasts

We studied the Calculus of Transcendental Functions. These functions cannot be expressed algebraically as finite polynomials such as exponential functions and trigonometric functions as well as their inverses. We focus here on exponential and logarithmic functions. We already covered trig functions in UNIT04 and we cover inverse trig functions in UNIT08. Fun was had by all! Of course, we went Calculus Caroling the day before Holiday Break!


We're loving our class set of TI nSPire CX CAS Graphing Calculators from Donorschoose


RECOMMENDED AP CALCULUS BC REVIEW:
CRIB SHEET (not given during exam) 
REVIEW BARRONS BOOK (see me)
REVIEW BARRONS ONLINE 

REVIEW DELTAMATH AB CALC FLASH CARDS
REVIEW APCENTRAL (lastest BC FRQs)

REVIEW APCENTRAL (older AB FRQs)
REVIEW APCENTRAL (older BC FRQs)
REVIEW EDX MOOC01 
REVIEW EDX MOOC02 
REVIEW COURSERA MOOC03 


XTRA CREDIT FILKS RUBRIC 
(1 video = up to 5 bonus points):
1) Use a recognizable tune.
2) Karaoke entire song changing up the words (about STEAM).
3) You are Singing, Dancing or Playing an instrument.
4) You upload your video to YouTube and provide the url.
5) YouTube Description includes the lyrics.

XTRA CREDIT ARTICLES RUBRIC

(up to 5 articles = 1 bonus point each):
1) Cover Sheet is a Summary of the article.
2) FullPage, 12 pt, DoubleSpaced, 1" Margin.
3) Article has to be STEAM related
4) Article has to be a current event.
5) Copy of entire article is attached.

Well, that's all folks!
Teaching with Technology, 
AJG

preCalculus Honors 2018-2019: Trigonometry Boot Camp Continued (December)

preCalculus Honors 2018-2019:
Trigonometry Boot Camp Continued
(December)

Chapter08 SCREENCASTS

We continue with Chapter 8 which is all about Law Of Sines, Law Of Cosines and Special Triangle Area Formulae. We will start Chapter 9, all about vectors, after break. Fun was had by all. Of course we went preCalculus Caroling the day before Holiday Break! 

We always say:


"Be one with your inner Ramanujan! 
He figured trig all by himself, he was 13. 
He had no school, no teacher, no book! 
He didn't even have paper or pencil. 
All he had was dirt and a stick!" 


If he can figure out trig under such dire circumstances, so can you!

I call this our 8 Week Trig Boot Camp as we spend all of Quarter II on Trig. We spend the first 4 weeks on Chapters 6&7 as described above. Then we cover Chapter 8 (Law Of Sines, Law Of Cosines and Triangle Area) for 2 weeks before holiday break and we spend 2 more weeks on Chapter 9 (Vectors and CIS(theta)) after holiday break. Then we review for MidTerms!


XTRA CREDIT FILKS RUBRIC 
(1 video = up to 5 bonus points):
1) Use a recognizable tune.
2) Karaoke entire song changing up the words (about STEAM).
3) You are Singing, Dancing or Playing an instrument.
4) You upload your video to YouTube and provide the url.
5) YouTube Description includes the lyrics.

XTRA CREDIT ARTICLES RUBRIC
(up to 5 articles = 1 bonus point each):
1) Cover Sheet is a Summary of the article.
2) FullPage, 12 pt, DoubleSpaced, 1" Margin.
3) Article has to be STEAM related
4) Article has to be a current event.
5) Copy of entire article is attached.

Well, that's all folks!
Teaching with Technology, 
AJG

Saturday, December 15, 2018

CIS(theta), 2018-2019 December Meeting: flops.f and openMPI!

CIS(theta), 2018-2019
December Meetingflops.f and openMPI!

CH01SEPTEMBER READING
CH02OCTOBER READING
CH03NOVEMBER READING
CH04DECEMBER READING: 

DECEMBER UPDATE: (meeting 3)
We downloaded the latest pelicanHPC ISO and burned a DVD for each of us. Then we booted our PCs from the DVD drive and ran openMPI from RAM. We used flops.f to test our "clusters." flops.f is a FORTRAN program that uses mpirun to stress a cluster by calculating PI using reimann sums for 1/(1+x^2) from a=0 to b=1. 

BTW, I call our PCs "clusters" since they have quadcore processors and openMPI can run on multicore just as well as on a grid. We can't set up a grid based (multinode) Linux cluster anymore as we are not allowed to setup our own DHCP server anymore. We got about 2 GigaFLOP/s per core, so 8 GigaFLOP/s per PC. If we could setup our own DHCP server, we'd get 100 cores running in parallel for about 200 GigaFLOP/s!

Compile:
mpif77 -o flops flops.f
Execute multicore:
mpirun -np 4 flops
Execute multinode:
mpirun -np 100 --hostfile machines flops

Enter pelicanHPC as a our first solution! We demoed an old DVD we had to show how to fire up the cluster. Our experiment demonstrated that we could not boot the whole room anymore, as we used to, as PXE Boot or Netboot requires we setup our own DHCP server. When you boot the DVD on one PC, it sets up a DHCP server so all the other PCs can PXE Boot the same OS. However, our new WimpDoze network uses its own DHCP server. These two servers conflict, so we cannot reliably connect all the Worker bees to the Queen bee. We can't setup grid computing or a grid cluster, but we can still setup SMP. In other words, boot up a single PC with the pelicanHPC DVD and run multicore applications on all the cores on that one PC.

So, here's your homework. Download the latest pelicanHPC ISO file and burn your own bootable DVD. Don't worry if your first burn doesn't boot. You can use that DVD as a "Linux Coaster" for your favorite beverage the next time you play on SteamOS. If you can make this work at home, try to run Hello_World_MPI.py from John Burke's sample MPI4PY (MPI for Python) code.


NOVEMBER UPDATE: (meeting 2)
See below for our Raspberry PI project. We have been waiting for funding for some extra hardware from DonorsChoose and we just got it! Yeah! In the mean time we're playing with PelicanHPC and BCCD DVDs to see how openMPI works so we can set it up the same way on our new Linux Cluster.

OCTOBER UPDATE: (meeting 1)
We've decided to make a Linux Cluster out of Raspberry Pi single board computers! Our school district has been kind enough to purchase 25 RPIs plus some USB and Ethernet cabling, so now we just need some power supplies, routers and SD cards. So here comes DonorsChoose to the rescue! We started a campaign to raise the money to purchase all the remaining equipment from Amazon!



What we want to do is to replace our Linux Lab of 25 quadcore PCs, where we used to do this project,with 25 networked RPI 3.0s. The Raspbian OS is a perfect match for our project! Raspbian is linux based just like our old lab which was based on Ubuntu Linux. Also, python is built-in so we can just add openSSH and openMPI to code with MPI4PY once again! With the NOOB SD card, we start with Linux and python preinstalled!


Once we get all the hardware networked and the firmware installed, we can install an openMPI software stack. Then we can generate Fractals, MandelZooms, POV-Rays and Blender Animations!


SEPTEMBER UPDATE: (meeting 0)
Please see september organizational blog post.

NEW SMARTBOARD SETUP
NOTE: MIC FOR SCREENCASTING!
NOTE: TI nSPIRE CX CAS EMULATOR!!
NEW DECOR IN THE REAR OF ROOM 429
NOTE: SLIDERULE!
NOTE: OLD LINUX SERVERS!!
NEW TAPESTRIES IN ROOM 429
NEW VIEW FROM LEFT REAR SIDE
NOTE: OLD UBUNTU DESKTOP!
NEW VIEW AS YOU WALK IN
NOTE: SIDERULE!

So, what's all this good for aside from making Fractal Zoom or Shrek Movies?
SETI Search
Econometrics
Bioinformatics
Protein Folding
Beal Conjecture
Scientific Computing
Computational Physics
Mersenne Prime Search
Computational Chemistry
Computational Astronomy
Computer Aided Design (CAD)
Computer Algebra Systems (CAS)

These are but a few examples of using Computer Science to solve problems in Mathematics and the Sciences (STEAM). In fact, many of these applications fall under the heading of Cluster Programming, Super Computing, Scientific Computing or Computing Science. These problems typically take too long to process on a single PC, so we need a lot more horse power. Next time, maybe we'll just use Titan!

====================
Membership 
(alphabetic by first name):

CIS(theta) 2018-2019:
Gaius(12), GiovanniA(12), JulianP(12), TosinA(12)

CIS(theta) 2017-2018:
BrandonB(12), FabbyF(12), JoehanA(12), RusselK(12)

CIS(theta) 2016-2017: 
DanielD(12), JevanyI(12), JuliaL(12), MichaelS(12), YaminiN(12)

CIS(theta) 2015-2016: 
BenR(11), BrandonL(12), DavidZ(12), GabeT(12), HarrisonD(11), HunterS(12), JacksonC(11), SafirT(12), TimL(12)

CIS(theta) 2014-2015: 
BryceB(12), CheyenneC(12), CliffordD(12), DanielP(12), DavidZ(12), GabeT(11), KeyhanV(11), NoelS(12), SafirT(11)

CIS(theta) 2013-2014: 
BryanS(12), CheyenneC(11), DanielG(12), HarineeN(12), RichardH(12), RyanW(12), TatianaR(12), TylerK(12)

CIS(theta) 2012-2013: 
Kyle Seipp(12)

CIS(theta) 2011-2012: 
Graham Smith(12), George Abreu(12), Kenny Krug(12), LucasEager-Leavitt(12)

CIS(theta) 2010-2011: 
David Gonzalez(12), Herbert Kwok(12), Jay Wong(12), Josh Granoff(12), Ryan Hothan(12)

CIS(theta) 2009-2010: 
Arthur Dysart(12), Devin Bramble(12), Jeremy Agostino(12), Steve Beller(12)

CIS(theta) 2008-2009: 
Marc Aldorasi(12), Mitchel Wong(12)

CIS(theta) 2007-2008: 
Chris Rai(12), Frank Kotarski(12), Nathaniel Roman(12)

CIS(theta) 1988-2007: 
A. Jorge Garcia, Gabriel Garcia, James McLurkin, Joe Bernstein, ... too many to mention here!
====================

Well, that's all folks!
Happy Linux Clustering, 
AJG

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