Skip to main content
The Globe and Mail
Support Quality Journalism.
The Globe and Mail
First Access to Latest
Investment News
Collection of curated
e-books and guides
Inform your decisions via
Globe Investor Tools
per week
for first 24 weeks

Enjoy unlimited digital access
Enjoy Unlimited Digital Access
Get full access to
Just $1.99per week for the first 24weeks
Just $1.99per week for the first 24weeks
var select={root:".js-sub-pencil",control:".js-sub-pencil-control",open:"o-sub-pencil--open",closed:"o-sub-pencil--closed"},dom={},allowExpand=!0;function pencilInit(o){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];select.root=o,dom.root=document.querySelector(select.root),dom.root&&(dom.control=document.querySelector(select.control),dom.control.addEventListener("click",onToggleClicked),setPanelState(e),window.addEventListener("scroll",onWindowScroll),dom.root.removeAttribute("hidden"))}function isPanelOpen(){return dom.root.classList.contains(}function setPanelState(o){dom.root.classList[o?"add":"remove"](,dom.root.classList[o?"remove":"add"](select.closed),dom.control.setAttribute("aria-expanded",o)}function onToggleClicked(){var l=!isPanelOpen();setPanelState(l)}function onWindowScroll(){window.requestAnimationFrame(function() {var l=isPanelOpen(),n=0===(document.body.scrollTop||document.documentElement.scrollTop);n||l||!allowExpand?n&&l&&(allowExpand=!0,setPanelState(!1)):(allowExpand=!1,setPanelState(!0))});}pencilInit(".js-sub-pencil",!1); // via darwin-bg var slideIndex = 0; carousel(); function carousel() { var i; var x = document.getElementsByClassName("subs_valueprop"); for (i = 0; i < x.length; i++) { x[i].style.display = "none"; } slideIndex++; if (slideIndex> x.length) { slideIndex = 1; } x[slideIndex - 1].style.display = "block"; setTimeout(carousel, 2500); } //

Clive Thompson is the author of Coders: The Making of a New Tribe and the Remaking of the World, and a contributing writer to The New York Times Magazine.

Nearly every programmer knows when they fell in love with the craft.

It’s usually when they run their first “Hello, World” program. The coder writes a rudimentary piece of code that makes the computer print out a statement, often a greeting such as “Hello, World!” or their name (“Hello, Clive!”). Then they place the command on an infinite loop. When they run the program – voila! “Hello World! Hello World! Hello World!” spills endlessly down the screen.

Story continues below advertisement

It’s an electrifying, Promethean experience: You’ve breathed life into the machine with your incantations. One coder I know, James Everingham, was a teen when he wrote his “Hello, World” command back in the early 1980s. “I thought it was magic,” he told me, and vowed, “I must know more.” Over the years, he devoured coding books and eventually became part of the team that made Netscape, the first web browser. When I interviewed hundreds of programmers for my recent book, Coders, they all had similar, magical stories to tell.

Those “Hello, World!” stories came to mind when I learned that Ontario is making computer programming part of its elementary school curriculum. Those electrifying introductory moments can tell us a lot about the true value of teaching children to code – and it isn’t always what you’d expect.

If Ontario is teaching coding in hopes that they’ll create a generation of well-paid, professional coders years later, I’m afraid the province will be disappointed. I suspect only a minority of people will ever really want to be full-time coders; like medicine or journalism or construction, it’s not a job for everyone.

Do we hope coding will improve children’s math skills? It’s not likely. Despite its nerdy reputation, much coding requires almost zero math.

So what does coding offer a young child? If you ask me, it gives them a more subtle and philosophical glimpse into the world, and themselves.

First off, programming gives students a taste of power. People are forever telling children where to go and what to do. When they program a computer, by contrast, they command a completely obedient device. The machine does exactly what they tell it to.

“When you’re a kid, that feeling is wild,” one programmer told me. “It’s like you have a little universe to control.” For a child, who has so little authority, coding invokes a sense of possibility; you imagine all the things you could coax a computer to do. It opens a window in the soul.

Story continues below advertisement

Yet – in what may seem like a contradiction – coding is also brutally, grindingly frustrating. Sure, computers will do exactly what you say, but they need precise, accurate instructions. The tiniest error – a colon misplaced, a badly formed command – and the program won’t work.

You’ve seen movies where programmers pound out torrents of code? That is nothing like reality. Most of the time, coders don’t type at all; they sit and stare morosely at the screen, running their hands through their hair, trying to spot what they’ve done wrong. It can take hours, days, or even weeks. But once the bug is fixed and the program starts working again, the burst of pleasure has a narcotic effect.

The upshot is coding teaches – and also rewards – dogged persistence. It shows us that errors are a normal part of life and that careful, patient work can repair them. It also teaches the coder to think experimentally, to patiently test every possible reason their code isn’t running. This is a powerful experience for young children.

There are many other quieter, less-obvious benefits of programming. Coding is part of modern civics: Once you know even a bit of coding, you can more readily debunk Silicon Valley’s gauzy hype. Coding can be deeply artistic: I know programmers who couldn’t care less about making apps or commercial software – they use code to make art and music. (I’m that way, myself. My most popular creation is a Twitter bot that composes poetry. It has zero commercial value, but brings me constant delight.)

So by all means, we should introduce children to these profound moments. Making coding mandatory also makes the world more equitable, ensuring lower-income children, racialized children and girls – groups that have traditionally been sidelined in programming – get to have these experiences.

Nonetheless, I can see problems in Ontario’s plan. For one, it requires elementary-school teachers – already juggling crowded classrooms – to become fluent enough in basic coding to teach it. I’m not sure that’s fair, or truly possible. It potentially reduces class time for basic literacy and numeracy, which are far more crucial subjects. And as with all subjects, turning coding into compulsory schoolwork might turn it into a slog.

Story continues below advertisement

That would be depressing. The sheer joy of programming is, to me, the whole point. Coding is a fun thing to do. It’s captivating, maddening, powerful and deeply weird. If we teach it, we need to teach it right – and make it more than a chore.

Keep your Opinions sharp and informed. Get the Opinion newsletter. Sign up today.

Your Globe

Build your personal news feed

  1. Follow topics and authors relevant to your reading interests.
  2. Check your Following feed daily, and never miss an article. Access your Following feed from your account menu at the top right corner of every page.

Follow topics related to this article:

View more suggestions in Following Read more about following topics and authors
Report an error Editorial code of conduct
Due to technical reasons, we have temporarily removed commenting from our articles. We hope to have this fixed soon. Thank you for your patience. If you are looking to give feedback on our new site, please send it along to If you want to write a letter to the editor, please forward to

Welcome to The Globe and Mail’s comment community. This is a space where subscribers can engage with each other and Globe staff. Non-subscribers can read and sort comments but will not be able to engage with them in any way. Click here to subscribe.

If you would like to write a letter to the editor, please forward it to Readers can also interact with The Globe on Facebook and Twitter .

Welcome to The Globe and Mail’s comment community. This is a space where subscribers can engage with each other and Globe staff. Non-subscribers can read and sort comments but will not be able to engage with them in any way. Click here to subscribe.

If you would like to write a letter to the editor, please forward it to Readers can also interact with The Globe on Facebook and Twitter .

Welcome to The Globe and Mail’s comment community. This is a space where subscribers can engage with each other and Globe staff.

We aim to create a safe and valuable space for discussion and debate. That means:

  • Treat others as you wish to be treated
  • Criticize ideas, not people
  • Stay on topic
  • Avoid the use of toxic and offensive language
  • Flag bad behaviour

If you do not see your comment posted immediately, it is being reviewed by the moderation team and may appear shortly, generally within an hour.

We aim to have all comments reviewed in a timely manner.

Comments that violate our community guidelines will not be posted.

UPDATED: Read our community guidelines here

Discussion loading ...

To view this site properly, enable cookies in your browser. Read our privacy policy to learn more.
How to enable cookies