Live data from Hacker News

Tell HN: My child's first program

news.ycombinator.com

71–80 of 139 posts

Re: Tell HN: My child's first program

#72
post #11

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. 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 the…

>they could have a phone if they made an app I think this is a great way to get your kids to have a habit of self-learning. In my opinions, this is the single most important skill a kid can learn. Every time my little cousins ask me something they want to learn, I go with "Let's search for the answer together" and guide them on how to do basic research. Sometimes I ask them follow-up questions if they find the topic…

I think it's a great way to ensure that the only motivation your kids have is external. "What's the point of doing X is no one offered me a phone for it"

When I was a kid, I heard that some friends were getting money from parents as a reward for good grades. I always had good grades so I suggested to my mom that I should get money for good grades. She said "No, because then you'll get used to only work hard when I'm offering you money". At the time my take away was just "no money, got it." But now I think it was actually an insightful observation.

Re: Tell HN: My child's first program

#73

PR review: - Reformat with `black`; needs space around "=" - Change constants to uppercase, so YOU and FART - Probably best to use an f-string, e.g. f"{YOU}{FART}" - Needs tests Otherwise LGTM

You forgot space between } and {

It depends on whether you want the whitespace or not; if so, the ideal would be to use:

    messages = [YOU, FART]
    print(" ".join(messages)
So that you can add additional messages (manually or programmatically) in the future. Always important to consider extensibility!

Re: Tell HN: My child's first program

#75
post #41

Earlier quoted context omitted.

As a kid? When writing stupid scripts, I frequently use `fart` as a variable name to this day. I'm a staunch supporter of naming variables intentionally in software that lives, but I'm definitely not above doing a `fart=True; while fart: ...` in temporary repl work. Maybe I'm just eternally 10 years old, haha.

I must be old-fashioned! My variable names in throwaway programs tend to be x, y, and z and my iteration variables tend to be i, j, and k.

Huh. I tend to use the first letter of the type, so "s" for a string, "d" for a dictionary, etc. Then "s2," "d2," etc. if there are more than one.

Re: Tell HN: My child's first program

#77
post #37

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".

This comment is my spirit animal.

Re: Tell HN: My child's first program

#79
post #36

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?

An AutoIt script that opened the cd tray and popped up a message box with some taunting phrase or another.

Re: Tell HN: My child's first program

#80

I love the variable names. I definitely had the same naming conventions as a kid :) 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. I assumed the guy who checked it in was just immature and met w him to "profess…

As a kid? When writing stupid scripts, I frequently use `fart` as a variable name to this day. I'm a staunch supporter of naming variables intentionally in software that lives, but I'm definitely not above doing a `fart=True; while fart: ...` in temporary repl work. Maybe I'm just eternally 10 years old, haha.

heck, in MY time, variables could only have 2 (significant) letters, so we were stuck with "hi", "jk", "ah" and things like our initials....

The good thing is that since only 2 letters were significant, the variables "fa", "fart", "fan", "fall" etc. were all treated the same, which could cause some confusion to people not familiar with the intricacies of C64 BASIC ;-)

Post reply on HN