How to Teach Programming
This week on IT Babble the Podcast Edition, you will hear Patrick and I discuss this topic that was posted on Slashdot.org: Revisiting Why Johnny Can’t Code: Have We “Made the Print Too Small”?
Any one claiming that programming is related to text size has a serious problem. Why? Because tools that you can use to write programs allow you to set your text size. These are the options that come with the built in terminal on the Mac:
Clearly, there are plenty of fonts, sizes, and colors available. People are grasping at straws trying to figure out why all the time spent having students plow through programming models simply is not turing them into “coders” or programmers. Trust me, it is not the font size.
The Main Problem
Everyone is over complicating the issues around learning to program, and they are not working towards the correct goals. The curricula are based on doing things in an hour, or 24-hours, or as a running elective without an objective.
Unless those in education set goals, at age appropriate levels, and have tasks that students can relate to, then attainment will be dismal. This process is not any different than learning a language. If a student is forced to do a language, and they have no application outside of the classroom, the language will not be learned.
The goal of programming, cannot be programming. This is what happens in all subjects when educators believe the subject should be taught, but have no practical application to connect the subject.
What Would a Curriculum Look Like?
I wrote a curriculum framework, yet to be fully implemented, for building problem solving skills and pattern recognition skills starting in year 3. The full framework can be seen here: Problem Solving with Computer Science and Programming: A Holistic Guide & Curriculum Overview.
The goal at every level is to build problem solving skills that connect to the physical world, as well as the digital world. The goal is always simple and repeated year after year. This allows a student to spend time working within the discipline, but also allows them to have time for all the other educational opportunities that are available.
Because this curriculum has a variety of experience based learning opportunities, students are more likely to apply what they learn to other subjects on their own initiative. When you state, this is programming class, and this is where you will do programming, then a student is less likely to apply programming outside of that framework.
What Does a Good Programming Class Look Like?
If students are required to take programming, then the lessons of a programming class cannot be based around following step-by-step instructions. Instead they need to be puzzle based, allow for teamwork, and follow a flexible assessment model.
One practice I like to follow for all new programming concepts is something I call “chopping wood”.
I once read that chopping wood is therapeutic because a person can get immediate results. Students new to programming need immediate results.
Here is how it works:
- Students are given a working program, not piece of code, but a simple program with 3-4 parts.
- The teacher asks the students to team up and annotate what they believe each part does. They do annotation with comments. The teacher asks the students not to run the program, just to study it.
- The students run the program and play with it. Whatever features it has the teacher then defines so the students can experiment. This might take 5-10 minutes, it is not a game or challenge.
- The teacher sends the students the program again, this time it is broken. The students compare the working model to the broken one and try to fix it.
- The students break the program and send it to one another. (This can also be a homework assignment)
- The teacher review the structures and logic.
- The final assignment- add a new feature. Annotate what you will do inside the code, and try to achieve it. Make it clear students can sign-up for forums (teacher provides a list if age appropriate) to get help from their peers around the world.
Rinse and repeat with every new set of concepts. After students have a decent framework, they can start taking code that exists and combining it together, improving it, etc. Then after they have manipulated and used many scripts or programs, the process of making something unique will not be so trivial or difficult.
The assessments need to be peer (30%), self (20%), and teacher (formative/summative 50%). Students need to feel like they have some say in their work. Most teachers are not great programmers, and without some input from students, interesting solutions or attempted solutions, may be ignored. In programming attempts matter. The logic might be clear, but the syntax maybe jus be a bit off. Literally speaking – if you are not careful in programming you can fail a student with a great idea for a grammatical/spelling mistake.
Unless the goal is to have a factory of people typing instruction sets, schools need to focus programming efforts towards problem solving, pattern recognition, and team work. As much as possible, the subject of programming needs to be integrated and not separated. The student mindset should be that programming, writing code, etc. is simply a tool box that can be accessed anywhere and anytime.
Tony DePrato
You must be logged in to post a comment.