
Teach our kids to code - jgrahamc
http://blog.jgc.org/2011/09/teach-our-kids-to-code.html
======
danieldk
Somewhat related: Chris Smith is teaching kids programming using a tiny subset
of Haskell, the Gloss graphics library, and a web framework that he built
around Gloss, using the SafeHaskell extension.

His experiences can be followed through his blog. Previous posts:

[http://cdsmith.wordpress.com/2011/08/16/haskell-for-kids-
wee...](http://cdsmith.wordpress.com/2011/08/16/haskell-for-kids-week-1/)

[http://cdsmith.wordpress.com/2011/08/23/haskell-for-kids-
wee...](http://cdsmith.wordpress.com/2011/08/23/haskell-for-kids-week-2/)

[http://cdsmith.wordpress.com/2011/09/03/haskell-for-kids-
wee...](http://cdsmith.wordpress.com/2011/09/03/haskell-for-kids-week-3/)

[http://cdsmith.wordpress.com/2011/09/10/haskell-for-kids-
wee...](http://cdsmith.wordpress.com/2011/09/10/haskell-for-kids-week-4/)

Well worth the read, and a good example of how programming can be taught to
children.

------
pygy_
You could also mention the Ruby-based Hackety Hack, a tutorial environment
built on top of the Shoes GUI toolkit, targeted at tweens. You don't have to
use toy languages.

Once they are proficient with the tutorials, students should be able to
develop full-fledged Shoes apps which can be packaged as stand-alone
executables. Shoes makes it extremely easy (and fun) to create and share games
and other graphical programs.

<http://hackety-hack.com/>

<http://shoesrb.com/>

~~~
mtogo
Yeah, or they could not. HH is a great idea, but with a tutorial that most
people it's targeted at can't follow.

It's the kind of thing programmers love, "look, it teaches people to code
using my favorite language!", but doesn't actually do anything to teach kids
to program.

If you want to teach someone to code, start them off with Scratch (or
something similar), then pick a language to start with based on their
intentions. If they want to learn gamedev, for example, give them C++.

Yes, I fully expect this to be downvoted to hell and back because of all the
_why worshipping on HN. I'm fine with that.

~~~
pygy_
_> HH is a great idea, but with a tutorial that most people it's targeted at
can't follow._

Do you have any real life experience about this?

~~~
mtogo
Yes. I recommended it to a few people squarely in it's target market and not a
single one could understand HH, and not one even wanted to use it. The same
people then learned various languages through different means and had no
problems. To me that is pretty damning.

------
robertskmiles
> What we don't need is to teach a specific language. Any language will do.

Except BASIC. Anything but BASIC.

If I had to pick a language to teach 9-10 year olds, I'd probably go with
Python. Of the 'real languages' (by which I mean languages substantially used
in industry/academia for real applications), I think python has the least
overhead to get your head around before you can write functioning code.

~~~
ErrantX
Python sure. Moving into... Ruby possibly, or potentially PHP (if you combine
it with one of the better/easier frameworks) and then HTML.

The latter ones because you can start to get them to deploy/work on websites.
Being able to write websites is a generally useful skill nowadays (even if you
don't go into programming.. all my family need/want websites, for example).

I teach an after school IT club and a project to maintain/develop a site on
the school intranet has consistently been the favourite :) Because it's
something functional and visible!

(and also a good opportunity to teach about security issues what with the
trial-by-fire environment a school brings :D)

EDIT: the other good thing about web-dev is that it needs a few different
skills - design, back-end coding, infrastructure/sysops and databases which a)
gives them a taster of all the career opportunities and b) lets different
people "shine" in different areas, and contribute their strongest skill to the
final project.

~~~
tuukkah
When you get to know Python, you don't need to "move into" Ruby or ( _shudder_
) PHP. It's much easier to learn a web programming framework in Python and how
to deploy it, rather than to learn how your second programming language
differs from Python.

The sad state of client-side programming is that you need to learn a lot about
the messy world of HTML, CSS and JavaScript. Come to think of it, CoffeeScript
might be a good language to start with today?

~~~
ErrantX
_shrug_

In my experience PHP or Ruby is generally a better/easier web programming
experience (I tried Python but it never really clicked with the kids).

Python is a good general purpose language though.

------
sunkencity
Best way to learn kids to code is Scratch imho. My 4 year old daughter loves
it <http://scratch.mit.edu/>

~~~
yardie
Your 4yo knows scratch? I'm trying to get my son interested in programming but
it's been frustrating for both of us. He is a lefty in house of righties so
the mouse never works the way he wants it to.

If he doesn't make a good programmer he'll be a master mechanic. I've given
him a precision screw driver set and he's gotten quite good at taking things
apart.

I'll give scratch another try in a year or so.

~~~
sunkencity
The interface is really a bit too hard, generally she have to explain to me
when she want to do something more complicated, but she can drag and drop
stuff from the sidebar to the active area and rearrange the stuff there, also
entering numbers is fun generally she wants all numbers to be at 100.

I would really want to have a scratch version for the ipad. The graphical
visualization of programming is excellent, but it's really too complicated
with a mouse. Also, painting with a mouse really sucks when compared to
painting with a touchscreen.

Looking at her with the ipad, the mouse really feels like a legacy device.

------
ErrantX
_The petition itself is marred by a rather confused statement of its aims
which seem to cover teaching children to code and doing something about the
gender gap in IT._

This was my first thought too. A noble aim to be sure, but it would be nice to
see it cast with broader aims!

~~~
philbarr
I agree, although that didn't stop me from signing the petition. When I was at
school I was told, "I.T. isn't a real subject", and was prevented from taking
it. It was seen as a drop-out's subject.

That kind of attitude has to change, and although I think the wording of the
petition could be better, I'll sign anything in the hope of getting this issue
noticed.

~~~
robertskmiles
But I.T. _isn't_ a real subject, at least not how I was taught it. The
mandatory course I took at school was essentially a certificate that says
"This person can work the basics of the Microsoft Office software suite". No-
one in the class didn't know everything already, since we already used Word,
Powerpoint and Excel for our other work. If they taught some actual Computer
Science rather than just computer use, it would be a real subject in my
opinion.

~~~
ErrantX
I think the former has value to people with no aspirations in CS (a lot of
value, really, everyone needs basic IT skills in the modern world).

But you're right... they need to divide them - so teach "Basic IT Skills" (or
w/e) and Computer Science as separate courses. A lot of the kids I teach are
really put off by their IT classes because it is all about competency and not
creativity.

