Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Best intro to programming book for 2nd graders?
30 points by hedora on Sept 4, 2023 | hide | past | favorite | 19 comments
So, back in the day, my parents bought a laptop, and a purple book about programming qbasic. About a year before that, my dad and I wrote a CHIP-8 program.

What good references have people found for a grade school intro to programming? The kiddo already worked through game builder garage, and is familiar with scratch.

Ideally, it would be available in dead-tree form, and assume an offline programming environment, but those aren’t hard requirements.

It doesn’t really matter if it’s a modern programming environment or not; we have dos, win 3.1, linux, etc.



Honest question: Does the kid really want learn via dealing with a book? Programming has such a wonderful virtuous feelback look built in, seems a shame to get in the way of that. My son learned a ton of programming mainly by building bigger and bigger things (with more and less help from me), and only after many years got to a point where researching a question on stackoverflow/etc started working for him. All the progress was well-motivated by the task at hand, not the next page of the book.

One tool that we found to be a very deep learning ground: an iPad app called Tynker. It is another block-based env like Scratch, though we found Tynker to have stronger primitives (e.g., you wind up forced to use globals to pass state around less often). Some big advantages: 1) iPad is super portable, so works when travelling 2) has an excellent physics engine built in - we made an Angry Birds clone 3) was strong enough to support making a piano app that can play concurrent tones. 4) Lots of samples shared by community for inspiration.


I personally taught my 8yr son programming using Swift playground on an iPad. Its a great visual app which asks kids to solve fun challenges and minimal coding - but teaches them basics of variables, if/else, loops pretty well. Its a great starting point.

He also experimented alot with scratch.

Now he's 9 and learning intermediate Python through community classes taught by our area hi-schoolers.

He recently made a summer holiday project called "Story Machine" which takes 5 nouns, calls a generative AI API to create a story, uses Spacy to find nouns and randomly replaces those nouns with another set of random nouns - creating a funny story in the process. UI input using tkinter :-)

I helped him to learn concepts like API calls, JSON, generative AI, UI, event based coding etc - he google searched himself to figure out how to use those concepts.

Once you teach them the basics, they will fly!


Do they like Minecraft? Because Minecraft itself gets programming agacent - but modded Minecraft just is programming, and that’s using things like OpenComputer and not even talking about modifying mods themselves.


+1 for messing around with Minecraft! There's SO much tutorial content out there that will teach you how to make your own mods, modify mods, modify things in-game with mods like computercraft (in-game Lua interpreter!), and even just red stone in the base game is complex enough to spark lots of curiosity!


I personally learned basic java as my first PL wanting to code minecraft server plugins as a kid! I'd get up early every day at 7 o'clock because on the afternoons I had music practice just to code plugins for my server :)


Strange as it may seem, me (computer hobbyist) and my son (3th grade) ended up working with this book on QBASIC by Ted Felix: http://tedfelix.com/qbasic/

Yes, QBASIC. Back to the 1990s. DOSBox or something similar needed for it to work under Windows 10. But: the syntax is easy to grasp even for children who are not native English speakers, and the full-screen IDE with Large Friendly Letters On A Blue Screen seems to help the kids in maintaining focus. Modify your code, hit F5, repeat (infinite LOOPs under DOSBox may be "fun", though, since the program termination hotkey is tricky to figure out).

For teaching/learning the absolute basics of programming, QBASIC still seems well worth considering.

Going through this book with my son just these days, and I think he's doing great. It's a really well written book, too. Careful wording, empathetic towards the child-learner. A prime example of "new is not always better".

When we're done with the introductory book, we'll probably move foward to "Sprites in QBASIC" by the same author: http://tedfelix.com/qbasic/sprites.html


Interesting to see this here, as I came to the thread with the intent to re-recommend QBASIC. I started around a similar age with QBASIC via 'QBASIC Programming For Dummies'. I was crushed when my dad's work laptop was upgraded and QBASIC was no longer bundled in (Windows 2000?).


IME, kids at that age learn through play/engagement, not reading reference books. Have them come up an idea of a fun project and do it with whatever tools they are familiar with.


My kids are older now, but I found this very interesting - https://www.kogics.net/kojo

