Wednesday, November 30, 2016

AP Computer Science 2016-2017: Conditional Statements (November)

AP Computer Science 2016-2017:
Conditional Statements

We spent a whole month on this lab! We're still not done. We were rudely interrupted by the Hour Of Code which for us turned into a whole week of practice using Daniel Shiffman's excellent tutorial. Anyway, this lab was all about conditional statements, boolean expressions and predicate methods. Please see the YouTube Playlist above.

YouTube Wednesday: Write In C!

Teaching With Technology,

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

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

Sage Ebay

Tuesday, November 29, 2016

AP Calculus BC 2016-2017: Anti Derivatives (November)

AP Calculus BC 2016-2017:
Anti Derivatives

This unit was all about anti-differentiation. We had great fun with definite and indefinite integrals. We played with a lot of Differential Equations. We even wrote programs to calculate Riemann Sums numerically on our TI nSpire CX CAS Graphing Calculators! Please see the YouTube Playlist above.

YouTube Wednesday: Calculus Rhapsody!

Teaching With Technology,

Monday, November 28, 2016

preCalculus 2016-2017: Vector & Polar Notaion (November)

preCalculus 2016-2017:
Vector & Polar Notaion

This chapter was all about using the Trig we learned in chapters 6-8 in order to talk about vector and polar notation! We started with some Polar Graphs. Then we talked about Complex Numbers as Vectors on the Complex Plane. Last, but not least, we played with Vector Arithmetic in 2D and 3D. We worked with sums, differences, dot products and cross products too. Please see the YouTube Playlist above.

YouTube Wednesday: Mathematicious!

Teaching With Technology,

Tuesday, November 15, 2016

CIS(theta), 2016-2017 Oct + Nov Meeting: Ubuntu Install Fest!

CIS(theta), 2016-2017 
Oct + Nov Meeting: Ubuntu Install Fest!

We had a huge problem installing Teamviewer. When you go to the download page for Linux you find a discussion of their version for 64bit PCs under "multiarch." So I tried to install the multiarch *.deb file. I couldn't complete the install as there were several unmet dependencies. This is usually not a problem. Just go to the Ubuntu Software Center and search for the listed missing *.deb files or try something like: 
sudo apt-get install libpng12-0

Problem is that some of these files were removed from the Ubuntu 16.10 repositories! So I looked for the missing dependencies on:
and tried something like:
sudo dpkg -i libpng12-0
Well, I found the missing file under the 16.04 repositories and I installed it. However, Teamviewer's installation still did not complete???

So, I opened a Teamviewer ticket and waited about 2 days to get this response (I'll try it on Monday at school):

"Dear Jorge,

Thank you for contacting TeamViewer.

Please use this workaround to install TeamViewer.

To make all TeamViewer dependencies available on Ubuntu 16.10, make sure you perform the following steps:

1. Add a repository
2. Update the Advanced Packaging Tool
3. Install the library
4. Install TeamViewer
5. Disable the repository (Optional)

The following commands will help you to perform the process:

sudo apt-add-repository "deb main universe" 
sudo apt-get update
sudo dpkg -i teamviewer_i386.deb
sudo apt-get install -f
#optional remove the line 'deb xenial main universe' from /etc/apt/sources.list using your favorite editor with sudo priviledges

Commands tested on Ubuntu 16.10.2

If you have any other questions please don’t hesitate to contact us.

Best regards,

Christian Cay
Technical support representative"

NOTE: teamviewer_i386.deb is not a 64bit package. So, you will need to start this process in the command line with:
sudo dpkg --add-architecture i386
sudo apt-get update

NOTE: if you FUBAR your dependencies table:
sudo dpkg --configure -a
sudo apt-get install -f

NOTE: if you don't know your Ubuntu version:
lsb_release -a

In the mean time, I've been experimenting with Chrome Remote Desktop (CRD). It's a bit of a bear to set up the host PCs in class on Ubuntu, but the clients at home are easy. All you need to do is install the Chrome browser (if you don't already have it) and go to the Chrome Wedapp Store to install CRD. Then login with our AP CompSci gmail address ( and click on your PC! That was easy, right?

Here's what I had to do on each of our 24 student PCs in class:
1) install Chrome
2) install CRD
3) install *.deb host file listed here.
4) open CRD in chrome://apps
5) enable remote connections

Now, that wasn't too bad, was it? Wait, hang on to your hats! CRD cannot display a 3D Accelerated Desktop like Ubuntu's Unity. So, you have to install a 2D Desktop! 

I tried lxde but it was way too retro! 
sudo apt-get install lxde lxde-common
and add file
with this one line
exec /usr/bin/startlxde

So, I tried:
sudo apt-get install gnome-session-flashback
which actually installs the Metacity 2D Desktop. To get a Metacity Desktop running in display:0, you need to logout and select the desktop from the login screen. 

