Lego Blocks and Codes

Read the blog post written by Dr. Jessica Amsbary, and learn how to use blocks to foster future coding skills. 

Jessica Amsbary's headshot

Dr. Jessica Amsbary

About the authors:

Jessica Amsbary, PhD is a Technical Assistance Specialist at FPG Child Development Institute and Program Coordinator for the Master in Education for Experienced Teachers in Early Childhood Intervention and Family Support at the School of Education at UNC Chapel Hill. Her research interests involve the development and implementation of effective and inclusive early intervention resources and support for young children with disabilities and their families. She has a doctorate in Applied Developmental Sciences and Special Education from UNC Chapel Hill, a M.S. in Early Childhood Development with a specialization in infancy from Erikson Institute, and a B.A. degree in Psychology from the University of Notre Dame.

When I played with Lego Blocks as a child, I wasn’t generally thinking about ways to use them to foster future coding skills, but I am excited to write here about how we as educators and family members can and should use Lego Blocks to address foundational computational thinking skills for very young children with and without disabilities. While some early childhood educators and family members report that they are not necessarily prepared and confident in their ability to integrate early STEM leaning into their daily routines (Brenneman et al., 2009), many of the activities we already do easily lend themselves to STEM learning. And what’s more: Children are ready to engage and interested in such activities (Sarama et al., 2018). Let’s take Lego Blocks and computational thinking as an example.

To begin, although there are a few different specific “definitions” of foundational computational thinking in early childhood (Bers et al., 2021), most interpretations include sequencing, patterns, and representation as critical elements of definition, meaning that teaching these concepts in early childhood can support children’s later computer coding skills.

So, how do we use Lego Blocks to teach these concepts? Let’s start with the idea of using the blocks as symbols to represent something else (shall we call this a “code”?). At home and in classrooms, we can work with children to make the Lego Blocks stand for something else. For example, we may decide that the red block means “clap”, the blue block means “stomp”, and the yellow block means “spin”. It can be a lot of fun if children make some of their own choices. Then we can make a game out of doing the actions each block represents when we see it. Specific actions and the activity itself can be adapted and modified so that all children can participate. Visual supports and signs can be used to help label steps and actions and children can make sounds or other non-movement actions if they experience fine or gross motor challenges. Check out this guide from STEMIE to learn more about specific adaptations.

Once we have a set of blocks representing some sort of action/sound/response, we can start putting the blocks in a specific order and helping the children carry out the activities. If we use the actions described above, that would mean when we put out a sequence of red, red, blue, then the children would “clap”, “clap”, “stomp”. As children get older and more advanced in their thinking, we can encourage them to lead the activity and document the sequences they put together, encouraging them to develop their own codebook! They can develop sequences/codes for dances, songs, or whatever they desire to create!

This simple, fun activity can be done using Lego Blocks or other objects that are more convenient or of higher interest to individual children. Throughout the activity, be sure to label what the children are doing in ways that they can understand. Describe how the Lego Blocks are a symbol representing something else and that when we put them together in a particular order (or sequence), we can refer to that as creating “codes” or “coding”. The activity can help increase young children’s awareness of some of the most important foundational concepts of computational thinking, empowering them for future success in STEM and beyond. For more ideas and information, please visit


E-mail me when people leave their comments –

You need to be a member of stem4ec to add comments!

Join stem4ec


Hello and welcome to the STEM4EC Community.  We invite your participation.

Read More >

Marta Marks is now a member of stem4ec
Slki Narae Lim and Angela Vargas joined stem4ec
Apr 27
Deborah Palarino is now a member of stem4ec
Apr 24
Alicia Carroll is now a member of stem4ec
Apr 22
Alicia Carroll liked STEMIE Center's blog post Practice Highlights: Using Learning Trajectories for Meaningful STEM Learning
Apr 22
DANIELLE SAVORY SEGGERSON is now a member of stem4ec
Apr 20
Roya Brown is now a member of stem4ec
Apr 9
STEMIE Center posted a blog post
Have you heard of storybook walk? Read the article and find out!

By Katherine Mansfield

About the author: 
Katherine Mansfield is a second-year speech-language pathology student at the University of North Carolina at Chapel Hill. She has been a…
Apr 7
Erin Metoxen is now a member of stem4ec
Apr 5
Petrea Hicks is now a member of stem4ec
Mar 30
Michaela Thompson is now a member of stem4ec
Mar 29
Joan Longo is now a member of stem4ec
Mar 25
Emily Rasmussen is now a member of stem4ec
Mar 2
Hannah Minter Anderson is now a member of stem4ec
Feb 28
STEMIE Center posted a blog post
"As his mother and educator, it is essential to build his literacy experiences through books that represent people and characters that look like him." - Marye Vance. 


By Marye Vance

About the author:
Marye Vance is an early childhood…
Feb 25
Jen King and Julie Cucuel joined stem4ec
Feb 17

Community Guidelines and Privacy Statement