Tuesday, February 28, 2017

AP Computer Science 2016-2017: Arrays & ArrayLists (February)

AP Computer Science 2016-2017:
Arrays & ArrayLists
(February)


LAB07/CHAP08
Finally, we are ready for Static Arrays and ArrayLists! We started with list traversals using for loops. Our introductory project was Rot13a where we traversed a String as an array of char and ran a Caesar Cypher. Rot13b did the same thing with static int[] arrays. Then we tried Rot13c with dynamic arrays aka ArrayLists!



YouTube Wednesday: Watson on Nova!


Teaching With Technology,
AJG

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

 Applied Math, Physics and CS
2017 NYS Secondary Math PAEMST Nominee


Sage Ebay
TpT

Monday, February 27, 2017

AP Calculus BC 2016-2017: Advanced Integration & Series (February)

AP Calculus BC 2016-2017:
Advanced Integration & Series
(February)




UNIT 08 
UNIT08 starts with L'Hopital's Rule as we'll need it soon to take care of indeterminate forms when finding intervals of convergence! However, this unit was primarily about advanced integration techniques such as Trig Sub, Integration By Parts, Partial Fractions and applications to Variable Separable Differential Equations!


UNIT 09 
There is no UNIT09 as it used to be about Improper Integration, but now I do that in UNIT10 so we can develop the Integral Test!

UNIT10 
In UNIT10 we learned about Improper Integrals and when they converged. We had fun with a number of Gabriel's Horn problems. Then we developed a theory of P-Integrals. Armed with these tools we then developed a number of tests to prove convergence of Series of Constants with all Positive Terms!





YouTube Wednesday: Antikythera on Nova!



Teaching With Technology,

Sunday, February 26, 2017

preCalculus 2016-2017: Matrices & Linear Programming (February)

preCalculus 2016-2017:
Matrices & Linear Programming
(February)


CHAPTER11
In this chapter we talked about how to add, subtract and multiply matrices! We even talked about division via multiplication by inverse matrices. We solved systems of linear equations using Guass-Jordan Elimination, Cramer's Rule and Matrix Algebra. We even talked about the simple case of John Nash's Theorem: Linear Programming.



YouTube Wednesday: Antikythera on Nova!

Teaching With Technology,

Wednesday, February 15, 2017

CIS(theta), 2016-2017 Feb Meeting: openMPI & FORTRAN!


CIS(theta), 2016-2017 
Feb Meeting: openMPI & FORTRAN!

We decided to install a native openMPI stack over our Ubuntu OS on all the hard drives in our cluster and skip using the pelicanHPC DVD. The idea is to login from home and ssh into any node to login on the cluster as needed! We already covered steps 1-4. We're on step 4, installing openMPI and testing with flops.f!

InstantCluster Step 1: 
Infrastructure - Power, Wiring and AC

InstantCluster Step 2: 
Hardware - PCs

InstantCluster Step 3: 
Firmware - Ubuntu

InstantCluster Step 4: 
Software Stack I - openSSH:

01) Install openSSH-server from USC or 
http://packages.ubuntu.com

02) Create a the same new user on every box of the cluster

03) login as the new user, we used 
userid: jaeger, passwd: galaga

04) If you have no .ssh directory in your home directory, ssh to some other machine in the lab; then Ctrl-d to close the connection, creating .ssh and some related files. 

05) From your home directory, make .ssh secure by entering:
chmod 700 .ssh

06) Next, make .ssh your working directory by entering:
cd .ssh

07) To list/view the contents of the directory, enter:
ls -a [we used ls -l]

08) To generate your public and private keys, enter:
ssh-keygen -t rsa

The first prompt is for the name of the file in which your private key will be stored; press Enter to accept the default name (id_rsa).The next two prompts are for the password you want, and since we are trying to avoid entering passwords, just press Enter at both prompts, returning you to the system prompt.

09) To compare the previous output of ls and see what new files have been created, enter:
ls -a [we used ls -l]
You should see id_rsa containing your private key, and id_rsa.pub containing your public key.

10) To make your public key the only thing needed for you to ssh to a different machine, enter:
cat id_rsa.pub >> authorized_keys

NOTE: The Linux boxes on our LAN, soon to be cluster, have IPs ranging from 10.5.129.1 to 10.5.129.24 So, we copied each id_rsa.pub file to temp01-temp24 and uploaded these files via ssh to the teacher station. Then we just ran cat tempnn >> authorized_keys for each temp file to generate one master authorized_keys file for all nodes that we could just download to each node's .ssh dir.