There's one last SNAFU! I could not get CRD to start Metacity in another display like I did with lxde (so you can login remotely without bothering the user on that PC). So, I left the host PCs logged into Metacity and made CRD use display:0. 

To accomplish this:
sudo gedit /opt/google/chrome-remote-desktop/chrome-remote-desktop
and set
also comment out
#while os.path.exists(... % display)
#    display += 1

BTW, if you FUBAR your CRD, just:
sudo service chrome-remote-desktop restart

We reinstalled the back row of our PC Classroom/Lab with the newest version of Ubuntu Desktop 16.10 Yakkety Yak 64bit!

Wine did not open windows executables from permissions anymore so we needed executable scripts for our TI Graphing Calculator emulators, Wabbit and kArmTI. We may even add Wabbit to the startup apps menu.

Apt-get couldn't find kate or wine-stable on some PCs after a fresh install. That's odd, since all the PCs were installed exactly the same way. Anyway, we'll have to change the software sources in the Ubuntu Software Center (USC) in some cases before we using apt-get or dpkg.

We hit only one major snag. Teamveiwer would not install as Yakkety Yak sees it as a 32bit application. The Teamviewer website says we should download the multiarch version for Ubuntu 16.10 but we still had no joy! We tried using USC to install the *.deb file, maybe we should try:
sudo dpkg -i teamviewerxxx.deb
We may try the instructions here.