One thing that worked for me is to let them guide me. When they stopped being interested I'd wait a few months and try again


Look up Code Club and their Scratch modules. I was a volunteer and we had a few kids around that age and they took to it really well. The instructions are clear and walk them through generating something fun right from the start.

I've tried Learn to Program from PragProg and a few other books with the older kids I volunteered with and it just never stuck there was just too much of a gap there still between what they do and what they see. If you do want to go that way though then https://pragprog.com/titles/csjava2/3d-game-programming-for-... something like that but download all the code examples, show them how to run them then just let them play around with changing things and see how it changes on the screen.


Practical Computing for Biologists was an extremely great one for me, but it looks like the price got jacked way up, maybe there are PDFs floating around and maybe it’s worth $120 due to awesomeness. https://practicalcomputing.org/index.html

Mainly I give this recommendation based on the practicality of the material and straightforward style. You don’t necessarily need to be a biologist to get a lot out of it, same stuff is used everywhere anyway. Combine that book with the Pythonista app on a phone and you can just whip out your mobile device and instantly have a better equivalent to a TI-83 calculator, with internet.


I've been using this:

"Invent Your Own Computer Games with Python, 4th Edition."

https://inventwithpython.com/invent4thed/

I feel like it has been going pretty well so far.


Shortcuts is a really good start for getting him to think algorithmically without sweating the actual code writing yet and still getting satisfying results to show for it. Its really colorful and tactile too which appeals to multiple learning styles. Get him to put together simple shortcuts that accomplish some small goal or series of goals and work him up to the automations with various triggers (turn all the wifi off at 9pm, or lock when connected to power, etc. Then use that as a springboard to writing actual code (which he will appreciate much more when he's got that experience and success in getting it to do what he wants)


For second grade I would recommend the ScratchJr book and also the ScratchJR cards.

I have taught Scratch to different grades at my kids school. I have found third grade to just barely grasp Scratch.

ScratchJr on the other hand can be picked up by kids as young as 4 but ideally at 5.

I have a whole curriculum designed around it that pushes the boundaries of what you can do with it.



I like "Learn to Program", by Chris Pine. It is very simple and straightforward. You get students into interactive exercises very quickly. You can preview it online:

https://pine.fm/LearnToProgram/



If you want to go old school... have you thought about Basic? :) No, seriously, hear me out.

Microsoft once created Small Basic [1][2], which is essentially the vintage Basic but targeting kids and education. It was updated to include a graphics interface, new modern language semantics, light OOP, and Logo-style commands. Not to be confused with Visual Basic.

When my son was 7, we went through the book "Learn to Program with Small Basic" [3] over several weeks, and he really enjoyed it. It taught him the basic concepts of variables, for-loops, control flow, etc. The language was intuitive for him to follow, and the Small Basic IDE and syntax are user-friendly and non-intrusive (especially when compared to VSCode, or services like Repl.it).

A couple of caveats to keep in mind:

1) Microsoft hasn't updated SB since 2015, so it's (was) showing its age. It appears it has been open sourced in 2019, and there are now community efforts to modernize it. This sounds great, but I haven't looked at it.

2) SB runs only on Mac and Windows. To make matters worse, the version for Mac is (was) terrible, so I ended up loading a Windows VM on a Mac host, and running SB inside it.

After that he did some more dabbling with PICO-8 and Lua (we built a Pong game together), then played with Minecraft, and eventually he moved on to other interests (music, etc).

More recently his curiosity sparked again, and now he just started learning Python using P5.js (basically Processing for Python, which offers a very visual experience out of the box).

We just started 1:1 tutoring classes using a service called Strive Math [4], and he's loving it. I found Strive Math exactly because I wanted someone who used P5 and offered a more visual learning experience, and that's exactly what these folks do. Still early, but early results are very promising.

[1] https://en.wikipedia.org/wiki/Microsoft_Small_Basic

[2] https://smallbasic-publicwebsite.azurewebsites.net/

[3] https://www.amazon.com/gp/product/1593277024/

[4] https://www.strivemath.com/


Disney Coding Adventures is a series of physical books that present coding basics like functions and loops, but it sounds like your 8 year old may have progressed beyond that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: