What's the best way to teach 6-9 year old kids to program?


Hồng Thất Công

Đả Cẩu Bổng Pháp
Joined
Dec 19, 2012
Messages
4,386
Location
Cái Bang
OK, I always like to learn how to program games and stuff, but I'm too dumb to learn any language to get to the point where I can produce something cool and functional.  My kids are now ages from 6 to 9.  So I would like to know what would be the best way to teach my kids to program?  Specifically, what language(s), book(s), platform(s) is(are) best for them to learn?  I have 3 Pandoras now, if possible, what would be the best languages to develop for the Pandora so he/she can actually see it working on another device.  Do you recommend develop it on full size computer like laptop or desktop first and then port transfer it to the pandora?  What IDE do you recommend to use, etc.

You know when you love something but you couldn't do or did not have a chance to do/learn, you kinda want your kids to learn that and  fulfill your dream for you  :)

Thanks,

Shenmue
 
Last edited by a moderator:
Maybe something simpler than "true" coding and something that gives direct result that can be played with like scratch, stencyl or multimedia fusion (from the humble bundle).

Scratch is available on pandora IIRC.

I've played around with stencyl it's really easy to have a really basic game running in minutes. With time, you can make more complex games writing real source code. But it doesn't allow to build the game for pandora (could maybe be added if someone make a pandora target for Haxe…).

Multimedia Fusion is unknown for me, never tried it at all
 
Last edited by a moderator:
Basic is always a good start and praise Dunny on his awesome project, It can do some cool things.. http://repo.openpandora.org/?page=detail&app=pandabas.zxdunny.2994

I both agree Ruby and Python are two very clean languages to play with.. I know Python is pre-installed on the firmware, Ruby isn't on there by default.. it may be in one of the Development PNDs.
 
Last edited by a moderator:
There are quite a few "Learning to code"-type books based on Scratch around. Just the other day, this one turned up https://www.iis.se/lar-dig-mer/guider/barnhack/ which, of course, is in swedish, but there must be similar things out there in english. There's also those, um...*googles a bit*...Ah: http://inventwithpython.com/ Make simple games with Python. The first book is really basic, and does text-based games mostly, whilst the second brings in graphics. Also, of course, Dunnys ZXBasic on the pandora.

I'd probably, at that age, do something with Scratch in order to get the basic concepts - Loops, selections, but also event trapping and animation as very simple primitives. That might help when transitioning to a text-based language, where it is usually difficult enough to get the preciseness needed for the syntax to actually be able to engage on a very conceptual level. 
 
go and grab pascal.. if it is to complex, try darkbasic // glbasic or even 'klick and play' for Win 3.11

Pascal? Seriously?

Pascal is pretty much 'dead'. Theres Delphi etc, which.. are also pretty much dead.

That doesn't detract from its ability as a teaching language (for which it was well used, don't get me wrong.) But I'd focus first on if theres something still alive, first :)

I think too much typing would slow it down for a lot of kids; my eldest is 6 and woudln't have the patience for any of it, but I've sorely failed at getting her into computers per se; but I think they change a lot from 6-9, so , yeah.. nows a good time, but not sure which to hit with. I'm rather thinking _modding_ is the way to go.. tinkering with stuff.

ie: Not getting them into _programming_ per se, but into _technology_ and how things tick, how stuff works.

I've always had my girl into _Stuff_.. she was using powered screwdriverds by 3 or so, putting knobs onto cabinets etc; at 5 I had her plugging LEDs into arduinos and screwing with the code to turn it on and off at various timings, while sitting in my lap; just to see how stuff works. Fiddle with wires.

We have a house policy.. dont' throw stuff out if you can fix it, and if you have to trash it.. smash it open, find out whats going on. Salvage parts, fiddle around in there.