(01)Download the latest Ubuntu.
(02)Burn the ISO file to DVD with Brasero.
(03)Reboot PC with DVD.
(04)Install to Linux Partition by script.
(05)Reboot Linux Partition.
(06)Tweak Appearance
(07)Tweak Brightness
(08)Configure Network
Method: Manual
Proxy: Manual/ (optional)
(09)Configure Printers + jetdirect (laser printer) + jetdirect (color laser printer)
(10)sudo chmod 700 /usr/games/*
(11)sudo apt-get update
(12)sudo apt-get upgrade

(13a)install WINE for the emulators 
sudo apt-get install wine-stable
(13b)install Kate for color laser printer 
sudo apt-get install kate
(13c)install bzflag for Game Day
sudo apt-get install bzflag

(14a)copy WABBIT directory to Home
(14b)copy TI84C.rom to WABBIT directory
(14c)write executable shell script to run
(14d)add to startup menu:
(14d)wine ~/WABBIT/Wabbitemu.exe

(15a)copy KARMTI directory to Home
(15b)copy boot string into KARMTI
(15c)write executable shell script to run

(16a)add firefox tab for SAGE 
(16b)add firefox tab for HOC 
(16c)add firefox tab for SOCRATIVE

(17)install TeamViewer (d/l from website)
(17)install SplashTop (d/l frpm website)
(17)install Chrome Remote Desktop (CRD)

1) Teamviewer is not installing on 16.10
2) SplashTop is not free
3) CRD hosts crash alot


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

Tuesday, November 1, 2016

So, what are you doing for Grace Hopper Day?

So, what are you doing for Grace Hopper Day?

UPDATE (11/11/16): Here it is Veteran's Day and I'm setting up for the Hour Of Code again! Every year around Admiral Grace Murray Hopper's (12/9/1906) and Ada Lovelace's, aka Augusta Ada Byron Countess of Lovelace, (12/10/1815) birthdays, I conduct an in-school Field Trip for the Honors Math classes to my PC Classroom/Lab to talk about taking AP Computer Science next year. In recent years, this has coincided with The Hour Of Code sponsored by promoting Computer Science education in grades K-12. 

This year have a lot of new tutorials for CS ED Week, aka The Hour Of Code. I think I'll do these with my own classes too. I'm trying to get teachers to sign up their students for my Field Trip on Wednesday 12/7/2016. Since I don't have a lot of Seniors this year, I'm also going to show some of these tutorials to my own classes on Monday 12/5/2016 as a trial run.

I think I'll show the Disney Frozen tutorial on 12/7/16. I'll also use this one in my preCalculus classes. There's so many good tutorials to choose from. Maybe I'll show the Star Wars tutorial? Wait, Angry Birds look fun too! Karel The Dog was fun last year! I could do a different tutorial each period! 

BTW, The Hour Of Python looks nice too.

Also, The Hour Of JavaScript is cool!

There's a new tutorial based on the TI nSpire CX CAS that I may use for my AP Calculus BC class. That link also has a tutorial for the TI-84! One problem with these tutorials is that they are teacher driven. So, the teacher needs to know about programming in general and TI-BASIC in particular. Most of the other tutorials are student centered with videos to keep them on track. 

We use the nSpire every day in AP Calculus. We even code with TI-BASIC on the nSpire. We've written code for solving Quadratic Equations and for Newton's Method. Soon, we'll be writing code for Riemann Sums and Euler's method too! So, may be I'll show the tutorial on MATHLAB instead! 

The new tutorial on Processing would be perfect for my AP Computer Science class as we have been doing console based programming all year so far and we're thinking of switching to graphics based programming soon. The only issue with the Processing tutorial is that it will most definitely take more than and hour. Daniel Siffman, the developer of Processing, put together a nice intro but he sure likes to talk! I may take a couple of days on this one!

UPDATE (11/29/14): Originally posted 12/14/13, what follows is a description of what we did for CS ED Week, aka The Hour Of Code, aka Admiral Grace Murray Hopper Day, aka Lady Ada Lovelace's Birthday last year. This year we are doing much the same thing. Our goal here is twofold. (1) Promote Computer Science Education in general. (2) Recruit more students for the APCS class next year!

UPDATE (12/1/14): Last year was based on this Hour Of Code Tutorial from This year I'd like to try this or this tutorial from I'm having a problem with the new tutorials. They load fine at home, but take forever to load in school. So, I'm downloading the whole thing to run locally on each of my student PCs! I used the following commandline to download the webste recursively, 
wget -mirror -r --html-extension -convert-links

UPDATE (12/5/14): I'm not getting very far with as yet. I'd like to do the tutorials with my AP classes as they saw the tutorials last year. Also, has an Angry Birds tutorial and and a Disney's Frozen tutorial. So, I can do one in the morning with AP Calculus and the other in the afternoon with AP Computer Science as I have some of the same students in each. For students who have not done The Hour of Code with me,'s Karel the Dog is an easier intro. has two new tutorials. One is on mySQL and Harry Potter which is a little dry. The other is on making graphics with JavaScript which is a little challenging. I also like the tutorials because they feature experts in the video tutorials like Bill Gates and Mark Zukerburg teaching about if/then/else branches and repeat/until loops! Here's some videos from

UPDATE-04 (12/8/14): Here's what we did today!

(original post from 12/14/13:)
Here's what I did for the #HourOfCode
(1) I registered myself as a presenter of an Hour Of Code,
(2) I registered all my classes for a tutorial do be done during said hour,
(3) I presented the following info during that hour on Monday 12/9/2013:

Admiral Grace Murray Hopper is one of my personal idols! Not only did she usher in the entire industry of Software Engineering but she single handedly invented Computer Programming Languages and Compilers! She was a Math Professor, a Naval Officer, the developer of COBOL and an all around class act! 

Grace Hopper's birthday was Monday 12/9. To honor her memory, I registered all my classes for an Hour Of Code. Maybe you'd like to participate as well? The Hour Of Code is about exposing as many students as possible to Computer Science in all disciplines. I'm making this presentation during course selection week as well to encourage students to take Computer Science at my High School! Due to budget cuts, teacher layoffs, large class sizes and canceled electives, I'm recommending Honors 9th Graders take AP Computer Science next year. I used to recommend an intro course, but I can't anymore.... 

CSEDWEEK was an unprecedented international effort. Over 15,000,000 students at more than 30,000 locations (mostly schools) in nearly 200 countries were registered to participate sometime during last week and wrote more than 500,000,000 lines of code!

I teach Computer Science and see it as a great tool in all disciplines. It's a shame that more students don't take Computer Science in High School. Taking Computer Science can lead to a great major in college and a great profession! I also use Computer Science in all my Math and Science courses in High School and College! 

I've been teaching people how to code since 1975. I've also been teaching AP Computer Science at the High School level since 1984. Finally, I've been teaching computing at the College level since 1993. Needless to say, I'm a vehement advocate for a strong Computer Science Education in particular and a challenging STEM curriculum in general for every High School student

In fact, every single class I teach, every single day of the week, is devoted to some aspect of STEM! STEM stands for "Science, Technology, Engineering and Math." Actually, I try to incorporate STEAM into my classroom: "Science, Technology, Engineering, Arts and Math." By Arts I do mean Art (fractals, 3D graphics, animation) but I also try to tie in plenty of History, Literature and Culture. 

Mine is one of the few High Schools in the USA to offer a Computer Science curriculum! CS50 at Harvard, see playlist above, covers a lot of the same material we cover here at Baldwin Senior High in my AP Computer Science class. They use Scratch, C, php and JavaScript whereas we use Python, SAGE, MPI and Java, but the concepts are the same!

Sadly, the United States is falling far behind other countries in training professionals for jobs in the 21st Century that will require this skill more and more! So, in answer to this growing demand, here's what I teach (in addition to Math and Science):

Intro to Computer Science (python):

AP Computer Science A (java):

CIS: Computing Independent Study 
(MPI with FORTRAN, C, C++ and python):

Calculus Research Lab (SAGE):
aka Scientific Computing Lab (Octave):
aka Computing Science Lab (R): 

HOUR OF CODE Instructions for Monday's tutorial:
(1) Each student should go to
(2) Sign up for CodeHS using this code: F2B9
(3) Start learning!

You will be completing a tutorial on programming for beginners. Fun will be had by all!

Course Selection Week DropBox!

Well, that's all folks.

Generally Speaking,

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

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

Sage Ebay