

Let's make a "type the code listings" book for kids. - bphogan
http://github.com/napcs/programming_for_kids

======
stcredzero
Actually, that's precisely what this is for Python:

<http://inventwithpython.com/chapters/>

The programs in this book are actually modeled after such projects from
magazines and books from the early 80's.

------
bphogan
I'm hoping to get lots of people interested in helping out. I think this could
be a lot of fun and a great way to show how fun programming could be. I enjoy
teaching my daughter how to write little games, and I imagine others do too. I
miss these old books and I think we should bring them back.

~~~
ErrantX
Great idea; I can contribute some Python if that's any use.

What's your plan r.e. organizing chapters? By language or by example?

~~~
bphogan
I was planning to work up a structure once I saw what we ended up with. I'll
take whatever we can get for languages. If we end up with a bunch of ruby and
a bunch of python, maybe we see if we can get one example of each. Or maybe we
just split the book into parts.

~~~
eru
I might add some Haskell.

~~~
bphogan
I think that'd be neat. And even neater if you could explain why you chose
Haskell for your example over other languages.

One advantage of us doing this as a multilanguage book is we get to show how
different languages solve different problems.

One disadvantage of that is it's a lot to absorb.

------
benofsky
I personally love Ruby but as a beginner language, I have found people find it
a lot harder to understand than say Python, C or Basic. Ruby has a lot of what
looks like "magic" syntax to an unfamiliar user. I would probably go with a
different language.

Otherwise, very cool idea.

~~~
bphogan
We Rubyists tend to put on the wizards hat and wave the wand around. But Ruby
can be procedural too, and a lot of times can look a bit like Basic. I like
Chris Pine's book "Learn To Program" because it uses Ruby very simply to teach
introductory programming.

I have much respect for Python, but don't know it well enough yet to be
comfortable. Would kids be frustrated by the whitespace / indenting?

~~~
benofsky
Yeah, that's a good point the whitespace thing would be very frustrating. I
guess Ruby could definitely be written in an easy to understand way as long as
it's kept to a strict definition of what should/shouldn't be used.

~~~
eru
Why should the whitespace be frustrating? It was never an issue for me, or
anyone I know who gave it a try.

The IDE that comes with Python (IDLE) is good enough to help you with the
whitespace. And even in MS Notepad it should be fine. Closing parens without
editor support is much more frustrating.

~~~
dagw
The only real time whitespace can get frustrating is if you happen to mix tabs
and spaces in the same file. Unfortunately this is quite an easy mistake to
make (depending on how your editor is set up) if you're new to programming and
don't yet understand the difference between a bunch of whitespace character
and a single tab character.

------
stcredzero
Why not an environment where you're just a click or two away from browsing
(editing, changing, and running) the source code of everything?

<http://www.squeak.org>

Edit: To encourage kids to tweak and program, make the source easy to get to
and a breeze to modify. Forcing them to type The whole program to do this
strikes me as a bit indirect. We did it in the early 80's because we had to.
Often, there was no other way to get your hands on that particular program.
Today's environment is vastly different.

~~~
tlb
I think you learn something by typing it in that you don't by scanning code on
the screen. I learned a lot by typing in Applesoft Basic programs when I was
10. It's like the difference between learning a language by actively trying to
speak it, vs. just reading.

~~~
stcredzero
That's Not the point. It's not the reading, or the typing in that's the key.
It was the _tweaking_! Typing in source code gives you the freedom to tweak
because, dammit, you typed that in in the first place! But being able to
instantly change source and see the results of it instantly in the running
system -- this is a much more immediate way of encouraging tweaking.

I'm saying, so long as you want to encourage X, why not directly take the
steps to encourage X?

~~~
bphogan
I don't think you're wrong. But I think we need the examples before we can
prove you're right. Nothing prevents anyone from taking this code and building
a lab out of it as a secondary method of learning.

Of course, you're perfectly free to set up your own project using Squeak. I
bet you'd get a lot of people onboard with that. Then you can prove me wrong
:)

~~~
stcredzero
Again you're not quite understanding the point. Squeak _already is_ a massive
project of the kind you're referring to, but substituting instant source
access/change/immediate feedback for having kids type in code.

------
jaschoolcraft
I know there are a bunch of books like this (by a bunch like 4), but saw this
one yesterday:

<http://msdn.microsoft.com/en-us/beginner/bb308756.aspx>

Languages aside, it's worth checking out how other people teach kids.

I remember typing in hundreds of lines of poorly visible code in the backs of
magazines for the c64 probably 25 years ago.

Sounds great though.

~~~
confuzatron
I will always regret having typed in pages and pages of DATA to end up with a
really rubbish side-scroller.

Let's not inflict this on another generation :)

~~~
jacquesm
I used to read hex-dumps over the phone with my buddy, complete with checksum
in the 'pre-affordable-modem' days.

DATA statements aside, typing in reams of code from hard copy certainly
ingrained the ability to predict what the code did long before finishing the
typing in, and I'm sure that is something that comes in handy even today when
scanning other peoples' code.

I think it is harder today to get started programming than it ever was in the
past, the 'bar for entry' is no longer some crappy little game you can write
in three days but some three-d studio produced glitzy epic adventure. No way
'block shoots block' is going to live up to that, even if you did write all of
it yourself, and the 'enterprise' being the red block isn't much of a winner
either.

Computers are no longer 'knowable', and this is another matter that needs
addressing if we really want to lower the bar for understanding what goes on
under the hood.

~~~
bphogan
BLock shoots block is just fine for a 4th grader - at least it is for my kid.

And I think computers are knowable. Some languages are not, but others are.
Ruby has a REPL that's very good as a teaching tool. I've had a lot of luck
teaching with that. C++ on the other hand, or even Java, not so much.

I know it's harder than it was, but we could change that as long as we don't
decide to fail by defeating ourselves.

~~~
jacquesm
With knowable I mean that you could at some point in the past literally know
each line of code present in the memory of your machine. That's no longer the
case.

------
Nealman
I'm 32, does that count as a kid?

------
synnik
My brother-in-law started something along these lines a while back:
<http://cymonsgames.com/>

------
j2fly
Sounds like a great idea. A free rubyproblems.com for kids so to speak.

