Introduction

Welcome!

Have you ever wondered how computers like your laptop or your phone work?

In this course, we'll get to the bottom of this question and, if you want, way beyond.

Computers can't think

Computers are great at following instructions, but there's something they're really bad at.

What might that be?

  • Thinking

That's it! In fact, they're not just really bad at it, they can't think.

Instructions

So, if computers can't think, how do we get them to do what we want?

  • By giving them instructions and rules

There! Giving computers precise instructions and rules is a large part of what programming is about.

Programming vs. writing code

But how do we get from a problem we want to solve to instructions and rules computers can understand?

  1. Map out the problem
  2. Break down the problem into instructions and rules
  3. Translate the instructions and rules into code

Bingo! As you can see, programming involves a lot more than just writing code.

Computer programs

Almost anything computers are capable of is done by computer programs. That kind of makes them the secret sauce of computing.

Which of these things might be programs?

  • Computer apps
  • Graphics cards
  • Computer screens

Yass its Computer apps! Besides computer apps, things like browsers, operating systems, and viruses are also computer programs.

Sequences

The most basic programs use simple commands in a step-by-step order. They're called sequences.

  1. Unlock the door
  2. Open the door
  3. Enter the room
  4. Close the door behind you

Great! A different line of action wouldn't make a lot of sense, would it?

They're among us

Sequences are everywhere, from simple tasks like getting dressed or making a cup of coffee, to doing rocket science.

What do you think is the best sequence order for baking a cake?

  • Mix batter, bake in oven, eat
  • Eat, bake in oven, mix batter
  • Mix batter, eat, bake in oven

The first is the best! We constantly use sequences in our daily lives. Same as baking a cake, programs work better when they follow a correct sequence.

Making a sandwich

The honorable task of sandwich-making is also a sequence.

Let's try to make a peanut butter jelly sandwich.

  1. Get 2 slices of bread
  2. Put peanut butter on slice 1 and jelly on slice 2
  3. Press slices 1 and 2 together

Fantastic! If we forgot a step or changed the order, would we still get a great PBJ?