Category: Programming

Programming in Algebra 1

After doing some programming in my Honors Algebra 2 class, I turned over to my freshmen Algebra 1 class. Very different group of kids, so I created a whole new intro. This time, I walked them through every tiny thing and didn’t expect them to do nearly as much from scratch.

The set-up that I used for the first two lessons was:

-a written hand-out with both questions requiring written responses and instructions for coding (lesson 1 and lesson 2)

-an entry on my programming club blog with code to copy (lesson 1 and lesson 2)

-kids coded in http://www.coffeescript.org

Then for the third, which only a handful got to, I used:

-a written hand-out with explanations only

-coding in sublime and running programs in firefox

The first two days went really well. Then on the third day, kids who hadn’t gone very quickly and were still on earlier lessons started to flag. I wasn’t really able to help all 22 kids in my big class as much as they needed, what with having to constantly add dropbox to various computers that it had mysteriously disappeared from, and the momentum had run out, so on the third day I saw much less enthusiasm. I really should have just moved them all onto the day 3 activity no matter what, because it was visual, which always helps, and since it was just a 3 day thing, it wasn’t crucial that they all did each lesson straight through.

A consistent problem was getting students to understand WHERE in my prepared code they were supposed to add their own things. I did absolutely no direct instruction, which may have helped with this. Then again, since we don’t have programming classes beyond the club that I run with Adam (aka an actual pro programmer), I thought it was nice to show them that they could just sit down at a computer without anybody telling them what to do, since that would most likely most clearly mirror their experience for the next few years if they chose to continue.

One very nice thing about this all is that one of my students who has recently had very low math self esteem, to the point of handing in blank tests and quizzes, was a total rock star and was even helping other kids get started with the third lesson.

3 Days of Computers

At the end of every unit, my students take a test and complete a project. The project uses the ideas we’ve been studying, obviously. They’re usually rather challenging, but I think fairly engaging. But I recently came to the end of the rational functions unit, which I had never done before, and had no ideas about how to spin that into something more interesting.

So, screw math, let’s program.

Should I really take 3 days to do something completely unrelated to the curriculum when I’m already half a chapter behind the other teacher who does this course? YEAH DUDE.

Because most of these kids have no idea what computer programming is! Which is ridiculous! We spend hours and hours and hours using computers/smart phones/kindles/nanopets. And we use (most of) them to do really important things. I am a little confused that most schools don’t require any computer knowledge beyond how to use word. I don’t care whether my students are going to become master programmers; it’s important that they understand just a little bit about how machines process information. We make kids take all kinds of science classes in order to understand the world in which we live and figure out how to ask and answer questions about it. Considering that computers are becoming a humungous part of our daily life, I think we need to teach kids what they are. Also adults.

Also (and this is unrelated), I have read a whole bunch of people say that not everybody can program. That is SO DUMB. No offense. But I have a whole variety of kids, some who will never move beyond 7th grade math, in my programming club, and everybody can figure out a few things. Which is important when every single kid in a school system that can afford it is using/seeing computers daily.

Okay enough of that. Sorry.

This week I was doing programming with a bunch of real quick honors kids, so it was pretty easy. I put together a few blog posts with instructions and set them loose. I had them program in CoffeeScript, which is derived from JavaScript. I used this partially because my boyfriend had selected this for the programming club this year and, frankly, I’m currently used to it. It’s a rather forgiving language that doesn’t freak out about whether you put a space in front of an opening parentheses. Also, you can code and run programs right in their browser (www.coffeescript.org — click “TRY COFFEESCRIPT”), so my students would be easily able to work at home without worrying about downloading stuff.

I started off with this google slides presentation, which admittedly is extremely slow for an extremely dumb reason, which is just that I thought it would be cute to make a background that looked like code:

The reason that I included that, basic as it is, was that I don’t think my students have any sense of how their computers work. I wanted them to know how the little thing we did in a blue box on a web page was connected to it all.

In the two lessons, I kind of just threw my kids into the code without much explanation. Last year I had tried to start by explaining what things were and then asking them to start something from scratch, and it was a disaster. So I did the opposite here. Since we only had 3 days, I wanted to focus on how to make stuff happen on computers, rather than definitions.

Here are the two lessons I put together:

http://whsprogrammingclub.wordpress.com/2013/03/31/h-alg-2-basic-programming/

http://whsprogrammingclub.wordpress.com/2013/04/01/h-alg-2-programming-lesson-2/

The one thing that didn’t go so well was just that students kept skipping stuff. They just didn’t read it. I’m not sure what I could have done to fix that.

 

In any event, the kids did good work. They created programs that took user input values and then did the quadratic formula and the pythagorean theorem (in two separate programs, that is). And they were so PROUD of themselves. It was fun to see them buzzing about their successful work and being so satisfied when their programs worked.

Programming Games

At our Programming Club meeting this week, Adam and I veered from the usual course of events. It was our first meeting since winter break and we had a new student who’s in special ed programs.

For that kid, I started him off on Scratch, which is a hugely visual programming language for beginners. He played around a little bit with everything, and proved to be super adept at finding images that interested him online and using them in his programs. I think that’s a useful strength that Scratch has, as that’s an easy way to get most any kid engaged. Next week we’ll take another stab at actually building something with the different commands.

For the other kids, we had planned to start by playing Light Bot (can be found many places online with a search), and then work through a handout introducing arrays. But we only had 3 students who weren’t on Scratch, so Adam brought out his iPad and showed them the game I just found called Cargo-Bot. Both “Bot” games make students create little programs in order to reach a desired end. Cargo-Bot is hugely different from usual programming because of how extremely limited your commands, and the number of commands that you get, are. This is extremely useful for what we’re trying to do with our club — aka, introduce new topics by showing them that the stuff they’ve been doing takes too much work.

I take issue with two things in Cargo-Bot:

  1. The song has 8 counts of repeating the same two notes over and over and over again. It makes me feel unwell.
  2. The puzzles get hard REALLY fast. Our group spent about half an hour on one puzzle and we had to leave before we finished it. Admittedly they would have stayed if we had let them, but I felt that the meeting had carried on for long enough at that point.

So, perhaps we’ll get to arrays next week. But I do think these games are nice for reinforcing the habits of using recursion and conditionals to build an elegant program.