At every high school, students are required to show proficiency in certain subjects to graduate. Now there’s a push to include computer coding as one of those subjects.

The idea is that such a skill will be invaluable in a world that increasingly runs on computer technology. What’s more, many companies report shortages of workers with programming skills.

Nearly...