~~~
demallien
"I think the former has value to people with no aspirations in CS (a lot of
value, really, everyone needs basic IT skills in the modern world)."

Well yes, but let me tell you a little story.

One of the things that I get to notice, as a woman, which my male colleagues
don't, is just how repetitive womens' work often is in the office. I have a
lot of female friends that are secretaries, receptionists, assistants etc,
which I don't think is true of most men working in IT. And I see how much of
the daily grind of what those women do could be automated, if only they knew
how to put together macros, or even just how to make use of tools like
Automator on the Mac. I have tried teaching macro programming to a couple of
them, but they get stuck on the simplest of programming concepts. What's a
variable? How can I expresss a complex algorithm given a small set of
primitives? Flow control, what's that?!?!

I can't help thinking that if they had learned these very simple basic
concepts when they were back learning about how to set tabs in Word, that they
would be many times more effective in their office jobs today. So even if
someone has no interest in CS as a career, the reality is that these days
many, if not a majority, of jobs could be helped by it - running a small
business, office work, etc. But if you leave it until the person is an adult
out in the workforce, they often won't want to learn.

------
inovica
I think that there should be good classes that kids can opt into, but
personally I don't think that it should be compulsory. There is a tendency for
adults to want their children to be like them (but better of course). Probably
every fire fighter wants their kids to follow in their footsteps.

On a personal note, whilst I sit as both 'coder' and 'business' person I enjoy
my children learning about what I do without pushing them. What I love to do
with my kids is to take them out into the world so that they experience
different cultures, discover nature, learn to kayak, ride bikes and.... well,
be kids. If they develop an interest in something then I will support them,
but I'll not be a pushy parent. I would be delighted if my children followed
in my footsteps, but as long as they do their very best in whatever path they
choose to follow that will make me the proudest

~~~
cynest
Lack of exposure to activities like coding is a problem in society beyond HN-
types. These activities should be something children are exposed to in school
because their home environments will not provide this exposure.

------
petercooper
I have some hazy memories of them trying to teach us Logo in the mid 80s but
little beyond that.

I think it's a good idea because it's so cross-discipline _and_ can be made
'fun' (doing mostly simplified graphics programming, etc). Things like
teamwork, math, music, art, logic, English, and even the scientific method can
all combine into a project that's both productive and fun.

Maybe times have changed but I was at school, subjects were strongly
compartmentalized and rarely combined (other than the occasional bit of math
in a physics class), yet in the real world, combining disciplines makes up
most of the work day.

------
mas644
This is a fascinating topic that is always debated. There's always arguments
about how young, which language (BASIC, Logo, Scratch, Python, Haskell
(yikes!)), which paradigm (functional, OOP, imperative/procedural, logic,
etc). I think the point that Eric Schmidt made in the article is that the only
wrong move is not to teach anything :) As long as something is being taught
about how computer hardware and software works, it's a move in the right
direction! His concern is that students are taught only oversimplified
computer skills like using a word processor and a spreadsheet rather than
understanding some basics about computer science and engineering.

I'm currently teaching introductory programming to non-engineering majors at a
major university in C (yes I know uggh, I would have gone with Python). I've
noticed what seems to be the biggest problem is that the computer education
that was given to these kids earlier in school didn't teach any independent,
critical thought. They struggle when things aren't EXACTLY as they were taught
to them (e.g. if the Microsoft Word icon is on a different part of the
desktop). I've been trying to teach them to use their brains and to try to
understand how to solve a problem without asking me for help. I try to make it
clear that I do not have the answers to every question regarding
computers...neither does any other person on the planet. It requires
deduction, inference, experimenting, lots of Google searches, forum posts, and
infinite patience. Turns out they can handle it! You just have to let them
believe in themselves and let them struggle with it for a bit. In the end,
they appreciate it and enjoy it more! I even show them a lot of things that
people feel might be too advanced, such as the command line and interfacing
with external libraries. They can get it if you can break it down for them. I
think often the problem is that the teachers themselves are not experts in
programming and have difficult conveying info to students.

