Monday, December 6, 2010

New For Skyline Next Semester: Screencasts!

In the past I underestimated how important the multi-media aspects of a computer are to teaching computer science.  Whereas in the past it seemed like the instruction in my lab was happening in human space, all the programming was done on the screen.  Those lines are starting to blur, though, as more and more instruction can be done via the computers themselves. 

In the past Linux was easily my preferred programming environment--still is.  However, I'm a teacher, and I need to do more than just write code.  I never imagined the Mac lab to be so far ahead of anything else I've ever used when it comes to making my teaching more effective. 

This coming Spring students and I will be making screencasts for future students (and for present students that need a review)--ranging from the basics of programming (how to use the unix terminal, text editors, etc), to other particular skills.  I can think of no more efficient way to capture knowledge than to just record examples in realtime. 

Sunday, November 28, 2010

Let's Do Something Fun This Year: Genetic Algorithms!

I have to admit--the new Computer Science lab has made teaching Computer Science so much easier that I rarely feel the need to complain about things.  Sadly, I also blog a lot LESS than I used to.  And that is unfortunate, because our school is quickly becoming a top-notch Computer Science high school.  The more we end up actually doing, however, the less we seem to document it.  That irony stings a bit.

Heck, even using something as innocent as the Apple Remote Desktop has caused me to rely less on Google and the web in general.  Why upload assignments to our class website when I can just click and drag it onto their desktops?  Also, I can improvise stuff on the fly and share it immediately with my students.

Still, there's something to be said for documenting the great things that we do in education.  So what the heck, might as well share one of those things here.  This year Skyline Computer Science students and members of the Skyline Programming Club are working on two major projects that I am very proud of.

The first is PyKata.  PyKata aims to be an open place for teachers and students to practice writing functions in Python.  Of course we were inspired by JavaBat, and we only hope to make PyKata challenging and fun.  This is a way for Skyline's graduating class of programmers to leave behind something for future programmers at Skyline to use for years to come--not to mention anyone else in the world that uses PyKata.

The second is something that occured to me and a few of my senior programmers: working together on a year-long, school-wide case study.  Since there was a lot of interest in a classic example by Melanie Mitchell, we are going to roll up our sleaves and do some old-school science work.  We are going to attempt to repeat her results--to confirm them.  We are then going to add our own style to her study and take it further.  Whereas Mitchell's study dealt with evolving robots efficient at picking up cans--we'd like to give it the Skyline touch and try evolving other types of bots.  Bots that make beautiful art, for instance.  You will see this project develop mostly during the Spring semester, but to get started, check out the project's main page now.

Thursday, September 9, 2010

Okay, I'll admit....

Programming on a Mac is quite nice.  This year we got a brand new Mac lab (36 iMacs) for our Computer Science classes at Skyline.  Students love them.  They're built for programming.  Their ability for digital media integration is outstanding.  One of my students is currently working on programming the iSight cams to implement facial recognition. 

Best thing yet:  Haven't had to reboot any of these Macs during class.  :-)

Friday, August 20, 2010

The Simple Hello Instructor Assignment

I teach a full schedule of computer science courses, and one section of Geometry that utilizes Geogebra.  The very first assignment I give is exceedingly simple, but tells me more about a student than nearly any other type of icebreaker on the first day: I have them send me an email with a particular subject field (like, for example, "B5 hello"), and have them introduce themselves.

Working at a school progressive enough to use Google Apps Education is a dream come true.  I receive those emails and can do a subject search for the particular subject ("B5 hello").  I see how many students sent an email with that exact subject heading.  Then, I look around for the rest, that usually have slight differences like "B5hello," or "B5 Hello."  I give them credit, but we do discuss how syntax errors occur in text editors when you use "Print()" instead of "print()", for example.

Then I deal with the students that didn't send an email.  Many times there are English Language Learners, and getting a quick handle on their level of English development is pretty important. 

Of course you also quickly find out which students have not had their accounts set up for them yet, and so on....

Friday, July 30, 2010

Mac dev vs. Linux dev

I'm so comfortable on Linux, so adjusting to a Mac has been...well, surprisingly easy overall.

Ran into a snag today, however, when I tried to use gcc to compile a simple C program and there were permission problems.  I'm not EXACTLY sure how I solved it, but basically I had to copy a whole directly and put it elsewhere:


