Educators

What Happens When Young Students Learn Computer Science

Discover how introducing computer science in early education transforms young learners' thinking, fosters collaboration, and builds essential problem-solving skills.


When I first brought programming concepts into my second grade classroom years ago, I thought it would be “cool” for the 7 and 8 year olds in my class to “make a program” or “animate a character” in the computer lab. I wanted them to create something to share, instead of spending the whole period on math games and instructional videos.

What I hadn’t counted on was what happened afterward. Exploring how computers work began to change how my students thought and talked about their own thinking throughout the school day.

I noticed in small moments that their thought processes became more visible. One of my goals as a teacher was to encourage my students to build their metacognitive skills, which we called “thinking about their thinking.” Young kids often reach an answer and, when you ask how they got there, say “my brain just knew it” or “it was easy.” That’s frustrating when you’re trying to assess whether a student can find evidence in a text or correct an error in a two-digit subtraction problem. Writing programs in the lab gave my students a reason to break down tasks (like helping a bee fly to a flower) into smaller, more specific actions (fly forward, then turn left, then fly forward again). Once students could decompose a process into discrete actions, they began breaking down their mental tasks the same way, and explaining those steps to me and to each other.

Bugs, Not Failures

There aren’t a lot of good answers for “How can I help my students navigate failure more easily?” But coding provides us a great opportunity to bake-in failure as part of the learning process. Programming invites learners to navigate productive struggle. When a program doesn't run as intended, there is no one to blame—it is simply following the instructions provided. This idea helped my students separate their self-worth from immediate success and nudged them toward a growth mindset. They began asking each other for help and talking through logic out loud:

"Wait, why did your sprite turn left there? Try moving the turn command after the loop."

My elementary students were collaborating and iterating, and nobody had to tell them to do it!

I began to bring more computer science topics into my classroom and the ideas rippled through other subjects. In science, observations and inferences connected to computer inputs (sensing visual, sound, and tactile information), processing, and outputs. In reading, the sequence of story events became an algorithm that the characters followed. The biggest shift came in math. When students followed a regrouping algorithm to add two-digit numbers, they could see why each step mattered. When they landed on a wrong answer, erasing the whole problem stopped being the first move. Instead, they scanned their work line by line to find the exact step that held the mistake. Error was no longer a personal failure or an unsolvable wall. It was a bug in the “code,” waiting to be isolated and fixed.

Starting Early Doesn’t Mean Starting Big

How do we start teaching computer science to younger students? Starting CS early isn't about pushing advanced coding into younger grades. It's about giving children developmentally appropriate experiences that build a foundation for later learning. I’ve taught CS to students in grades preK-6, and I’ve watched as experiences they had in their early years scaffolded their CS learning in upper elementary, middle school, and beyond. It took less effort than you might expect. I did some exploring on my own, took part in quality professional development, and used CS vocabulary throughout the day to connect it to other subjects.

Looking back, my initial goal of simply giving elementary school kids a "cool" creative outlet in the lab was far too small. Early CS education provides young children with a cognitive framework–a way to decompose big problems into manageable pieces, treat mistakes as information rather than failure, and put the silent steps of their own thinking into words.

Those habits stay with students whether they go into medicine, theater, anthropology, electrical engineering, finance, or fabrication. When we teach young learners decomposition, pattern recognition, and algorithmic thinking, we aren't just training the next generation of coders; we are equipping writers, scientists, artists, and leaders with a critical thinking toolkit. And the place to start is smaller than you might think: one lab period, one lesson, one bug.


About the Author

Michelle Pealo has been an elementary educator in Virginia for 20 years, teaching computer science both integrated into core subjects and as a stand-alone course. After teaching in the general education classroom for 12 years, she originated the role of 4th-6th grade coding teacher at Westside Elementary, later serving as an instructional coach, and taught computer science to all PreK-3rd grade students at Carrollton Elementary. She now works as a product creative for CodeVA, designing curriculum, professional development, and instructional resources for K12 computer science. Michelle is passionate about inspiring students to create, rather than consume, technology, and helping teachers of all disciplines see themselves as computer science teachers.

Similar posts

Keep up with our work

Get news, computing education resources, newsletters, upcoming events, and updates via email!

Subscribe