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

✍🏽 Register

Energiser

Every session begins with an energiser. Usually there’s a rota showing who will lead the energiser. 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. Popcorn show and tell: popcorn around the room and show one nearby object or something in your pocket or bag and explain what it means to you.

🎑 Morning orientation

Learning Objectives

info

🧭 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

🧰 Workshop Activity

Learning Objectives

This space is for a workshop activity of your choosing. In order for this to actually happen, you must organise it ahead of time.

What is a CYF workshop?

πŸ‘·πŸΏβ€β™€οΈ No lectures

Code Your Future workshops are designed to be interactive. Developed by volunteers and trainees, they are not about listening to a lecture. They are about doing, discussing, and learning together.

πŸ’ͺ🏾 No spoonfeeding

Workshops are also not tutorials, where you follow along step-by-step. CYF workshops are meant to expose gaps and mistakes in your understanding, so mentors can help you fix them. This means you should expect to be challenged and to make mistakes. This is the main value of mentor-led workshops.

πŸ‘‚πŸΏ Responding to needs

You can run a workshop in person on class days, or online in the week. Mentors volunteer to run workshops on Slack, and learners propose topics they need help with. There are a huge number of workshops available at workshops.codeyourfuture.io/.

Organise a workshop on Slack

./organise-workshops.png

πŸ—‚οΈ Options

Planning Estimation Game [PD] (60 Mins)

Planning Estimation Game [PD] (60 Mins) πŸ”—

Paint The Room πŸ§‘β€πŸŽ¨

Understanding how to estimate tasks is a valuable skill that goes beyond just software development β€” it’s useful in many areas of life and work. Whether you’re planning a project at your job, managing a household renovation, or coordinating a group activity, the ability to break down a large task, consider hidden complexities, and accurately estimate effort can reduce stress, and help ensure success.

Let’s take a real-world example.

Your project manager comes to you and says he has a customer who wants you to develop an app. He wants to know how quickly can you deliver it and how much should we charge the customer. You’ve developed a couple of similar apps so you tell your project manager you think it will take two developers one month and cost 10,000MD (made up dollars).

Suddenly three weeks into the project you realize that the app wasn’t as straightforward as you initially thought: it will be at least another month until you will be close to done, and will cost another 8,000MD at least. Your project manager is furious, your customer is furious, and you are stressed because of the pressure to deliver.

How to avoid this situation?!

Today we will learn some effective techniques that help us plan large complicated tasks through an interactive game.

Learning Objective 🧐

We will play a game to learn important techniques to help us estimate our work. After this workshop, participants will be able to:

  • [] Use relative estimation to compare the effort involved in two different tasks.
  • [] Assign story points to tasks based on complexity and effort.
  • [] Elaborate on user stories by asking questions, raising assumptions, adding necessary details and clarifications.
  • [] Split large tasks into smaller, more manageable stories.
  • [] Participate in Planning Poker to collaboratively estimate tasks.
  • [] Explain what a backlog is.

Set up 🌼

  • Split into groups of no more than 5
  • You will need some paper and something to write with.

The game 🎲

Your team has been tasked with painting the room you are in. The customer’s vague requirement is: β€œPlease paint the room.” Before you begin you need to tell your customer how much it will cost and how long it will take. If you underestimate the cost or time it will take, you will lose money. If you overestimate the cost or the time it will take by too much, you will lose the job to a competitor!

Your initial project backlog (work that needs to be done) consists of:

  • Paint the north wall
  • Paint the south wall
  • Paint the east wall
  • Paint the west wall
  • Paint the ceiling
  • Paint the floor

Part 1: Establish the Anchor Feature

  1. Choose one wall in the room that appears to require a medium level of effort compared to the others.

    This wall serves as the anchor for all future relative estimations.

  2. Choose a scale. Some people use T-shirt sizes (XS, S, M, L, XL), some use points (1-5). Whatever the scale that you as a group choose, the anchor wall will be in the middle of your scale.

    Story Points” are abstract and are used to estimate the effort involved, not the time.

