Last night, I introduced my kid to programming. We'd done some stuff with Mindstorms before, but she never really caught the bug for it. But for some reason, last night when I showed her some simple Python scripting to solve math problems and write to the console, she was enthralled.<p>After guiding her through a few things, she took the laptop off for a while and then came back with her first program, giggling like a maniac<p><pre><code> you='WOW!!!'
fart='So many poops!'
print(you,fart)
</code></pre>
I'm pretty proud :D
My son took a coding class in elementary school (MIT scratch), and he came in one day and told his teacher that his Dad was a "pro programmer" and had helped him. The program was a pigeon farting on a man's head. The teacher asked what Dad had helped with, and he said "he recorded the fart sound".
I love the variable names. I definitely had the same naming conventions as a kid :)<p>Funny story. Sophomore year at college, I worked at a dev shop, and I was the first person to set up version control there (CVS... it was like year 2000.) The next day I reviewed changes that were merged and variables $tit and $ass were all over the place.<p>I assumed the guy who checked it in was just immature and met w him to "professionalize" him. But turns out these variables referred to Titles and Assignments (it was staffing software). LOL!
So. I made a deal with my kids that they could have a phone if they made an app. There's enough youtube tutorials and they're old enough to follow them. I could have helped them more over the summer, but we didn't get it done.<p>Now ChatGPT will generate the flutter code for an app in seconds, as well as guide you with 'show me how to install flutter'. It's crazy that all the code is written for you. I tried one of their timer/todo list ideas and it generated the code, I just need to install flutter and run it today. So a summer long project of learning to code has been reduced to copy-paste instructions from an AI chat bot. Crazy times.
My girl's favourite saying at the moment is "command not found".
That's the thing she reads the most, except on the occasion it does
something. Walking around the house saying it gave way to answering
back to requests with "command not found daddy". What have I
unleashed?
Hilarious! After a few of those, I taught my son how to open the javascript console and "hack" his favorite cookie clicker. He was so excited to show his friends but the school-provided chromebooks are really locked down.<p>I was disappointed, thinking that would be the end of it, but his whole class has been trying to find ways around the blocks and filters ever since. They've found some clever workarounds and a lot of things that sort of look like hacks but are not. It's adorable.
PR review:<p>- Reformat with `black`; needs space around "="<p>- Change constants to uppercase, so YOU and FART<p>- Probably best to use an f-string, e.g. f"{YOU}{FART}"<p>- Needs tests<p>Otherwise LGTM
"One of us! One of us!"<p>Congrats! What a fun and delightful thing. Props to you, and here's to many more enjoyable programs. Thanks for bringing a little humor to my day.
My kid really took to Scratch last year when he was 6. We got a Raspberry Pi 400 and reading the manual he saw a full chapter on Python. Now when I'm working, he'll come by and say "hey! that's Python!"<p>Conveniently, the [turtle module](<a href="https://docs.python.org/3/library/turtle.html" rel="nofollow">https://docs.python.org/3/library/turtle.html</a>) comes built-in and he also got to draw some fun patterns after reading the "Secret Coders" comic book series. It's really fascinating to see him develop his mental models.
I started programming as an autodidact in fourth grade, creating programs on an Amstrad with BASIC language, reading the instruction manual (I didn't speak English). I remember the joy when I had the idea that it was possible to add a variable to itself to increase a number A = A + 1 instead of having to use multiple variables and that testing it worked. I felt like a genius.
I've always said that most kids my age got the programming bug with something like the following:<p><pre><code> 10 PRINT "FARTS"
20 GOTO 10
</code></pre>
And it's as good a start as any other. Probably better since it drives home the idea that the computer follows your orders, even to the point of breaking taboos.<p>There was an intro to computers book from the 80s that was written entirely this way. Its first example Pascal program concatenated the strings FAR, TIN, and G, yielding FARTING. When they wanted to introduce machine language and assembly language, they invented a pretend instruction set and an assembler for it, calling it the Simple, Excellent for You Assembler, or SEXY ASS.
Hedy <a href="https://www.hedycode.com/" rel="nofollow">https://www.hedycode.com/</a> has worked very well with my kids. It starts as an extremely simple language, minimizing friction, provides good examples and exercises, and gradually adds more and more to the language. Finally, it tells you that with just a couple minor changes, you have now learned Python.
Nice.. I taught 2nd graders and up Computational thinking and python programming for 1.5 years during covid and it was fun and rewarding - this is the repo <a href="https://github.com/TheRockStarDBA/CodingForKids" rel="nofollow">https://github.com/TheRockStarDBA/CodingForKids</a>
This is more sophisticated than my first line of code, but maybe reflects some universal underlying truth about how all of humanity is connected.<p>We kids finally got parents to buy a computer. They brought home a TI 99/4A, plugged it into the TV, kids all gathered around, got to the TI Basic prompt, everyone's full attention, but we didn't know what to do.<p>Someone typed something, got an error message, and a few more things.<p>One of us asked whether what we type "goes into the memory of the computer", wide-eyed fascinated.<p>Then we proceeded to type juvenile naughty things into this memory of the computer, which is the greatest thing.
The first program I ever wrote was in AppleSoft BASIC. It would pick a random location on the screen and print MILK in inverse text at that location. And then GOTO 10. Anyone else remember their first program?
Now to suck the joy out of it for her by giving her a code review and a lecture about I18N :)<p>I like that the code itself is almost poetic, and is in itself a statement about the problem domain. Knuth would be proud.
:D, my son tired of changing battery of a computer mouse, added charger circuit and battery of his old toys, ( that’s charging circuit of Bluetooth speaker and that’s old helicopter toy battery )<p>As 8 year old, I’m proud that he recognised a problem and solved it.<p><a href="https://www.dropbox.com/s/ivuxfgyv9ehlvdu/View%20recent%20photos.png?dl=0" rel="nofollow">https://www.dropbox.com/s/ivuxfgyv9ehlvdu/View%20recent%20ph...</a>
Would you mind sharing how old is your child?<p>My son is almost three. I also want to get him into programming.<p>I am utterly sad that my dad wasted his brain doing manual labor as we grew up in a small city in Poland and he never had the resources to even own a computer.<p>He would be a good programmer, as I got it from him. He is really good at finding solutions to repetitive tasks and hates to do the same thing twice.
I well remember the epiphany I felt while learning Logo in elementary school, at the moment I understood what recursion is.<p>While I have never worked as a professional software developer, computers have been a hobby all my life. I don't think the fact that the language I have mostly written code in in recent years is Emacs Lisp is unrelated to the above moment.
For those with even younger kids (they say ages 5-7), you might enjoy checking out Scratch Jr[1]. Building-block style programming with lots of examples for kids to get started on their own! (No affiliation, I just loved what happened when I gave it to my kid)<p>[1]: <a href="https://www.scratchjr.org/" rel="nofollow">https://www.scratchjr.org/</a>
Proud you both can be.<p>Now, with the advent of programming languages supporting full Unicode encoding (e.g. in Swift) since a few years ago, the option of<p><pre><code> Emoji as variable names
</code></pre>
should not be forgotten...<p>(Unfortunately the HN comment system does not support Unicode and justs deleted them from my neat example)
My daughter was really inspired to explore Scratch by finding all the distinct things she could simultaneously name "poop". I believe she got a variable, list, block, sprite, backdrop, costume, sound, and the project itself. Lots of distinct namespaces there. Very educational.
Had my proud dad moment when I gave my (then 6 year old) son a TI-85 during a covid lockdown and he started playing around with generating random waves and learning for/next after a few months of fiddling.
Editing a game written in BASIC on Amstrad CPC, swapping original author name with mine. Reaching level 9000 of happiness watching my name at the screen. Then playing with C and mode 13h to simulate a an explosion of pixels using for loops. Damn i was 10 and i’ll remember forever.
<3<p>Farts and poop talk all the time.<p>There was a post in the past where someone talked about “the function game”. You think of what the function does. The other person gives you “input”, and you give them back “output”, and they try to figure out the internals. Great to play anywhere.<p>There were plenty of fart and poop functions.
My oldest daughter's first real programming project in school was a Mondrian style art generator. I was so proud of her that I wrapped it up as a CGI and put it on the kids web site. Too bad her excitement for her project was exactly 0% my excitement.
That's excellent! Variable assignment, strings, function calls, and two layers of humor!<p>I'm interested as to what age she was when she figured this out? I'd think maybe a 10 year old ? But one steeped in tech from the start maybe younger? 8 ?
I just was showing my daughter some basic Python last night as well and she seemed very interested, but didn’t leave my laptop with her lol so crazy to see this on HN today! Let her have fun! Lol cool to read about today!
My first program was drawing an escher stairs using basic. Computer screens had just two colors these days, dark green (background) and light green (foreground). Things were simple and fun these days.
The thing that got me to learn OO programming (9th grade...probably 1999) was my desire to write a program that contained the line:<p>> if (ned.isStupid):<p>and show it to my best friend, Ned, who only knew how to program TI-83 calculators.
I showed many kids in my school how to program the Commodore 64 on display in the local KMart to display obscenities to shoppers:<p>10 PRINT "Whatever obscene thing comes to mind"<p>20 GOTO 10<p>RUN<p>That's probably the only code many of them ever learned.
I got hooked into programming via Game Maker, and I've heard of similar experiences from a few of my colleagues.<p>Good fun taking a platformer base and messing with the physics calculations. :)
Very cute!<p>I've been bragging for a bit about my boy's first proof by induction:<p>"Hey dada, if seven ate nine, and that means seven ate ten... then there aren't any numbers bigger than eight!"
Accenture will hire her right now! Get after that! I'd be proud too! My first program was merely Hello World and frankly, this is a bit more complex than that.
Adorable. Interesting that mindstorms didn’t take while Python did.<p>I’d kind of assume the opposite, since MS is more tangible and easier to visualize.
That's the moment to memorize for ever. I bet that's one of the scenes you will remember before you die (no offence, just thinking about American Beauty). I would.