βπ½ Register
π‘ Morning orientation
Learning Objectives
Planning during the week
π£ 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:
- Assemble the entire group (all volunteers & all trainees) in a circle
- 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}”
- Ask any newcomers to introduce themselves to the group, and welcome them.
- 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.
- 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
π Java workshop
Learning Objectives
Understanding Java
No one (neither trainees nor volunteers) involved in this workshop needs to know Java.
The goal of this workshop is to work with code even though we don’t know the language.
Trainees should be familiar with any programming language (e.g. JavaScript or Python), and should be comfortable searching for and reading documentation.
Introduction
There are a lot of things in common across different programming languages.
Even if you don’t know Java, knowing other languages gives you a basis for making sense of it.
All of your existing documentation/research/Googling skills will help you!
Get into groups of no more than 6.
Understanding code (10 minutes)
Here is some Java code:
class DnsResolver {
public static void main(String[] args) {
if (args.length != 1) {
System.err.printf("Expected exactly one argument, but got %d%n", args.length);
System.exit(1);
}
String host = args[0];
String[] parts = host.split(".");
System.out.printf("The top-level domain of the host %s is %s%n", host, parts[parts.length - 1]);
}
}
Set a timer for 10 minutes.
Take 10 minutes to play computer with this code on your own. Read through it line-by-line and work out what you think each line does.
Identify what things you don’t know, or haven’t seen before in another language. Try to work out what they are. First make a guess, and if you’re not confident, do some research.
Identify what things you have seen in another language, and what the equivalent code in that language may be.
Discuss new is similar and what is new (15 minutes)
Popcorn around your group discussing what things in this code are similar to what you’ve seen in other languages, and what things are different.
Discuss the things that are different:
- What trade-offs do you think they bring?
- What extra value do they give compared to how things would look in other languages?
- What draw-backs do they have?
Debugging code (15 minutes)
Set a timer for 15 minutes.
On your own, predict what you expect this code to do and print.
Save the above Java code to a file named DnsResolver.java
. From the same directory as the file, run the following command:
javac DnsResolver.java && java DnsResolver google.com
This does two things - it compiles the DnsResolver.java
file into a file called DnsResolver.class
, and then it runs that file with the argument google.com
.
If you run this command, you may see different results than what you expect. Compare this with your prediction.
In your group, try to debug and fix this problem. Share theories about what’s happening, suggest how you could get more information, and work together.
Extending code (50 minutes)
Add additional code to the existing code to satisfy an additional requirement:
Resolve the DNS hostname passed as the program’s command line argument, and print out the IP addresses it resolves to.
If you run your finished program, it should behave similar to below (but the actual values may be different):
% java DnsResolver codeyourfuture.io
The top-level domain of the host codeyourfuture.io is io
The host codeyourfuture.io resolved to the following IP address:
54.72.81.102
% java DnsResolver google.com
The top-level domain of the host google.com is com
The host google.com resolved to the following IP addresses:
142.250.179.238
2a00:1450:4009:81d:0:0:0:200e
You can work on your own or in groups to do this.
Sample implementation
A sample complete implementation of this exercise can be found in https://github.com/CodeYourFuture/CYF-Workshops/blob/main/understanding-java/DnsResolver.java but we recommend you try to completely solve the exercises yourself rather than looking at the sample implementation.
π« 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
Usually there’s a rota showing who will lead the energiser. We have some favourite games you can play if you are stuck.
- Traffic Jam: re-order the cars to unblock yourself
- Telephone: draw the words and write the pictures
- Set: a game of visual perception
- Mastermind: a game of deduction
- Sudoku: a game of logic
- 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
ποΈ Code waiting for review π
Below are trainee coursework Pull Requests that need to be reviewed by volunteers.
Change letter being replaced from s to i π
s/s/S/
is a little more confusing than s/i/I/
for their first exercise.
Start a reviewAdd instructions for implementing cowsay π
This is for sprint 4
Sample solution in the top commit of https://github.com/CodeYourFuture/Module-Tools/commits/implement-cowsay-solutions/
Start a reviewAdd exercises testing understanding of number systems π
This meets the learning objectives of the binary numbers section of sprint 1.
Solutions can be found in the HEAD commit of https://github.com/CodeYourFuture/Module-Tools/tree/binary-numbers-solutions (currently e61b911d89b1ad5c704df3cc52bcd84230306c7f).
Start a reviewπ« 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.
- Set a timer for 5 minutes. There’s one on the RetroTool too.
- Write down as many things as you can think of that you’d like to start, stop, and continue doing next sprint.
- Write one point per note and keep it short.
- When the timer goes off, one person should set a timer for 1 minute and group the notes into themes.
- 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.
- Finally, set a timer for 8 minutes and all discuss the top three themes.