Week 01 Workshop

Exercise:
Workshop 1 - Image Creation

In this workshop, you will form groups and write a program which is able to create or modify different bitmap images. The goals of this tutorial are:
  • to demonstrate the use of basic rust features and error handling
  • to practice designing rust applications
  • to practice writing Rust
  • to introduce you to other members of your tutorial

Rules of the game:

  • This game is completed by finishing tasks. Complete as many tasks as possible before you run out of time! You can find a list of tasks here
  • Pair up! There should be one person typing per two people in the tutorial. If there's an odd number of people, you'll need one group of 3.
  • Your tutor will create "teams" from the pairs (teams should have 4-6 people). Teams should have a means to share code. We recommend pastebin.com, or github's gist. Teams will be working together to complete as many challenges as possible.
  • Download the Starter Code.
  • The first 20 minutes if the tutorial will be spent on general administrivia, doing some quick revision, forming teams, and explaining the game.
  • The next 20 minutes should be spent planning in teams. Tutors will walk around, helping you design and answering questions. You can spend this time writing common code, but do not write any code to create the specific images.
  • Then, you will have about an hour to complete as many tasks as your group can. Tutors will help you if your team can't figure things out, and also help co-ordinate groups and make sure everyone is doing work. Tutors may also encourage you to think about different ways of doing things. If you don't know where to start, talk to a tutor!
  • The last 20 minutes should be spent reviewing code. First, teams should have a short "retro" and answer three questions:
    1. What did I notice about Rust that I didn't notice about other languages? Was error handling, data structures, functions, etc. Different?
    2. What did I struggle with, why did I struggle with it, what helped me get through it?
    3. What would I change about the design, knowing what I know now?

Then, the class can discuss these questions. If there's time, one team might present their code for code review. Other teams can discuss how they did things differently, and share suggestions for improvements.

You can find the documentation for the bmp crate at https://docs.rs/bmp/.