Computer science can change how students who struggle in math see themselves. I’ve watched it happen.

Far too many high school students have walked into my classroom with a fixed idea of how much they can accomplish.

That mindset is especially prevalent in the math classes I taught for years, where some students walked in confident that they would fail. But computer science instruction is proving to be a game-changer for my students.

I didn’t expect this to happen. I switched from teaching math to teaching computer science in an effort to get out of my own comfort zone and to move into a subject area without a graduation-required Regents exam attached, allowing me and my students more creative freedom.

Three years in, I’ve found that computer science instruction offers a unique space for students to change the way they think about their own abilities, especially in the all-girls public school where I teach.

My students don’t assume that there is knowledge they should have but don’t, as they might with a core content class. When encountering a new concept, there is no assumption that they are “dumb” or “behind,” because many of them have either never attempted a computer science class or, if they have, have never attempted one in Javascript, our language of choice.

My students start fresh. And nearly every day, they are invited to wrestle with problems, engage in algorithmic thinking both individually and in pairs or groups. Being comfortable with the idea of failure, of being new to something, and of never really being done iterating is a prerequisite for learning computer science.

The result is a class that can feel designed to instill a love of the rush that comes with pure problem-solving. My students sometimes spend an entire class frustrated that I won’t share my own solutions to what they view as insurmountable puzzles. At the end of class, when they are celebrating and high-fiving their tablemates, I make a point to ask them, “How do you feel solving it yourself? Doesn’t it make you feel powerful?”

We talk a lot about “empowerment” in education, but this feeling of real power is something we don’t think enough about giving to students. I hope any positive experiences my students have places them even more firmly on a path to succeeding in any field they wish — and gives them access to spaces that have historically excluded them.

I have learned a lot from this experience, too. Growing up tweaking MySpace profiles and LiveJournal lookups meant I was familiar with the most basic elements of HTML and CSS, but by no means did I have a deep background in coding. I was intrigued when our school’s co-directors approached me about attending a professional development event as part of the citywide Computer Science for All initiative.

In July 2016, I spent two weeks of my summer break with CS4All. We ran through the entire ninth-grade curriculum, from Scratch to robotics to basic web development, in a room full of mostly beginners.

The material felt exciting and full of creative potential. The tasks posed to us asked us to demonstrate a skill or concept, but how we chose to tackle each was completely up to us.

That’s now how my class works, too. I coach from the sidelines, walking around the classroom, bouncing a tennis ball, sometimes turning to a student who has raised a question or concern. But mostly, with the correct structures in place, the class runs itself.

By the end of each session, students take turns presenting to the entire classroom how they may have solved a problem, revealing their code and their thinking. Everyone shares and claps, as everyone succeeds and struggles together.

This experience has been an exercise in seeing myself as a lifelong learner. It required doing what I ask my students to do every day: embrace the discomfort of not having all of the answers.

Courtney Morgan is a high school teacher at The Young Women’s Leadership School of the Bronx. If you’re interested in training opportunities through New York City’s CS4All initiative, you can sign up here.

About our First Person series:

First Person is where Chalkbeat features personal essays by educators, students, parents, and others trying to improve public education. Read our submission guidelines here.