Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Programming Time - Playing card game to teach your kids Python (punkjazz.org)
203 points by throwaway47292 on Feb 24, 2022 | hide | past | favorite | 72 comments


> playing card game to teach your kids

> "Diffie-Hellman Key Exchange"

Just how old and already well-instructed is said daughter I wonder. Certainly not as young and novice (and sparsely attentive) as my ten year-old who's also learning Python. Because he wants to, I should add.


She is almost 11, and some of the cards are very very challenging, and some are impossible for her at the moment, but I just pick the ones who are appropriate for the mood/patience/concentration capacity for the day.


Yeah, going over the RSA algorthim with kids-- maybe other kids are smarter, but Im not sure. I mentored a 16 year old some time ago(python), and also trained young engineers in their 20s-- and just teaching the basics of programming is hard enough without also throwing in crypto algos


Very cool! I'd recommend simplifying it. I created a card game for SQL and kids were lost when there was too much work involved until I simplified it - https://rowsandtables.com


This seems really complicated for the age group (2-4 years old), and becoming a "real data scientist" might not be an aspirational goal for these kids


You're mistaking recommended age for number of players. Recommended age is 8+.


wow those look amazing!


So for a large deck from this company it's $22 or so. If I were a parent teaching my kids to code, I would do this in a heartbeat.

https://www.makeplayingcards.com/design/large-blank-card.htm...


I don't understand why you have linked what you have linked


I suggest simplifying the content of the cards. Love this idea!


Thanks for the suggestion, I made those specifically with my daughter, and are tailored to improve her level.

But you are right, in the future I will make decks with different difficulties.


May I suggest that instead of Python, if the aim is for children, you consider a block based language such as Scratch or MakeCode?

I have a nephew who is ~8 and is doing absolutely amazing with Scratch in his classroom. He's making little mini-games, understanding loops, variables, and he's learning the all-important skill of debugging.

When/if he transitions from a block based programming language to one that's purely textual, I feel like that transition will be smooth based on his existing understanding and skills.

So if the aim is puzzles for kids, having a setting that they are more familiar with, such as blocks, might make it easier.

Just a thought.


She didn't like scratch at all, says it feels patronizing, so I didnt push much, but she is doing fine with python and c.


I believe typing in early age will lead to carpal-tunnel syndrome so I'm not pushing my kids to learn typing.

In my experience Scratch or SNAP! are great to learn programming. We recently made auto-clicking mouse with microPython and I could see they understood the code well because of their experience with Scratch.

My kids like to follow tutorials by griffpatch on YouTube which I think are superb.


> I believe typing in early age will lead to carpal-tunnel syndrome so I'm not pushing my kids to learn typing.

Typing extensively and without proper ergonomics will lead to carpal-tunnel and other syndromes. Not teaching them proper posture and typing ergonomics as kids means when they inevitably have to use computers in school/college/work, they will be much more likely to develop a strain-based condition.


I would argue there's no 'proper posture' for child's hands on adult sized keyboards and keys.


backspace and enter are especially an issue, i teach her to use ctrl+h and ctrl+j capslock being control, on windows i made https://github.com/jackdoe/programming-for-kids/tree/master/... to help with that


Spending half your time dragging with the mouse seems to cause way more wrist issues than typing. For me at least


At least pointing devices come in different shapes and forms, including vertical and trackballs. We used to enable chrome accessibility feature [1] to automatically drag-click when the mouse button is stopped. Although, as kids got faster they turned it off. It's a nice option to have.

[1]https://mcmw.abilitynet.org.uk/how-to-make-your-mouse-click-...

One of the reasons why we made auto-clicking mouse is so, when playing games, they don't have to click it crazy fast (besides it being fun project). To increase keyboard ergonomics I am thinking on a custom keyboard with programmable keys to, for example to turn long-press space into backspace, shift space to enter.


yeah my 14 yr old son says the same thing about scratch and the other similar targeted languages.

not surprising really he's taught himself c# to make games in unity.


I think there's a huge difference between a 14 year old and an 8 year old.

Also there's a bit of cultural assumption going on here. Based on the amount of comments, the poster's child is probably a native English speaker. My nephew is not, and has only begun learning English in school.

If the goal is "Let's make something for my child" that's cool and needs no change. If the goal is "Let's make something to help children learn programming", a more difficult and noble goal, then removing barriers such as English fluency, is a way to do that.


> the poster's child is probably a native English speaker

She is not, but started learning english when she was 5 or 6 by watching netflix peppa pig in english and with english subtitles, now she is almost 11 and watches anime in japanese with english subtitles.

What pushed me to do that years ago was Stephetn Fry's turn on the subtitles video https://www.youtube.com/watch?v=I-zISnJ-oao (I cant actually find the one I watched at the time, but was the same content)


Good on you for that.

This is my nephew, so I don't have a lot of control. My wife learned English around your daughter's age and she's at native level.

Nonetheless, human languages are a barrier :)


