Week 01 Workshop

Preparation

Before the workshop you should have watched the lectures. Some workshops have pre-workshop tasks which are optional, but useful. Completing labs before workshops is also optional (but may be useful)!

Revision

Your tutor will quickly explain over the starter code, and explain how to set every second line to be black.

If you have any questions, now is a great time to ask them!

Exercise:
Workshop 1 - Image Creation

No preparation is required for this workshop, however if you would like to prepare, then reading through the starter code might help.

Your tutor will quickly explain over the starter code, and explain how to set every second line to be black.

If you have any questions, now is a great time to ask them!

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).
  • Download the Starter Code.
  • The first 10 minutes if the tutorial will be spent on general administrativia, forming teams, and explaining the game.
  • The next 10-20 minutes should be spent planning in teams. Tutors will walk around, helping you design and answering questions.
  • Then, you will have about an hour to complete as many challenges as they can. Tutors will help you if your team can't figure things out, and also help co-ordinate teams 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,
  • The last half-hour 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/.