by Christopher George

How we’re teaching K-12 students how to code

ZwNg7zlMOMToIjHe71wCz2XNIuqDARC-LFll
This application is an exercise on CMU CS Academy.

Hello World! (Sorry, I couldn’t resist.) My name is Christopher George and I am currently a Junior at Carnegie Mellon University studying Intelligent Computer Systems for Visualization.

Since starting university, I have gained an appreciation for quality computer science education.

I work for a project on campus called CMU CS Academy (Carnegie Mellon University Computer Science Academy), the purpose of which is to bring a free, world-class computer science curriculum to the high school level.

CMU CS Academy is the topic of this article. Throughout this post, I will have gifs and pictures to show the capabilities of the curriculum and platform as a whole.

All media used in this article was created using the CMU CS Academy graphics package.
CbmyvzgpzdzytNLTAiTc5EHmHe3JoEPFuTOB
This application was created in the Sandbox on the CMU CS Academy website.

The What

CMU CS Academy is an entirely free online 9th grade computer science curriculum.

“Think, Khan Academy on steroids.”
“This isn’t ‘drag and drop’ programming. We’re teaching [kids] to use Python, a text-based programming language that is the most widely taught language at the university level.” Professor David Kosbie
Currently, CMU’s CS Academy is running its second pilot program of its initial course offering, a 9th grade CS1, Intro to Programming and Computer Science. The course uses a custom graphics package written in Python to introduce students to the programming and problem solving skills required in Computer Science. It requires no prerequisite other than algebra readiness. The Program has 40 participating high schools across the United States and in Rwanda with over 1000 students using the curriculum.

Students learn how to code by creating drawings, animations and games all in Python. The best way to explain to you how awesome this is, and what this offers 9th graders, is to show you what can be done with CMU CS Academy. Here is a small showcase of exercises that students complete as part of the curriculum. (The entire curriculum has over 255 auto-graded exercises.)

xYne62Cf7JUJDJ90whKMldfCKhoCDj6XgxLH
This application is an exercise on CMU CS Academy.
06EVqig7GteaL09WaQO3mtKYFz6rRszJXyCQ
This application is an exercise on CMU CS Academy.
QfTdNoAieYkVRNm0Dxjs4EEmvvyqdfLgL7XW
This application is an exercise on CMU CS Academy.
nSBhcQn14tLlcyyCIqaCqdjmFT3Rmbgs1cRU
This application is an exercise on CMU CS Academy.
ckdDZKwEowzXR-TDRzj8PStZgDXFV9eFqXLX
This application is an exercise on CMU CS Academy.

The curriculum is intended to be taught in a high school setting for students ready to take algebra.

Students, if you visit the website, and find it interesting, fun, or worthwhile, I would heavily advise you to talk to your schools.

Teachers, if you don’t already have a 9th grade computer programming course, start one! It’s here. Just take it. We are trying to give it to you! Teach your kids how to code!

What we offer

  • CMU CS Academy isn’t just a free curriculum, but an entire online textbook that is student paced. Again — Think, Khan Academy on steroids.
  • The teacher is the guide, the leader, the debugger, through the twisted and treacherous journey that is code.
  • At the publication of this article, CMU CS Academy has over 255 exercises, that are entirely auto-graded. Meaning, a teacher will not have to sit for hours grading exercise after exercise until the wee hours of the night.
  • Visit our website to see what else there is

The Why

Software developers, computer engineers, designers, architects, school teachers, writers, dancers, everyone benefits when they know how to code.

There’s been a push recently across the US (and the world) to better prepare kids for this technological revolution. This project, and this opportunity, is where that preparation will start.

CMU CS Academy is meant to bridge the gap between Scratch’s block-based code and the AP Computer Science classes later in high school.

The How

‘So, Chris? How exactly do I go about getting this curriculum into my 9th grade class? How do I get my kid to learn this stuff?’

Teacher/ School Administrator

  • If you are a teacher or administrator, you can make a demo account on our website now!
  • That will give you a preview of the notes and exercises that are available with the course.
  • From there, you can get in contact with our program manager to set up a full teacher account (through the website).

Student/ Parent/ Anyone else

If you aren’t directly affiliated with a school, but still want this in your district, you can and should reach out to your school administration and ask them to look into us. Badger them about it! Send them to our website!

You could also find a teacher that is already teaching a programming course, (probably created in the 1980's) show them the website, and watch as their eyes become glossy and they squeal with excitement.

Wrap Up

Finally, you can go and explore the website, and all of it’s glory now. There is a Sandbox mode where you can write whatever program you like. The Docs are also helpful for anyone just looking to play around with the graphics package.

Below, I will have a few sample exercises that I made real fast, but know the possibilities of this platform are endless, as you are writing pure Python in browser.

Notes

Anyone experienced with graphics packages in Python might notice a distinct lack of MVC. This and all other aspects of the graphics package were settled on after an immense amount of debate about the pedagogical purposes of the platform. They were decided, in part, based on what we thought would be the easiest way for a 9th grader to learn to code.

As promised, here are some code samples to have fun with! As well as all of the links :)

Here’s the CMU CS Academy Website. If you are a teacher/administrator, you can make a demo account. If you are anyone else, you can play around in the Sandbox and make something awesome.

Another resource through CMU is Teknowledge. A CMU student organization which has a number of free curricula for teaching coding in an after school setting. We have a middle school curriculum (open sourced through Google), high school machine learning curriculum, and a high school android app development curriculum.

Here is a CMU Press release about CMU CS Academy.

Code Samples

eYVWsRPV3AySf00qsScDapLrxntWBjgbKgQa
This application was created in the Sandbox on the CMU CS Academy website.
backRects = Group()def drawRects():    for i in range(20):        backRects.add(Rect(200, 200, 100, 100,                            fill=rgb(randrange(0, 255), 255, 255), align='center'))    Rect(200, 200, 100, 100, fill='white', align='center')    drawRects()
def onMouseMove(mouseX, mouseY):    currentDistance = distance(200, 200, mouseX, mouseY)    angle = angleTo(200, 200, mouseX, mouseY)    for r in backRects.children:        newX, newY = getPointInDir(200, 200, angle, currentDistance)        r.centerX = newX        r.centerY = newY        currentDistance /= 2
gTiGWLtkcsilkxsvEarR1BiwNM0d3c5eDps4
This application was created in the Sandbox on the CMU CS Academy website.
app.background = 'black'dots = Group()
def onMousePress(mouseX, mouseY):    for i in range(10):        c = Circle(mouseX, mouseY, randrange(1, 20), fill='white')        c.dx = randrange(-30, 30, 5)        c.dy = randrange(-30, 30, 5)        c.line = Line(mouseX, mouseY, mouseX, mouseY, fill='white')        dots.add(c)
def onStep():    for d in dots.children:        d.centerX += d.dx        d.centerY += d.dy        if (d.centerX < 0 or d.centerX > 400 or d.centerY < 0 or d.centerY > 400):            dots.remove(d)        d.line.x2 = d.centerX        d.line.y2 = d.centerY

To finish, this is an opportunity that you as a teacher, student, or citizen of the world should be excited about. I know I am!

So please… reach out to your schools and show them the possibilities!

Happy Coding :)