9 ms·
Teaching our five year old to code by cheating
- kripy 6y agoif int(guess) == int(lulu + boonie): There ... I fixed it.
- samwhiteUK 6y agoYeah, question 1 it gave me was "What is 0+1?" and then it told me that 1 was the right answer, when that's what I typed. A few questions later and I thought "hmmm... something is up here"
- stadt 6y agoAs the random lulu and boonie are already integers you only need to edit line 9: guess = int(input(question))
- th3sly 6y agoguess = int(input(question))
- yonixw 6y agomine was: `if guess == str(lulu + boonie):`
- gregorymichael 6y ago:)
- Moosdijk 6y agoNice article! I liked the "I can use code to do anything." remark. It's so true! I assume you're the author. How did you pitch the idea of coding with her? While I don't have children yet, I love the idea of coding together with them, but I'm not sure how to get them to do it. Especially with minecraft and other way flashier options available to them.
- gregorymichael 6y agocode.org was a great place to start. making anna and elsa dance using ~logo. dance party. also the book Hello Ruby.
- sriku 6y agoI've been frustrated by the magnified expectations of kids w.r.t. programming because they play sophisticated games compared to the pong/bricks/tetris of my highschool days. Very hard to satisfy my kids with doing, say, turtle graphics. I'm yet to try Minecraft programming (need windows machine) but that might do it for them as they're into Minecraft. I had a blip of a realization one day when idly talking to the 6yr old with a prolog terminal at hand. Documented that here - http://sriku.org/blog/2019/07/16/prolog-is-magic/ http://sriku.org/blog/2019/07/16/prolog-is-magic/
- blackbrokkoli 6y agoJust putting this out there: You don't need a windows machine. Minecraft, including programming mods like ComputerCraft run fine on Ubuntu (and therefore probably on a lot of other distros).
- mjevans 6y ago"Java Edition" is, assuming the system can run "modern" games decently well. I've also heard good things about "ro blocks", but having watched a stream or two I'm less sure of it as a good introduction. Computercraft turtles and LUA aren't terrible, but when I see a FOR loop I think C style, while LUAs is the other kind and I'd really love for that for to be named something like ITER instead.
- Cyph0n 6y agoI think you mean Roblox.
- sriku 6y agoI was considering this initially - https://www.microsoft.com/en-us/research/blog/code-minecraft/ https://www.microsoft.com/en-us/research/blog/code-minecraft... - but ComputerCraft (& ComputerCraftEdu) look like a lot more fun. Thanks!
- blackbrokkoli 6y ago
- Deukhoofd 6y agoThe script you included doesn't actually work, as you're comparing a string with an integer. It will always return false.
- netsharc 6y agoHuh, did the kid understand that 3 != "3"? I'd be stumped how to explain that...
- jcims 6y agoSure give them a cookie and a picture of a cookie.
- shean_massey 6y agoEpic, I like your analogy!
- ThisIsTheWay 6y agoBrilliant
- gregorymichael 6y agoSo good!
- stadt 6y agoThat's the real teachable moment ;P line 9: guess = int(input(question))
- ldeangelis 6y agoI was going to comment the same thing. It can be fixed by addding a conversion in the if like this: if int(guess) == lulu + boonie: instead of if guess == lulu + boonie:
- gregorymichael 6y agoThanks for the catch! Should embed a version a REPL that we're not still working on.
- boltefnovor 6y agoKids should be taught programming when they express an interest, and when their brain is ready which in my non-facts based opinion is 11-13 years old. Trying to make kids learn programming without them being interested is about the parent wanting their children to be like them.
- hackerman123469 6y agoI agree with this, it's like forcing a kid to play sports if they just wanna read books etc.
- MrLeap 6y agoUnless we get an AGI to do it for us, there's a part of me that thinks that programming will eventually be as baseline as literacy. If I'm right, OP is either ahead of the curve or jumping the gun, depending on your perspective. :)
- Wowfunhappy 6y agoWorth noting that the author says he started learning to program on his own when he was seven.
- deleted 6y ago[deleted]
- watwut 6y agoKids show interest in random times tho. And if you do stuff with small children in way they find pleasurable, they tend to start liking and valuing that thing. Most parents introduce kids to things they themselves like or value. Like, sport, reading books, music, video games, nature, shows they themselves like and so on. People do it even with math and grammar (through I was never able to fully understand the grammar thing). The list is pretty long and the more parents you know, the more normal it seems to be to show your kids what you yourself like soon.
- alexgmcm 6y agoYeah, five years old is really young but I guess it's worth a try. I think at 5 years old I played some educational games that my parents had (I can't even remember the names..) and I was lucky that we had a computer because that wasn't common in the early 90's. I learned a lot about computers from trying to cheat at games though - whether it was hex-editing to get around CD-ROM checks, or memory/packet editing to cheat in the games themselves. I guess mischief and breaking things is attractive to children.
- tarruda 6y agoMy kid turned 6 years old in August and is just starting to read basic words and do basic sum/subtraction math with the help of counting the fingers. I can't imagine how he could start to learn programming at this age.
- hhas01 6y ago“I can't imagine how he could start to learn programming at this age.” Don’t. Instead imagine a computing environment that facilitates the basic reading and math skills he’s now attempting to practise. Age 6 is a bit young, but by age 8 a child starts developing the capacity for abstract thought, which enables them to turn those rote-taught skills into useful practical tools which they can apply to the problems that they themselves want to solve. Again, go read Papert’s Mindstorms. It is worth their weight in gold, if/once you can understand it yourself.
- tarruda 6y agoWill do, just purchased on kindle. Thanks for the recommendation.
- gwd 6y agoI've done something a bit like this for "career days" for elementary school kids. I coded up a perl script that was basically something like this: #!/usr/bin/perl $score = $ARGV[0] if ($score > 90) { print "A"; elsif ($score > 80) { print "B"; elsif ($score > 70) { print "C"; elsif ($score > 60) { print "D"; } else { print "E"; } And I'd ask, "What do you think happens if you put in '85'? What about 10000? What about -30?" If the group I was talking to seemed pretty sharp on the uptake, I'd ask, "If you wanted to hack it so that people who got 95 got an E, and people who got 50 got an A instead, what would you do?" The kids really seemed to enjoy that. Apparently they even told the teachers I was teaching them to hack programs -- a bit concerning for the teachers, but mission accomplished as far as I'm concerned.
- boltefnovor 6y agoLook I don’t want to criticise but I’ve got to say, this is the sort of thing that makes kids hate programming. “Hey kids ready to do some super exciting math in a computer program?” Nah. I had a computer teacher who managed to make me bored and disinterested with stuff like this, despite me being crazy crazy crazy interested in computers. The best way to teach kids programming is via programmable graphics I.e visual games making systems. Not written code.
- gwd 6y agoAll I can say is it went pretty well for me. Remember that this wasn't a full-on class; it was a "career day" where I had at most 5 minutes with any student, most of whom had no experience with any kind of programming whatsoever. And my main goal was actually to get "normal", not crazy-interested-in-computers children to experience the cognitive dissonance of running `./grade.pl 10000` and seeing it print out "A". My favorite response was the girl who knitted her eyebrows for a few seconds and then exclaimed, "Oh, I see -- you tell it what to do and then it does it!" Yes, exactly. Whatever she ends up doing with her life, her attitude towards computers will different now.
- pbronez 6y ago
- chaganated 6y agothese days, and at that age, what you exclude is probably more important than what you teach. so many overdeveloped, hyper-real, dopamine-avalanches fighting for their attention--good luck getting them to pay attention to mere reality after that. especially when mere reality has to be introduced in baby steps.
- triyambakam 6y agoYeah this is a good point and why I think it's important to make sure young children still get lots of physical playtime
- quickthrower2 6y agoHaving some success with Logo and 8 yo. Not sure if Logo is the best, but it’s fun and that’s my main concern :-). She quickly figured out how to draw some letters from the basic lt/rt/fd commands.
- progx 6y agoTss.... replace all Code with print(" !!!!!!YOU WON THIS GAME !!!!!!")" ;)
- gregorymichael 6y agototally! i was so proud when she figured this out!
- tommilukkarinen 6y agoCaptains log, stardate 345.455.33: I record this for people who might want to try this with kids around 10 years old: I made a game with my daughter, according to the .apk date it was 5 years ago so she was 10. I started by making a project in android studio. Then a gameloop, where you had one function for drawing and one function for handling clicks/screen presses. So when you pressed 'play' on studio, it opened an 'empty game' on her own phone. All you had to do to make a game, was to edit 2 different functions and to make variables to pass info. After that we started coding together and I no longer touched the keyboard. I just asked what she would like to do next, and gave advice how it could be done. She had patience for about 15 minutes at a time, and after of total maybe 2 hours, calendar time 4 weeks, we finished a 'hit a mole' game. I was quite careful not to put any pressure like 'lets do a bit more'. And asked maybe twice a week, 'would you like to do some coding'. After the project she said it was 'not her thing'. This summer she was coding web-UI with Java+IntelliJ in my work as a summer trainee, and now she said she enjoyed it.
- hhas01 6y ago“After the project she said it was 'not her thing'. This summer she was coding web-UI with Java+IntelliJ in my work as a summer trainee, and now she said she enjoyed it.” Her first instinct was not wrong. I’ve been coding 20 years now (self-taught automator who turned pro after the first 10), and though I absolutely love what programming enables me to do I still despise the amount of hostility and crapwork that “popular” modern programming platforms put me through in order to do it. I hope your daughter goes on to achieve whatever she wants to achieve, and if that should be programming I hope she never forgets that early distaste, because that is the only thing that will drive substantive improvement in a culture and industry grown fat and complacent on the sorry status quo. -- “The reasonable woman adapts herself to the world: the unreasonable one persists in trying to adapt the world to herself. Therefore all progress depends on the unreasonable woman.” ― George Bernard Shaw (paraphrased)
- babuskov 6y agoI made a game with my 9-year old who's struggling with math. Because of this I did all the programming, but I made him draw the main hero and all the monsters. He's got an interesting style. You can see the game here: https://store.steampowered.com/app/1226170/Forest_of_MATH/ https://store.steampowered.com/app/1226170/Forest_of_MATH/ Of course, the game itself is meant for him (and other kids) to play and practice basic math. I hope he'll get to program his own games in a couple of years.
- shean_massey 6y agoI love reading these. My daughter is only 2 but I've been compiling these tips as "learning hacks" to present as soon as she's ready since before she was conceived! I was also introduced to software development through "hacking" some 20 years ago and immediately fell in love (ms frontpage websites made in school and hosted on free hosting servers that injected banner ads.. my first ever hack was getting rid of those pesky ads with a bit of js back when "js is a dead technology, don't use it" :D) Ive since believed the thrill of "hacking" is the best intro into programming in that it's like a sort of gamification of logical thinking where you need to beat the game by finding and exploiting the weaknesses. Best of luck and please continue sharing your experiences!
- Darkstryder 6y agoI'm glad Greg Baugues started blogging again. I discovered his blog all the way back in 2013 with one of my favorite articles of his, "Autoworkers of our generation" [1] and I've been reading his blog religiously until he stopped writing circa 2017. Glad to discover he got back to writing recently. [1] https://baugues.com/autoworkers/ https://baugues.com/autoworkers/
- reyqn 6y agoFunny that the code provided in the article doesn't work, but the right (working) code is the one pictured on the header image.
- otikik 6y agoMy 4yo doesn't know how to read yet, introducing him to programming is definitively out of the scope for now. And yet. We have been doing videogames together. (Maybe spent 4 or 5 hours total, distributed in several months. I don't want to overwhelm him or anything). I found that pico-8 is an excellent platform for doing this kind of collaborative thing. I can do the programming (for now) and draw basic sprites (for now). He's the art director, and provides game design ideas. It's fun, although he gets frustrated when I am "writing" too much time. But I think the idea that "games are made out of letters and graphics" is already permeating into him. I would love to teach him the programming part, but I will wait for him to express some interest on it first (after he learns how to read). If he prefers the graphics (or doing something else) that's fine too.
- srtjstjsj 6y agoYou don't need to read before programming Scratch Jr
- xx_alpha_xx 6y agoI just have to say, I would have completely forgotten about 3-2-1 Contact until reading the reference in this article. I "learned" BASIC exactly the same way. Excellent :)
- jeffrallen 6y agoToday I made this with my daughter: https://scratch.mit.edu/projects/433574144 https://scratch.mit.edu/projects/433574144 She was watching closely and asked about important details of it. She saw that "if you don't have what you need, you can make it yourself". Programming isn't everything. Having the confidence to make the world into what you want it to be is. If programming gets you there, fine. If art, poetry, activism, or welding get you there, so much the better!
- tmaly 6y agoI remember taking some classes in basic when I was 7. I teach my daughter programming in Scratch and it much easier. The fact that she can record sounds and draw her on characters are just some of the aspects that make Scratch appealing. Addons like MakeyMakey make it more interactive.