COS 126 Wrap-up


The main course that I taught this term, the introduction to computer science (COS 126) at Princeton, just wrapped up. It’s a very well-designed course. Before coming here I had thought that Java had too much potential for confusion for beginners — it is a lot of confusing work to type out

public class { public static void main (String[] args) { ...

for each of your first 10 programs without having a clue what it means. But, once you get past this there are some advantages.

Is it important that Java has strongly typed variables, compared to say Python? Not sure, I can see pros and cons to both styles. But, it is a definite bonus that Java’s functions have typed parameters, return values, and explicit access modifiers (public/private). When we give students assignments requiring that they build methods of a particular type, this makes them think about the big-level ideas before starting to just code. Then, this also fits well with requiring students to submit more than one file in an assignment, since we can explicitly control which public information is shared in-between classes, forcing students to think carefully about information representation, and the different ways that the same information can be passed around in different forms.

Highlights of the final project grading:

former = latter;
current = next;
before = after;

for three parallel variables (e.g., an integer, a float, and a string) used in between iterations;


for geometric point sets (no alien technology involved);

and the typos BeardTracker and Avocado for BeadTracker and Avogadro.

This upcoming term, I am hoping to make a web-based system for submitting tiny Java exercises — programs just big enough to test out new syntax elements and allow students to have their first bugs appear in a small setting de-coupled from any complications. Compared to CS Circles two of the big changes would be (1) multiple blanks for code entry in a single exercise and (2) syntax checking required to get the latter to work. Students rarely take the time to do the small exercises in the book, and even when they do they don’t seem to test them exhaustively; I hope this can help get students doing more tiny coding sessions from scratch.

No Responses Yet to “COS 126 Wrap-up”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: