The Value of Teaching Students to Code

Currently, I am working as a library media specialist in a K-8 school. I’m teaching library, technology, and research classes to students across all the grade levels. Planning for next year, I am trying to convince my administration to let me teach an elective programming class next year to interested middle school school classes. Before I get into my reasoning, I would like to give a little background. As a school that is listed as in needs of improvement, the main focus for the new superintendent is on improving students’ ability in literacy and mathematics. There currently are not many electives offered in the school, so the students have little freedom in terms of what classes they take. This is mostly due to limitations in the number of rooms and teachers in the building. Depending on the students who choose to take the course, I would probably start with either Scratch – a visual programming language – or an introduction to web design, starting with HTML and CSS.

From my own experience programming, I believe that practicing programming can help with both mathematics and literacy understanding. Having taught reading and language arts classes for several years, close reading is a skill that does not come naturally to many students. Programming forces students slow down, both when reading and when writing, and pay close attention. They need to be attentive to words, syntax, and the relationships between words. These skills definitely translate back to reading and understanding in more traditional contexts.

Furthermore, all programming languages are based on logic and applied mathematics. This sounds complicated, but it really is not. It reinforces basic concepts that can serve students very well in many contexts. For example, last week, I was writing an application that required drawing something on the screen. To do this, I had to put in the coordinates on a Cartesian coordinate system. This was the first time I had used a Cartesian coordinate system outside of a school setting. There are many such examples that both reinforce mathematical concepts and show students their value outside of math class.

Having a sound understanding of logic, as well, can help students tremendously in any class. Logic is an understanding of how to reason, a way to figure out what makes sense. For example, a typical construct that students may see could look like this:

if (variable < 5) {

Do something

} else {

Do something else


This is a very simple construct. It simply means, if a variable is less that 5, do something. lf the variable is 5 or more, do something else. Helping students to have an understanding of reasoning will serve them very well.

Lastly, Ira Socol made a great point in one of his recent posts. Programming helps students get away from a paradigm in which there is a right and a wrong answer. When you write code, it either works or it doesn’t work. It allows students to creatively problem solve and to safely learn through failure. There is often no single way to solve a programming problem. Students may have to fail several times before they find a method that works. This is a daily fact of life for me (I spend a lot of time writing applications and websites). Every time something does not work, I learn something else. There may be a more elegant or efficient solution, but allowing students to solve problems in different ways and learn from each other can be invaluable. Creativity, problem solving, and perseverance may not be in the curricula, but they are certainly worth teaching.

I think that these skills can serve students well. It gives them a vehicle to concretely apply concepts from other classes and to do something meaningful with it. Simultaneously, they can be pursuing their own passions, finding new ways to solve problems, and reinforcing content area skills. What do you think? Is it worthwhile to teach programming to middle school students (11-14 years old)? If you have done so, have you had success and what languages did you focus on?

4 comments to The Value of Teaching Students to Code

  • Great post Jason. I immediately added it to My Computer Programming page: It is a great idea to teach students how to program.

    In 1968 while in college I took a computer programming class on MAD (Michigan Algorithmic Decoder). I should have stuck to it but did not get back to computers until the early 1980′s when I got an Apple IIe

  • “Is it worthwhile to teach programming to middle school students?”
    YES! I’ve used NetLogo, Scratch, Alice and good old HTML. The kids love it, especially when given the freedom to experiment and try out their own code. I’ve blogged about my experiences @ and collect resource @ I want to give Python a try next (I’m brushing up my skills by taking Udacity’s CS 101 – which I think would also be great for kids who show a real interest).

  • Jason T. Bedell
    Twitter: jasontbedell

    Thanks Jerry. I love that you’ve been programming since the 60s.

  • Jason T. Bedell
    Twitter: jasontbedell

    That’s awesome. I’ve taught HTML to high school students reading at a 5th grade level and they did surprisingly well. I didn’t know what to expect at the time as I was only in my second year teaching.
    I think I will probably start with Scratch with the kids next year if I get approval. Right now, I’m trying to learn to program iOS apps. I like your site.

Leave a Reply




You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


CommentLuv badge