May 12, 2018

Get started at

Welcome to CoderDojoKC! Let’s get you started!

Looking for something to do? Practice your typing skills! is a great way to keep your fingers nimble and learn where some of those tricky keys are located.

Step One: Wifi

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

2. Can’t connect? See if you can get to the wifi sign-in at

3. Still can’t connect? Raise your hand and a mentor will get you a hotspot to connect to.

4. 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 link in the sidebar on the right).




Step Three: Learn to Code



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!


Step Four: Check Out the Projects


Previous Concepts:

Today’s concept: Random

Let’s take a look at a concept that helps make many games interesting, the concept of “random.” If something is random, one has a difficult time predicting its behavior. Many games rely, in a huge part, upon randomness. For instance, in a card game, the dealer will randomize the deck of cards by shuffling the cards; which cards you get are selected from a randomly ordered deck. We roll dice to come up with a random number between 1 & 6. In American Football, a coin is tossed to determine which team starts the game by kicking or by receiving.

Randomness in Nature can be truly random. Computers, on the other hand, thrive on predictability and, therefore, making something truly random on a computer is very difficult. Here at the CoderDojo, we can attempt to use the computer’s definition of random to our advantage to help make certain games more fun to play.

In Scratch, we have two ways of doing something randomly. We can pick a random number between a starting number and an end number.

Scratch Random Number operator

We can also select a random item from a list.

Random item in a Scratch list

In JavaScript, we generate a random number and use that to access an item in an array or to show a random number. Because JavaScript random numbers are a decimal between 0 and 1, we have to multiply that random number by however many numbers we want to select from and then round that number down to the nearest whole number. For example:

var randomize = function(things) {
    var randomNumber = Math.random() * things.length;
    var arrayItem = Math.floor(randomNumber);

    return things[arrayItem];

This function will take in an array and return a random item from that array.

For today’s session, we want to see at least one usage of “random” in order to be eligible for presenting to the group.

Examples in Scratch

Trying the mastery project? The base starting point is here: CodePen

Step Five: Show Off!

Did you create something awesome based off of today’s theme/concept? Come present it on stage! Presentations will start at 11:30 am. At 11:00, come see Mentors Laura and Anri to get a place in line to present. Scratch projects that will be presented will be added the CoderDojoKC May 2018 Studio by a mentor.

Your assignment today is to build something awesome that uses at least one randomizer. Have fun!
