Kids are the future; teach them how to code
github.com
github.com
I asked one of the kids how he would like it if they taught programming as a subject in school. His eyes just lit up and said "that would be awesome".
It's also fun talking to kids about startups - the fact that you can use code to solve problems for people and start a business. They're usually more interested in building a fun game but still, you can see some flickers of awareness lighting up. A lot of these kids are selling candy to each other at school anyway, so they're pretty entrepreneurial by nature.
I guess this is a long winded way of saying that teaching kids to code is one of the most rewarding and challenging things you can do, and I'd highly recommend it to anyone on the fence.
Probably as awesome as I am as a baseball player, which I actually learned at age seven...and quit for spring soccer at age 9 because games and practices were so incredibly dull.
However, I suspect at age 9 I would have traded the prospect of a Saturday afternoon programming in a New York minute for sitting in the dugout during a baseball game.
I know my parents wanted me to truly understand new technologies, not just interact with them, so coding was an integral part of my life from an early age, but I fear many more parents probably saw the rate at which software was advancing and the promise of the internet and thought "Well, programming probably isn't that important anymore" (assuming, of course, that they had any opinion on programming at all).
He's a bright guy, so he'll be fine, but the fact that so many people my age will likely need to spend much longer acquiring and honing these skills (if they even bother to try) than children of the iGeneration is a bit depressing in the "Born just a bit too soon" sense.
How can you teach a seven year old to program? Kids of that age are hardly learning to add, subtract, multiply and divide numbers. How difficult would it be for a kid to grasp concept of function - in context of both math and programming.
Teaching kids how to program is not as easy and logical as it sounds. My opinion is to let a kid grasp and understand the basics - which are math, science and logic at an abstract level. Such a rush to throw everything at a kid is overkill IMHO.
Teaching teens a bit of programming is another matter in some cases, but regardless of approach, most won't care enough about it to pursue it as an adult.
Exposing young people to programming is as important as exposing them to Faulkner, but probably not much more important.
Leaving aside the various educational bugs that lead to that situation...
For one thing, the earliest concepts of programming don't depend on math; that comes later. Think about something like LOGO here: the simplest bits just involve giving instructions to a computer like "go forward" and "turn left". More complex instructions like those used in fractal snowflakes represent a natural progression, and suggest the basics of functions and repetition. Similarly, think about LEGO robots: "go forward until you hit something, then back up and turn". You don't have to understand advanced math to implement that.
At some point around that age, I came across a simplistic algorithm in a geology book for identifying rocks, which provided a series of questions that amounted to a flowchart: does it split into layers, what color of streak does it leave if you rub it on glass, etc. I turned that algorithm into a simplistic pile of C, using printf to print questions, getch or similar to prompt for answers, and if/else to figure out what to do next. I had no concept of modularity or code reuse, open-coded the prompting logic for every question, and nested the conditionals to an absurd depth, but it worked, and triumphantly printed the kind of rock you had. :)
Take for example Gennady Korotkevich, at the age of 6 he was starting to program, and at the age of 11 he was already competing in IOI and also winning a silver medal, his programming (specially algorithmic ability) skill was already beyond of what your average programmer may get in his lifetime.
Maybe he is an extreme example, and he was born gifted, but i do think that there are many children which with proper guidance and encouragement can achieve levels of mastery in some topic like programming.
It presents various "arcane runestones" like "look ahead" and "look left", which send out "magic" over "threads of silk" to power other runes like "walk forward" and "turn left". The harder puzzles introduce AND and OR gates, and later on something similar to flip-flops to store "magic" and send it out later.
I played with computers non-stop, however. To the best of my recollection, my first real programs started around the age of 12 or 13.
Changing the way we teach mathematics would probably do much, much more to improve our future than pushing programming on younger students.
After you create an app you should be also able to "name" it, so that <name>.this-site-name.com means instant-deploy of your app.
This is the thing more similar to BASIC of C64 that I can think, in terms of easy access, and ability to build something that you can actually distribute/show.
1. Basic programming & general computer skills 2. A foreign language 3. The ability to learn by themselves
I have no desire to hothouse them of course, nor is it anything to do with improving their career prospects etc. I just look forward to sharing the fun of learning with them
There is no end of fun in learning with children, as I can attest as the homeschooling father of four children, one now grown up.
(I will have to remind my oldest son, a computer science student in university and hacker, that I could use his help updating that website.)
Either that or some form of Scheme. Not that it is simple to most programmers but it has very few basic pieces of syntax learn and when you start programming all of it is foreign anyway.
I haven't found a more vibrant and impressive code-sharing community and it's a simple install.
Python would be a great first language, possibly using pygame for some early game-making gratification.
Etoys is also an impressively flexible visual programming environment http://en.wikipedia.org/wiki/Etoys_(programming_language) but its visual interface has a much higher learning curve than Scratch. Kids can explore the examples and figure it out, though, and it seems to have a higher ceiling.
They already have everything they need on their computer now, and can start right away at JSFiddle and with various online tutorials that run the code on their own machines.
They can do useful stuff right away and share it with people immediately. (for instance, make a little game or graphic gizmo and put it on a web site)
It not only runs on the browser, but runs on the server (node), and in various other environments (MongoDB, Windows 8, etc). So again, their skills can be put to use quickly, and will be useful going forward in the maximum number of places.
There are immense numbers of people out there using it, writing about it, offering help on sites like stackoverflow, and so on.
For kids with short attention spans, the simplicity of javascript is a big plus. Being able to create objects on the fly easily, and not really worry about types and object orientation and all that makes it a lot easier to get up to speed quickly. (yes, there is potential for them to learn bad habits, but I think a far bigger risk is that they get bored and give up)
But yeah, Python would be the best next step.
I started learning at 8 so another year wouldnt've done much.
In regards to the program this is really cool. I've been trying to teach my younger brother how to code to help him in his math classes at school. If you can break a math problem down far enough to be able to build a calculator for it, you must understand it, which is in fact why I started to learn to code so young.
Having base coding knowledge and experience will go a longer way for our children then teaching them a foreign language like French, Russian and other languages!
People who make false dichotomies like these threaten to undermine the entire push to make programming and computer science available in lower education.
Our children should be able to learn a foreign language; our children should be able to learn to code. One is not better than another; what's important is that children have the possibility to learn both.
Though for me what did five years of French class do for me? I would have preferred spending that time learning a skill that would help me later in life.
They don't? I took Logo and BASIC programming on the Apple IIe in 7th and 8th grade (1988, 1989). BASIC on the PC in 9th. Switched to Pascal and covered all the basic data structures and algorithms in 10th - 12th grade. That was a looong time ago. Surely computer education in schools has only improved since then in most places, right?
I grew up in a tiny town of 3000 in the middle of Kansas.
In general the school system is still more focused on offering foreign language classes to students then teaching them coding languages. The latter skill being more valuable then the former!
That said, based on my own experiences, I think that a fast-track program could be developed to create functional, real-world (e.g. CRUD apps) developers straight out of high school. Basically, technical school for the modern world.
For the record, I went to a completely average high school in the Pacific Northwest. It was neither a rich nor poor district. There was no meaningful computer industry in the area. I have to admit that we did get a relatively awesome CS teacher when I was a sophomore, and without the freedom he granted us, I likely would not have gotten half as far as I did.
I wonder if the attitude in some schools is "everyone has a computer at home and knows how to use one now", so they shrug their shoulders and feel like there's nothing left to contribute. The kids print out or email their homework from their computers, so maybe they think that's all buttoned up.
http://codecademy.com http://teamtreehouse.com
and our soon to be released start-up http://codepupil.com
I am sure there are other sites too others here will suggest.
Not that much, if I happened to want to work in any other totally unrelated profession, like a language teacher or a chef or a doctor. Now, imagine how awesome I would be at MY chosen non-coding profession, if I had learned it since seven years old. Which actually doesn't make sense, because I hadn't made my choice of profession yet.
So let seven years olds just be, and if some of them are programming prodigies, OK, but not everyone has to learn to code. It's just programmers thinking they are "the shit".
Here's another thought: kids are the future, teach them how to behave and be considerate.
There's also the idea of CS + X, for all X[1] (or for most X, as batista points out).
1. http://www.xconomy.com/new-york/2012/01/18/cs-x-for-all-x/
Thank you for suggesting a generalized benefit of learning programming. My oldest son (grown up now) is a programmer, and maybe there is something to what you say. I'm glad he had early opportunities to learn Logo, C, and Scheme as part of thoughtful computer science curricula before he finished his high school education. Anyway, I'll encourage all of my children to go beyond the programming I reached decades ago with a time-sharing terminal running BASIC back in the 1970s.
But if I think about this issue of the educational benefits of learning this or that subject on multiple levels of abstraction, I wonder if the unique benefits of learning programming are really all that unique, and really all that generalizable to domains other than programming. I raise this question as someone whose last formal higher education was in law, a domain in which I practiced for a time, before turning my attention to specific issues of policy that are not all issues that raise legal questions. As I look at public policy discussions here on Hacker News, and especially at threads in which legal issues are discussed, I don't often have the pleasant experience of seeing multiple-level abstract thinking going on in those domains. Usually the comments here on HN about public policy or law look as elementary as my comments about programming must look to any experienced programmer. Many of the best comments about law on Hacker News, perhaps to no one's surprise, come from lawyers. Maybe the ability to think really abstractly (and correctly) on multiple levels is much more domain-specific than people who have been trained and practiced in one domain but not another usually acknowledge. Maybe part of domain-specific expertise is an "ability to think at a very granular level of detail and multiple levels of abstraction simultaneously," without much transfer of that ability to other domains.
Knowing I am among learned people here who like to think, I'd be happy to hear the comments of any onlooker to this idea that learning is often stubbornly domain-specific.
Law sometimes seems to have the most in common with machine learning techniques like neural networks: start with something simple, evolve it in small steps based on potentially-flawed fitness functions, hope you don't get stuck in a local maximum, and in the end end you have a tangled mess that more or less gets the job done but which nobody can fully understand or explain. :)
More seriously, I think abstract thinking and similar methods do help in law and many other fields, but they complement knowledge of those fields, rather than replacing it. You still have to understand the details of any field you want to work in. However, abstract thinking helps greatly when attempting to apply that knowledge.
The article I originally linked to, https://rwxweb.wordpress.com/2012/01/31/teaching-algorithmic... , mentioned an applicant for a CS job who didn't know how to sort words because they'd only memorized an algorithm to sort numbers. The same issue would apply to a lawyer who doesn't know how to deal with a stolen meal because the examples they'd worked with only dealt with stolen cars, and (hypothetically/rhetorically/probably-untrue-in-reality) because the law doesn't specifically talk about stolen meals. (Feel free to provide a more relevant example; I don't have the expertise to supply a higher-quality analogy.) And on the flip side of that, just as a programmer ought to know some of the quirks that apply to strings but not numbers (such as dealing with locale-specific sorting), a lawyer also needs to know the specific quirks that apply to stolen meals versus stolen cars (such as "theft of services"); otherwise, in both cases, they'd wind up with faulty generalizations. So, experts in a field need both the abstract-thinking skills that apply to any field and the knowledge of the specific details of their chosen field.
However, I take tokenadult's point to be that the lack of analytical reasoning as applied to law by some commenters on this site is very unfortunate given that presumably the same thought processes go into coding, which many people on HN are very skilled at. I agree that some fundamental details of law are important, but I think these details are far fewer than non-legally educated people believe. The whole idea of "the common law" as applied in the United States (in contrast to, say, doctrinal "civil law") is that it should be accessible: this is exactly why judges give reasoned opinions, as opposed to decrees, and much of the ideological underpinnings of the common law rest on the presumption that law simply "exists" in the ether, and one only had to meditate on it to discover it (for example, we used to have non-codified crimes, we still don't accept "mistake of law" or "ignorance of the law" as a valid defense, even if it practically would be impossible for someone to know of a law's existence and so on). We've obviously moved away from that presumption, but, from my perspective, law is intended to be accessible, not arcane.
It's therefore highly unfortunate, and possibly the fault of the legal profession, that law, today, is seen as inaccessible. Reading a legal opinion is not an exercise in futility--it's intended to be read, and often intended to be read by people with little knowledge of the underlying subject matter. I would challenge people, particularly coders skilled in analytical reasoning on HN, to take the time to read judicial opinions in their entirety on legal topics of interest, because I strongly believe that the analytical reasoning one uses in coding does have excellent applicability to understanding legal decisions. Law is NOT as convoluted as many presume, and judges try every day to harmonize conflicting legal concepts--in fact this is largely the entire job of appellate judges whose opinions one might read.
No one here would discourage non-coders from getting their teeth wet by doing something--anything--related to learning how to code, even if that person didn’t go to school to learn it. But, commenters on HN would be perplexed if someone didn't bother do that at all, but then tried to express an opinion on some programming technique they never bothered to learn about. This is the same sort of perplexity I get when people comment on legal topics without reading or knowing the much about the (accessible) underlying topic.
As far as the differences, I'd like to say that there is less room for error in programming, since you're working with a perfectly literal machine. However, you can create incorrect abstractions that fail to run and immediately throw errors, but you can also create incorrect abstractions that do run, but return either obviously or subtly incorrect results. Not so different from the legal system.
So I suppose the big difference is the relative accessibility of the two. As soon as you buy a $200 netbook and start programming basic, c, or whatever, you're immediately subjected to the instant feedback loop. With law, you can take a few courses in undergrad, or go to law school. But attempting to learn law on your own, without guidance, is probably easier to go off on tangents, than attempting to learn programming on your own.
In either case, transitioning the skills from one domain to another will require some study of the core body of knowledge, hence the state of legal discussion on programmer sites (and state of tech discussion in Congress, for that matter).
As an aside, it is a watershed moment in any profession when the practitioners find themselves believing that their profession is so fundamental it should be taught to all children. Bravo, coders of the world :)
Programming just isn't for everyone and no matter how often or loudly you scream that it is that doesn't make it so. Coding is hard and people think its boring. They won't persue it any further than they would a sport their parent puts them in that they dont like. There are things that all children should learn like reading, writing, and math but you wouldn't say all kids need to be trained in writing like a writer would or that mandatory math needs to incorporate the kind of stuff the guy from A Beautiful Mind was doing, right?
In the same way that we all need to know how to read, write, and do basic arithmetic, that's how we need to teach kids to code. Sketch the broad strokes of how a computer works. Give definitions of hardware and software and teach them how they interact with each other. Introduce them to the concept of binary data and how all code is just one's and zeros. After that it should just be up to the child to decide if they are fascinated enough to learn to code. Even if there is a shortage of software engineers it doesn't matter. Teaching kids to code young won't help them pursue it any further if they aren't interested. No one taught programming in schools years ago but I love it. I became fascinated with the idea that I could make the computer do anything I wanted and there are a lot more like me that did just fine without being taught it in schools. That's how any profession is, really. Pilots don't become pilots because they took an aeronautical engineering class, they do it because when they're little kids they see a plane in the sky and say "wow, I want to fly when I grow up". Same with programming. Somewhere, a kid who never has or will take a mandatory programming course before college is sitting at the computer, browsing Facebook and thinking "wow, I want to make my own websites/games/other software when I grow up".