Reflections on Teaching AP Computer Science with TEALS

Technology Education And Literacy in Schools (TEALS) is a Microsoft program that builds sustainable computer science programs in high schools. The program is sustainable in that volunteers train an on-site teacher who will eventually take over the class.

I have a personal connection with TEALS, having been an AP CS student with the program my senior year of high school. I know firsthand how impactful the program can be—and I know that I wouldn’t be where I am today without it.

So, while I was working from home due to the pandemic, I thought it would be a good time to volunteer. I didn’t realize when I signed up to volunteer that my high school’s CS teacher had left for another job, leaving the school without a CS class. After learning, I requested to switch, and the TEALS staff were able to make it happen.

I had the opportunity to co-teach the course I took at my high school seven years ago.

It was a rewarding experience

While it was challenging, it was a very rewarding experience. Teaching is not something I’m particularly good at, so this was an excellent opportunity to improve my skills. It forced me out of my comfort zone, but it wasn’t too bad.

Luckily, TEALS provides a structured curriculum with plenty of teaching resources to volunteers. Slides and worksheets are almost always available for each topic, along with a sheet of key points and suggestions for the teacher.

It was nice to give back to my school and the program. I hope that I’ve made a positive impact on the students.

Be aware of the curse of knowledge

A common cognitive bias when teaching is the curse of knowledge, where people with knowledge about a particular topic assume that others share that knowledge. I deal with code nearly every day, and there’s a lot of foundational knowledge I take for granted. A student most likely will not have that knowledge, and it can be easy for a teacher to gloss over some of the finer details.

Even though I tried to keep this top of mind, there were still cases where I caught myself assuming knowledge. I’m sure there were cases where I didn’t catch myself.

I found that the provided lecture notes were a great help since they highlighted key points and anticipated areas where students might need more time to properly digest the material.

Keeping students engaged

It’s hard to keep students interested and motivated, especially remotely. A lot is going on in the world, and the students were trying to learn in extraordinary circumstances.

Understandably, most students are more interested in concepts that help with their immediate problems, like arrays. It’s harder to motivate concepts like encapsulation, where the benefit is more pronounced while programming in the large. I’ve experienced this in my professional job as well. It’s tough to adequately prioritize code health and maintenance when it doesn’t meet the project’s immediate needs.

These more "professional" concepts unfortunately seem best learned in hindsight after bad experiences with poorly maintained code. Perhaps we can learn from analogous situations in other fields, like flossing.

On the other hand, programming is fairly unique within high school subjects in that it’s easier to verify your problem sets. If you’re working on a problem to print a pattern of asterisks with for loops, you can always run your program and see! It’s not as easy to verify your math or English homework.

I think we can leverage this feedback loop to increase engagement. More frequent feedback also helps to localize cause and effect. If you see the output of your program, change the code, then run again, you can connect the change in output to the change in your code.

Developer tools are invaluable when learning

The AP Computer Science curriculum uses the Java programming language as the medium to learn concepts. While revolutionary when it was released, Java has many idiosyncrasies that can get in the way of learning more fundamental concepts.

It can be frustrating to deal with syntax errors while you’re learning things like inheritance or sorting algorithms. int[] foo vs int foo[] shouldn’t matter when learning the differences between an array and ArrayList, but you can only run your code with the former. Furthermore, the reasons behind certain syntactical decisions are often unsatisfactory.

Luckily, we have access to some amazing developer tools. Integrated development environments (IDEs) are applications that provide many tools and utilities to help programmers write software.

Closing the feedback loop is one of the best features of most IDEs. Much like how word processors can underline a misspelled word, IDEs can underline anywhere in your code with syntax errors. Some can even suggest and implement fixes to common issues. This is invaluable when you’re learning, as it provides constant feedback and suggestions while programming.

Contrast this with a workflow where you edit a source file and need to move to another program to compile the file. After compiling, you’ll need to move back to the window with your source file and correct any mistakes. This introduces a lot of inefficiencies, and the experience is not as fluid as with IDEs.

