Contents

Part Slides
1 · What is CS? What is it? · CS ≠ programming · The telescope · Computational thinking · Fields of CS · Your future · Society
2 · Abstraction Complexity · Detail removal · Generalization · Audience responses · Summary
3 · Binary Decimal · Binary & hex · Why base 2? · Encoding · Colors · Text · Video games · Summary
4 · Languages What is a language? · Roll a die: Python, JS, Lua · Java · C++ · Same idea · Which games? · Java ≠ JavaScript · TIOBE · TIOBE top 10 · Rankings disagree
5 · Why Java? Meet Java · Why Java · Cousins · Why Processing · Programming in Processing
Wrap-up Summary · Next deck

Intro to Computer Science

Thinking, languages, and why we code in Java

Game Programming 1 · Unit 2: Drawing with Code

Partly adapted from CSE 120, University of Washington

Part 1: What is computer science?

Why study computer science?

  • Massive impact on our lives and society as a whole
  • Increasingly useful for all fields of study and areas of employment

What is computer science?

  • The study of solving problems with computation
    • What can a computer figure out?
    • How do we make it correct, fast, and clear?
    • How does it affect people?
  • Computers are the tool. Problem solving is the subject.

CS ≠ programming

  • Computational thinking is knowing how to break down a problem so a computer can solve it
  • Programming is the tool you use to carry out your solution
  • In GP1, we use programming (and games) to learn computational thinking
  • It can be learned, like any other skill
    • There's no such thing as a "coding gene"
    • At first it can feel like learning a new language. That's normal.

Computers are the telescope

"Computer science is no more about computers than astronomy is about telescopes."

Astronomers study space; the telescope is how they look.
Computer scientists study problems and solutions; the computer is how they test them.

Computational thinking

Idea What it means In Pong
Decomposition Break a big problem into small parts Ball, two paddles, a score
Pattern recognition Spot what repeats Both paddles move the same way
Abstraction Keep what matters, hide the rest The ball is just a circle with a position and a speed
Algorithms Write clear, step-by-step instructions Every frame: move the ball, check the walls, check the paddles

The many fields of CS

Field In games
Graphics Drawing 3D worlds, lighting, animation
Artificial intelligence Enemies that chase, flee, and plan
Cybersecurity Protecting accounts, stopping cheaters
Data science Finding patterns in player stats
Human-computer interaction Controls and menus people can actually use
Networks Online multiplayer that doesn't lag

Computing in your future

  • Computing and its data are inescapable
    • You generate "digital footprints" all the time
  • Computing is a regular part of every job
    • Use computers and computational tools
    • Generate and process data
    • Deal with IT and software people
    • Understand the computational part of projects
  • Our goal: help you make sense of the "Digital Age" that we now all live in

Computing and society

Thumbs up or down if you or someone you know:

  • Works primarily from home
  • Has "stalked" someone online
  • Communicates mostly using 🐺👶 instead of words
  • Has taken extra trips outside to catch that Pokémon (does anyone still play that?)
  • Gets most of their news from social media (yes, this includes Reddit)
  • Has had their identity or credit card number stolen online
  • Has seen a parent quiet a child by giving them a digital device

Part 2: Abstraction

Complexity and abstraction

  • Programming is straightforward, as long as your programs are small
    • Complexity is our enemy
    • Abstraction is the key to conquering complexity
  • Abstraction allows us to build general-purpose artifacts
    • Detail removal: hide unnecessary details from users and designers
    • Generalization: avoid unnecessary repetitive work
  • Learning to reason using the most appropriate abstraction is a key goal of computational thinking
Henri Matisse's Blue Nude IV, a person made of a few flat blue cut-paper shapes

Abstraction: Detail removal

"The act or process of leaving out of consideration one or more properties of a complex object so as to attend to others."

What's missing from each of these?

  • Henri Matisse, Blue Nude IV
  • Maps for directions (next slide)

Abstraction: Detail removal

Two maps of San Francisco: a detailed street map, and a simpler map that shows only the main roads and highways needed for directions

Maps for directions

The brake and accelerator pedals on a car floor

Abstraction: Detail removal

Detail removal example:

  • Modern user interface: the right pedal is "accelerate," the left is "decelerate"
  • Even as the underlying technology has changed, this abstraction has not!
    • Computer-controlled fuel injection
    • Anti-lock brakes (ABS)
    • Electric cars