that's hugely impressive, learning to program in a language you dont speak.

actually given how messed up english can be at times i wonder if that actually helps :-P


Yeah, Scratch is is IMHO more an option for half that age.


Block based programming languages are a bad idea for teaching kids programming and I would argue actually counter productive.

There is no need to 'transition' as BASIC, and nowadays HTML or Python, are simple enough for anyone to grasp (like every programmer ever did, some starting with C "even").

If a kid can't grasp BASIC/HTML/Python, they won't be a programmer (with or without Scratch).


I dont know about the 'if they cant grasp BASIC' thing, but Scratch is not as inclusive as people think. My daughter was almost repulsed by it, but actually when I made a "laptop" (https://github.com/jackdoe/programming-for-kids/blob/master/...) of a pi zero and a small screen that boots into vim, and she started to make python do things, basic math things, she was much more engaged.

We made few arduino nano led controller, she helped to solder the mic sensors and etc, and also to program the delay between the 'claps', it just feels so real.

I also bought pi4 game hat (https://www.waveshare.com/game-hat.htm) that she assembled herself, and then I uploaded a 'hello world' snes game, showed her some assembly.

She played a lot of 'human resource machine' and '7 billion humans', and I was paying her sometimes 1 euro per completed level, and turns out it was time well spent.

She also helped me with some work on Ben Eater's kit (especially the clock and some registers).

I think the best lesson we had that got her hooked was when I made like 5 line python script that controlled the keyboard that was climbing an infinite staircase in Roblox using pyautogui.

What I am trying to say is that some kids will respond to scratch and some wont, and either way I dont think you should say 'oh programming is not for them'


I think this depends on the age of the child and on the child themselves.

Scratch is what they teach him in school, so that's what he knows.

Scratch is also a real programming language- it presents differently visually, but the concepts are all there, except some that I doubt many children use- such as closures, generators, threads, etc.


of course, that was my point scratch is great if kids like it, it is absolutely real programming language, i meant that just my kid didnt enjoy it


Block based programming languages are a bad idea for teaching kids programming and I would argue actually counter productive.

I disagree with this. Block based languages reduce the amount of text on the screen (less dependent on reading skill), reduce the amount of typing (dexterity and keyboarding skills) and reduce the number of confusing syntax errors (important if the learner has limited patience and emotional control skills).

All of these skills are important and can be learnt given time, but they are not the same as learning programming. The ideas of abstraction, repetition and problem solving are still there in block languages.

If a kid can't grasp BASIC/HTML/Python, they won't be a programmer (with or without Scratch).

We teach mathematics to everyone but don't expect everyone to become a mathematician. There's no need to handle programming education in such an extreme way.


Do you have any evidence to suggest this is the case? a case study or something or is it just your opinion?


Evidence is that every single programmer that exists in the world, and that started coding as a kid, had to and grasped a concept of a real programming language or they wouldn't be a programmer.

I personally started coding at 8 with BASIC, using a book in another language (that I didn't speak) as a guide. This is the kind of thing a future programmer would do.

I tried teaching programming to my daughter when she was 8. We started with Python and it didn't go. I thought maybe we should try Scratch like everyone is telling us to do. It didn't go either because she was simply not interested in learning programming.

So a case study on a sample of 2 - does it count?


> So a case study on a sample of 2 - does it count?

no :)

What would you have done if she was not interested in learning math or literacy?

Also when you were 8, you didnt have about 1 million developers making 500k per year trying to extract(and sell) every single bit of your attention in any possible way. From roblox to netflix to tiktok to supercell.

It took us like 300 years to learn how to teach math, and we are still improving, we are getting new tools every day, just look at https://www.youtube.com/3blue1brown can you imagine how many people he himself has reached and inspired? People that previously thought: "math is not for me".

We dont know neither pedagogy nor andragogy for programming, what is known is that tutoring + help software works really well (https://www.public.asu.edu/~kvanlehn/Stringent/PDF/Effective...), but we are still trying to find ways to teach mastery.


Don't simplify. If you want to make some simpler "starter" cards okay, but what you have is great, even for total python beginners, as long as there is a dedicated teacher to help them work through the card.


I don't see the reason for not just doing this as Jupyter notebooks.

I am child free but I just can't see not using Jupyter notebooks.

If I had a kid we would learn jupyter after learning multiplication.

5*7 shift+enter

variable = "hello kid"

variable shift+enter in a new cell.


This is so neat! Seems like a really fun game, and I'm also a big fan of the very straightforward & minimal website. Would definitely buy one of the decks you're planning to sell :)


Thanks!

The 300 decks arrived yesterday, and we were super excited with my daughter. Today we played multiple times and its super fun. Even though we played many times when I printed the game on normal a4 paper, having the real professional cards really make a difference.

I plan to also make lisp, c and javascript decks so we can explore more paradigms.


Just curious if you could share how old is your daughter.

I have tried teaching coding (several approaches, but eventually on Scratch) my 9yo nephew, but ran into many issues. For example, trying to debug a counter, I thought it'd be fun if I asked "hey, what's 7 - 2", and he went "it's 5, duh" and then I went "and what's 2 - 7", ... and he went "that's not possible!"

Turns out his math teacher hasn't yet introduced negative numbers! I had to go back to number line...

Anyway, what you've done is really cool! I'm sure once he's old enough it might prove to be very useful.


She is almost 11 now, but we are coding every day for almost a year now (I am logging the progress here: https://github.com/jackdoe/programming-for-kids). Its often we go to the number line :) but because we usually make games, and it was easy to get negative numbers when you go out of the screen, so it "clicked".

The whole game was her idea and we started working on it about 5 months ago.


You should mention that it was her idea and that you worked on it together on the web page! I'd buy it to support her efforts more than because I am sure my 11 year old would enjoy it!

One other thing I wasn't sure about it from the web page was how it was a game. I got the impression that it was basically just a set of python programs/ideas and you pick one at random. Is there anything game-like going on or is it just that?


That's awesome, the end result seems enjoyable even for us adults! :)


that repo is awesome - you should do a ShowHN for that!


There's a typo on the ghost card:

    Roll the dice until your door is different __form__ the ghost's door


There's a few scattered around - In the memory.txt "Imagine" and "Trillions" are both incorrect.

But you know OP has done a good job if we are nitpicking these small things!


Love this and am looking for more ways to teach programing and stem generally without putting my child in front of a screen all the time. Will be starting with shoots and ladders from as early an age as possible. Looking for other tools to fill the gap between shoot and ladders and this, which may take years to bridge together.


Robot Turtles could be a good way to introduce multi-step reasoning. You'll need to be attentive to your kid's developmental level (and don't worry about "other kids." One of the most important things I read was an essay by Keith Gessen in which he related a conversation with his own third-grade teacher who told him that some kids learn to read in kindergarten, some in second grade and in third grade you'd be hard-pressed to tell them apart. As a father of twins who learned to read at different ages, I can verify that this is very true) and be prepared to put things aside for months or years as necessary. And there are some pretty good screen-based things a well (I was a little startled to look at my second-grader son who was hypnotized with his iPad while I was working and mom was busy and saw him casually doing some basic algebra problems out of his own volition—although I am quick to admit that there's plenty of Minecraft time too).


Is shoots and ladders the same as "snakes and ladders" ? https://www.amazon.com/HASBRO-GAMING-Chutes-Ladders-Board/dp... is what you're talking about?


Yes


Super cool idea!

I think I found a typo on this card:

https://punkjazz.org/programming-time/photos/c.png

Your comment next to e=7

says: "pick a number between (p-1)*(q-1)..."

But it seems like it's missing "between 1 and (p-1)*(q-1)..."


hehe i didnt want to put `between 1 and` because of the salt fiasco https://github.com/saltstack/salt/commit/5dd304276ba5745ec21...

and then i had a typo ..

i will fix in the next revision!


I think this is really cool and I would be interested in a set of cards - I emailed the address listed on the page.


Very cool! I took the liberty to cross-post it to my Python News Aggregator over here: https://news.python.sc/item/65013aec-29a0-495c-b288-65abd470...


Great idea, similar in spirit to spaced repetition. I wonder if the cards can be simplified to reduce the time it takes to solve a card (possibly more fun due to faster reward) but still retain the same level of knowledge.


there is a typo

# Roll the dice until your door is # different form the ghost's door.

should be from*


You had me at "20 sided dice".


Any dungeon master worth his weight in geldings... goes nowhere without his... 20-sided die.


Simple Efficient Fun

I’m a fan.


here we go, right back to punch cards...


"Dad can I please play with my toys?"

"Not until you learn python you little shit"



Do you read every single comment posted here?



Not even close!


"When I come back in this room that function better be done!"

My kids hate code.


This may well be an effective way to learn to code but god, it sure doesn't seem like a way to have any fun.


Please follow the Show HN guidelines: https://news.ycombinator.com/showhn.html as well as the site guidelines: https://news.ycombinator.com/newsguidelines.html. I'm sure you meant no harm, but comments like this have a way of poisoning the culture, especially when they get upvoted to the top of the page, as they often do.


I don't think my comment broke any rules, and I have a hard time taking you seriously when I compare the reality of what goes on here day in day out to the fantasy world of the supposed guidelines.


I would say your GP comment was a putdown and therefore gratuitously negative.

Obviously a lot of commenters break the guidelines but that doesn't make it ok to break them more.


apparently fun is subjective :D


I hate this kinds of ideas. They should play with the "computer" and learn to program it, know the inner workings.


I was sat down in front of a computer, given a couple of machine code manuals for the ZX Spectrum, and told to get on with it.

I just wished my dad has sat down with me and spent some time with me. This card game would have been great.


Well, I didn't tell that parents shouldn't cooperate with their kids.




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

Search: