Curriculum

About CS Principles and the Beauty and Joy of Computing course

CS Principles is a course framework designed, unlike traditional CS courses, to appeal to a broad range of students, including groups traditionally underrepresented in the field. The framework from the College Board includes seven “big ideas”: creativity, abstraction, data and information, algorithms, programming, the Internet, and global impact. Several versions of CS Principles have been designed, all following the framework but differing in emphasis.

BJC stakes out the technological high end of the range. Somewhat more than half the course is computer programming practice, including techniques traditionally considered difficult, like recursion and higher order functions. However, we believe that techniques such as these offer students the “aha moments” and motivation they need to stick with computer programming and see the beauty in code!

We also believe that we can teach these ideas to all students, and hold their interest, thanks to the Snap! programming language, which takes the brilliant visual metaphors of Scratch and  extends them to include user-defined functions (allowing recursion) and procedures as data (allowing higher order functions).

Recursion in Snap!

image01image04Recursion is a basic computational building block that is best used for problems where a large task can be broken down into smaller, similar sub-tasks.It is a very versatile programming technique; it can provide simple loops that allow you to repeat parts of a program, and it can also generate intricate fractal graphics: shapes that include smaller versions of themselves, like the one on the left.

Novices often find this magic; how can you repeat part of a program that you haven’t finished defining yet? But it’s worth learning, because it allows a small program to have a very complex effect.

Higher order functions in Snap!

Higher order functions allow students using Snap! to create functions that operate on other functions.  Here we use MAP to apply the function ☐×3 to each number in the list.image03

It may sound complex, but this enables students to think about this list of numbers as a single entity, instead of looping through the numbers one at a time. It saves time and creates cleaner, easier to read code.

“Why not use Java / Javascript / Python / Processing / Scheme?”

Scratch (scratch.mit.edu) has had enormous success in getting young programmers up to speed instantly, with no anxiety, partly because syntax rules are visually apparent: a block can be used in a slot if the two are the same shape. Also, no keyboard skills are required. For these and other reasons, several recent CS 0 curricula start with Scratch and then switch to a text-based language. But Snap! has both the intuitive Scratch interface and the full power of any other programming language. And the visual presentation helps make advanced abstractions such as function-as-data concrete.

For example, compare (lambda (x) (* x 3))or function(x){return x*3}toimage05

Technology and society

The other part of the curriculum that we emphasize is the connection of computer technology with society. It’s ironic that programming has had a bad reputation among kids, because they all love the fruits of programming: cell phones, social networks, and video games. In this part of the course we try to balance a fundamental optimism about the technological future with a critical stance toward any particular technology and its uses.

The textbook: Blown to Bits

The textbook used in BJC, available free online, Blown to Bits anchors the non-programming topics.

image00

Implications of Digital Revolution
“Who owns all the data about us?”
“Which news sources can we trust?”
Ten paradoxical digital data truths that are overturning centuries-old assumptions.

Accessible Technology Explanations
Binary data, compression, search, cryptography, networking and others explained simply!

Praise for Clarity and Timeliness
“There is no simpler or clearer statement of the radical change that digital technologies will bring, nor any book that better prepares one for thinking about the next steps. Rich in examples and beautifully accessible in its writing, it should be required reading everywhere.”
— Lawrence Lessig, Professor of Law, Stanford University

Authors: Hal Abelson, Ken Ledeen, & Harry Lewis Cost: Free online (or $21 at Amazon) URL: bitsbook.com

Read more about the BJC project and curriculum at bjc.edc.org and AP CS Principles at apcsprinciples.org.

image02This material is based upon work supported by the NationalScience Foundation under Grant No. 1441075, Bringing a Rigorous Computer Science Principles Course to the largest School System in the United States. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.