Abstraction: Detail removal

Hide unnecessary details from other designers

  • e.g. the Engine Control Module (ECM) designer doesn't care about the return spring inside the throttle!

Diagram of an electronic throttle: accelerator pedal position sensors send signals to the ECM, which drives the throttle control motor in the throttle body

Diagram: the accelerator sends a signal to the Engine Control Module, which sends a signal to the throttle

Abstraction: Detail removal

  • Hide unnecessary details from other designers
    • e.g. the ECM designer doesn't care about the return spring inside the throttle!
  • It's nice to think of a system as a hierarchy of well-defined "chunks" with precise functionality
    • In CS, we call this a separation of concerns

Abstraction: Generalization

"The process of formulating general concepts by abstracting common properties of instances."

  • Extensible shower rods
  • Adjustable hats and belts
  • Single recipe for <fruit> cheesecake
  • Feeding animals on a farm
    • To feed <animal>, put <animal> food in <animal> dish

Your brain makes generalizations every day, without you even realizing it!

Audience responses

Other examples of detail removal:

 

 

Other examples of generalization:

Summary: Abstraction

  • Abstraction is one of the most important challenges in computer science
    • How do you identify the right abstraction (building block) you need to solve your problem?
  • Think about computers:
    • How many of you actually know how a computer works?
      • I certainly don't understand every detail (I don't know if anyone does...)
    • How many of you can use a computer?
      • Thanks to abstraction!!!

Part 3: Binary

Decimal: the numbers you already know

  • Ten symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Represent larger numbers as a sequence of digits
    • Each digit is one of the available symbols
    • Each position has a "weight": ones, tens, hundreds, thousands...
  • Example: 7061 in decimal (base 10)

Binary and hexadecimal

  • Binary is base 2
    • Symbols: 0, 1
    • Convention: 0b10
    • Example: What is 0b110 in base 10?
      • 0b110
  • Hexadecimal (hex) is base 16
    • Symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
    • Convention: 0x10
    • Example: What is 0xA5 in base 10?
      • 0xA5

Why base 2?

Graph of voltage on a wire over time: anything from 0.0 to 0.5 volts counts as 0, anything from 2.8 to 3.3 volts counts as 1, so a noisy signal still reads as 0, 1, 0

  • Electronics: easy to store with "bi-stable" parts (on/off), and reliable even on noisy, inaccurate wires
  • Other bases are possible, but not yet practical: DNA data storage (base 4: A, C, G, T), quantum computing

Base comparison

Base 10 Base 2 Base 16 Base 10 Base 2 Base 16
0 0000 0 8 1000 8
1 0001 1 9 1001 9
2 0010 2 10 1010 A
3 0011 3 11 1011 B
4 0100 4 12 1100 C
5 0101 5 13 1101 D
6 0110 6 14 1110 E
7 0111 7 15 1111 F

Humans think about numbers in base 10, but computers "think" in base 2. Binary encoding is what lets computers do all the amazing things they do!

Binary encoding

  • With N binary digits, how many "things" can you represent?
    • You need N binary digits to represent n things, where
    • Example: 5 binary digits for the alphabet, because
  • A binary digit is a bit
  • A group of 4 bits (1 hex digit) is a nibble
  • A group of 8 bits (2 hex digits) is a byte
    • 1 bit → 2 things, 1 nibble → 16 things, 1 byte → 256 things

You can represent anything countable with numbers!

  • You just need to agree on an encoding, kind of like learning a new language
  • Examples:
    • Decimal integers: 0 → 0b0, 1 → 0b1, 2 → 0b10, etc.
    • English letters: CSE → 0x435345, yay → 0x796179
    • Emoticons: 😃 0x0, 😞 0x1, 😎 0x2, 🤠 0x3, 😈 0x4, 🙋 0x5

So what does 0x4E6F21 mean? It depends! It could be the number 5140257, the characters "No!", or a color. It's up to the program to decide how to interpret the bits.

A cube of colors with red, green, and blue axes: black at one corner, white at the opposite corner, and every mix in between

