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 >

Sam Agoos is now a member of stem4ec
Mar 7
Paula Walshe is now a member of stem4ec
Mar 1
Paula Walshe liked STEMIE Center's blog post Intersectionality of Disability, Race, and Gender in STEM
Mar 1
Dennise Day is now a member of stem4ec
Feb 28
STEMIE Center posted a blog post
Do you know video demonstrations can be a great tool to enhance practitioners' practice?  Check out this blog post to learn more!

By Elica Sharifnia, PhD. 
Postdoctoral Research Fellow at the Marsico Institute for Early Learning at the University…
Feb 24
Flo is now a member of stem4ec
Jan 24
inifanadunia is now a member of stem4ec
Jan 23
Jenny Ingber is now a member of stem4ec
Jan 3
LeighAn Fifer is now a member of stem4ec
Dec 28, 2022
Christine Chaille is now a member of stem4ec
Dec 13, 2022
Melissa Rosenfeld, Kathy Scott and MIA COVIC joined stem4ec
Dec 8, 2022
adasd posted a status
Dec 6, 2022
adasd is now a member of stem4ec
Dec 6, 2022
Becky Handler, Nora Carrizales and hutananak35 joined stem4ec
Dec 5, 2022
Mallory Judkins is now a member of stem4ec
Dec 2, 2022
Ellie Strbo is now a member of stem4ec
Nov 30, 2022

Community Guidelines and Privacy Statement