Ancient CS 61 Content Warning!!!!!1!!!
This is not the current version of the class.
This site was automatically translated from a wiki. The translation may have introduced mistakes (and the content might have been wrong to begin with).

Learning Objectives

Getting Started

There is no code for today's exercises!

Instead, you will see that there is a number on your bucket. The number corresponds to a Google doc that has been prepared for you. Go to the class folder and select the document for your table.

Now, team up in pairs and have each pair select a color.

Once you've got your team and a color, each team should work on their appliance and write a C function that is not too long - perhaps 10 lines. You will generate assembly that you'll paste into the Google doc and this will become a puzzle for the other teams at your table. Be thoughtful about the C you write -- you want to generate something that is approachable, but challenging. You can decide what optimization level to use to produce the code you post, but unless the others at your table demand it, let's stay away from vectorized instructions -- we could spend an entire couple of lectures learning those and we're not going to do that. Try not to spend more than 5-10 minutes generating your puzzle (we'll alert you after about 10 minutes).

Once each team has generated some assembly, start working on the assembly generated by the team to your left. See if you can work your way all the way around the table; if you do, then everyone gets to write a new C function. If groups get stuck, it's the other groups' job to help them get unstuck. Feel free

If there are constructs you found particularly fun, clever, interesting, or challenging, annotate them on your Google doc (after all the teams have had a chance to try all the functions).

Wrapping Up

We'll take a few minute to ask tables if they have any particularly fun code samples to share.

And, as always, take a minute and complete the post-class survey.

Enjoy!