Binary encoding: Colors

  • RGB: Red, Green, Blue
    • Additive color model (light): one byte (8 bits) for each color
    • Commonly written in hex (in HTML, photo editing, etc.)
  • Examples:
    • Maroon → #800000
    • Gold → #FFD700
    • Orange → #E2661A
    • Turquoise → #33997E
ASCII table listing each character with its decimal, hex, octal, and HTML code

Binary encoding: Characters and text

  • ASCII: American Standard Code for Information Interchange
  • Each character gets a number
    • y → 0x79, a → 0x61
    • So "yay" → 0x796179
  • asciitable.com
The Pac-Man level 256 kill screen: the half of the maze is filled with scrambled letters and symbols

Binary encoding: Video games

  • In many old games, stats max out at 255, the largest number in one byte
  • Pac-Man "kill screen": level 256 breaks, because the level counter only goes up to 255

An RPG stats screen where Strength, Vitality, Magic, and other stats are capped at 255 The Legend of Zelda HUD showing a rupee count of 255

A hand-drawn cartoon giraffe saved as giraffe.jpg

Binary encoding: Files and programs

  • At the lowest level, all digital data is stored as bits!
  • Layers of abstraction keep everything understandable
    • Data/files are groups of bits interpreted by a program
    • A program is groups of bits interpreted by your CPU
  • Demo: open a file (like giraffe.jpg) in a text editor or hex viewer to see the raw bytes

Summary: Binary

  • Humans think about numbers in decimal; computers think in binary
    • Base conversion lets us go between them
    • Hexadecimal is easier for humans to read than binary
  • All information on a computer is binary
  • Binary encoding can represent anything!
    • The computer/program needs to know how to interpret the bits

Sign: There are 10 types of people in the world, those who understand binary and those who don't

Part 4: Programming languages

What is a programming language?

  • A precise way to write instructions that people can read and computers can run
  • Computers only understand binary (Part 3), so your code gets translated into machine code
  • High-level languages (Python, Java) read a bit like English
  • Low-level languages (assembly) are close to the hardware

Roll a die: Python, JavaScript, and Lua

Python

import random
roll = random.randint(1, 6)
print("You rolled", roll)

JavaScript

let roll = Math.floor(Math.random() * 6) + 1;
console.log("You rolled " + roll);

Lua (Roblox uses a version of Lua called Luau)

local roll = math.random(1, 6)
print("You rolled " .. roll)

Roll a die: Java

import java.util.Random;

public class Dice {
  public static void main(String[] args) {
    Random rng = new Random();
    int roll = rng.nextInt(6) + 1;
    System.out.println("You rolled " + roll);
  }
}

Roll a die: C++

#include <iostream>
#include <cstdlib>
#include <ctime>

int main() {
  std::srand(std::time(nullptr));
  int roll = std::rand() % 6 + 1;
  std::cout << "You rolled " << roll << "\n";
}

Same idea, different spelling

Language Random number 1–6 Show it
Python random.randint(1, 6) print(...)
JavaScript Math.floor(Math.random() * 6) + 1 console.log(...)
Lua math.random(1, 6) print(...)
Java rng.nextInt(6) + 1 System.out.println(...)
C++ std::rand() % 6 + 1 std::cout << ...

Every version does the same algorithm: get a random number, store it, show it.

Which language makes which games?

Language Where you'll see it
C++ Unreal Engine, most big console and PC games, Minecraft: Bedrock Edition
C# Unity (many indie and mobile games)
Luau (a version of Lua) Roblox
Java Minecraft: Java Edition, Android apps
JavaScript Browser games and websites
GDScript Godot engine
Python AI, data, game tools; beginner games with Pygame

Java ≠ JavaScript

Java is to JavaScript as car is to carpet.

  • Different languages, different creators, different jobs
  • Both came out in 1995; the similar name was a marketing choice
  • Java: apps, Android, Minecraft, big company systems
  • JavaScript: websites and browser games

The TIOBE Index

  • A monthly ranking of how popular programming languages are
  • Based on how often each language shows up in search engine results
  • It measures how much people talk about a language, not which one is best

TIOBE top 10: October 2026

Rank Language Rating
1 Python 19.23%
2 C 11.33%
3 C++ 8.87%
4 Java 8.41%
5 C# 3.79%
6 JavaScript 2.77%
7 Visual Basic 2.20%
8 R 2.06%
9 SQL 1.97%
10 Rust 1.44%