I started a project to build an R/C car from scratch (not even a kit, my own design); she couldn't do a lot for that, but every day she'd sit down with me and poke her fingers in and ask, and she got to drive it around; at first wa sjust spinning motors, and later the R/C receiover and hookups,a nd now its a ugly tank car thing and she knkows how to crash it into everything. Most important, my theory, was that she knows we made it, and that it can be taken apart and rebuild, and modified. She wants to add a potato gun or catapult on it. Yeeeah, thats my girl :)

So yeah, programming.. I'm still working on that too.. but I think getting thei rbrains _Working_ is the first step :)

One thignm to consider.. the 'old ways are not the best ways' necessarily; I learnt to 'code' around 7 or 8 or something, BASIC on a Vic-20, then ASM, and then next machine got useful (Atari ST..); but thats not to say BASIC is the way to go now. Might be, but you gotta approach new methods as well.

glBasic, yeah, thats pertty hot :)

Alice is neat too.

jeff
 
I learned how to code with 15 from the book C for dummies from Dan Goodkins. Very very very good book, I will write my master thesis in computer science in the next months :) .
 
Arduino... Maybe not the code itself, but there is a programming interface online which is just like Android App Inventor.
 
Oh, and a question I missed the first time around: I'd definitely do development on a "big" computer at first. There are sizeable advantages to a fullsize keyboard and generous screen real estate when coding (or doing most anything similar, really). _wb_ might be able to write complete games on the pandora, but I would hazard a guess that he is a lot better at keeping state in the head and planning stuff out than the average complete beginner :)

For several of these languages mentioned above, there exists interpreters or similar on the pandora, too, so it will be a cinch to code something on the big box, transfer it to the pandora and see it run there, too.
 
I'd recommend Beginning C++ Through Game Programming.  I bought the first edition when I was getting back into programming more seriously and I found it to be a nice, gentle introduction.  I have heard that C++ Primer is a great introduction, too, though I started with Teach Yourself C++ in 21 Days from Sams Publishing.  It's a good book, but it's not something you can rush through, and of course, you won't learn every aspect of C++ in 21 days, nor should it be taken as literal that it is 21 days total.  From there, however, that's a different story.  If they show no aptitude or interest in programming I wouldn't recommend forcing it, programming is not really an important skill to learn and there are many crevices for each language.  No matter if it's Brainfuck, Assembly, Whitespace, Ada, C#, Go, F#, C, Erlang, C++, Java, or any of the hundreds of programming languages out there.

Programming on a machine that can run virtual machines (under VirtualBox, for example) is beneficial, as you can create a virtual machine, put Linux on it and don't have to worry about any of the downsides of potentially messing up your machine or having to reboot after a crash.  Of course, you can always use any desktop or laptop for programming on, but having your programs in a virtual environment is great for experimenting with potentially catastrophic code (such as hard disk access or non-trivial memory management).  Plus, being able to take snapshots of your system can save a lot of time if something does go wrong and you have to re-install your OS.  Also; a full keyboard and a big monitor is nice.

If you're on Windows, you could use Visual Studio and it's a very good IDE.  I don't use Visual Studio, instead I use gVim and a terminal/command prompt, this is just my preference.  There's also Code::Blocks, which I've found to be pretty neat.  I've tried Anjuta which has a fair amount of features, though I did only use it briefly, so I'm not well-versed in it.

I'm really not sure what compilers, interpreters, or virtual machines are available on the Pandora, I've set up GCC on my desktop and am deploying and debugging via USB.  A while ago, I contacted ekianjo about doing a series of programming tutorials for the Pandora to put up on PandoraLive, you can see the beginnings of what I was doing here: https://drive.google.com/folderview?id=0B-SP21EJQpw0SjFrcHJzYmo5M00&usp=sharing#list.  Unfortunately, I started a job in May that is syphoning all of my free time away from me, plus the idea for the game was too big for the small amount of time I now have and I didn't try to contact ekianjo after the second e-mail I sent as I was just too ashamed to under-deliver.  All of my free time right now is dedicated to building my game demo for my portfolio, though I'm still very interested in doing a series of programming tutorials for the Pandora.  Sorry about that tangent.

