How I used GitHub Copilot to build a browser extension
Here’s how, in seven steps, I built my first browser extension with GitHub Copilot—and my three major takeaways about learning and pair programming in the age of AI.
For teachers it can be a challenge to get students the help they need exactly when they get stuck, especially in large courses. But when teachers use an automated testing…
For teachers it can be a challenge to get students the help they need exactly when they get stuck, especially in large courses. But when teachers use an automated testing suite like Travis CI with their assignments, students can hone in on their mistakes and iterate to improve.
Students see the value of a test-driven workflow as they are learning, and teachers save time grading assignments: a win for everyone.
Omar Shaikh, Lecturer at San Francisco State University, saw an opportunity to improve the assignment workflow for the C++ course he took over:
“The problem with the manual submission process was that, if a student is missing a small semicolon, or they were almost correct, the TA has no way of knowing because it doesn’t compile. Yes, the TA can go into the code and try to grade it, but it’s very inefficient.”
Exercism, a tool that helps code newbies and experienced programmers learn new languages, uses a testing framework to guide students in increments.
“It helps people who are new to programming break down problems into smaller pieces” said Exercism creator Katrina Owen, “a lot of students spent a lot of time being stuck before I introduced test suites. Seeing the green check marks when their tests pass can reassure students that they’ve mastered the skill and the problem is solved for now.”
Experienced Ruby teacher (and TravisCI engineer) Renée Hendricksen agrees: “When you have assignments that are ‘write code to get these tests to pass’ the student gets instant feedback if they are on the right track.”
“When you use a ‘test-first’ teaching method,” she explained, “students get used to reading and understanding errors early. When they start with a failing test, they can look into whether it’s an error because of setup or their application. Let the red-green-refactor guide you.”
Instead of grinding through a lot of time looking for a missing period or semicolon, teachers have insight into exactly which piece of the code didn’t pass and go from there.
For Hendrickson, a testing suite makes grading more efficient because she can see where a student needs help:
“If I see a failing test I can look there immediately and address where they struggled. If all the tests are green, I can focus on working code and give them guidance for style and composition improvement, without getting bogged down explaining syntax issues.”
Omar connects his course organization to GitHub Classroom, and then to Travis CI. While there are many ways to implement automated testing, here are the steps to implement his particular workflow:
Setting up a new individual assignment in GitHub Classroom
xis the homework number).
Example of a few student repositories on Travis CI for “hw3”
Graders can look at which tests failed for insight into where students struggle with the material
If you’re ready to implement Travis CI and GitHub Classroom, here are some tools to get you started:
To help you put all of the pieces together, Omar made a video walkthrough:
This is a post in our “Teacher Spotlight” series, where we share the different ways teachers use GitHub in their classrooms. Check out the other posts:
Join this week’s discussion in the community forum: How to automatically gather or collect assignments?