Computer Science

9th, 10th, 11th

9th, 10th, 11th

Interactive Java while loop debugging

Interactive Java while loop debugging

Give students practice in identifying and fixing buggy Java code that is provided by an AI.

Give students practice in identifying and fixing buggy Java code that is provided by an AI.

Student session with emoji of surprised bug sitting on a loop emoji.
Student session with emoji of surprised bug sitting on a loop emoji.

Teaching goals

Teaching goals

Debugging is an invaluable skill that should be learned hand-in-hand with new programming concepts, but can be a challenging area for teachers to provide practice to students in.

With Flint, teachers can give provide infinite debugging practice that scales to match the level of each student, all with minimal setup.

In the example below, the teacher has provided a simple learning objective related to debugging as well as while loops, which is the topic that students recently learned in class.

Extra customization

Extra customization

Flint automatically generated the underlying prompts necessary for the AI tutor to function. Additionally, the default helpfulness level of “medium” ensures that the AI won’t give away the answer to students.

Helpfulness level set to medium to ensure the tutor will give guidance without giving away the answer and the autoo-generated rules that ensure the tutee will need to identify and attempt to fix bugs in the code presented.

To make this AI tutor more readily available to students, the teacher can pin it in the tutor list in their class page. This brings the AI tutor to the top of the list and makes it easily accessible 24/7 within the “Intro to Java section A” class page.

Screenshot of Intro to Java section A class page with the while loops detective tutor pinned to the top of the tutor list.

Student experience

Student experience

Throughout the session with the AI tutor, students are presented with buggy while loops in Java, and are asked to identify the bugs.

Example session where the AI tutor has preseented the student with example code that may or may not contain a bug.

Once the student has correctly identified the bug, they can copy the code provided by the AI, open Flint’s built-in code editor, paste in the Java code, and then make edits to the code directly within Flint.

Graphic highlighting how students can click the copy button to copy the code snippet and then paste and edit it within the built-in code editor.

Then, the AI will respond to the code provided to the student. If the student has corrected the bug, the AI will move on to more practice problems. If the student hasn’t fixed the code, the AI will pick up on that and will ask a follow up question.

Example session where student correctly identified a bug in the code and the tutor asks how they might fix it.

Dark plum background with light painstroke lines on the corners

Learning feels different when it fits you.

Streak of orange highlighter
Dark plum background with light painstroke lines on the corners

Learning feels different when it fits you.

Streak of orange highlighter
Dark plum background with light painstroke lines on the corners

Learning feels different when it fits you.

Streak of orange highlighter