had to be copied to


As nice as Macs are, this reminds me of how a default Ubuntu installation does not contain the necessary C header files.  Not a big problem by any means, but it will be good to document it here for when I have to set up a Mac lab for programming classes.

Thursday, July 29, 2010


I need to learn more about the Google Web Toolkit.  So I'm studying that now.  Think I'll make a version of Light's Out or something.

Wednesday, July 28, 2010

MacBook Pro Report #2

What a sleek machine this is.

I don't know if my productivity has increased all that much, as I still seem to be in the holy-crap-you-just-connect-it-and-it-works phase with videos and garageband...

Thursday, July 22, 2010

MacBook Pro Report Day One....

Today I got a brand new MacBook Pro that I will be using to teach Computer Science with.  For the last several years I have been exclusively using Linux, as it is my preferred OS.  However, I pushed for and got a new Mac lab approved for this coming year.  Although Linux was my home choice, the labs at school were all running Windows, and not running it very well. 

So after LMAOing for a while using Photo Booth's special effects, I got to work.  This puppy is gonna hafta be a strong programming machine, and what I learn on here will transfer to the new lab.

Earlier today I was visiting two of my students that have a summer internship with a local high tech firm.  One was writing some Python code on a Mac and commented about the default 8 space tabs.  Well, my first priority in setting up my MBPro, then, would be to get Vim configured correctly.

After struggling a little with those pesky End Of Line errors you get whenever going between Macs, Linux and Windows, I got Vim to do all the syntax highlighting and code completion that I have it do on Linux.  I posted my workaround to our programming forums, and called it a day.

Next step: install and configure Eclipse, Scratch, Alice, and so on....

Tuesday, July 13, 2010

Genetic Algorithms: Summer Fun!

Just thought I'd drop in for a second and post about what I've been up to.

Today I wrote Java code to attempt to reproduce a Genetic Algorithms study that Melanie Mitchell talks about in chapter nine of her excellent book, Complexity: A Guided Tour.

Right now I'm a little brain fried after using both Python and Java to find an easy way to convert a five digit string version of a base three number to a decimal version. Maybe you've done something similar this Summer? :-)

The project in short description is simply a way to use evolution to produce the best algorithm for a near-sighted bot that picks up cans in a large room. It's not the situation that matters as much as it is the method: Genetic Algorithms.

Image is from the Complexity page at Wikipedia.

Monday, May 24, 2010

This is worth supporting

I try (somewhat successfully) to avoid politics and other hot topics in the classroom.  There are times, though, when something comes along that deserves our support so much that, well, we spread the word:

This recently led me to this.

Saturday, April 24, 2010

Chaos in the Classroom

The classroom can be chaotic at times, especially as Summer approaches, but this time it was all on-topic.  Well, actually it was off-topic, as we were supposed to be working on the Graphical Interfaces for our Spring Semester projects.  Nonetheless, I had been reading about chaos the night before and took the opportunity to show my class the basics of attractors in chaos theory.

I had thrown together a quick Python program that allowed the user to choose values to iterate through a chaotic function.  I pulled up a great image from wikipedia and showed how the numbers produced were just where they should be, according to the image.  One of my students said, " I want to make that graph!"  I said, "yeah, go for it." 

That night I did what I often do: code some of the same projects that my students are working on, just to keep sharp.  I used John Zelle's graphics module and produced the above image.  Not bad. 

Of course Josh--my best Java programmer--threw together a Swing version that has about ten times the resolution....

Wednesday, April 14, 2010

Meng the Finisher!

Sometimes it pays to just let things go for awhile. 

Last week I showed my students a program I was working on in Processing: a simple RGB color tool that allowed you to alter the Red, Green, and Blue values to choose that perfect shade of ... well, for me it's usually purple.

Anyway, I had the prototype user interface and showed it to my students.  It was all there--except the sliders didn't work.  So basically I had painted a pretty, but non-functional, picture.  I told my students that I would get to the sliders soon and post the whole thing--source code included, of course--on our Processing Playground page.  Unfortunately I've had to spend a lot of time lately catching up on four plus pages of emails (most of them completely irrelevant--despite being marked as "high importance!"), so I haven't had much time to write any code.  When I have written code, it usually amounts to simple demos or other small snippets of code to aid some of my students with their Spring 2010 projects.

