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
you='WOW!!!'
fart='So many poops!'
print(you,fart)
I'm pretty proud :DFunny 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 "professionalize" him. But turns out these variables referred to Titles and Assignments (it was staffing software). LOL!
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.
- Dvorak: aoeu, htns, gcrl, mwvz
- Colemak: arst, neio, qwfp
- Mtgap: inea, htsr, dlcw, fvgj
etc...
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
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 ;-)
https://old.reddit.com/r/cscareerquestions/comments/95dgrx/i...
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.
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.
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 interesting so it gives them a sense of accomplishment. Takes little time and effort but teaches the most valuable skill.
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.
That prompt, or something like it, generated Futter code along with the instructions of how to modify a default flutter app for the code to work.
I haven't ran the code yet, but all the other code samples I asked for worked.
Asking for a ruby Student, Teacher application where the student takes multiple courses and the teacher can assign a grade to each course.
After you get that code, you can clarify in your next question.
I want each course to have progress steps.
More generated ruby code..
Can you add a grade for each progress step, and can the teacher have the ability to unlock the next progress steps.
Generates more code.
Then.
Generate me a react front end for this.
Generates React code.
I didn't install/run the code, but it looked accurate and had comments explaining what the lines of code did.
----
GitHub code works, ChatGPT code works, and does exactly what you want, and you can modify it just by asking.
"Change the progress array to be an object that has a grade, started date, finished date and parent acknowledgement."
That actually works as an example after the bot generated the initial app.
We're in for a world of changes.
It also gives you a human readable section, in addition to the code, that tells you what the code is doing, and where exactly to copy/paste it to make it run.
Give me an app in flutter that does X How do I install flutter How do I run my first flutter app
That only requires typing and reading for exactly the results you want.
Github only gives you what you know already. ChatGPT only gives you what you asked for, and holds your hand for how to use it.
Vs. searching for results on StackOverflow and similar, you'd probably have to combine results on 'how to basic flutter app', 'intro to programming', 'todo list example app [perhaps not in flutter]', and even then it wouldn't be exactly what you wanted if you were looking for specific requirements.
I thought it was the greatest trick ever. Meanwhile my brother was reimplementing every game he saw, including Tetris and some early Mario game.
10 PRINT "FARTS"
20 GOTO 10 while (true) {
cout << "Fuck!";
}10 PRINT “Welcome to Currys the electrical ripoff store”
20 GOTO 10
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.
That is sweet. Congrats.
- 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
messages = [YOU, FART]
print(" ".join(messages)
So that you can add additional messages (manually or programmatically) in the future. Always important to consider extensibility!I’d kind of assume the opposite, since MS is more tangible and easier to visualize.
I never really got into Mindstorms either, I remember I would build a thing, then use the pre-loaded programs to run stuff, but then because I was starting from zero and didn't really have an understanding of what was going on, I wasn't able to really fiddle around very much.
With Python, it's easy to get something from very little- as is seen here from OP.
That said, I did get really into Mindstorms when I went to summer camp that split the days between that in the morning and 3D modeling in the afternoons. Once the time was more structured, the feedback loop of "modify working code on a working robot and see what happens" was very fulfilling.
NO HIRE for me
I think we could bring her on as a junior.
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.
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.
Conveniently, the [turtle module](https://docs.python.org/3/library/turtle.html) 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.
10 PRINT "FARTS"
20 GOTO 10
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.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.
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.
Someone typed something, got an error message, and a few more things.
One of us asked whether what we type "goes into the memory of the computer", wide-eyed fascinated.
Then we proceeded to type juvenile naughty things into this memory of the computer, which is the greatest thing.
I like that the code itself is almost poetic, and is in itself a statement about the problem domain. Knuth would be proud.
As 8 year old, I’m proud that he recognised a problem and solved it.
https://www.dropbox.com/s/ivuxfgyv9ehlvdu/View%20recent%20ph...
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.
Now, with the advent of programming languages supporting full Unicode encoding (e.g. in Swift) since a few years ago, the option of
Emoji as variable names
should not be forgotten...(Unfortunately the HN comment system does not support Unicode and justs deleted them from my neat example)
Kids I have taught, love that they can record and play back the sounds with programming blocks.
Farts and poop talk all the time.
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.
There were plenty of fart and poop functions.
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 ?
> if (ned.isStupid):
and show it to my best friend, Ned, who only knew how to program TI-83 calculators.
10 PRINT "Whatever obscene thing comes to mind"
20 GOTO 10
RUN
That's probably the only code many of them ever learned.
Good fun taking a platformer base and messing with the physics calculations. :)
I've been bragging for a bit about my boy's first proof by induction:
"Hey dada, if seven ate nine, and that means seven ate ten... then there aren't any numbers bigger than eight!"
Nice work.
All code has a smell...