BallCODE

STEM Learning Through Basketball

Episode Episode 1: The Tip-off Trial
Target Audience Grades 3-8
Duration 15-25 minutes
Learning Focus State Management

📹 Episode Recording Coming Soon

Video will be embedded here when recording is complete

Episode 1 Recording | Duration: TBD | View Transcript (coming soon)

Skill Pit-Stop: Understanding State in Code

What is State?

Think of state like a light switch. A light switch can be in one of two states: ON or OFF. It can't be both at the same time, and it can only change from one state to the other when you flip the switch.

In basketball, and in code, we use states to track what's happening. Just like a light switch, the game can only be in one state at a time, and it changes when something specific happens.

The Four States of Possession:

  1. START - When the play begins (tip-off)
  2. LIVE - When the ball is in play
  3. DEAD - When play stops
  4. OUTCOME - When the play ends with a result

Why Does State Matter?

Just like Nova learned, tracking state helps you understand what's happening and what you can do next. If you know the state is LIVE and you have the ball, you know you can dribble, pass, or shoot. If the state is DEAD, you know the play has stopped and you need to wait for the next state change.

Career Connections

Integrated with IBM SkillsBuild Teacher Toolkit

State management is a fundamental coding concept used across many technology careers. Understanding how programs track and change states is essential for software development.

Software Engineer / Developer

What they do: Build web applications, mobile apps, and software systems

How they use state: Track user sessions, manage application data, handle form states

Real example: When you log into a website, the app tracks your "logged in" state

Education: Bachelor's in Computer Science or related field, coding bootcamp, or self-taught

Game Developer

What they do: Create video games for consoles, computers, and mobile devices

How they use state: Track player health, game level, score, inventory, character status

Real example: In a video game, the character can be in states like "idle," "running," "jumping," or "attacking"

Education: Bachelor's in Game Development, Computer Science, or related field

Frontend Developer

What they do: Build the user interface and user experience for websites and apps

How they use state: Manage UI states (dropdowns open/closed, forms filled/unfilled, buttons active/inactive)

Real example: A shopping cart that tracks items added/removed, quantities, and checkout status

Education: Bachelor's in Computer Science, coding bootcamp, or self-taught with portfolio

Systems Analyst

What they do: Analyze and design computer systems for organizations

How they use state: Model system states and transitions, design workflows

Real example: Designing a ticket system that tracks tickets from "open" → "in progress" → "resolved"

Education: Bachelor's in Information Systems, Computer Science, or Business with tech focus

Quality Assurance (QA) Tester

What they do: Test software to find bugs and ensure quality

How they use state: Test state transitions, verify edge cases, ensure states work correctly

Real example: Testing that a login system correctly transitions from "logged out" → "logging in" → "logged in"

Education: Associate's or Bachelor's in Computer Science, QA certification programs

Career Connection Activity (15-20 minutes)

Objective: Connect Episode 1's state management concept to real-world tech careers.

  1. Career Selection (3 minutes)
    Students choose one career from the list above (or teacher assigns). Each student/group gets a different career.
  2. Research (8-10 minutes)
    Research: "How does [career] use state management?" Find one specific real-world example. Identify 2-3 skills needed for this career. Note education/training requirements.
  3. Share Findings (5-7 minutes)
    Each student/group presents findings (1-2 minutes each). Class discusses: "What similarities did you notice across careers?" Teacher highlights: "State management is used in many different tech jobs!"

Discussion Questions:

  • "Can you think of a video game that uses state management? What states does it track?"
  • "How might a mobile app developer use states in an app you use?"
  • "What happens if a program loses track of its state? (Hint: Think about when a website 'forgets' you're logged in)"
  • "Which career interests you most? Why?"

Try the Exercises!

Complete the exercises to practice what you've learned about states. Download the exercise worksheets from your teacher or access them through the teacher guide.

Download Exercises (PDF) Try Online Exercises

Teacher Resources

Access complete teacher guides, answer keys, and additional resources for this episode.