So I was pretty happy today when Meng showed me his completed RGB slider application.  How nice to see an idea reach fruition via the self-determination and "just for fun" motivation of one of the few students in the US that will graduate high school knowing how to write some serious code.

Step by step.  Paso a paso....

Saturday, March 27, 2010

Spring Break

The Avalon Hill Game Company made a lot of money off of me in the 80s.  I mean, I basically bought just about every sports game they published, and a heck of a lot of their other games.  While the wargames were fun (from Stalingrad to B17), I always enjoyed a good sports game.

One of the most interesting games from AH was March Madness, a game focused on the NCAA basketball tournament.  The main game was unimpressive and let you roll dice to quickly play out an entire 64 team tournament in under an hour.  But it was pretty generic and ... dull.

March Madness, however, had an "advanced game" version included that was pure brilliance.  It allowed for players to coach a team from the past final four teams (I always choose Michigan '89, of course), and you ended up with a surprisingly realistic result from an abstract system that hardly resembled a game of basketball.  But heck, even the solitaire version worked, and despite the strange system, it felt more like an authentic game of basketball than did any of the APBA or Statis-Pro simulations that took way too long to play (one game usually took five or six hours).

So, with the actual NCAA tournament on TV as background, I'm beginning an attempt to make a computer version of March Madness.  I may use Java.  I may use Python.  I guess I could even use Open Office Spreadsheet for this....  At any rate, I hope to recapture the excitement that this strange little basketball simulation brought to me back in the early 90s, when I wrote up a career mode set of rules that included recruiting and player development. 

Saturday, February 27, 2010

Thrift Store Find: The World of Objects

The internet really is amazing, when you think about it.

A few weeks ago I found an old VHS copy (never opened before) of THE WORLD OF OBJECTS with Philippe Kahn.  With VHS tapes going for 50 cents, I didn't even hesitate to throw this one in my cart.  Then I found it hosted on Google Video, which was convenient.

Yesterday I watched it.  What was amazing to me about it was how little things have changed when it comes to Object Oriented Programming.  The video hammers out the three main facets (Encapsulation, Inheritance, and Polymorphism) as if they are revolutionary concepts in programming.  Well, at one time they were.

My students, though, have never lived in a pre-OOP world.  For them, the usual responses range from a nonchalant "oh, okay" to a somewhat amused "well, duh!"  I remember Don Slater giving a demo of Alice 3 at Carnegie Mellon University.  He made the comment, "you know, as far as objects go, students 'just get it'."  He was right.  In fact, I've found it easier to teach objects than it is to teach functions, which is a strange twist on reality if you grew up programming BASIC on a Vic-20

This last week during our programming club at Skyline, one of my best programming students and I talked about redesigning old video game classics like Breakout using OOP principles.  We each had a piece of paper and were soon diagramming UML boxes for a Breakout clone.  It was pretty clear to me, right then and there, that a) you can't go home again, and b) you wouldn't want to anyway.

This weekend "just for fun" I'm programming the Breakout clone and also a cellular automata simulation of forest fires that I came across in a great book on computational programming.  For the Breakout clone I used some of the design that my student and I had come up with, but toned down the OOP a little (The paddle class and ball class should be quite re-usable).  But for the forest fire sim, I sat down and just started coding.  That turned out to be a mistake.  I hadn't fully planned the program on paper, and I know that the grid class I write will be used by students in the future.  So now I'm back to paper and UML diagrams, thinking through what a grid object's attributes and methods should be.  At least when I do start writing the code, I'll have a good plan in place.

Processing will be used for this, and the results will eventually appear on Skyline's Processing Playground page.

Saturday, February 20, 2010

The Short Answer

 When people ask me what the goals of a high school computer science department are, I have a supply of various answers that range from vague and obscure to complex and convoluted.  It's much easier to just distract them by walking them through a typical class and asking them to talk to the students one on one.  To learn computer science is to experience computer science, and explaining that to an outsider can be a challenge.

Ever notice how computer science has been applied to nearly every aspect of human life?  Even domains that are the most blatantly "human" in nature, like linguistics, have proven to be fertile ground for computer science.  Computers, ironically, seem to be crucial in our quest to fully understand what it means to be human.

