Back to computer sciencecomputing use cases

Computer ScienceComputing6th, 7th, 8thYear 7, Year 8, Year 9

How to support every student's own coding project in middle school computer science

How to let every student code their own project without the teacher having to debug 30 different programs at once.

Title card reading 'How to support every student's own coding project in middle school computer science', next to three students' cards from a Python project: a student who fixed her first error in a practice reminder, a student who found a hunger bug in his pet game, and a student who still needs to pick a problem.

"Flint was brilliant in supporting customization for students' design projects. It added an element of choice without overwhelming teachers, differentiating instruction effectively while ensuring students had support and clarity needed to succeed."

Kimberly SmithKimberly Smith, Computer Science & Design Thinking / STEAM Teacher at St. Raphael School

Why this matters

In one 7th grade computer science class, 28 students can pick 28 different programs to write. One student wants practice reminders for her soccer team, and the student next to her wants a pet care game. Each one hits a different error at a different time, but the teacher can only sit with one student at a time. Some projects stall at the first error, and the teacher has to wait for the programs to come in to find out whose did.

Strategies for student-chosen coding projects

Giving students a choice in their work raises their motivation, effort and performance, according to a meta-analysis of 41 studies (Patall, Cooper and Robinson, Psychological Bulletin, 2008).

  1. Let each student pick the problem
  2. Keep the steps and the rubric the same for everyone
  3. Help each student cut the idea down to one they can code

No teacher can debug 30 different programs at the same time. Sparky, Flint's AI tutor, coaches each one in the student's own chat.

The same coding steps, two different programs

Both students are in the same activity and follow the same four steps: problem, plan, code, and test and fix. They write Python in Flint's code editor, press Execute to run it, and send it to Sparky, who reads the code and what it printed. Sparky's first question is the same for the whole class. Everything after it is one student's own chat with Sparky.

Sparky matches the student's coding experienceSparky helps the student cut the idea down to one they can code
R

Ruby

Coding experience: New to coding

Understanding check

What's a problem you, your friends or your family run into, and who has it?

Ruby

My soccer team always forgets when practice is. I want an app that reminds them, and it also has team chat and scores and a map to the field.

Sparky

Problem step: people missing practice is a real problem. That's four apps in one, and you have two class periods. Which part would help your team most?

Ruby

The reminders. It should say hi to each player and tell them the new time.

Sparky

Plan step: what does your program have to remember?

Ruby

Everyone's name on the team, and the new practice time.

Sparky

Code step: you're new to coding, so here's a list and a loop with a fruit stand instead of your team. Press Execute to run it, then use the same idea for your players.
A Python code snippet Sparky wrote in the chat, open in Flint's code editor: a list of three fruits and a for loop that prints Today we have, then each fruit. The Output panel below shows the three lines it printed after Execute was pressed.
CodeFruit stand list and loop

Ruby

I tried it, but it says error. I don't get it.
Ruby's Python program in Flint's code editor: a list of four player names, time set to the number 5, and a for loop that prints Hi, the player's name, and practice is at, plus the time. The Output panel shows TypeError: can only concatenate str (not int) to str.
CodeRuby's practice reminder

Sparky

Your list and loop work. The error is on line 4: Python can't join words and a number, and time = 5 is a number. What could you change so the 5 is text?

Ruby

I put quotes around the time, and now it prints a reminder for every player!

Cut four apps down to one, then fixed her first error herself

T

Theo

Coding experience: Has made games in Scratch

Understanding check

What's a problem you, your friends or your family run into, and who has it?

Theo

My little brother wants a dog but we can't have one. I want to make a game where you feed it, walk it, give it baths and unlock new dogs.

Sparky

Problem step: your user is a kid who wants a dog. Which of those jobs matters most for a kid practicing to care for a real dog?

Theo

Feeding. If you forget, the dog gets hungry.

Sparky

Plan step: in Scratch you'd make a variable for this. What does your program have to remember, and what does it print?

Theo

A hunger number that goes down every minute and back up when you feed the dog. It prints the hunger every minute.

Sparky

Code step: a repeat block in Scratch is a for loop in Python. Use one to count the minutes, then press Execute.

Theo

Here's my code. I fed the dog at minute 3.
Theo's Python program in Flint's code editor: hunger starts at 6, a for loop over minutes 1 to 10 takes 1 off hunger each minute and adds 3 at minute 3 with the message You fed the dog, and prints the minute and hunger. The Output panel counts hunger down to 0 at minute 9 and -1 at minute 10.
CodeTheo's hungry dog

Sparky

It runs. Look at minute 10 in the output. Does a hunger of -1 match your plan?

Theo

No, it should stop at 0. I'll add an if so hunger can't go below 0, and the dog says it's too hungry to play.

Found a bug in his own output and planned the fix

Ruby is new to coding, so Sparky showed her a list and a loop on a different topic and explained her error in plain words. Theo has made Scratch games, so Sparky connected Python to Scratch blocks and let him spot the bug in his own output. Sparky didn't write either program or fix their code. The code pictures are Flint's code editor, where students run their code and send it to Sparky. The students and chats are examples we wrote for this page.

How to see whose program is stuck

Sparky grades each chat against your rubric. The activity page shows who needs help right now, what the class did well, and what to teach next.

Flint's activity page for an activity called Code a Program for a Problem You Care About. Needs attention shows a live alert that one student has run the same error three times without changing his code. Activity analytics lists what the class does well, an area of improvement where 7 students join words and numbers in print without turning the number into text, and a follow-up with a button to create a follow-up activity. The Sessions table shows two submitted students graded Developing and Proficient and one still in progress.

Example activity page

After a class writes their programs

The school and students are made up for this page. In this example, most of the class planned what their program remembers, and the step to teach next is turning a number into text.

Set up the activity for free

The coding project is in Flint's public library, with Sparky's role, guidelines, greeting and a rubric already written. Open it, select Try this activity to copy it into a free Flint account, and move it to a class. Every student gets their own chat with Sparky, and the activity page fills in as they work. In the activity settings, select Try session myself to test it as a student before you assign it.

Students open the code editor with the Write code button under the message box. The editor starts in Java, so have students pick Python from its language menu the first time. Flint remembers their choice after that.

To use your own project, such as a game with different steps, replace the four steps in Guidelines for Sparky with yours and keep the rest, like this:

Example guideline

Every student picks their own problem and writes a small Python program for it, following these steps: [your steps]. When the student needs a new idea, show one short example on a different topic. When they share an error, name the line and explain the error in plain words. Never write or fix the student's program.

For high school, see how to differentiate instruction in computer science. For more computer science activities, see Flint for computer science.

Other use cases

See all use cases →

Learning feels different when it fits you.