[optional] To make it so that only you can read or write the file containing your private key, enter:
chmod 600 id_rsa 

[optional] To make it so that only you can read or write the file containing your authorized keys, enter: 
chmod 600 authorized_keys

InstantCluster Step 5: 
Software Stack II - openMPI

We finally have openSSH installed with public key authentication on 10.5.129.17-10.5.129.20. We tested that today.
Today we also installed openmpi-bin, libopenmpi-dev and gfortran on the same machines: 

sudo apt-get install openmpi-bin
sudo apt-get install libopenmpi-dev
sudo apt-get install gfortran

Then we compiled flops.f:

mpif77 -o flops flops.f

Then we ran flops on our quadcores:

mpirun -np 4 flops

We got about 8 GFLOPS! So, we have multicore working on individual PCs now it's time scale our job over the cluster! 


mpirun -np 16 --hostfile machines flops

We got up to nearly 32GFLOPS! We made sure all four PCs are identical COTS, have identical firmware, have public key authenticated ssh for the user jaeger, and have these 3 files:

/home/jaeger/.ssh/authorized_keys
/home/jaeger/machines
/home/jaeger/flops

The /home/jaeger/machines file is a txt file that looks like this:
10.5.129.17
10.5.129.18
10.5.129.19
10.5.129.20

InstantCluster Step 6: 
Coding I - Quadrature

InstantCluster Step 7: 
Coding II - Mandelbrot

InstantCluster Step 8: 
Coding III - Mandel Zoom

InstantCluster Step 9: 
Coding IV - POVRay

InstantCluster Step 10: 
Coding V - Blender

InstantCluster Step 11: 
Coding VI - 3D Animation

2016-2017 MANDATORY MEETINGS
09/14/2016 (organizational meeting)
10/26/2016 (installing Ubuntu 16.10 64bit)
11/09/2016 (installing Ubuntu 16.10 64bit)
12/14/2016 (Pelican HPC DVD)
01/11/2017 (openSSH Public Keys)
02/08/2017 (openMPI Software Stack)
03/08/2017 (Quadrature)
03/22/2017 (Fractal Plots + Zoom Movie)
(03/29/2017 is a make up day)
04/26/2017 (POVRAY 3D Stills + Animation)
05/10/2017 (Blender 3D Animation)
(05/24/2017 is a make up day)

