# Teaching

### Site Tools

spcs:2015:day4

This is an old revision of the document!

# Day 4 - Thursday

## Activities

• Guest Speakers
• Egg Problem
• Physics
• Visual Sort
• Simulations

## Class Assignments

1. Processing: Visual Sort - Write a program that sorts 20 bars visually using various sorts or a sort of your choice.
1. Step 1: sort integers:
1. Input: a list of random numbers that you pick
2. Output: a list out numbers in order
2. Step 2: make it visual with rectangles
2. Processing: Physics - Create objects that represent physics. You can make it more realistic, like with gravity if you are able.
3. Processing: Simulation - Pick a simulation that will teach me something.
4. Processing: Make a Game - To make a game, give it interactions and a winning condition (Ludus and Paida).
5. Processing (Bonus): Interaction - Make any of the above MORE interactive.
6. Github - You can store your processing projects directly there and run them with Processing.js - Read: http://processingjs.org/articles/jsQuickStart.html (Similar to yesterday)

## Homework

• Blog Post: Every project should have a post. If you made 3 projects, then there are 3 posts. Have images for what you did. Link to the github.io website online so people can see each program.
• Blog Post: Write about programming languages. How do computers understand instructions? What language do they use? What language do we use to give computers instructions? Explain what are high and low level languages and how computers can understand our code (talk about compilers).
• Improve your past work: Double check your work, and make sure your blog is complete. Make sure you have completed all projects. Finish anything you didn't get to do today. Improve anything that you can! Lots of pictures!!!
• Blog Post: Game Review - You Only Live Once - www.kongregate.com/games/raitendo/you-only-live-once

Note: From now on ALL game reviews must address Ludus, Paida, and Narrative.

int list[] = {2, 4 , 9, 6, 3, 8, 4, 1, 2, 5};
int min_index = 0;
int temp;

for (int i = 0; i < 10; i++)          // print the list to see it
{
print(list[i] + " ");
}

print("\n");                        // print a new line

for (int i = 0; i < 10; i++)          // start the sort
{
min_index = i;                      // set the min_index to the begining of the list
for (int j = i+1; j < 10; j++)      // search the rest of the list to find the min value
{
if (list[min_index] > list[j])    // if the there is a smaller value found, save it!
{
min_index = j;
}
}

temp = list[i];                      // swap the min value to the right place
list[i] = list[min_index];
list[min_index] = temp;
}

for (int i = 0; i < 10; i++)          // print the list again
{
print(list[i] + " ");
}

## Teams

TA: Jeffrey

1. Evangelin, Wilson
2. Toby, Mike
3. Lisa, Billy

TA: Yinan

1. Cindy, Michael
2. Kyle, Jack, Bran

TA: Kevin

1. Hollis, Peter
2. Jeff, Samuel
3. Chris, Frank