A compiler catching these types of errors is a perfect place to inject context-aware feedback to a user. The Rust compiler is an exemplar of helpful error messages that I have a lot of experience with. Elm also has a similarly helpful compiler, though I have less experience with it.

Regardless, while Rust and Elm may not be the best initial languages for a student to learn, having an empathetic compiler in their style to help guide students would be amazing.

I’m not aware of any student-focused compilers that place a priority on UX and teaching rather than optimizations and completeness. One for a traditional initial language would be an interesting project that has a lot of potential to positively impact the learning experiences of students. Though honestly, people of all experience levels benefit from good UX and error messages, so it may not make sense to separate these priorities from the standard compilers for languages. Of course, machine learning is really about automating the biases of the past. If you’re pessimistic, then you could consider Copilot as automating the buggy code of the past.

Tools like the newly announced GitHub Copilot make me hopeful for the future. If Copilot and future similar tools can help automate the boilerplate and suggest good context-aware code, then they can help remove the barrier to programming. These tools have the potential to introduce a new abstraction layer. Now, most programmers do not have to worry about assembly and low-level programming. In the future, maybe most programmers will not have to worry about a lot of the boilerplate and rigid syntax of our current languages.

Should object-oriented programming be taught so early?

There’s no escaping object-oriented programming in Java, a language where nearly everything is an object. Java is the language of the AP exam, so there’s not much TEALS can do about that.

Object-oriented programming is extremely common in the industry, and some subscribe to it wholeheartedly. It has many benefits including being fairly intuitive for students.

However, it has some drawbacks, especially as projects become older and larger. It’s all too easy for object-oriented code to become tightly coupled and complex.

The two things I worry most about are the following: forcing an object-oriented design onto a problem where it doesn’t fit, and having to unlearn many of the habits when working with other paradigms, like functional programming.

Objects map nicely to many of the manufactured problems you have in class. In the industry, though, the only constant is change. Your wonderfully designed object hierarchy might cleanly solve the first version of the requirements, but it can easily become a liability while solving the second.

Just for the record, I think object-oriented programming should still be taught. I’m just not sure if other paradigms should be excluded. Arguably, procedural programming is taught at the beginning of class while introducing fundamental concepts like variables and control flow. This isn’t usually made explicit, and it’s certainly not discussed as an alternative to object-oriented.

The pandemic exacerbated the digital gap

When I took AP CS through TEALS by senior year of high school, it was taught remote, as the volunteers were based in NYC. However, we still had an on-site teacher every day of the class, and we had reliable access to the internet at our school.

But when I took AP CS, there was not an ongoing pandemic forcing students to stay home. In a more just society, homebound students would still have access to learning materials and teachers via the internet. Unfortunately, reliable high-speed internet access is still not available for much of my hometown.

Some students in the class were not able to join the Zoom sessions during the scheduled time. For other students, they were able to join, but sharing their screen and video was unreliable. We were able to record the lectures and share with students unable to join live, but this, unfortunately, does not provide the same impact as attending live.

Representation is important

Our high school does an amazing thing for the AP CS students: they fly the students to Seattle for a tour of different tech companies.

There are a ton of Appalachian stereotypes, particularly around intelligence. You can’t help but internalize some of them while growing up in the area. For me, the AP CS course and trip played a critical role in instilling confidence in my ability.

This trip was a highlight of the class for me. Not only was it my first time on the West Coast, but it also made tech careers seem obtainable. They were no longer foreign. These were real people, and I could see my future self in their shoes.

It worked out, and I’m fortunate that I can serve as an example of a TEALS alumni who found success.

Looking to the future

I hope the AP CS course at my high school is sustainable. I also hope to encourage more people to volunteer with the program—because it truly is life-changing.

Computers are one of our greatest inventions, and they give their creators a ton of power. As software becomes more foundational to our society, we need to ensure that all members of our society are equally represented in tech. TEALS is a great opportunity to empower underrepresented groups, and I’m excited to see its future.

If you have any questions or comments about volunteering or the program, please reach out to me at [email protected]. This is a randomly generated forwarding address to help minimize spam. It may be deactivated and updated at any time. I’d love to help.