Part 2: Estimate One Wall

  1. Planning poker time! Pick Another Wall. Everyone write down your estimate in comparison to your anchor wall. Wait until everyone is ready and reveal your estimates at the same time.

  2. Discuss Estimates:

    Focus on the high and low estimates. Ask participants to explain their reasoning.

  3. Clarify Assumptions: Do we need masking tape for trim and windows? Should we remove electrical outlet covers? Is the prep work done in advance?

Part 3: Backlog Refinement

  1. Backlog grooming: What new tasks were discovered upon discussion of the assumptions. Examples:
  • Remove electrical outlet covers
  • Apply masking tape around windows
  • Purchase supplies
  • Cleaning up
  1. Story Elaboration: Refine the backlog by adding details about preparation, tools, or other hidden requirements.

  2. Refinement: If the task involves more complexity than anticipated, split the story into smaller tasks and provide estimates (e.g., remove fixtures, paint ceiling, reinstall fixtures).

Part 4: Estimate the Rest

  1. Repeat Parts 2 (Planning Poker) and 3 (Backlog Refinement) for the other walls, floor, and ceiling.

Part 5: Reflection

Key Takeaways:

The value of Planning Poker is in the conversation. As everyone shares their assumptions, the team gains a better understanding of the scope of work.

Relative estimation helps teams avoid anchoring on time and encourages thinking about effort in comparison to other tasks.

Backlog refinement happens naturally as the team discusses assumptions and new tasks emerge.

Reflection:

As a large group come together and discuss:

  • What were some hidden assumptions your team made during the estimation process?
  • How did those assumptions affect your initial estimates, and how were they uncovered during the discussion?
  • Did discussing your estimates with the group help you refine your thinking or challenge your assumptions? How?
  • Why is it beneficial to break large tasks (like “paint the room”) into smaller, more manageable stories?
  • How does splitting stories help teams deliver value more quickly or manage risk better?
  • How does regularly refining the backlog contribute to a more accurate project plan?
  • Why might relative estimation (comparing tasks to each other) be more useful than absolute estimation (assigning exact hours/days)?
  • What challenges did you encounter when using relative estimation, and how did you overcome them?
  • Why might this work better for estimating how much work a team can accomplish in a week?
CRUD [Tech] (60 Mins)

CRUD [Tech] (60 Mins) πŸ”—

CRUD 101

Learning Objectives

Requirements

Today we will build a CRUD API. CRUD stands for Create, Retrieve,* U*pdate, Delete. If you think about it, this is what most applications do:

Create some “resources” Retrieve them (GET them) Update them Delete them

🎯 Workshop Objective

Our API will manage BeyoncΓ© albums. It will:

Create a new album, Retrieve a list of albums or a single album, Update an existing album’s information Delete an album

We will build these endpoints:

  1. GET /albums should return all the albums
  2. GET /albums/:albumId should return a single album (that matches the passed albumId)
  3. POST /albums should save a new album
  4. DELETE /albums/:albumId should delete the album (that matches the passed albumId)

1. GET /albums should return all the albums

In server.js, create a GET /albums endpoint that returns all the albums. Some albums have been provided for you in albums.json.

app.get("/albums", (req, res) => {
  res.send(albumsData);
});

πŸ§ͺ Run and test

  1. npm run dev
  2. Open Postman
  3. Make a GET request to http://localhost:3000/albums

2. GET /albums/:albumId should return a single album (that matches the passed albumId)

Sometimes, we do not want to list all the information in one request, maybe we only want to get the information related to a single album. Imagine if we have a page to display the details of one album. We could call the server and get all albums then filter the one we need client-side. It would be more effective to tell the server to just return the one album we are interested in.

We will now add a new endpoint to return only a single album GET /albums/:albumId. In this case, albumId will tell us what album we can return. The call will be GET /albums/10 and that will return the album with that has albumId: "10".