Live version: tiobe.com/tiobe-index

Rankings disagree

  • TIOBE counts search results: Python leads
  • Stack Overflow's developer survey asks programmers what they use: JavaScript has led for years
  • GitHub's Octoverse counts contributors on GitHub: TypeScript passed Python in 2025

Discussion: Why might these lists be different? What does "popular" even mean?

Part 5: Why Java?

Meet Java

  • Created by James Gosling and his team at Sun Microsystems
  • Released in 1995
  • Motto: "Write once, run anywhere"
    • Java runs on a "virtual machine," so the same program works on Windows, Mac, and Linux
  • Owned by Oracle since 2010

Why we're learning Java

  • AP Computer Science A is taught in Java
  • It's been near the top of the TIOBE Index since 2001
  • It's everywhere: Minecraft: Java Edition, Android apps, banks, big websites
  • Your skills transfer: C#, C++, and JavaScript look a lot like Java
  • Types build good habits: int score vs. float speed makes you think about your data

Java looks like its cousins

// Java, C#, and C++: the exact same line
if (lives == 0) {
  gameOver = true;
}

// JavaScript: almost the same
if (lives === 0) {
  gameOver = true;
}
# Python: a different style
if lives == 0:
    game_over = True

Why Processing?

  • Processing is Java with a sketchbook
  • Made in 2001 by Ben Fry and Casey Reas at the MIT Media Lab, for artists, designers, and beginners
  • Free and open source
  • You see your code draw right away

The same die roll in Processing:

int roll = int(random(1, 7));
println("You rolled " + roll);
A Processing sketch of a green one-eyed monster that follows the mouse

Programming in Processing

  • We'll use a language called Processing
    • A text-based language that is good for visuals and interaction
    • We will use Java syntax
  • At the end of the day, the language you use doesn't matter as long as you develop computational thinking skills

A Processing tic-tac-toe game with a Reset button and a Player 1 label

Summary

  • Computer science is problem solving with computation; programming is one tool for it
  • Computational thinking: decomposition, patterns, abstraction, algorithms
  • Computers store everything as binary
  • Languages differ in spelling, not in ideas
  • We use Java (through Processing) because it's widely used, it's on the AP exam, and it transfers to other languages

Next: Processing Intro

Your first sketches: shapes, colors, and debugging

CONTENTS - Click any link to jump to that slide. Every slide's footer has a "Contents" link that brings you back here. - The lesson overview, timing, and sources are in the notes on the next slide (the title slide). - Links work in the HTML version (GitHub Pages) and in a browser. They may not work in the VS Code preview.

Lesson overview: the first deck of Unit 2 (Drawing with Code), in five parts. Teach it before processing-intro.md ("Processing Intro"), which picks up with drawing in Processing. After that come variables.md ("Variables", Unit 3) and functions.md ("Functions", Unit 4). algorithms.md ("Algorithms") is unplugged and fits Unit 1; if students did it, connect it to the computational thinking slides here. | Part | Topic | Time | | --- | --- | --- | | 1 | What is computer science? (CS vs. programming, computational thinking, fields of CS) | 20 min | | 2 | Abstraction (detail removal and generalization) | 25 min | | 3 | Binary, hex, and encoding (how colors and text are stored) | 1 period | | 4 | Programming languages ("roll a die" in five languages, the TIOBE Index) | 30 min | | 5 | Why we're learning Java, and why Processing | 20 min | Objectives: by the end, students can explain the difference between computer science and programming; name the four ideas of computational thinking; explain abstraction and binary encoding in their own words; compare how a few languages express the same program; read a language ranking critically; and give two reasons GP1 uses Java and Processing. Materials: none for Parts 1, 2, 4, and 5. Part 3 works well with paper for binary practice. Click-to-reveal: many lists in this deck appear one item per click, so you can ask before you show. That works in the HTML version (GitHub Pages, or the .html file in a browser). VS Code's preview, PDF, and PowerPoint show every item at once, so present from the HTML version. The notes on each of those slides say so, so nobody changes the * bullets back to -. Sources: Part 1's "Why study computer science?", "Computing in your future", and "Computing and society" slides, and all of Parts 2 and 3, are adapted from CSE 120: Computer Science Principles, Winter 2020, University of Washington (instructor Sam Wolfson), "L01: Intro, Abstraction" and "L03: Binary." UW course materials are not openly licensed, so this title slide credits the course; keep that line, since the deck is public on GitHub Pages. The rest of Part 1 and Parts 4 and 5 are new for GP1; their sources are in each slide's notes.

