Skip to main content

Verified by Psychology Today

Artificial Intelligence

AI Doesn't Change Why Kids Should Learn to Code

Coding prepares kids to be better problem-solvers in the real world.

Key points

  • Coding nurtures problem-solving and creativity in kids.
  • Young coders gain early math and literacy foundations through non-tech play.
  • Middle-childhood coding bolsters logical thinking, spatial reasoning, and team skills.
Ibrar Hussain/Canva
Coding encourages collaboration skills
Source: Ibrar Hussain/Canva

Is coding a necessary competency that kids need to learn? Or does the large specter of AI on the horizon and some grim prognostications have you questioning if signing your kid up for summer coding camp is even relevant? The doomsayers argue that since AI can code better than a human, human coders won’t be needed. That’s a baby-and-bath-water analysis. It overlooks two things: 1) there are lifelong benefits of learning to code that have nothing to do with writing code, and 2) an increasingly AI-driven world means a greater need for informed ethical oversight.

I once took a ceramics class. I was awful at it. However, I learned a lot about the broad set of skills and knowledge that make a beautiful piece, making me a more informed observer and critic. The point of encouraging your child to learn coding isn't so they can have a career as a computer programmer—although maybe they will. The purpose is to support their cognitive and psychosocial development by teaching them new ways of approaching problems and turning them into knowledgeable observers and critics of how we use technology.

Coding Teaches Computational Thinking

Coding is a way of solving problems of all kinds. It fosters computational thinking, enabling individuals to break down complex problems into manageable parts, identify patterns, and devise efficient solutions that can be applied to real-world applications, such as a science fair project, an online portfolio, an app that supports community recycling, animations, or building a game.

Beyond computational thinking, coding cultivates creativity and spatial reasoning, as coders must imagine and construct digital worlds and functions from scratch. Coding also promotes resilience, self-esteem, and adaptability, as it involves constant learning from mistakes, debugging, and refining ideas to reach a goal (Hippler, 2017).

Coding Activities Change With a Child’s Development

Coding is not a one-size-fits-all activity. The level and complexity of coding activities evolve in keeping with a child’s development and interest. Coding activities can be introduced at a very young age without involving any technology—pattern recognition, the order of things, cause and effect. These are foundational skills that support their overall educational development. Research shows that while all students—even preschoolers—can master foundational coding concepts, the activities must be developmentally appropriate (Somuncu & Aslan, 2022). Here are some descriptions of activities and research findings by age group.

Ages 4-7: Laying the Foundation

Young children are naturally curious and eager to learn. Coding, when introduced through play and storytelling, can significantly enhance their cognitive development. Many coding activities for young children focus on tangible objects, not technology, allowing children to physically manipulate objects to better understand relationships and connections. Bers et al. (2014) found that kindergartners were interested in and able to learn many aspects of robotics, programming, and computational thinking with a developmentally appropriate robotics curriculum.

For ages 5-7, tablet applications like ScratchJr offer a playful introduction to coding, enabling kids to create their own stories and games by connecting blocks of code. Engaging in simple coding images allows children to express themselves through digital storytelling (Strawhacker & Bers, 2019).

Integrating coding with play in early childhood education reinforces foundational math and literacy skills and teaches children to approach problems logically and sequentially (Bers et al., 2014). For example, Bee-Bots are small, programmable, rechargeable robots that teach young children through play by giving simple commands that the Bee-Bots follow, such as moving forward or turning. Hopscotch played with coding symbol cards reinforces sequencing and cause and effect, such as what happens when you change the card order.

Children exposed to age-appropriate coding activities showed higher mathematical reasoning skills (Somuncu & Aslan, 2022). Early coding challenges also teach kids the value of patience and perseverance, and the search for solutions through trial and error as part of the process rather than making and fixing "mistakes," reinforcing a growth mindset.

Ages 8-12: Building Blocks of Innovation

As children transition into middle childhood, coding activities start to include learning computer programming languages. As the complexity of coding projects increases, it fosters deeper engagement with computational thinking. Grover and Pea (2013) emphasized the role of block-based coding environments in enhancing logical reasoning and problem decomposition skills in programs like Scratch and Tynker. Fifth graders used Scratch to create an interactive story that explained the water cycle, learning about earth science while also developing an understanding of sequencing and cause-and-effect in programming. Thompson and Childers (2021) found that coding using Google’s CS First Storytelling Lessons improved a different group of fifth graders’ writing assessments and stamina.