So, what's all this good for aside from making a Fractal Zoom or Shrek Movie?

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 or Super Computing. 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) 2016-2017: 
DanielD(12), JevanyI(12), JuliaL(12), MichaelC(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,
A. Jorge Garcia

 Applied Math, Physics and CS
2017 NYS Secondary Math PAEMST Nominee


Sage Ebay
TpT

Wednesday, February 1, 2017

YouTube Wednesdays 2017!


Welcome to YouTube Wednesdays!
YouTube Wednesdays are alive and well! Every Wednesday I try to introduce my students to guest speakers from around the world talking about something at least remotely related to topics in Math and Computing that we're studying in class. 

Don't forget PI Day that coming up! That's a perfect time for "What PI Sounds Like" and the VI Hart Channel on YouTube!

Below you will find a number of documentaries I show  in various orders each year. I usually start the year with some Filks by Tom Lehrer and a few documentaries about Admiral Grace Murray Hopper. Then I start showing NOVA and National Geographic documentaries. At this point, I'll show a different documentary in Math class as opposed to CompSci class. Above is a new documentary I'm showing this month about a laptop someone lost in the Mediterranean some 2000 years ago? This TED Talk below I think talks about the inventer of this laptop!

Below, you will find a sample of all my YouTube Wednesdays from just a few years ago!


June YouTube Wednesdays!
Last, but not least, we talked about Watson the SuperComputer on NOVA and Jeopardy. I hope you enjoyed our YouTube interludes. Have a great Summer, see you next year!



May YouTube Wednesdays!
YouTube Wednesdays would not be complete without the Nova about Cliff Stoll and the Cuckoo's Egg!

April YouTube Wednesdays!
We started one of my favorite YouTube Wednesday features. In the name of AP Computer Science review of Computer History and Computer Literacy, I played the only National Geographic Special not about warm, fuzzy animals! It's called "Miniature Miracle: The Computer Chip" and it's all about the history of electronic computing. I remember seeing this live on NBC around 1983 listening to Alexander Scourby's iconic voice and Elmer Bernstein's phenomenal musical theme! 

I used to have this on online, but YouTube made me take it down. I copied it from my VHS version to a DVD. I then uploaded it to YouTube as MP4 files. So, I still have these files to play with VLC, unfortunately I can't show them to you online. You can get your own VHS copy on EBay or Amazon if you like! Here's a little review from 1985 in The New York Times!


February & March YouTube Wednesdays!

We haven't had a lot of time of late for YouTube Wednesdays what with all the Snow Days and February Break. We did manage to start a NOVA called "Ancient Computer" about a lump of bronze found off the coast of Greece. It was found with several lost works of art dated circa 70 BC. However, noone thought anything of this lump of bronze until someone decided to X-ray it! 

I'm showing this episode of NOVA for 10 minutes each Wednesday through the end of March. BTW, this used to be on YouTube. Unfortunately, the Nova YouTube Channel was converted to show only 2-3 minute previews, so you have to go to PBS.org to view full episodes. I used the PBS app on my Kindle Fire HD 8.9 over WiFi. I also used an HDMI cable to attach the Kindle to the SmartBoard in HDMI mode.


ALERT: Look what Neil DeGrasse Tyson is up to! Dr. Tyson was one of our "Guest Speakers" during our Astronomy Month YouTube Wednesdays (see November below). He has now taken it upon himself to update the seminal Carl Sagan series named Cosmos. You can catch the new and improved Cosmos: A SpaceTime Odyssey starting this Sunday at 9PM on NatGeoWild.

Midterm Week: Ingite, TED and Filk!

Showing a 5-10 minute YouTube at the beginning of class once a week is a great way to start a 5-10 minute discussion on interesting topics related to your curriculum to which students may otherwise never be exposed!

Recently, I tried out an Ignite Thursday. The Ignite Show used to be on the BBC. It was great in that the speaker had exactly 5 minutes to speak. Also, the speaker had 20 slides to talk about that auto-advanced every 15 seconds. Needless to say, this make for a very quick, if informative, presentation.


I found a nice Ignite by a curator at the Walters Museum, William Noel. His talk was about how he discovered long lost texts by Archimedes buried inside a medieval palimpsest. What's amazing about this discovery is that the text shows Archimedes doing advanced Combinatorics and Calculus circa 200BC! 


That Ignite video led us to a TED Tuesday also by William Noel! Now I think I have to show a documentary about the Antikythera Device! There's a nice NOVA about Ancient Computers and here's a related youtube.


By the way, I also throw in Calculus Filks at random intervals whenever we cover a related topic (some are by my own students):

Definition of Continuity

Definition of the Derivative



Position, Velocity, Acceleration

Product Rule

Quotient Rule


Chain Rule

L'Hopital's Rule

AntiDerivatives

More AntiDerivatives

Some Physics

Some BC Calculus

Even Outer Space

Don't forget VI Hart!



January YouTube Wednesdays!
Now we turn our attention to Nova and Fractals:

December YouTube Wednesdays!

December 9th was Grace Hopper's birthday and the Hour Of Code! So, we revisited Grace Hopper and Ada Lovelace. We were also practicing preCalculus and Calculus Carols which are the best math filks ever.



Who was Ada?

Calculus Sleigh Ride!

Oh Calculus, Oh Calculus

November YouTube Wednesdays!
This month I covered Conic Sections and Planet Orbits in preCalculus class. So, Youtube Wednesday saw several Astronomers as Guest Speakers. We have several Guest Speakers and Documentaries though out the year.
Neil DeGrasse Tyson

Bill Nye

Phil Plait


Carl Sagan

October YouTube Wednesdays!
October is devoted to one of my all time inspirations: Admiral Grace Murray Hopper.

60 Minutes!

Letterman!

Biographer!

September YouTube Wednesdays!

I started the year with the definition of filk:

 /filk/ n.,v. [from SF fandom, where a typo for `folk' was adopted as a new word] A popular or folk songwith lyrics revised or completely new lyrics and/or music, intended for humorous effect when read, and/orto be sung late at night at SF conventions. There is a flourishing subgenre of these called `computer filks',written by hackers and often containing rather sophisticated technical humor.


Then I proceeded to show some Math Filks! I always start with Mathematicious which is a review of Regents Math. Then I introduce Tom Lehrer!

Regents Math Review!


Base 8 Arithmetic!



Periodic Table of Elements!



Research?



Well, that's all folks!



Well, that's all folks,

A. Jorge Garcia

 Applied Math, Physics and CS
2017 NYS Secondary Math PAEMST Nominee


Sage Ebay
TpT