Teaching Python

We're two middle school teachers learning and teaching Python

Part 2: Tips for Creating a Safe Learning Space (for Coding): A Two-Part Series

Effective classroom management is a skill most experienced educators possess. It establishes an environment conducive to learning, where students feel secure and focused. Research indicates that a quiet, well-managed class only sometimes equates to effective learning. Authentic learning, especially in dynamic subjects like coding, requires more than just discipline and silence. It demands an environment that fosters comfort, engagement, and active participation.

Extensive research in environmental design and cognitive science supports the idea that comfort significantly affects learning, human productivity, and creativity. These perspectives have led to significant shifts in the design of workplaces, homes, and recreational spaces over the past thirty years.

This article is a two-part series focusing on how environmental and cognitive processes can promote positive learning in computer science. Each part will offer ten tips to help you 'get it right.'

Coding is not just about understanding syntax or memorizing commands; it involves critical thinking, problem-solving, and often, collaborative work. Coding requires a highly interactive and flexible learning environment where students can experiment, make mistakes, and learn from them. The strategies in this series are tailored to the unique needs of the computer science classroom, ensuring that students learn the fundamentals of programming and develop the cognitive and collaborative skills essential for success.

Part 2: Cognitive Processes and SEL in Coding Education

This part focuses on the cognitive aspects of learning to code, integrating the principles of cognitive learning theory with Social and Emotional Learning (SEL) strategies. Awareness of cognitive processes enhances learning, the role of metacognition in coding, and classroom management. Teaching students how to think improves classroom management because students are more engaged in learning, build self-regulation skills, develop persistence, and increase agency and control over their learning. Incorporating these ten tips in computer science can help improve cognitive processes directly and indirectly.


  1. Awareness of Cognitive Processes: Encourage students to reflect on their thinking. This involves guiding them to recognize and analyze how they process information, make decisions, and memorize. In Computer Science, ask students to explain the steps for an app in a computer science class. The student should be able to explain the functions or steps they choose and the order of the algorithms. This helps them understand their cognitive strategies and identify areas for improvement, leading to the development of more effective learning techniques.
  2. Long-term Learning and Assessment: Students should understand that coding is a process and learning is a long-term investment. Just as "getting fit" is judged over time, cognitive science suggests that learning is best assessed over extended periods; finding opportunities to ​complete check-in periodically but assess minimally can encourage students' growth and understanding.
  3. Encourage Metacognition: Understanding one's thought process is vital to problem-solving and debugging code. Teach students to think about their thinking and encourage student activities that promote active learning and reflection.
  4. Recognize the Role of Emotions: Coding can be frustrating and difficult for some students. Acknowledging, addressing, and managing emotions in the classroom is essential, especially with young coders. Help students handle their emotions by discussing their feelings, validating them, and avoiding dismissing them. This can help to build their resilience and promote positive learning outcomes. Remember, we were all newbies once.
  5. Create a Positive Environment: Encourage positive mindsets. Use the "Power of Yet" and help students change the words "I can't code" to "I can't code yet."
  6. Avoiding Fractured Teaching: Coding is a process that can not be accomplished by cramming or studying. Teaching concepts with a spiral curriculum and revisiting past content regularly is essential to strengthen long-term retention and understanding​​. ​ "Embed revisiting into your practice, ensuring that students are given regular opportunities to look back at past material."(Boxer, 2021) Regularly reviewing fundamental concepts to solidify learning, using and typing functions repetitively, and coding a lot is easy to scaffold.
  7. Scaffold to Build Confidence: Students may lack confidence in coding because they may not have mastered some skills and strategies. Fear of failure can hinder students' desire to code; however, if they experience success—even small successes—it builds their confidence. Scaffolding involves designing tasks that start at the student's skill level and gradually increase the task's difficulty once the learner reaches the next level. "As learners grow within their zone of proximal development and become more confident, they practice new tasks with the social support that surrounds them. Vygotsky maintains that learning occurs through purposeful, meaningful interactions with others."
  8. Promote Collaborative Learning: Enhance students' social skills by facilitating group work in coding projects. Collaborative learning fosters a sense of community and is grounded in educational theories like Vygotsky's social development theory, which emphasizes the importance of social interaction in cognitive development. Through group activities, students exchange diverse problem-solving approaches, provide peer feedback, and articulate their coding processes. Such collaboration is instrumental in developing both coding proficiency and interpersonal skills.
  9. Design Lessons that Matter: Introduce students to coding problems that have real-world applications. For example, ask students to develop a simple app that solves a common problem or contributes to their community. This can increase engagement and connections and help students see the broader impact of their coding skills. For instance, allow students to investigate the Flask library. Have them produce a website that they can later build upon. This website can house a portfolio for future college entrance essays or coding projects.
  10. Debugging builds persistence: This is a fundamental skill in code and is one of the first skills that requires patience and immediate instruction for all new coders. This is a skill that is persistent at all levels of a coding program. Debugging helps to improve problem-solving and flexible thinking. In addition, when students debug their peers' code, it helps build a deeper understanding of coding principles. Teaching debugging builds confidence and helps motivate students to persevere through future difficulties in code. Consider developing a mindset where when students encounter a bug, the teacher guides the student through a systematic debugging process instead of providing the solution outright. This approach involves breaking down the code, understanding the logic flow, and identifying where the error occurs, which not only fixes the bug but also develops a deeper understanding of the code structure.