Children begin to understand algorithms as sets of rules that determine actions, and they learn how data can be represented and manipulated in different forms, which is crucial for mathematical and scientific reasoning. Coding projects often involve teamwork, promoting social skills and collective problem-solving (Denner et al., 2012). Applying coding to solve real-world problems in math and science classes deepens understanding and retention of academic content (Ozcan et al., 2021).

Ages 13-18: Preparing for the Future

For adolescents, coding becomes an avenue for exploring more sophisticated programming concepts and technologies. Margolis and Fisher (2002) stressed the importance of high school computer science education for opening pathways and breaking down gender barriers to STEM careers by challenging sociocultural stereotypes and increasing self-efficacy. Programming experience has also been related to increased neural efficiency in problem-solving tasks (Helmlinger et al., 2020).

Coding in games like Minecraft and Roblox lets kids engage with games they love while creating mods (modifications) or entire game experiences they can publish and share with other players, simultaneously gaining social capital. Game coding education has also been shown to mitigate problematic gaming by improving adolescents' self-esteem (Chung et al., 2023).

High school students benefit from participating in school or community hackathons. These hackathons are often dedicated to using technology to solve pressing societal issues. These experiences of coding with others not only teach students programming skills but also demonstrate how these skills can be applied to real-world problems.

Conclusion

There's lots of evidence that coding education across all ages enriches cognitive development, enhances educational outcomes, and prepares students for a digital future. As a society, we also face urgent ethical questions that require a fundamental knowledge of technology. Rather than seeing coding as a wasted effort because AI can do it better, consider coding as a basic form of literacy in which understanding data structures, algorithms, and programming languages is as important as reading and writing if we are to understand society today. Coding is one part of digital literacy that has the potential to “inoculate us against fatalism. Those who understand how a program is built and why are less likely to accept its design as inevitable" (O’Gieblyn, 2023).

References

Bers, M. U., Flannery, L., Kazakoff, E. R., & Sullivan, A. (2014). Computational thinking and tinkering: Exploration of an early childhood robotics curriculum. Computers and education, 72, 145-157. https://doi.org/10.1016/j.compedu.2013.10.020

Chung, S., Kim, S. I., Hwang, H., & Han, D. H. (2023). The effectiveness of game coding education on problematic internet gaming. Psychiatry investigation, 20(6), 531-540. https://doi.org/10.30773/pi.2022.0218

Denner, J., Werner, L., & Ortiz, E. (2012). Computer games created by middle school girls: Can they be used to measure understanding of computer science concepts? Computers and education, 58(1), 240-249. https://doi.org/10.1016/j.compedu.2011.08.006

Grover, S., & Pea, R. (2013). Computational thinking in k—12: A review of the state of the field. Educational Researcher, 42(1), 38-43. https://doi.org/10.3102/0013189X12463051

Helmlinger, B., Sommer, M., Feldhammer-Kahr, M., Wood, G., Arendasy, M. E., & Kober, S. E. (2020). Programming experience associated with neural efficiency during figural reasoning. Scientific Reports, 10(1), 13351. https://doi.org/10.1038/s41598-020-70360-z

Hippler, R. K. (2017). Computing-based self-esteem: The interplay of competence and worthiness Bowling Green State University]. http://rave.ohiolink.edu/etdc/view?acc_num=bgsu1491331999463534

Ozcan, M. S., Cetinkaya, E., Goksun, T., & Kisbu-Sakarya, Y. (2021). Does learning to code influence cognitive skills of elementary school children? Findings from a randomized experiment. British Journal of Educational Psychology, 91(4), 1434-1455. https://doi.org/10.1111/bjep.12429

Somuncu, B., & Aslan, D. (2022). Effect of coding activities on preschool children’s mathematical reasoning skills. Education and information technologies, 27(1), 877-890. https://doi.org/10.1007/s10639-021-10618-9

Strawhacker, A., & Bers, M. U. (2019). What they learn when they learn coding: Investigating cognitive domains and computer programming knowledge in young children. Educational technology research and development, 67(3), 541-575. https://doi.org/10.1007/s11423-018-9622-x

Thompson, J., & Childers, G. (2021). The impact of learning to code on elementary students’ writing skills. Computers and education, 175, 104336. https://doi.org/10.1016/j.compedu.2021.104336

advertisement
More from Pamela B. Rutledge Ph.D., M.B.A.
More from Psychology Today