This endpoint has something different. The endpoint /albums/:albumId has a dynamic part. The albumId will vary depending on what the client sends.

In server.js, create a GET /albums/:albumId endpoint that returns a single album. The albumId will be passed as a parameter in the URL.

app.get("/albums/:albumId", (req, res) => {
  const albumId = req.params.albumId;
 // now find the given album from the `albumsData` using the `albumId`
 // finally send the album you found back to the client
});

πŸ§ͺ Run and test

  1. Save your changes
  2. Make a GET request to http://localhost:3000/albums/10
  3. Try changing the id in the URL and calling the endpoint again. What do you see?

3. POST /albums should save a new album

In order for our server-side to receive and use the data sent by the client, we will need to install and use a middleware.

The JSON middleware makes it easy for our route handlers to read JSON data from the request. If the Content-Type request header indicates that the request body contains JSON data then the middleware calls JSON.parse to convert the request body into a JavaScript data structure.

To register the JSON middleware, add the following to the server code:

app.use(express.json()); // before our routes definition

In server.js, create a POST /albums endpoint that saves a new album. The album will be passed as a JSON object in the request body.

Step by step if you get stuck
  1. Add the following code to server.js:
app.post("/albums", function (req, res) {
  const newAlbum = req.body;
  albumsData.push(newAlbum);
  res.send("Album added successfully!");
});
  1. Open Postman and create a new request.
  2. Set the Request Type to POST.
  3. Enter the URL for your endpoint, which should be http://localhost:3000/albums.
  4. Set the Body Type to raw and format to JSON (application/json).
  5. Enter the Album Data in the body of the request as JSON:
{
  "albumId": "13",
  "artistName": "BeyoncΓ©",
  "collectionName": "B'Day (Deluxe Edition)",
  "artworkUrl100": "http://is5.mzstatic.com/image/thumb/Music/v4/6c/fc/6a/6cfc6a13-0633-f96b-9d72-cf56774beb4b/source/100x100bb.jpg",
  "releaseDate": "2007-05-29T07:00:00Z",
  "primaryGenreName": "Pop",
  "url": "https://www.youtube.com/embed/RQ9BWndKEgs?rel=0&controls=0&showinfo=0"
}
  1. Click Send.
  2. You should see the album you just created in the response.

4. DELETE /albums/:albumId should delete the album (that matches the passed albumId)

This means that DELETE /albums/2 should delete an album with the id 2 and return 200 with JSON { success: true } to the user.

The code will look like this

// notice .delete
app.delete("/albums/:albumID", function (req, res) {
  console.log("DELETE /albums route");
});

Can you work out how to remove an album using this code?

Acceptance Criteria

  • I have written a server that can handle the following requests:
    • GET /albums
    • GET /albums/:albumId
    • POST /albums
    • DELETE /albums/:albumId
  • I have used Postman to test my server

Resources

Components 2 [Tech] (60 Mins)

Components 2 [Tech] (60 Mins) πŸ”—

Components are Functions

Today we’re going to think some more about components. We’re going to build a page using a design system and we’re going to collaborate on a sub branch, feature branch workflow. We’re going to identify the difference between HTML and the DOM using Devtools. And we’re going to create new DOM nodes using JavaScript functions. Oh my goodness, it’s so many things! That’s why it’s best to do this workshop after you’ve done:

And in particular, these workshops:

If you missed these workshops in your cohort, it’s a good idea to try to do them in the week (online) first. Record your session for people that can’t attend. Everyone should try to do the workshops first, either in groups or solo if necessary.

The overall mission is to compose “components” / groupings of HTML elements to build a page in together.html.

But this time, we’re going to use JavaScript functions to build our components.

Learning Objectives

activity

Set up your working branch

Everyone should do this so everyone is set up correctly.

  1. You will be working on a special branch called FOR-USE-IN-CLASS.
  2. First, clone the workshops repository Checkout git switch FOR-USE-IN-CLASS
  3. Your cohort has a named sub branch. Everyone, check that out next with git switch --create COHORT (eg NW6). This is your working branch.

