Teaching recursion with fractals at Lowell High School

Mikaela Marciales, a junior at Lowell High School in San Francisco and member of the JROTC, reflects on her projects in AP computer science as equal parts expression and fun—in…

art_simon
|
| 3 minutes

Mikaela Marciales, a junior at Lowell High School in San Francisco and member of the JROTC, reflects on her projects in AP computer science as equal parts expression and fun—in large part thanks to a creative AP computer science approach developed by her teacher, Art Simon.

When I’m feeling all optimistic and happy, I’ll make a really colorful, explosive program. If I’m more calm, I’ll make a more minimalistic type program.

Spark curiosity in your course design

Years ago, Art remembered that a student brought in some code he ripped out of a magazine. After they ran the code together, the student’s eyes lit up.

From there on out, Art has designed assignments for students to make work theirs, put personal touch on projects, and build things that are meaningful.

Programming is about making the computer do what you want it to do. So personalize your projects. Make them fun. Make them unique. When students can make it theirs, you tap into another kind of creative design and drive.

Rethink recursion assignments

Recursion is a critical programming concept, but it can be pretty abstract. In Mikaela’s words, her first introduction to recursion was, “Wow, this must be super complicated.”

But Art showed students fractals and prompted students to create their own. With a touch of Algebra and looking at a few lines of sample code, Mikaela jumped in to make her own Sierpinski Triangle.

triangleSee Mikaela’s project on GitHub Pages

Now Mikaela is even looking at nature differently.

Whenever I think of recursion, now I think of nature and tree rings, Mr. Simon showed us this picture of a leaf that is a leaf inside of a leaf inside of a leaf type thing. I think I’ve seen it in a lot of plants now that I think about it.

Unique projects make cheating difficult

Art encourages his students to look at similar projects on GitHub for inspiration and to ask other students for input.

Mikaela reflects on this blend of studio feedback and peer learning:

Having people that I talk to is really nice because, you can just say, “Oh, that would be really cool in your program.” And someone will tell me, “Oh yeah that would be cool in your program, too.”

mikaela asteriods 3Mikaela built on what she’d learned in Java programming for her future assignment Asteroids.

He structures the assignments in terms of milestones, layering in a different element or feature of the project at each turn.

In Mikaela’s Asteroids game, we’re using object oriented programming techniques that build up and adds features. We get the ship working first. That’s milestone number one. We get the asteroids on the screen. That’s milestone number two. We get the ability to remove asteroids and look for collisions. That’d be milestone number three. Then we add bullets, and you got a working game.

Since everyone’s project is unique, Art isn’t concerned about dishonesty—as long as students can explain what is going on in the program, they’ve mastered the material.

People are going to create objects that explode differently and encounter collision detection differently.

A passionate start to a career in programming

Mikaela has run out of computer science courses to take at Lowell, but she participates in an after-school program called Mission Bit and plans to continue with an engineering internship this summer. And Mr. Simon’s approach to teaching has made all the difference:

I have to compliment Mr. Simon because I was a complete beginner in all of this stuff when I came into it, and he taught me everything, which is pretty cool because now I know so much.

Resources for AP Computer Science teachers


This is a post in our “Teacher Spotlight” series, where we share ways teachers use GitHub in their classrooms.

See more GitHub Education posts

Related posts