From Scratch: Making Computers Do Cool Things

Thanks for joining me. Stay attentive, as the ride will move quickly. My associate Google will be happy to answer any questions you may have along the way.
Let’s begin by discussing humble object. In the world of computers, an object is anything that we can describe. An apple is red, so an apple is an object. The pieces of information we use to describe an object are called variables. Apples can be different colors, sizes, and shapes. So size, shape, and color are variables that describe our apple. Remember, variables describe “what”, not “how”. Got it? Good, because the ride moves on.
Making computers do cool things is easier than you think. Think about how you would explain the rules of a game like checkers to a child. You would probably speak slowly and carefully as you explain how to set up the board, how the different pieces move, and what the different colors mean. Programming a computer is like talking to a child, except the computer listens. In fact, that is one of the Laws of Programming. There are only two, so pay attention. 1) The computer always does exactly what you tell it to. 2) The computer only does exactly what you tell it to. We’ll talk about those later, so let’s get back to the checker game.
To explain checkers to a kid you might say, “This is a checker. Checkers can be black or red. This one is red.”
To explain checkers to a computer you might say:
checker :
{
color:red
}
Holy buckets! Computer code! You’re in The Matrix now my friend. You can use the simple pattern : to describe dern near anything to a computer. In this bit, checker is an object. You can tell because of the these bits: {}, which we call braces. Hear that? That sound means it’s time for a game. I’ll use this super techno numerical computator language to describe some things, and you get to decipher them. Sound categorical? Hexidecimal!
movie :
{
name: Mission Impossible 2,
lead actor: Tom Cruise,
rating: R,
number of cool scenes: 9
number of cool scenes with no explosions: 0
}
car :
{
make: Geo,
model: Metro,
year: 1995,
color: teal,
driver: Tim
}
Jay Z:
{
age: 40,
studio albums: 11,
problems: 99
}
Wasn’t that fun? Your homework is to describe some things as you would describe them to a computer. How would you describe your favorite book, your favorite shirt, your dream vacation spot, or my dazzling charm?
Homework will be collected on the fourth of never. Please consult Google with any questions.