Save Points

AI Builder Series — Workshop 3

 

 

 

 

by Brendon Thiede

Where We Are

  1. Prompt Power-Ups ✓
  2. One Thing at a Time ✓
  3. Save Points (today!)
  4. Team Up

Student Goals

  • Create save points with git
  • Write test cases in plain English
  • Follow the save-change-test loop
  • Roll back when something breaks

The "Oh No" Moment

Watch what happens when there's no save point...

Live Demo

I'll break the quiz app. Then try to undo it.

Spoiler: it doesn't go well.

Git: Your Save Point System

Video Game Save Files

  • You save before the boss fight
  • If you lose, you reload your save
  • You don't start the whole game over
  • Git works the same way for code

Key Commands


# Select what to save
git add .

# Create a save point
git commit -m "Working quiz with 5 questions"

# See all your save points
git log

# Go back to the last save point
git checkout .
					

Let's Make Our First Commit


git add .
git commit -m "Clean quiz app from Workshop 2"
git log
					

You now have a save point!

Writing Test Cases

How do you know if your app still works?

What Is a Test Case?

A plain-English description of what should happen.

"When I [do this], [this should happen]."

Our Quiz App Test Cases

  • When I open the page, the first question appears
  • When I pick the right answer, my score goes up
  • When I pick wrong, the correct answer shows green
  • After the last question, I see my final score
  • When I click Play Again, the quiz restarts at 0

Write Your Own

Write 3-5 test cases for your quiz app on your worksheet.

Then run through them manually to make sure they all pass.

Break

Stretch, grab water, and think about what feature you want to add.

Think About...

What feature would you add if you knew you could undo it?

The Development Loop

4 Steps

  1. Save
  2. Change
  3. Test
  4. Keep or Rollback

Step 1: Save


git add .
git commit -m "Before adding question counter"
					

Now you have a safe point to return to.

Step 2: Change

Ask Copilot to add your feature.

Use your prompt skills from Workshop 1!

Step 3: Test

Run through your test cases. Does everything still work?

  • First question appears? ✓ / ✗
  • Score goes up on correct answer? ✓ / ✗
  • Final score shows? ✓ / ✗

Step 4: Keep or Rollback

If all tests pass:


git add .
git commit -m "Added question counter"
					

If something broke:


git checkout .
					

You're back at your last save point. Try again!

Feature 1: Practice the Loop

Pick a feature and follow all 4 steps.

Feature 2: The Intentional Rollback

This time, the feature might break something...

Your test cases will catch it.

Your save point will rescue you.

Feature 3: On Your Own

Add something you want. Follow the loop.

Review Your Git Log


git log --oneline
					

Each line is a save point. This is the story of your project.

Wrap-Up

What We Learned

  • Git saves versions of your project
  • Test cases describe expected behavior
  • The loop: save, change, test, keep or rollback
  • Rolling back is a safety net, not a failure

Coming Up Next

Team Up

You know how to build carefully on your own.
Next time, you'll build with a team — and everything
you learned becomes even more important.

Questions?

Thank you!