Learn to Code through Problem Solving

Many K-12 CS teachers in Ontario are very familiar with the Don Mills Online Judge (dmoj.ca) site for students to practice their competitive coding skills. A recent book entitled Learn to Code (written be Daniel Zingaro – Associate Professor Teaching Stream at the University of Toronto) combines theory and practice. He explores coding problems in each chapter and then provides a list of similar challenges available on dmoj to further develop your skills

I have been using many of his referenced coding problems with my Grade 11 computer science students this year. These problems don’t include graphics or other Python extensions, but they provide a solid platform to develop introductory skills in the language. Students can extend their fun by explore Pygame Zero or other frameworks/libraries.

Misconceptions about Learning to Code

As each school year comes to an end it is important to reflect and ensure you focus on improving the learning environment in September.

The ACSE 2019 Conference was another excellent event with our keynote by Michelle Craig and the Mistakes Novices Make Tales from the CS1 Trenches by Jacqueline Smith.

thinking person

I decided to take a crack at the common mistakes or misconceptions I observed in my classroom this year.


  • statement execution order is not important
    • understanding control flow – selection (if statements), loops, function/method invocation
      • Correction – typically top to bottom or event driven, control flow is managed by the language elements (loops, stacks – function/method calls) or OO infrastructure
  • variables – data type and mutation is not important
    • store as many items or any data type in a single variable
      • Correction – data types are important to ensure proper semantics, complex data structures must be well designed and managed within algorithms
  • modularity – well defined interfaces are not important
    • print is the same as return
      • Correction – print is for display purposes and return defines the goal of the function/method
    • availability of data structures and algorithms is not important
      • Correction – data structures and algorithms have a well defined scope to improve code quality and improve reusability
  • syntax vs semantics
    • all of the elements of a statement are equivalent
      • Correction – parts of a statement are reserved (part of the language) and some are user-defined

Gender equity in CS classrooms – Ontario and locally

This week Steven Floyd shared his analysis of gender within high school (Grade 10, 11, and 12) Computer Science class in Ontario. He proposes many approaches in his excellent post.

Below is my local school analysis of female student participation.

Key Questions

  • Why do students in high school decide to take an introductory CS course?
  • Why do students who take an introductory CS course in high school continue with senior courses?
  • Are students exposed to coding/programming prior to grade 9? If so, what was their experience? Did it make them more or less likely to take elective courses in CS?

CS K-12 Big Picture – Local (Ontario) and Global views

A group of Ontario educators and computing professionals are gathering this weekend to develop a proposal for the Ministry of Education to improve the state of K-12 computing education in the province.

I recently attended the annual EdTech conference (Bring IT Together) and attended an excellent session called “What might coding look like in secondary classrooms?“. It was an excellent topic and there was lots of discussions throughout the room about how computing technology and coding could enhance learning in the in the classroom. Kendra Spira shared many different examples from English and Science classrooms.

Kendra shared how her school board discovered that coding could be an effective tool for exploring Innovation, Creativity & Entrepreneurship competency within the Global Competency framework.

The Global Competencies identified include:

  • critical thinking
  • innovation, creativity and entrepreneurship
  • self-directed learning
  • collaboration
  • citizenship

As a Computer Science and Computer Engineering teacher I would add that all of the competencies can be explored through computer science and coding either as an elective dedicated to exploring how digital/computing systems work or integrated into other subjects as a learning extension opportunity.

As Tim Bell explains, in his excellent paper entitled “Computer Science in K-12 Eucation: The Big Picture“, “A key goal … should be to help students find out if it (computer science/coding) is something that they might be passionate about, and to give them a vission of waht they might do with the wide possibilities that skill in computer science and programming can open up.”. He continues to clarify that programming is a skill that supports problem solving and creativity and like any skill it is important to have some early success, but to build fluency it takes many hours of experience. Learing to code in an hour, a day, or even a month is not realistic. Did anyone learn how to play the piano or ride a bicycle so quickly? I think not.

Both dedicated Computer Science teachers or subject teachers integrating coding should focus on establishing early success and focus on the problem solving and creativity of coding. The dedicated CS teachers in high school can then focus on building student compentency levels as the explore the breadth of CS including algorithm analsysis, communication skills, logical reasoning. Teachers can gradually release additional autonomy to students as they advance their skills and introduce students to competitive coding or IT industry professionals or academic institutions leading CS research such as Machine Learning and other technologies.

On a final note the Bring IT Together conference opening keynote by Dave Cormier was excllent. At one point he explained that there is a digital skills gap in North America with more computing jobs available than qualified candidates. This should not be the reason to bring coding into K-12 classrooms. There are so many other reasons as I discussed early in this post. As I had discussions with other teachers following his keynote teachers commented that they were shocked that he stated we shoulding be encouraging coding in schools. I explained my interpretation was that the focus should be on using coding for extended learning opportunities for problem solving and/or creative expression.

CanHack Challenge

Ryerson has launched their website for the CanHack 2018 Challenge.

This will be the first time that I will be registering my students and I excited to see how the challenge works.

If you are a high school CS teacher in Ontario and interested in participating register soon.

Why ask 1.7 million users to reset their passwords?

Air Canada had to shutdown user access for their mobile application due to a data breach in August. They asked all 1.7 million users to reset their passwords eventhough they only found that 20,000 user records were accessed. How can companies better protect their users’ data? They must ensure they have multiple layers of cyber security in place and ensure they constantly perform ethic hacking or cyber security tests to locate and fix any vulnerabilities before others do.

Students can learn about cyber security and prepare for these jobs by participating in the Carnegie Mellon University (CMU) picoCTF challenge. The 2018 event will be happening soon and my students plan to join in the competition this year.

Canada also has a CyberTitan competition that is run alongside the U.S. competition each year.