Live data from Hacker News

Tell HN: My child's first program

news.ycombinator.com

81–90 of 139 posts

Re: Tell HN: My child's first program

#81

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.

Are you serious?! That is so hilarious to me, because I do the same thing! And I am always so terrified that I will get an interview, and they will want to see a sample of my code, and I will have forgotten to take out all the bits of juvenile humor that are scattered through the code of my personal projects!

Re: Tell HN: My child's first program

#82

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 my dad told me that I could name my variables whatever I wanted. I still remember the confusion on his face when he saw “int iPod” and “string xbox” all over my code.

Re: Tell HN: My child's first program

#83
post #66

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…

"I got fired over a variable name...." - https://old.reddit.com/r/cscareerquestions/comments/dpcfns/i...

The linked "dog story" is an.. eye opener, too:

https://old.reddit.com/r/cscareerquestions/comments/95dgrx/i...

Re: Tell HN: My child's first program

#84

Earlier quoted context omitted.

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

Now re-contextualize that as if it were an employer/employee relationship. That's actually a pretty messed up lesson to teach a kid about negotiation and self worth.

Re: Tell HN: My child's first program

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

Can we get a link to this scratch, please.

Re: Tell HN: My child's first program

#86
post #41

Earlier quoted context omitted.

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.

Everyone doesn't use i,j,k for counting variables?

Yes. At least all decent people.

Re: Tell HN: My child's first program

#87
Would you mind sharing how old is your child?

My son is almost three. I also want to get him into programming.

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.

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.

Re: Tell HN: My child's first program

#88
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.

Re: Tell HN: My child's first program

#89

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.

I actually try to not do that now. As they say, programming is the art of naming and I think forcing myself to think about what a variable is (and then using that name) leads to better outcomes.

Agree for throwaway work it may not matter but I try to keep myself disciplined anyway. A good example is say I am doing an advent of code and the temptation is to treat it as throw away code. But the reality is, sometimes I put it down and come back to it, and having variables like fart doesn't really help snap back into the context.

Not saying this is an absolute but I find it a general rule of thumb for myself

Re: Tell HN: My child's first program

#90
post #66

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…

"I got fired over a variable name...." - https://old.reddit.com/r/cscareerquestions/comments/dpcfns/i...

Surprisingly I did get pulled into a meeting with the CEO and a sales/custcare guy because of a similar issue.

I wrote functions that are available for the users to use (they can customize their own dashboard). Our function conventions are camelCase. The function I wrote was something along the lines of `cumOnMetric` or something like that.

Needless to say some square somewhere thought this was a joke and didn't like it. So there I was, just blinking away and wasn't even aware this was something sensitive. It was funny sure, but I didn't have the idea that it was "unprofessional". I still feel the idea of professionalism is quite a club thing.

But yeah we got our first snake_case function name because of that.

Post reply on HN