Last updated on

Week 9 Debrief: Unguided lab

Congrats on completing your 9th week of CS-214! Here is a round-up of interesting questions, tips for exercises and labs, and general notes about the course.

Administrivia

Interesting Ed questions

Unguided lab

We have released the unguided-lab handout, which explains how to create your own app. This technical document is separate from the unguided lab policies, which explains deadlines and grading.

If you’re unsure what to build for your unguided lab, the unguided-lab write-up has plenty of ideas to get you inspired.

The next unguided-lab deadline is the proposal, which is due Fri, Nov 21, 23:00. Feel free to ask the staff for feedback on your proposal in help sessions!

A Scala puzzle 🔥

In week 1, we posted a “good-to-know” entry linking to Reflections on Trusting Trust. In this lecture, Ken Thompson writes:

In college, before video games, we would amuse ourselves by posing programming exercises. One of the favorites was to write the shortest self-reproducing program. […]

More precisely stated, the problem is to write a source program that, when compiled and executed, will produce as output an exact copy of its source. If you have never done this, I urge you to try it on your own. The discovery of how to do it is a revelation that far surpasses any benefit obtained by being told how to do it.

Such a program (a self-contained program that, when executed, prints its own source code, without reading it from disk) is usually called a quine. You might remember this problem from… the midterm!

So: is it possible to write a quine in Scala?