Today I spent some time developing a simple pong application using Processing.  With each new version of the program, I decided to heavily comment my code and hopefully make it clear to my students why certain choices were made.  Basically it goes from a simple paddle and ball to a game with obstacles, a scoring system, and an evolving complexity that is typical for even the simplest programming projects.  

Little things like using variables rather than hard coding coordinates throughout the code are covered, but so is the much larger picture that can only be clarified by the application of Object Oriented Programming principles.  It didn't take long, really, and my simple little pong application was seriously crying out for better design.  

Having students learn that while actually programming their own creations is reason for celebration.  I have seen it many times since moving over to computer science from teaching math full time.  I spend a lot of time developing curriculum, but fully realize that those moments are simply not the result of a particular curriculum.  Rather, they result only after a lot of time is spent nurturing the student through the cold and impersonal early days, when syntax errors and debugging can really take their toll on a student.   I think I draw on my years of teaching middle school most when I am helping beginners learn programming.  You simply can not be the "expert at the front of the room," or you will lose them forever.  You have to deal every day with the fact that your actions will prevent the inevitable from happening: a small proportion of your class (often boys) will soon be seen as "having it", while all the rest will be forever defeated at the thought of exposing themselves to the humility of writing code from scratch.
How do I do this?  I visit with my students every day.  I try to find those that are the least likely to approach me, and I sit down next to them and talk to them while they program.  I look to pair up students as much as possible for support.  In short, I throw a lot of the old wisdom of teaching out the window, and focus much more on human feelings than on programming skills.  If students taste some early success on programs of their own choosing, the stage is set for the learning of computer science principles that will form a foundation for exponential growth that can be witnessed in few other domains of education.  It's hard to explain that to someone outside of the computer science education, but the same way a simple application like, say, pong can develop from a ball and a paddle to a major time-sucking, addictive game--well, you soon realize that same exponential growth in your students, as they threaten to leave you behind as they become more and more fluent in their command of a computer and computer languages.

So, that, blog reader, is the goal of our computer science department.  In time we will develop official standards that basically say the same thing, but for now, this will have to serve as the short answer to the question.

Saturday, February 13, 2010



Every once in a while you discover something that you can hardly believe exists.  For me, that would be Processing.  Spawned at M.I.T., Processing offers users a powerful way to create visual and sonic digital art.  The fact that this is a free and open source project makes it an easy choice for supplementing a high school computer science curriculum.  Visit the exhibition pages and you can easily see why my students and I are pretty excited about Processing.

Our school has always had a top notch visual and performing arts program.  We also have a very diverse student population.  In our district, we easily have the most minority students, English Language Learners (ELL), and students that qualify for free and/or reduced lunch.  We have our challenges, certainly, but we also have one of the best kept secrets in our district: our school truly values the individual student and encourages students to think for themselves.  
I've read the data on the miserable state of women in computer science.  I think of that every day.  I get praised for having a relatively large number of female students.  I have also reached out to our Special Education department to encourage their students to take my classes.  Being certified in ELL instruction, I am pretty much assured that all of our ELL students will take my classes.  If you are serious about tacking the access and gender issues in computer science, you fight the battle daily.

Processing will help me fight the battle.  I think of Joanna, in my intermediate programming class.  She works her butt off learning Python, and still deals with syntax errors and bugs that have an annoying way of appearing just before she makes a breakthrough in her programming skills.  When she does complete a program, her work paints the screen with a style and grace that is all her own.  Still, I wonder if she would ever choose to do this "for fun."

So this weekend I am changing horses in midstream and developing some starter units using Processing.  We will have to run it off flash drives for a while, as it is not installed in our lab, but I know it will be worth it.  

I got a surprising email this week from a former student that I had lost track of.  She wanted to tell me that she is now attending Carnegie Mellon University on a scholarship and has every intention to pursue a career in computer science.  She wanted to thank me for teaching her how to program in a little computer club I used to run back when she was in the sixth grade.  Suddenly all the stress and frustrations of teaching seemed insignificant.  What more could I ever hope for than to have one of my students serving as a role model for women in computer science?  I could die now and not be unhappy in my handful of accomplishments.  :-)