πŸ§‘πŸΎβ€πŸ€β€πŸ§‘πŸΎ day-plan

✍🏽 Register

🎑 Morning orientation

Learning Objectives

Planning during the week

🧭 During the week, create a post on Slack and get some people to take on the roles of facilitator and timekeeper. Nominate new people each time.

πŸ‘£ Steps

If you haven’t done so already, choose someone (volunteer or trainee) to be the facilitator for this morning orientation block. Choose another to be the timekeeper.

πŸŽ™οΈ The Facilitator will:

  1. Assemble the entire group (all volunteers & all trainees) in a circle
  2. Briefly welcome everyone with an announcement, like this:

    πŸ’¬ “Morning everyone, Welcome to CYF {REGION}, this week we are working on {MODULE} {SPRINT} and we’re currently working on {SUMMARISE THE TOPICS OF THE WEEK}”

  3. Ask any newcomers to introduce themselves to the group, and welcome them.
  4. Now check: is it the start of a new module? Is it sprint 1? If so, read out the success criteria for the new module.
  5. Next go through the morning day plan only (typically on the curriculum website) - and check the following things:

Facilitator Checklist

  • Check the number of volunteers you have for the morning
  • Check someone is leading each session
  • Describe how any new activities works for the group
  • Decide how best to allocate trainees and volunteers for a given block - most blocks will make this clear

⏰ The Timekeeper will:

  • Announce the start of an activity and how long it will take (check everyone is listening)
  • Manage any whole class timers that are used in an activity
  • Give people a 10-minute wrap-up warning before the end of an activity
  • Announce the end of an activity and what happens next

πŸ”— Sorting Cards Workshop

Learning Objectives

Sorting Cards

Outline

You will need a deck of cards for this workshop per group.

Split into groups of no more than 4 people.

We are going to try sorting some cards using different algorithms to compare them.

You will do a few different analyses over each algorithm:

Shuffle the deck of cards and pick 13 random cards.

Algorithms (45 minutes)

For each algorithm, in order perform the following steps:

  1. Predict its worst-case computational complexity (number of comparisons and swaps performed).
  2. Predict what order of cards you think would give the best performance for the algorithm.
  3. Predict what order of cards you think would give the worst performance for the algorithm.
  4. Shuffle the cards and perform the algorithm on them manually.
  5. Arrange the cards in the best and worst performances you predicted, and perform the algorithm on them manually.
  6. Compare your predictions with your observations.

Bubble sort (20 minutes)

Bubble sort keeps going through the whole list, checking whether each pair of elements is correctly sorted. If not, it swaps them. It keeps going through the list over and over again until it’s sorted.

Because the highest/lowest element “bubbles” to the top in each loop, the highest/lowest encountered in each loop will be in it’s correct place at the end of the loop. Each subsequent loop only needs to loop over the remaining unsorted elements (i.e. one less than the previous loop).

Pseudocode (from Wikipedia):

function bubble_sort(A : list of sortable items)
    n := length(A)
    repeat
        swapped := false
        for i := 1 to n-1 inclusive do
            if A[i-1] > A[i] then
                swap  A[i-1] and A[i]
                swapped := true
            end if
        end for
        n = n - 1
    until not swapped or n == 1
end function

Insertion sort (10 minutes)

Insertion sort treats a subset of the array as sorted (initially just one element), and each time removes a new element, finds its correct location in the sorted subset, and inserts it there.

Pseudocode (from Wikipedia):

function insertion_sort(A : list of sortable items)
    i := 1
    while i < length(A)
        j := i
        while j > 0 and A[j-1] > A[j]
            swap A[j] and A[j-1]
            j := j - 1
        end while
        i := i + 1
    end while
end function

Merge sort (15 minutes)

Merge sort splits all of the input into one-element sub-lists. It then takes pairs of those sub-lists and merges them in-order so that each merged list is sorted. It keeps merging those (increasingly large) sub-lists until there’s one list, which will be sorted.

Pseudocode (from Wikipedia):

function merge_sort(A : list of sortable items)
    // Base case. A list of zero or one elements is sorted, by definition.
    if length of A ≀ 1 then
        return A

    // Recursive case. First, divide the list into equal-sized sublists
    // consisting of the first half and second half of the list.
    // This assumes lists start at index 0.
    left := A[..(len m / 2)] // From the start excluding the m/2th element.
    right := A[(len m / 2)..] // From the m/2th element to the end, including the m/2th element.

    // Recursively sort both sublists.
    left := merge_sort(left)
    right := merge_sort(right)

    // Then merge the now-sorted sublists.
    return merge(left, right)
end function

Comparing the algorithms (15 minutes)

Discuss:

  1. Which algorithm performed better for your randomly shuffled data?
  2. Which has the best worst-case complexity?
  3. When would each algorithm make sense to use in real life?

Sorting one suit (30 minutes)

Instead of picking 13 random cards, pick all 13 cards from one suit, so that each card has a unique number.

The best worst-case we’ve seen so far is worse than O(n).