Check you are in the right place with GitLens!

Visualise this Git workflow

gitGraph commit "main" branch FOR-USE-IN-CLASS checkout FOR-USE-IN-CLASS branch NW6 checkout NW6 branch feature/header commit commit checkout NW6 branch feature/footer commit commit commit checkout NW6 branch feature/card commit commit commit checkout NW6 branch feature/menu commit commit commit checkout NW6 merge feature/header merge feature/footer merge feature/card merge feature/menu

πŸ’‘ tip

Your COHORT branch is your cohort name. It might be NW6, WM5, GL7… You’ll be making branches starting from your COHORT branch and NOT starting from main.

Get set up to work in teams

Next, divide the class into four teams: header, footer, card, menu. Use the team generator to help you do this.

Set a whole class timer for 10 minutes.

activity

Each team, choose a driver

  1. Driver, ask everyone in your team to confirm you are in the right working branch.
  2. Driver, from this branch, create and checkout a new branch for your team named like this: feature/cohort-component, where cohort is your cohort name and component is the component you’re building, for example: feature/nw6-header
git switch --create feature/cohort-component

Now you’re all set up to make changes to together.html.

Find your docs

Set a whole class timer for 10 minutes.

activity

Deployed from this repo is a mini design system. This design system has several documented components, and some also have JavaScript files.

Your mission is to find the docs for each component with an associated script file, and read them. Discuss your findings. Here are some things to consider:

Look at the pages on the website with Devtools. Compare the Inspect view with the source code you can see in the files. How are they different? How are HTML and the DOM different?

What is a module? What does this code do <script type="module">import Header from "./docs/header/header.js";</script> ?

Together separately

Set a whole class timer for 30 minutes.

activity

Now build your component. Elect a new driver.

  1. Find together.html in the /components-2 directory. Your mission is to complete this page.
  2. In the correct portion of the page, make your changes to build your feature on together.html.
  3. Driver, commit your changes to your feature branch.
  4. Open a pull request from your branch to the COHORT branch, with your changes. Ask for help!
  5. Remember, docs will help you too.
  6. Do the simplest thing that could possibly work to begin with. You can always update your PR with more changes.

Review and merge

Now we’re going to review each other’s work and merge to our cohort branch.

Your COHORT branch is your cohort name. You’re working in your COHORT branch and not in main. Open your pull request to your COHORT branch.

⚠️ warning

Don’t open PRs to main. If you do open a PR to main and it is merged then it would break the exercise for other trainees.

Visualise this Git workflow

gitGraph commit id: "start" branch FOR-USE-IN-CLASS branch COHORT branch feature/component commit id: "import component function" commit id: "import data" commit id: "lighthouse revisions" checkout COHORT merge feature/component

Set a whole class timer for 20 minutes.

activity

  1. Go to the pull requests for this repo.
  2. Either individually or as a group, review each other’s PRs.
  3. Once you’re all happy with the PR, merge it.
  4. Did it work? Why/why not? What does “work” mean for this workshop? Discuss.

Acceptance Criteria

  • We have worked in teams to build a page using JavaScript components and modules
  • We have used an advanced sub-branch feature branch workflow to collaborate
  • We have reviewed each team’s PR

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.

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

πŸ›ŽοΈ Code waiting for review πŸ”—

Below are trainee coursework Pull Requests that need to be reviewed by volunteers.

Sprint 1 coursework solutions πŸ”—

Changelist

Adds example solutions for first sprint coursework

Questions

Do we want to keep this next to the questions, or organise all solutions elsewhere?

Start a review
See more 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

  activity</span>

A retro is a chance to reflect. You can do this on a FigJam (make sure someone makes a copy of the template before you start) or on sticky notes on a wall.

  1. Set a timer for 5 minutes. There’s one on the FigJam 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.