During the last eight plus years of teaching kids to code, I have constantly worried about the girls who feel they do not belong in the world of computer science. In 2012, I began creating a curriculum, strategies and a classroom environment to help girls fall in love with the subject. I am happy to report that many of these efforts have worked, and I continue to work on these each day. There is still so much more to be done to encourage girls to participate in computer science.
More recently, I started to worry about another group of students in my middle school Python-based computer science elective classes—a certain group of boys. Obviously, not all the boys, but there was a definite subset. These are boys that strongly believe they belong in my CS elective class since they fit the stereotypes that we see everyday in movies and TV shows about the tech industry. They are white or Asian (or South Asian) and in some cases, have parents who work at local tech companies here in the heart of Silicon Valley. They have been told that since they are interested in computers and video games, they will learn to code quickly and easily. They have enjoyed the introductory sixth-grade computer science class and have chosen to take this next more advanced elective in seventh or eighth grade.
In spite of their privilege, the positive reinforcement and the confidence that comes from knowing they belong in the world of computer science, these boys struggle with coding and fall behind other students in my elective classes. They are far behind the girls in my class, who were much more worried about taking the class and were not expecting to do well. For the most part, I considered this as an individual student problem and provide support on an individual basis to help them succeed. However, over time and with careful study, I have detected some common issues that impact this group and some teaching strategies that work well.
Not Willing to Ask for Help
Many of these boys do not want to admit they are unable to do a coding assignment and need help. Social pressures (especially in the difficult middle school years where they want to establish who they are) and the high expectations they set for themselves, prevent them from asking for help. Instead of turning to their peers or a teacher, they will simply not turn in an assignment; they may waste time, not read the instructions and ultimately miss deadlines.
Once I detect this behavior, I offer help discreetly. I quietly remind them of my many scaffolding techniques for new coders—help pages, sample projects and starter code. If needed, I do an optional ‘code-together’ session for the entire class so they can catch up without being singled out.
Not Really Reading
All programming assignments start with reading the instructions on what is expected, which might also provide hints and starter code. Debugging a program requires many careful re-reads of the error message and the code itself. But these boys do not actually read instructions, and are either attempting a very different and often more difficult project or are not able to detect the error because they are not reading the error message or their code.
The reading gender gap, where girls outscore boys on reading assignments, is often cited as a reason why boys can fall behind. Coding can be impacted by a boy’s reading skill just like any other subject. The amount of reading content is not large—this is not equivalent to a book in English class. However, it is about reading comprehension. In my class, I try to get the boys to actually read the error message or the instruction again carefully (sometimes aloud), though I must admit, I often go the easier route and just tell them them what it says. But I still maintain that it’s important that students learn to debug independently.
Not Ready to Persist
Coding is not always easy. It can quickly become difficult when you encounter a bug. Debugging a program requires a willingness to work through the challenge. Some of these boys quickly lose patience when their project does not work; they are not willing to persist by putting in the time to solve the problem. Instead, they might ask for help immediately or get another student (or me) to fix their bug, so they can keep going.
I get it. They just want their game to run. It’s difficult to teach patience and persistence. I have to gently nudge them to try debugging on their own. I always highlight students whose final project may not finish but who I can tell worked hard to try and debug it themselves.
Not Able to Use Their Algebra Skills
Coding requires an ability to abstract, and coders must be able to use basic algebra skills to read a problem, determine what must be denoted by variables and how to manipulate them. This is the same skill used in reading a word problem in algebra class, and being able to write down the correct variable expression or equation.
As a former math teacher, I know this can take some students longer to learn, and some boys have a more difficult time, especially at this age. These algebra skills also do not always transfer from math class to computer science, since it is not written up as a familiar math question. Once I determine that this is the problem, I try and get the student to do a special instance of the problem, and then go back and try to write a more generic solution.
Not Focusing on Process over Product
These boys are often the ones who play video games and are excited about making their own game. They do not know that creating a game of the type they play requires a team of expert programmers and designers several months of work. The projects they can make with their initial coding skills are sometimes a bit underwhelming, and they have to be motivated to go further. They have to learn to enjoy the process of coding and not focus on the end product.
If these boys have attended summer coding camps where a lot of code is given, and the focus was on making a big end product, they are even less willing to work through basic coding challenges in a class that is teaching them to write code independently. They want the flashy “Wow” project they can showcase as soon as possible and are impatient about going through shorter and simpler learning projects. I have found mixing in smaller independent projects with larger collaborative projects, especially those with graphics, can keep these boys engaged.
Computer Science for All
Obviously, the above characteristics can apply to any student—girl or boy. These are just some of the common patterns I have noticed in the group of boys who have a more difficult time learning to code than they expected.
There are no “boys only” after school coding clubs or summer camps to support them. They are often expected to be at the more advanced hackathon-style events that are often not a good fit for them. They are uncomfortable or unwilling to attend programs designed for new coders, especially since many often focus on girls.
For many of these boys, their own expectation (and sometimes their parent’s expectation) is that they will be amazing coders right away, and then create fantastic new apps that will change the world. When they find out that coding is harder than they expected and find themselves struggling in a coding class, they can be frustrated.
As a teacher, understanding the issues these boys face can help identify the right strategies. It can help design a class that is welcoming and helps everyone achieve their dreams. After all, as a teacher committed to computer science for all, we must reach all the girls—and also all the boys.