Try to devise an algorithm for sorting these 13 cards which is O(n). If you do, explain to the group why it’s O(n), explaining what properties of the cards you’re relying on to get this performance. Demonstrate this bound by sorting some cards.

Facilitation hints

We’re aiming for pigeonhole sort or counting sort here. Because we know the values are unique and contiguous, we know what the correct position is for each card (the ace should be in index 0, the 2 in index 1, the 3 in index 2, etc), so don’t need to perform any comparisons at all - just insert each value into its correct place.

This generalises to data where there’s a known (e.g. uniform) distribution of values, such as a whole deck of cards. In less precisely controlled distributions, we may not know exactly the destination position for values, but if we can guess well enough, we can do a broad pigeonhole/counting sort and then a few smaller comparison sorts of buckets.

πŸ«– Morning Break

A quick break of fifteen minutes so we can all concentrate on the next piece of work.

πŸ›— Study Group

Learning Objectives

What are we doing now?

You’re going to use this time to work through coursework. Your cohort will collectively self-organise to work through the coursework together in your own way. Sort yourselves into groups that work for you.

Use this time wisely

You will have study time in almost every class day. Don’t waste it. Use it to:

  • work through the coursework
  • ask questions and get unblocked
  • give and receive code review
  • work on your portfolio
  • develop your own projects

🎲 Games, rules, logic, and strategy

We have some favourite games you can play if you are stuck.

  1. Traffic Jam: re-order the cars to unblock yourself
  2. Telephone: draw the words and write the pictures
  3. Set: a game of visual perception
  4. Mastermind: a game of deduction
  5. Sudoku: a game of logic
  6. Mancala: a game of strategy

🍽️ Community Lunch

Every Saturday we cook and eat together. We share our food and our stories. We learn about each other and the world. We build community.

This is everyone’s responsibility, so help with what is needed to make this happen, for example, organising the food, setting up the table, washing up, tidying up, etc. You can do something different every week. You don’t need to be constantly responsible for the same task.

🎀 Demo

At CYF we expect you to demo your work to the class. You must have many opportunities to practice how to clearly and simply explain your work to others. This is really important both for interviews and for getting promoted later on.

⏰ Timekeeper

The timekeeper will keep the groups on track.

Split randomly into groups of no more than 5 people. Each person will have 2 minutes to demo their work to the group. After the demo, the group will give feedback for 5 minutes. Then the next person will demo their work.

πŸ§‘πŸΌβ€πŸŽ“ Trainees

1. Demo

You will demo your work to the group. You will have 2 minutes to explain what you did and why. It’s ok to show broken code or code that doesn’t work yet. Just make sure your demo is interesting.

2. Feedback

After the demo, the group will give you feedback for up to 5 minutes. It’s smart to suggest what kind of feedback you want by asking some “generative” questions. For example:

  • I wasn’t sure if it makes sense to try X. What do you think?
  • I liked the way I did X, but I know there are other approaches, what did you do?
  • I found X really confusing, did anyone else have the same problem?
  • I wasn’t sure if I explained what an X was very clearly, how could I have explained it better?

πŸ’‘ Tips:

  • Practice your demo before class.
  • Keep it simple. Don’t try to show everything you did. Just show one interesting thing.
  • Keep it short. Two minutes is enough.
  • Explain what you did and why.
  • Show your code.
  • Ask for feedback.

πŸ›— Study Group

Learning Objectives

What are we doing now?

You’re going to use this time to work through coursework. Your cohort will collectively self-organise to work through the coursework together in your own way. Sort yourselves into groups that work for you.

Use this time wisely

You will have study time in almost every class day. Don’t waste it. Use it to:

  • work through the coursework
  • ask questions and get unblocked
  • give and receive code review
  • work on your portfolio
  • develop your own projects

πŸ›ŽοΈ 0 PRs available. Open some pull requests! πŸ”—

πŸ«– Afternoon Break

Please feel comfortable and welcome to pray at this time if this is part of your religion.

If you are breastfeeding and would like a private space, please let us know.

πŸ›— Study Group

Learning Objectives

What are we doing now?

You’re going to use this time to work through coursework. Your cohort will collectively self-organise to work through the coursework together in your own way. Sort yourselves into groups that work for you.

Use this time wisely

You will have study time in almost every class day. Don’t waste it. Use it to:

  • work through the coursework
  • ask questions and get unblocked
  • give and receive code review
  • work on your portfolio
  • develop your own projects

πŸ”„ Retro: Start / Stop / Continue

πŸ•ΉοΈRetro (20 minutes)

A retro is a chance to reflect. You can do this on RetroTool (create a free anonymous retro and share the link with the class) or on sticky notes on a wall.

  1. Set a timer for 5 minutes. There’s one on the RetroTool too.
  2. Write down as many things as you can think of that you’d like to start, stop, and continue doing next sprint.
  3. Write one point per note and keep it short.
  4. When the timer goes off, one person should set a timer for 1 minute and group the notes into themes.
  5. Next, set a timer for 2 minutes and all vote on the most important themes by adding a dot or a +1 to the note.
  6. Finally, set a timer for 8 minutes and all discuss the top three themes.