------
cheez
I taught my kids Scratch from MIT. I think that is sufficient for the
_average_ 9/10 year old. Then the girl went on to learn more on her own and is
now programming electronics.

If LOGO is no longer being taught in schools as it seems, then we have a
problem. LOGO is what made me love programming. That fucking turtle/pixel.
Goddamn.

~~~
pmiller2
Try 'import turtle' at the Python REPL some day. :)

~~~
cheez
AWESOME

------
JoshPic
The problem, I feel, with my generation is that we're too often called
'Digital Natives'. We lull ourselves into believing that we are 'good with
computers' when in reality we haven't a clue as to whats going on beneath the
surface. To make a comparison, its like being able to operate a microwave oven
versus understanding how a microwave oven works. We press a few buttons and
four minutes later that frozen lasagne is piping hot. But from a purely
academic point of view, wouldn't it be fantastic if everyone had an
understanding of the process in between?

Oh, and list 10 distinct careers where an in-depth knowledge of the Haber
process is required, as that is one of the areas taught in GCSE Science for a
disproportionate length of time.

Just my 2 cents \- J

------
joshaidan
This leads to another question, do we teach our kids imperative programming,
or functional programming?

~~~
groovy2shoes
It's valuable to be able to know how to approach problems from different
angles and be able to work with different constraints. So why not both?

------
hexis
Even better, teach your kids to code. Cut out the middleman.

~~~
mattdeboard
A+.

I have my 7-year-old using Scratch and she loves it. It's a great intro to
analytical thinking & problem solving. Even if she doesn't carry on
programming it is a valuable thing to learn for life in general.

~~~
pointyhat
Your 7 year old should be playing outside.

Don't take their childhood away so they can live by your standards.

~~~
mattdeboard
First, that is a remark with extraordinarily sexist undertones. What makes you
think that she doesn't love it? Have you ever used Scratch, or even looked at
it? It's a huge cartoon-and-legos playground. It's great for kids. But
moreover, she likes problem solving. But I guess to you, that's not the domain
of women or girls.

"He must be thrusting this upon her, because little girls don't love problem
solving!"

Give me a break. Judging from your other posts in this thread you sound like a
very judgmental, smug & condescending person, exactly the characteristics I
point out the folly of to my kid. Plus, you're just way off-base, factually.

------
illumen
python/pygame

------
pointyhat
No no no no please no. Don't teach them to code. Teach them to think first.

If you give someone a hammer without telling them how to use it, they are
going to hit some fingers and get frustrated.

I think we should teach children to understand mathematics at an algorithmic
level and let them see that programming is a tool/hammer for executing those
algorithms. Unfortunately current educators tend to concentrate on the pure
mechanical aspects of mathematics such as arithmetic and punching numbers into
off-the-shelf formulae which is the real problem.

Personally, they should just throw in valid use cases that map to reality like
calculating GCDs or Newton's method and let them knock up the programs in TI-
BASIC on their standard issue TI-84's.

That's enough for school, even to A-level.

Footnote: For reference I was brought up at school in the UK on LOGO, BBC
BASIC (6502 and ARM), LEGO Dacta and TI BASIC. Life was good for me, but I
know that my peers found it frustrating when they just wanted to solve a
problem and go home.

~~~
_corbett
I completely disagree with this, programming is a fundamental skill in a
variety of careers and can be used as a tool to teach how to think.

It isn't an either-or proposition, incorporating programming exercises into
any science oriented class can not only be illustrative, it like any sort of
hands on lab does teach students to think like a scientist and helps to create
a more realistic microcosm of how science is actually done these days, with
programming forming a bridge between theory and experiment and heavily relied
on in analysis.

~~~
mibbit
List 10 distinct careers where programming is a fundamental skill.

~~~
dpritchett
Pretty much anywhere people use Excel. Any job where people use spreadsheets
and their output is quantified and measured against their peers is ripe for
automation by enterprising individuals. Why not be the fastest, most accurate
analyst on your team?

From pg: _"To get rich you need to get yourself in a situation with two
things, measurement and leverage. You need to be in a position where your
performance can be measured, or there is no way to get paid more by doing
more. And you have to have leverage, in the sense that the decisions you make
have a big effect."_

And also from Zed Shaw: _"Programming as a profession is only moderately
interesting. It can be a good job, but you could make about the same money and
be happier running a fast food joint. You're much better off using code as
your secret weapon in another profession.

People who can code in the world of technology companies are a dime a dozen
and get no respect. People who can code in biology, medicine, government,
sociology, physics, history, and mathematics are respected and can do amazing
things to advance those disciplines."_

[1] <http://www.paulgraham.com/wealth.html>

[2] <http://learnpythonthehardway.org/book/advice.html>

~~~
pointyhat
Reminder: pg and zed are not deities. They have an opinion.

