Computer Science

|

9th, 10th, 11th

Interactive Java while loop debugging

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.
Student session with emoji of surprised bug sitting on a loop emoji.

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.

Learning objective:

Students should be able to debug while loops in Java. They should identify bugs but also be able to correct them by writing the code themselves.

No materials provided (learn more here)

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

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.

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.

Computer Science

|

9th, 10th, 11th

Interactive Java while loop debugging

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

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.

Learning objective:

Students should be able to debug while loops in Java. They should identify bugs but also be able to correct them by writing the code themselves.

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

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.

Other Computer Science teacher testimonials:

"I can't emphasize enough how Flint has revolutionized my teaching. Flint has been an invaluable tool for introducing new concepts and assessing student understanding. My students have embraced Flint wholeheartedly. My high flyers love how they can deep-dive into course content with an AI expert. Other students who need more attention can get a one-on-one tutor to help with their specific needs."

Matthew Davis headshot

Matthew Davis

Computer science teacher at Episcopal

"Even as the initial novelty of Flint wore off, engagement has stayed exceptionally high. With any other activity, some top students want to move to more complex material, and others need more time on basics. As a teacher, you are stuck trying to find a middle ground. In Flint's activities, I can rotate as a facilitator and Flint automatically scales the assignments to each student's skill level."

Jake Kazlow headshot

Jake Kazlow

Computer science teacher at Westminster

Spark AI-powered learning at your school.

Get a free trial for up to 80 users at your school.

Watch the video

Spark AI-powered learning at your school.

Get a free trial for up to 80 users at your school.

Watch the video

Spark AI-powered learning at your school.

Get a free trial for up to 80 users at your school.

Watch the video