Oh, and there is really no best language, they all have their pros and cons.

And I'm editing this now because I've realised that I haven't really answered your question at all.  One way to introduce them to programming could be through games, business applications, office software, or whatever they find interesting that they would like to contribute to working on (I should really say "playing" because it's never really work when you're starting out).  I'm not a parent, so I have no idea what it's like to ask someone who has spent their entire life under my care what they are interested in.  Is there any specific reason you believe they should learn to program?
 
Last edited by a moderator:
It is practically impossible to teach good programming style to students that have had prior exposure to BASIC
Teach 'em python, and they'll never write a badly-indented piece of code again :)
 
It is practically impossible to teach good programming style to students that have had prior exposure to BASIC
 Teach 'em python, and they'll never write a badly-indented piece of code again :)
I think there are plenty of good coders in this community that started with BASIC.. There wasn't much choice when I was 5-6 years old..
 
Last edited by a moderator:
Actually, I think that knowing programming, or rather the programming mindset, will be a fairly important general skill in the future. There is a quote from Thore Husfeldt (all-round brilliant CS guy) in that swedish link up there that goes
 

Thore Husfeldt, professor i datavetenskap vid Lunds Universitet, menar att det inte är en rimlig ambition att alla ska bli skickliga programmerare. Inte heller är det önskvärt, samhället behöver också många andra kompetenser. Att alla ska vara dåliga programmerare, däremot, är fullt realistiskt enligt honom. Och det är dessutom eftersträvansvärt:
– Att själv ha fått prova på och misslyckas ger många av de insikter som jag tror är väldigt värdefulla att ha som medborgare. Vi behöver inte fler systemtekniker, vi behöver fler jurister, sociologer och ekonomer som förstår datavetenskap, säger Thore Husfeldt och fortsätter:
– Samhället och våra demokratiska beslut och principer manifesteras i allt större utsträckning i form av it-system. Därför är det viktigt att många förstår vad it är.
Quick translation:
 

Thore Husfeldt, Professor of Computer Science at Lund University, believes it is not a reasonable ambition for everyone to become skilled programmers. Nor is it desirable - the community also need many other skills. However, that everyone should be (at least) bad programmers is fully realistic, according to him. Furthermore, it is desirable:
- To try and fail, yourself, leads to many insights that I think are very valuable to have as a citizen. We do not need more systems engineers, we need more lawyers, sociologists and economists who understand computer science, sais Thore Husfeldt and continues:
- Our society and our democratic decisions and principles manifest increasingly in the form of IT systems. Therefore it is important that people understand what they are.
I agree with this general idea. A small understanding of what underlies our society goes a long way.
 
Could try BennuGD, you can make a functional "game" (draw sprite, and move it around with keys, print text) in 10 lines or so. Then just go from there and expand and experiment.

It's very simple to start out with, and their wiki is a great resource with many examples. Runs great on pandora, available for many platforms. I don't think there is a good IDE for it however with function popups and such. Back when it was Fenix I used FBMX or what it was called, it was quite buggy but at least it came up with suggestions as I typed and such. No idea if it's still available and if there's bennu support.

Of cource, it's bad practice since it's not OOP and you'll probably pick up some very bad habits that could be hard to unlearn later on, I know from experience. But if you want to start simple and get fast results.. it's there 

That's how I started out myself. Randomly found a GP2X handheld device on an craigslist type site in '06, never heard of it, took a chance and bought it. Loved it, searched online, found my way over to gp32x and loved the freedom the little device provided. It was exciting to get my first code up and running on this little handheld with not much more than a set_mode() write() and a loop.
 
Last edited by a moderator:
Bah. Practice, schmactice, I say. Get them coding in whatever strikes their fancy! :)
 
Back
Top