Creating an effective learning environment for coding extends beyond traditional classroom management. It encompasses the physical comfort of students, their emotional well-being, and an approach to learning that is active, engaging, and responsive to their needs. These ten tips provide a starting point for educators to cultivate a space where students can thrive in learning the valuable skill of coding.

Which of the ten strategies discussed resonates most with your teaching style, and how do you plan to integrate it into your computer science classroom? Are there particular challenges you anticipate in implementing this strategy?


Reources

Barrett, Peter, et al. “The Impact of Classroom Design on Pupils' Learning: Final Results of a Holistic, Multi-Level Analysis.” Building and Environment, vol. 89, 2015, pp. 118-133, doi:10.1016/j.buildenv.2015.02.013.

Boxer, A. “Improve Learning with Cognitive Science.” Royal Society of Chemistry, Oct. 2021, edu.rsc.org/feature/improve-learning-with-cognitive-science/4014475.article.

Edutopia. “A Comfortable Truth: Well-Planned Classrooms Make a Difference.” Edutopia, www.edutopia.org/article/comfortable-truth-well-planned-classrooms-make-difference.

Edutopia. “Creating a Space for Collaboration.” Edutopia, www.edutopia.org/article/creating-space-collaboration.

Fisher, A. V., et al. “Visual Environment, Attention Allocation, and Learning in Young Children.” Psychological Science, vol. 25, no. 7, 2014, pp. 1362–1370, doi:10.1177/0956797614533801.

Insights to Behavior. “The Impact of Classroom Management on Social-Emotional Learning.” Insights to Behavior, insightstobehavior.com/blog/impact-classroom-management-social-emotional-learning/.

Juan, Y.-K., and Chen, Y. “The Influence of Indoor Environmental Factors on Learning: An Experiment Combining Physiological and Psychological Measurements.” Building and Environment, vol. 221, 2022, 109299, doi:10.1016/j.buildenv.2022.109299.

Kurt, Serhat, Dr. “Vygotsky’s Zone of Proximal Development and Scaffolding.” Educational Technology, 18 Aug. 2020, educationaltechnology.net/vygotskys-zone-of-proximal-development-and-scaffolding/.

Office of Scientific and Technical Information (OSTI). “Indoor Air Quality, Ventilation and Health Symptoms in Schools: An Analysis of Existing Information.” U.S. Department of Energy, www.osti.gov/servlets/purl/828725.

RSC Education. “Improve Learning with Cognitive Science.” RSC Education, edu.rsc.org/feature/improve-learning-with-cognitive-science/4014475.article.

7pace. “Here's What Science Says About How Music Affects Your Productivity.” 7pace, www.7pace.com/blog/heres-what-science-says-about-how-music-affects-your-productivity.