About 20 minutes. Three slides here (Why study computer science?, Computing in your future, Computing and society) are adapted from "L01: Intro, Abstraction," CSE 120, Winter 2020, University of Washington; the rest are new for GP1.

Even if it's not your focus, it has a massive impact on society. It also tends to be useful for lots of different fields. Activity: break into groups. Each group lists careers they think don't involve any computing. Then share out, and the class tries to find the computing in each one (farming: GPS tractors and weather data; hair stylist: online booking and social media; and so on). Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

Before showing the bullets, ask: "What do you think computer science is?" Write answers on the board. Common ones: coding, fixing computers, hacking, making games, AI. Point to land: all of those use CS, but CS itself is about problems and how to solve them. Coding is one part of it. Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

Programming is a way to express computational thinking, but it's not the most important part of computer science. Once you know what you're trying to solve, the details of a specific language matter less (Part 4 shows this with the same program in five languages). Computational thinking might feel strange at first, but it's not impossible. It's just another skill to learn. Adapted from "L01: Intro, Abstraction," CSE 120, Winter 2020, University of Washington. Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

Discussion: "What would a chef's 'telescope' be? A musician's?" (Knives and a stove; an instrument.) The tool matters, but it isn't the subject. Source caveat: this quote is usually credited to Edsger Dijkstra, a famous Dutch computer scientist, but there's no record of him writing it. It may come from computer scientists Michael Fellows and Ian Parberry (1993). Say "often credited to Dijkstra" if you name anyone.

