Ask HN: To what extent should code be taught in schools?

3 points by mikemajzoub ↗ HN
Hi HN!

I'm curious to hear your opinions regarding whether or not children should be taught to code in school. In 10 years, should it be a significant, mandatory part of the curriculum, or not? Why?

11 comments

[ 3.1 ms ] story [ 16.6 ms ] thread
I definitely think it should be taught. If taught correctly, I believe it could really excite children about school. Plus it just offers so many benefits even to kids that won't become programmers like problem solving, critical thinking, planning, etc.
Children should learn J for mathematics starting in first grade. When they have mastered mathematics, they should stop learning J.
What's 'J' ?
J is an ASCII compatible mathematical system of notation that can be readily and directly expressed as a computer programming language. http://Jsoftware.com.

It is Ken Iverson's remix of APL based on roughly 3 decades of field use. Originally a commercial product, it has professionally written high quality documentation with particularly good materials related to a realistic onboarding timeline for something that aims to be broadly useful for mathematics.

At a higher level Iverson believed that the traditional mathematical notation is problematic because it is not designed for expression at the keyboard and as code. APL used special keyboards, but requiring custom hardware impedes general adoption.

And there's a full version that runs on a typical Android phone.

I'm hoping the current frenzy around coding dies a bit, and, after the dust settles, people bother to implement it correctly.

Best example I can demonstrate of the ridiculousness that we are in right now: https://www.youtube.com/watch?v=-7x7GYItzS4

Teaching kids to code is fantastic -- but its not what 98% of these initiatives are doing. I got to visit a school in NYC which taught "coding" to their kids... it was literally kids copying and pasting things into a Flash editor with ZERO understanding of what they are doing... truly heartbraking.

Totally guessing here, but I feel like there's a problem for grade schools to attract talent to teach CS _right_....
One useful but of course not absolute generalization is that grade school teachers "want to teach kids something" and high school teachers "want to teach something to kids." Which is to say that high school teachers are more likely to be motivated by subject first and grade school teachers are more likely to be motivated by kids first.

For something like computer science, It's going to be a rare person with a passion for computer science who jumps on the grade school track in a college of education. A grade school just isn't a place conducive to expressing that passion.

I think it goes beyond any sort of talent pinch. Any teacher who could teach a calc or pre-calc class certainly would be able to teach a beginning coding class to middle or high-schoolers. The real issue is that the people who come up with what should be in these courses today are far more concerned with how the course LOOKS than its actual substance.

If you think about math, for instance, or heck, even the AP Comp. Sci. curriculum, you learn A TON of really deep, important stuff... but you actually produce... well, nothing. Somehow with "coding," though, that's 100% not okay anymore; all of a sudden, the success of the kids and your program is judged largely on the projects that these kids do. Administrators (from superintendents to teachers and everyone in between) aggressively advertise that their kids "make apps" and "code websites" and everything else of the sort. That's what they are maximizing. What the students actually learned seems rather secondary.

Just look around at all the popular coding initiatives today: code.org, scratch, etc... the topic of assessment is notably absent.

What all of this ends up becoming is teachers pushing super elaborate projects in which kids do little more than copy the teacher and make minor alterations. But, the kids feel good 'cause they are told they can "code", the teachers feel good 'cause they see the projects come out the door, and the public-at-large is none the wiser. The truth, though, is that the kids learned precious little -- actually, worse: The one example in NYC that I mentioned, for instance, simply reinforced the idea that coding is a bunch of "magical incantations" that they can't understand but that somehow does things. That doesn't empower the student; it just reinforces in him the idea that he is powerless.

I'm not a big fan of schools, so I don't think I'd like anything they did haha. But if I was forced to come up with something I'd probably just optimize for breadth. Just exposing people to as much information about coding, software, OSes, the industry, even CS/software history. If people like what they hear they'll figure everything out (I warned that I don't like schools :D ).
Yes and no. Should it be taught? Yes. There are clear economic advantages to having people who have an understanding of the subject, and it makes sense to support people who are interested in it. Should it be a significant, mandatory part of the curriculum? No.

The point of an early education is to provide you with a broad basis of understanding in a wide range of subjects. And while it is important for people to have some idea of some of the things that computers can do, it is not necessary for them to become programmers (in the sense someone would pay them for their skill) to do that. Very simple programs will give someone somewhat of an understanding of what's at play.

It makes no more sense to say that everyone should have to learn programming than it does to say that everyone should have to understand calculus, or everyone should have to understand mitosis. That's knowledge they're probably never going to use. Forcing it down their throats to be thrown up in an exam and then forgotten is a ridiculous waste of time and good will on behalf of everyone involved. Quite aside from the fact that if you can get those who aren't interested to self-select out you can focus resources on those who are interested and help them get further ahead in that subject.

People should probably get enough exposure in primary school to be able to write toy programs when they leave. That will be sufficient to give them a few general concepts and let them get their feet wet, so to speak. After that, the mandatory criteria should be dropped.

coding in schools - possibly a mindless activity - clicking and shoving a mouse around in an excel spreadsheet or throwing together a website - without any understanding of what actually happens - might be what will be implemented when schools have coding sessions taught by teachers who struggle with the topic themselves.

on the other hand:

computer science at its core is the science of making a system go from one state to another using explicit transformations on the state of the system.

how to arrange these operations is computer science, to finalize them, write down the algorithm using operations in a codified form is - coding.

These codes are put down in a language - a programming language when using computers, a knitting pattern when making socks.

To learn how to sequence these operations, to convey the solution to a problem unambiguously in a language using elementary operations, building up a complex system from that and finally reaching the solution as a group of collaborators, taking pride in this achievement together...

I believe that there is great utility in that wherever a student may venture.