March 11, 2017

Get started at http://www.coderdojokc.com/today

Welcome to CoderDojoKC! Let’s get you started!

Step One: Wifi

1. Open up your internet connection and connect to “Fiber Public WiFi

2. Can’t connect? Raise your hand and a mentor will get you a hotspot to connect to.

3. We recommend using the Google Chrome browser.

Step Two: Start Learning!

If you don’t know which programming language to start learning, we recommend Scratch (if Scratch is not to your speed, check out the typing.io link in the sidebar on the right).

You will need a parent or guardian’s help to create a Scratch login:

  1. Click “Join Scratch” in the upper right-hand corner of the Scratch site.
  2. Create a username that does not include your real name.
  3. Think of a password that you can remember easily. You should have your parent or guardian write this down and save it.
  4. Click “Next” and continue following the directions. You will need a valid email address (yours or your guardian’s) to continue.

Once you have a Scratch login, use the links below to build something awesome.

Step Three: Learn to Code

1. Are you brand new to coding? Start with Codecademy (recommended for 13 years & up) or Scratch (recommended for 12 years & under).  Want to try building your own phone application? Check out App Inventor! Be sure to create an account and write down your username and password so you won’t forget!

2. Do you have a little coding under your belt? Are you ready to learn more? Check out these fun games:

3. Were you working on a project from our last session? Feel free to continue on that, and ask mentors if you need any help!

4. Get started on the new project. We can’t wait to see what you create!

Step Four: Check Out the Projects

Mastery – Feeling masterful? Check out the requirements for our mastery badges. You can earn cool pins!

Today’s theme: Guessing games

Today’s Concept: Code Reuse with Functions

Have you ever found yourself repeating your code over and over in Scratch or in JavaScript? If you find yourself doing this, you can take advantage of “functions” to reuse the same code over and over again. In Scratch, functions are called “custom blocks,” but everywhere else, they’re called “functions” and sometimes “methods.”

All functions do something within your code.

Functions can take input and return output. This is like a popcorn popper at the movie theater: you add popcorn kernels and oil, and you get hot popcorn in return.

Other functions are like commands. They don’t take any input, but they do something anyway. It’s like telling your dog to sit. You don’t tell your dog where to sit, how to sit, how long to sit, or when to sit; you just tell your dog to sit. And guess what? Your dog sits. Good dog!

One way to think about functions is that they let you take a bunch of steps and give them a simple name. This is like teaching a robot to speak. You could tell the robot how to speak each time you want the robot to speak, or you can just create a speak function and tell the robot to do it instead.

voiceBox.turnOn();
voiceBox.setVolume(30);
voiceBox.say("Hello");
voiceBox.turnOff();

voiceBox.turnOn();
voiceBox.setVolume(30);
voiceBox.say("I like to play games");
voiceBox.turnOff();

The same, but with functions!

function speak(phrase) {
    voiceBox.turnOn();
    voiceBox.setVolume(30);
    voiceBox.say(phrase); // <-- Here's the part that relies on the input!
    voiceBox.turnOff();
}

speak("Hello");
speak("I like to play games");

As you can see, you can create the function once and call it multiple times.

Additional information about Scratch custom blocks
Additional information about JS functions

For today’s session, we want to see at least two things in order to be eligible for presenting to the group: The theme of a guessing game and the use of at least one function or custom code block.

Example Project:


Step Five: Show Off!

Did you create something awesome based off of one of these projects? Come present it on stage! Presentations will start at 11:00 am. Let a mentor know you want to show off your work. Scratch projects that will be presented will be added the CoderDojoKC Studio by Mentor Eric.

**Presentations may not contain any politics, violence, gore, or bad words. (And we’re counting “sucks” as a bad word!)