These four ideas are a common way to describe computational thinking in K-12 CS (for example, BBC Bitesize and Google's Computational Thinking resources). Jeannette Wing popularized the term "computational thinking" in a 2006 essay. Ask students to try it on another game they know: "Decompose Tetris." (Falling piece, the grid, clearing lines, the score, speeding up.) Coming up: Part 2 goes deeper on abstraction. Algorithms get their own deck, Algorithms (algorithms.md).

CS is a big field with many specialties, and games touch almost all of them. Ask: "Which of these sounds most interesting to you?" Quick hands or a sticky-note poll. Careers connection: game studios hire graphics programmers, AI programmers, network engineers, security teams, data analysts, and UX designers, not just "game programmers."

I will try to convince you that computing is inescapable (unless you want to live in the woods, but even then...). Whether or not this is a good thing is its own topic. Computing is important for every job: creating and processing data. We don't have time to make you super skilled programmers, but we do want you to have a sense of how CS affects you and how you can actively understand it, even if you never take another CS course. Some of you will decide you want to continue with CS, and that's great! Some of you won't, and that's fine too. But you'll make an informed decision. Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

How has computing affected our society? After each line, ask what it shows: - Working from home: computing enabled it, for better or worse. When are you really "off the clock"? - Online "stalking": have you looked up info about someone instead of asking them directly? Employers do this too. - Emoji: a whole new way to communicate and express emotions. - Pokémon GO: interaction between the digital and physical world. Does anyone have a newer example? - Identity theft: new ways to enable theft. - Devices for kids: changes how we interact with children and raise them. Lots of ways they interact! For high schoolers, you might swap in TikTok, group chats, or AI chatbots for homework. Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

Abstraction is somewhat difficult to describe. Has anyone heard of it or used it some way before? A research paper starts with an abstract (a short summary). So, what is the goal of abstraction?

...to deal with complexity. If you just want to draw a few things, it's fairly straightforward. But as it gets more complex, there's a lot more "stuff" you need to deal with. - Detail removal: only expose the parts that are necessary for the task at hand. - Generalization: don't reinvent the wheel; apply existing tools to similar but new problems. What is the most appropriate abstraction that lets you solve a problem? We'll start with detail removal. Game connection for GP1: a board game piece is an abstraction too. A chess knight doesn't need a horse's legs, just a shape and a move rule. Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

Read out the quote. Then ask: what is missing from each of these examples? 1. Matisse: missing features. How can you tell it's a person? It has legs, a head, etc., even though it's missing the details a real person would have. Artwork: Henri Matisse, Blue Nude IV (Nu bleu IV), 1952, gouache-painted paper cut-outs, Musée Matisse, Nice. Still under copyright in the US; used here for classroom teaching.

2. The detailed map is missing trees, buildings, people, etc. They aren't needed for its purpose. 3. The simpler map is missing the small streets. If Google Maps is down, how much detail can we remove and still solve the problem? You don't even need most of the streets.

The user interface stays the same even as the underlying technology changes: pedals and steering wheel, shape and position are generally the same. You don't need to know what's going on under the hood as long as you understand the interface; it's all abstracted away! Nowadays the pedals don't even directly control the systems; they just send a signal to a computer. Game connection: a game controller works the same way. "A" means jump in many games, no matter how each game makes jumping happen. Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

Detail removal also applies to how the car is designed. The people who design the accelerator pedal don't even need to know the people who design the part that actually sends fuel to the engine. There's an "abstraction barrier" between the accelerator and the throttle body; neither needs to understand the other's details.

The ECM serves as an "abstraction barrier" between the accelerator and the throttle. The designer of each part isn't concerned with how the others work, as long as it can send and receive data to and from them. Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

Read the quote. - Shower rods: not every bathroom is the same size, but instead of building a rod for every bathroom, make one that extends. Same for hats and belts. - Recipes: you can substitute an ingredient like the fruit while keeping most of the recipe the same. - Feeding animals: just substitute the animal's name for each food type. One generalizable solution for all situations. This is exactly what a variable or a function does in code. Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

Collect answers on the board. Examples students (and past classes) have come up with: Detail removal: - Flying an airplane (autopilot) - Using a computer (press a button) - Light switches - A painting; an abstract (short summary) of a paper Generalization: - Writing a formula you can reuse - Clothing sizes (S/M/L) instead of exact measurements; a onesie (less clothing to deal with) - IKEA furniture - Sorting food into food groups

Wrap-up. Ask for a show of hands on each question. Land the point: you can use a computer without knowing how it works because of abstraction, and in this course you'll learn to build your own abstractions in code. Click to reveal: the bullets start with * instead of - on purpose, so they appear one per click in the HTML version, with "Thanks to abstraction!!!" last. Get the show of hands on each question before you click.

Source for Part 3: "L03: Binary," CSE 120, Winter 2020, University of Washington. Why this matters for GP1: every color you pick in Processing is three numbers from 0 to 255, and many old games have stats that max out at 255. Both come from binary.

As humans, we use the decimal numbering system. Why? Hard to say. Maybe because we have 10 fingers? For 0-9, we use one digit. To make larger numbers, we combine digits. Write the place values over the example: ones digit, tens digit, hundreds digit, and so on. Each place is the base raised to the power of its position (10^0, 10^1, ...). The original deck also had a slide on octal (base 8) using four-fingered cartoon hands. It's skipped here; mention it if students ask "why base 10?"

Computers typically use binary and hexadecimal. Binary is just base 2: we only have 0 and 1! You can write a subscript 2, or the prefix "0b" ("zero bee"); they mean the same thing. Same procedure as decimal to convert, but now the places are 1's, 2's, 4's, 8's... Hexadecimal is also often used with computers. Ask: where can we get the extra symbols we need past 9? Letters: 10 is A, 11 is B, and so on up to 15 = F. The prefix is "0x" ("zero ex"). With A in the 16's position, it means 10 x 16. Powers of 2 to keep on the board: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024. Click to reveal: the answer lines start with * instead of - on purpose, so each one appears on its own click in the HTML version. Give students a moment to work out each example before you click.

Bi-stable: having two stable states (i.e., "on" and "off"). Point at the graph: the signal wobbles, but as long as it stays in the low gray band it's a 0, and in the high band it's a 1. Two wide bands are much easier to tell apart than ten narrow ones. DNA bases: adenine (A), cytosine (C), guanine (G), thymine (T).

Each row is the same value written three different ways. Point out that one hex digit always matches exactly four binary digits; that's why programmers like hex.

Warm-up: with N decimal digits, how many things can you represent? (1 digit: 10, 2 digits: 100, N digits: 10^N.) Same idea in binary: 2^N. Some people spell it "nybble." Click to reveal: the answer lines start with * instead of - on purpose, so each one appears on its own click in the HTML version. Ask the question first.

As long as we agree on a translation from the number to what it represents, we can use numbers for (nearly) anything! "Let's agree that the happy face is 0," and so on. Base 2 is too hard for humans to read, so we use base 16 as a convenient way to hold what is really binary data in our heads. 0x4E6F21: as a decimal number it's 5,140,257; as ASCII text it's "No!"; as an RGB color it's a dark green (red 0x4E = 78, green 0x6F = 111, blue 0x21 = 33). The original slide used that green as its background. Numbers aren't useful without context.

Each of red, green, and blue gets a number from 0 to 255 for how much of that color we have. Why 255? It's the largest number that fits in 8 bits (2^8 = 256 values, 0-255). This is exactly how color works in Processing (Processing Intro deck, Part 4: Colors): fill(128, 0, 0) is the same maroon as #800000 (0x80 = 128), and fill(255, 215, 0) is the same gold as #FFD700. Processing's color selector shows both. Maroon and gold are Lindblom's colors. These hex values are the standard web colors named "maroon" and "gold"; the school doesn't publish official hex codes, so ask students to sample the exact shades from the Lindblom eagle logo with Processing's color selector or an eyedropper tool.

Write "yay" → 0x796179 on the board: it's text only if we tell the computer to interpret it as text. Modern computers use Unicode (UTF-8), which starts with the same 128 ASCII codes and adds every other writing system and emoji.

255 is the max number stored in a byte. Pac-Man (1980): the level counter is stored in one byte. On level 256 it rolls over to 0, and the code that draws the fruit at the bottom of the screen runs wild and garbles the right half of the maze. The game can't be finished. Final Fantasy VII: most stats cap at 255. The Legend of Zelda (NES): rupees max out at 255. Video: Numberphile, "255," http://www.numberphile.com/videos/255.html GP1 connection: if you store a score in a byte-sized variable, you'll hit the same wall. In Processing, int goes up to about 2.1 billion, so you're safe.

Computer memory demo: open an image in a hex viewer (in vim: %!xxd; online hex viewers work too). Every JPEG starts with the bytes FF D8 FF. The image viewer knows to interpret these bits as a picture; a text editor shows garbage. This connects back to Part 2: layers of abstraction let us think "picture" instead of "millions of bits." Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

End on the joke and ask who gets it: 10 in binary is 2. Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

Part 4 is new for GP1. About 30 minutes. Big idea: there are hundreds of programming languages, but they share the same ideas (variables, decisions, loops, functions). Learn one well and the next is much easier.

Connect to Part 3: the CPU only understands 1s and 0s, so every language needs a translator. If students ask how the translation works: some languages are compiled ahead of time (C++ into machine code; Java into "bytecode" that runs on the Java Virtual Machine), and some are interpreted while they run (Python, and JavaScript in the browser). No need to go deeper today. Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

Same program, three languages: pick a random number from 1 to 6, store it, and show it. Ask students to find the three steps in each version. Then ask: "What's different?" (How you get a random number, how you print, whether lines end in semicolons, how text is joined: a comma, +, or ..)

The same three steps, but Java asks for more structure: every program lives in a class, it starts in main(), and you say what type each variable is (int roll). That extra structure feels like a lot at first, but it's also why Java catches many mistakes before the program even runs. Part 5 comes back to this, and shows how Processing hides most of this setup. rng.nextInt(6) gives a number from 0 to 5, so we add 1.

C++ powers most big console and PC games (Unreal Engine is written in C++). It looks a lot like Java: braces, semicolons, int, and main(). std::srand(std::time(nullptr)) seeds the random numbers with the current time so you get a different roll each run. % 6 gives a remainder from 0 to 5, so we add 1. (Modern C++ has a better random library, <random>, but this version is shorter to read.)

Point to land: the algorithm didn't change; only the syntax (the "spelling") did. That's why CS is not the same as programming: the thinking carries over from language to language.

Ask: "Which games on this list have you played?" Most students have played something built with each. Notes: Unity scripts are written in C#. Unreal is C++ (plus a visual scripting system called Blueprints). Roblox uses Luau, a faster version of Lua. Godot also supports C#. Minecraft: Java Edition is the original PC version; Bedrock Edition (consoles, phones, Windows) is C++.

A very common mix-up, even among adults. Java came from James Gosling's team at Sun Microsystems. JavaScript was created by Brendan Eich at Netscape in 1995, first called Mocha and then LiveScript, and renamed to ride on Java's popularity. The car/carpet line is a well-known joke among programmers; its original author is unknown. Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

TIOBE is a Dutch software-quality company that has published the index every month since 2001. It counts search results for "<language> programming" across many search engines and websites. Discussion: "Does more search results mean a language is better? What else could cause lots of searches?" (A language could be popular with beginners who search a lot, or confusing enough that people look things up often.) Source: TIOBE Index, https://www.tiobe.com/tiobe-index/ Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

The numbers are TIOBE's October 2026 index, copied from tiobe.com. The top 7 are in the same order as a year ago. The movers: R climbed from #13 to #8, SQL from #10 to #9, and Rust from #16 to #10. Go dropped out of the top 10, to #11 (1.39%). Discussion: "Python is about 19%, and #10 is under 1.5%. What does that tell you?" (A few languages get most of the attention, and hundreds more share the rest.) Ask which languages on the list students have heard of, and which ones show up on the "Which language makes which games?" slide. Caveat: TIOBE changed its method in 2026 (it added Mandarin Chinese search terms), so some big jumps this year may come from the method, not real changes in interest. Update this table each school year. Point out that Java has been near the top since the index began. Sources: TIOBE Index, October 2026 (https://www.tiobe.com/tiobe-index/); TechRepublic, "TIOBE Index October 2026."

Each ranking measures something different: what people search for, what developers say they use at work, or what people write on GitHub. TypeScript is JavaScript with types added, so it's a close cousin. Point to land: before you trust a ranking, ask what it counted. Sources: Stack Overflow Developer Survey (survey.stackoverflow.co); GitHub Octoverse 2025 (github.blog/news-insights/octoverse/). Check the newest editions each year; the order changes. Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

Part 5 is new for GP1. About 20 minutes. Goal: students should leave able to give two reasons we use Java and Processing in GP1.

Java was designed so one program could run on any kind of computer without being rewritten. The Java Virtual Machine (JVM) is the translator on each computer that makes that work. Oracle bought Sun Microsystems in 2010, so Oracle now develops Java. Source: Oracle, "The History of Java Technology" (oracle.com/java). Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

For LMSA students, the AP CS A connection is a big one: what they learn in GP1 is a head start on that course and exam. Android: Google has recommended Kotlin for new Android apps since 2019, but Kotlin runs on the same system as Java and many apps are still written in Java. Types: Java makes you say what kind of data each variable holds. It feels strict at first, but it catches mistakes before the program runs. Sources: College Board, AP Computer Science A course page (apcentral.collegeboard.org); Android Developers, "Kotlin-first" (developer.android.com). Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

Point out the braces, parentheses, and semicolons: Java, C#, C++, and JavaScript all come from the same "C family." Learning Java means Unity (C#), Unreal (C++), and the web (JavaScript) will look familiar. JavaScript's === means "equal and the same type"; == also exists but has surprises. Python uses indentation instead of braces.

Processing hides the setup that plain Java needs (the class and main() from the "Roll a die: Java" slide), so the same program is 2 lines instead of 8. It's still Java underneath, so everything carries over. random(1, 7) gives a decimal from 1 up to (not including) 7, and int() chops off the decimal, giving 1 to 6. Source: Processing Foundation, processing.org/overview.

We'll use Processing for this course. Its syntax is based on Java, but we're mainly using it because it's designed to create visual and interactive programs. Like I've been saying, the language doesn't really matter in general. Here are some cool things you'll be able to make! Both animations come from the UW course: a monster that follows the mouse, and a two-player tic-tac-toe game. Tic-tac-toe is a good preview of the board-game-to-digital projects later in GP1. Processing: https://processing.org/

Exit ticket (pick two): 1. In one sentence, what's the difference between computer science and programming? 2. Name a programming language and one thing built with it. 3. Give one reason we're learning Java. 4. Why might the TIOBE Index and the Stack Overflow survey rank languages differently? Click to reveal: these bullets start with * instead of - on purpose, so they appear one per click in the HTML version.

Next deck: processing-intro.md in this folder. Students need Processing installed (https://processing.org/download; may need IT).