Playing with Programming

I’m teaching AP Computer Science Principles this year following along with the CS50 AP from Harvard. I like it, but this curriculum is way too heavy on the coding end to really match the intent of APCSP.

My plan next year is to mix and match’s material with ideas from CS50, but instead of C we’ll use JavaScript. With this in mind I’ve been playing with p5.js. I like it a lot for two very important reasons. First it gets students to graphics right away. It’s a lot easier to get student excited about code when they can create cool pictures on the screen than it is when all the do is print text.

The other thing I really like about JavaScript is students can run their code on pretty much any device with a modern web browser. As an example, check out the sketch below. I created after watching a cool video by Dan Shiffman. I made this in Openprocessing, a cloud editor for p5.js. If you’re interested, Wikipedia has a great explanation of the math involved in my program.