Last updated on

Unguided callback

The aim of this callback is to develop your independence and project-planning skills and to prepare you for the unguided lab. In this callback, you will:

  1. Think of a modification or improvement you’d like to make to a previous lab.
  2. Write a specification describing the planned change.
  3. Implement the change.
  4. Receive a “checkoff” from a staff member: demo your implementation and answer a few questions.

This callback counts towards your grade as explained in the course policies. You can start working on it at any time, but check the syllabus for the due date.

Process

  1. Read the rules below.
  2. Form a team of 2 to 4 people.
  3. Write a one-paragraph specification and submit it to Moodle by the proposal deadline. The specification should consist of:
    • 2 or 3 sentences explaining what feature you plan to implement.
    • 1 sentence explaining which course concepts you plan to use or illustrate.
    • 1 sentence explaining the distribution of tasks among team members (all team members are expected to contribute equal effort to the final result).
  4. Implement your specification, and submit the resulting code on Moodle as a git bundle.
  5. Register on Moodle for a checkoff slot.
  6. Receive your checkoff as a team from a staff member. This should take approximately 4 minutes + 1 minute per person in the team. Be prepared to:
    • Give a short live demo of your feature. (2-3 minutes by a single team member)
    • Walk the staff member through the code and tests that you wrote or modified, by showing them your Git history. (1 minute per team member)
    • Answer a few clarification questions.

Rules

Topic choice

You can pick any topic for your unguided callback, but:

Grading

The unguided callback is graded out of 10 points, based on the checkoff:

Grades are individual, as per EPFL policy.

The unguided callback is worth 10% of the unguided lab score. (The other 90% comes from the unguided lab. Together, the unguided lab and callback make up 20% of the overall lab score. This is also explained in the course policies.)

If you are not satisfied with your score, you may challenge it. To do so, make a private post on Ed, and explain where you disagree from the original score. Include instructions on how to run the demo. A TA (PhD student) or professor will compile your code on their own machine based on your Moodle submission and decide on a new score. This score may end up being lower than the original one.

Submitting your code

Submission is on Moodle, as usual. However, to preserve your Git history, you will submit your work as a Git bundle (a single-file copy of a repository). Use the following command to create submission.bundle:

$ git bundle create submission.bundle HEAD

Example specification

Stepwise calculator

Spec: Implement a new function stepwise(e: Expr) that takes an expression and prints the result of evaluating e step by step (one reduction at a time, e.g. (7 + 1) * (4 - 2) → 8 * (4 - 2) → 8 * 2 → 16. Implement two versions and compare their efficiencies: one that works with Expr directly, and one that converts the expression to Polish notation, then repeatedly alternates between printing the expression and reducing the last operator of the expression.

Course concepts: Recursion, evaluation by substitution

Work distribution: V will implement the recursive version; C will implement the Polish-notation version.

Callback suggestions

Below are some suggestions for inspiration, but we hope most of you will come up with your own ideas! In all cases, make sure that you create adequate tests in addition to implementing the functionality.

Find

FFP3 (any team size)

Extend find with new kinds of filters (this will require modifying the supporting library to expose other properties of files and directories, the command-line interface to expose new flags, and the testing code to mock that data). Think carefully about how to test your new filters!

Baby’s first sentence (2-3 people)

Generalize the interface of find by allowing combinations of filters, such as -name foo -and -size +200c, -name foo -or -size +200c, or -not -name foo. Do you need a parser to support arbitrary combinations of filters? Or have we already seen an easier way to represent and evaluate complex expressions? (hint).

Boids

Loopy times (any team size)

Explore unguided geometries in the boid world: wrap the world on a torus, add wormholes to transport boids across the board, use non-euclidian distances to compute forces, etc.

Not all the same (any team size)

Invent multiple new boids classes and vary their speeds, colors, and behaviors: perhaps some boids escape certain forces; perhaps some boids have more influence on others; perhaps some boids chase other boids; etc.

Flocking in the rain (two people)

Merge neighboring boids when they get too close to each other, producing fewer, larger boids; adjust the rules of the world so that larger boids affect the world differently from smaller ones.

Squaring the circle (2 people)

Rewrite boids to use a fast datastructure to find neighbors. Good candidate datastructures are “spatial hashes” (very easy to implement yourself), “quad-trees”, or “bounded volume hierarchies”.

Calculator

Show your work (two people)

Implement a step-by-step interpreter for computation, showing reductions (substitutions) one by one (e.g. interpreting 2 * ((4 + 4) - 3) should print 2 * (8 - 3), then 2 * 5, and finally 10). Can you make this process more efficient?

Can it cook rice? (any team size)

Add a separate type of logical (boolean) expressions to the calculator, with operators like and, or, not, etc. Add a conditional construct (if) to the main type of expressions, using your new type of logical expressions for the condition in the if. (Suitable for 2 people. With more, add additional constructs beyond if, like while or do … while.)

Anagrams

Not wet (2 people)

Change the sentence-anagrams enumeration algorithm to produce results unique up to word permutations (that is, different sentences in the output cannot have the same words in different orders). Your algorithm should eliminate permutations as it computes anagrams (and not eliminate them after the fact). Measure the efficiency of the result using a benchmarking tool such as jmh.

Scalashop

Rose-tinted glasses (any team size)

Add one new image filter per team member.