News for hackers. Stuff that matters.
Re:Teaching how to code is broken by lawl on Friday January 14, 2022 @02:18PM (#29938998)
I always thought the best way to learn programming is to find a program you want to create, and then figure out how to make that happen.

This is still how i learn (most effectively) today. If i want to learn a new language or something, i write something that i always wanted to write in it anyways. That way it doesn't get boring.

I think what you're describing might be similar in that canned-data is not interesting.

Re:Teaching how to code is broken by Cupertino95014 on Friday January 14, 2022 @07:03PM (#29942171)
This is true. You do have to watch for the "adult piano beginner" syndrome, though.

I'll explain: many piano teachers won't take adult beginners, purely because they have unrealistic ideas of how good they're going to be. They want to play a Chopin Etude or the Goldberg Variations or a Brahms Intermezzo, and don't want to spend time struggling with Clementi.

Well, sorry. You won't be that good for a long, long time, if ever. It could be that some beginning programmers also have wild ideas of doing a game as good as GTA, all by themselves.

Re:Teaching how to code is broken by jimz on Saturday January 15, 2022 @01:58AM (#29944301)
I find the comparison really odd as someone in the opposite position - I had formal classical piano training from 8 years old until I gave it up during college, and later learned how to code entirely through copying other people's code and Stackoverflow in my mid 20s. Piano to me feels much more like a sport, in that there's a very visceral, physical aspect to playing, and in turn a ton of effort goes into optimizing everything from where your fingers should be placed to how hard or soft one is striking a key. Practicing is effectively comparable to training for some sort of non-team sport much more than anything else. I don't have perfect pitch, but learning how to read music is a very small part of the whole experience, and I would think that as an adult someone learning piano will find the physical aspect, particularly the finer motor elements, to be the primary hinderance to being really great. Writing code is entirely different in that it feels much more like learning a subject matter, and there's neither something akin to the apotheosis of the particular thing you're working on that you aim to emulate, nor hard boundaries as to determine your proficiency through performance. It's cool if your code doesn't work when you test it, you can fix that. It just feels like apples and oranges in the experience.

If you're picking up basketball at age 30, I hope you know that you're never going to be anywhere nearly as good as Curry, or Lebron. But you can definitely pick up a subject matter and become an expert later in life. Heinrich Schliemann essentially began his archeological career at age 36 and yes, basically excavated Troy in the worst way possible, but managed to actually excavate Troy. That's the difference between an adult piano learner and an adult code learner, I think.

Re:Teaching how to code is broken by Cupertino95014 on Saturday January 15, 2022 @12:37PM (#29948372)
> If you're picking up basketball at age 30, I hope you know that you're never going to be anywhere nearly as good as Curry, or Lebron

Well, I hope so, too. However, in basketball, the really good players aren't even going to let you play with them, so you're forced to play with people your own level. In music, you're constantly hearing 8-year-olds who are better than you will ever be.

I believe it's the motor skills, and the plasticity of the brain. Personally, I memorize pieces with no effort at all, but sight reading is a bitch for me and always will be.

Re:Teaching how to code is broken by oriolid on Saturday January 15, 2022 @01:01PM (#29948630)
In music there's also the stubborn belief that anyone who's older than 8 is too old to learn, and the idea that the goal of music lessons is to train professional musicians and anyone over 8 is not going to be ready at college age and has to pick a different job anyway.
Re:Teaching how to code is broken by Cupertino95014 on Saturday January 15, 2022 @01:06PM (#29948665)
No, I don't think there is. In my area (heavily Chinese), parents seem to believe, fervently, that children should learn an instrument. Especially girls.

Lots of parents think it's important for their kids to learn music, actually, with no thought that they'll become professionals. In fact, most of them would be horrified if that happened.

Re:Teaching how to code is broken by oriolid on Saturday January 15, 2022 @04:35PM (#29950534)
From my perspective that's some kind of weird Chinese thing. For a different view, you could for example look at the discussion at https://music.stackexchange.com/questions/120433/why-don-t-p.... It's a long thread, but search for "professional" and you'll find the same by multiple posters. There's also an interesting conflict of interest between students, their parents and music schools.
Re:Teaching how to code is broken by Cupertino95014 on Saturday January 15, 2022 @08:24PM (#29952361)
My teacher had 12 adults and 28 kids. We had our recitals separately. The adults were maybe 9 white & 3 Chinese.

But one time I saw the student list for the kids. Every single one was Chinese.

Re:Teaching how to code is broken by Cupertino95014 on Saturday January 15, 2022 @10:32PM (#29953006)
Just got around to looking at that Stack Exchange thread, and I'm reminded why I dislike that site so much:

It's full of PLPs (Pedantic Little People, or you can substitute a different P-word for "people"). And why is it full of PLPs? They get little brownie points for answering, and when you get to certain levels, then you're allowed to do even more! So they compete with each other and downvote your answer for, well, pedantic reasons.

I suppose this site has some of that, but it's not nearly as obnoxious.

Anyhow: I finally found a teacher who played standards, and actually studied with George Shearing! But they're few & far between.

Re:Teaching how to code is broken by oriolid on Sunday January 16, 2022 @04:34AM (#29954579)
Yes, music.stackexchange is pretty bad. Did you find any of the parts where someone writes that the classical teaching style is for training professional musicians or at least developed in the time when it was?
Re:Teaching how to code is broken by Cupertino95014 on Sunday January 16, 2022 @11:28AM (#29957315)
Regrettably, my visceral reaction to that site kept me from reading very far.

But yeah, conservatories are definitely that. "You, too, can get an expensive education and then struggle to compete with 200 other kids just like you for the the very few paying gigs in classical music!"

Re:Teaching how to code is broken by oriolid on Saturday January 15, 2022 @03:13AM (#29944730)
Have you tried formal computer science training? Learning programming through copying from StackOverflow sounds to me like about as good idea as learning piano by watching Synthesia videos on Youtube.
Re:Teaching how to code is broken by Cupertino95014 on Saturday January 15, 2022 @12:33PM (#29948342)
... and yet that's how people do it these days. I hate that, personally.
Re:Teaching how to code is broken by wruza on Saturday January 15, 2022 @07:19AM (#29945819)
That's how I stop myself every time a desire to buy a guitar shows up. I'd like to play some solos from Ten Years After, Iron Maiden, or Dire Straits, but then I realize that this will take forever to learn, and my middle age issues wouldn't help with that either.
Re:Teaching how to code is broken by chmod600 on Friday January 14, 2022 @04:34PM (#29940738)
But you need some concept of what kinds of problems are solvable with a computer before you could really be inspired to program one.

And more than that, you need to have a concept of the difficulty of a given problem for a beginner or expert. Obviously a beginner will be wildly off, but probably needs some concept of the level of difficulty.

For example, lots of people have motivation to write a game. But few have the level of obsession to follow through with it. Maybe they should do a basic iPhone convenience app or something first instead.

Re:Teaching how to code is broken by WalterBright on Friday January 14, 2022 @06:20PM (#29941867)
> you need to have a concept of the difficulty of a given problem for a beginner or expert

I thought writing a C++ compiler would be just some new keywords and member functions, and would take 3 months.

10 years later...

Re:Teaching how to code is broken by Bjartr on Friday January 14, 2022 @07:03PM (#29942175)
> But few have the level of obsession to follow through with it.

If the goal is to release a complete product, then you're right that that's a problem. However, if the goal is learning, half a game is a great way to learn about a variety of systems and how to program for them!

Re:Teaching how to code is broken by paulryanrogers on Friday January 14, 2022 @05:27PM (#29941369)
It's a matter of scope and expectations. Leave your epic space opera in your dreams and take baby steps using easier tools and concepts. Once you find some fun try product-izing it.
Re:Teaching how to code is broken by muzani on Friday January 14, 2022 @10:38PM (#29943313)
I used to teach from the "program you want to create" angle, because that's how I learned programming. (JS/MEAN bootcamp)

The problem was that about 95% of my students didn't have a program they wanted to create. Some just wanted a hobby. Some wanted a better job. Some wanted to do a startup and manage a team, but they didn't really know what kind of startup to do. One guy joined because he made discord bots and thought node.js was cool, but learning loops started to get boring for him.

Re:Teaching how to code is broken by erwincoumans on Friday January 14, 2022 @02:30PM (#29939156)
Yes, learning is much easier if you have motivation. How do you motivate kids, if they rather play games rather than coding (and they even ignore in-game scripted coding such ad Minecraft or Roblox coding)?
Re:Teaching how to code is broken by majormajor on Friday January 14, 2022 @06:55PM (#29942107)
Heck, I'm employed to write code and I'd still rather play games. Just I get paid for the code, and not for playing the games.

But you will do better teaching-wise if you do find something that has intrinsic motivation, not turning it into a chore.

It just might not be the right time! They've basically got until they are 18-20ish to decide to get into it. The programming books my parents gave me after 8th grade never interested me. The 11th grade programming class didn't either. The junior year of college tangentially-related course where I was like "oh I could write a program to help with this homework!" That did the trick for me.

So just keep trying, see if you can find programming-related aspects of other hobbies. And just try to focus on them learning things around those hobbies or obsessions, even if it doesn't seem to have a practical application. Get in the habit of going deep on subjects and practicing learning.

Re:Teaching how to code is broken by xmprt on Friday January 14, 2022 @04:26PM (#29940670)
Try a game like Factorio or Satisfactory. Even just Minecraft can be good enough to train their problem solving and critical thinking skills.

They don't need to start with redstone to learn to code. They should play the game and naturally realize that redstone is a way to solve their problem (like making an automatic sliding 2x2 door) and then solve it.

I feel like those skills will take you much further in life because now you have an extra tool to solve problem no matter what field you end up going into. And since programming is so powerful, it's often one of the best tools for the job so kids will naturally pick it up.

Re:Teaching how to code is broken by tialaramex on Friday January 14, 2022 @08:57PM (#29942863)
The trouble I had in Factorio is that it's deliberately not giving you very powerful tools in order to be a better game. The authors do not want you to skip their fun game by solving a tricky optimisation problem yourself instead.
Re:Teaching how to code is broken by MonaroVXR on Friday January 14, 2022 @06:48PM (#29942067)
Not sure if Factorio would work, because I played it and it didn't work for me.

But.... I can finally program.

Re:Teaching how to code is broken by meristohm on Friday January 14, 2022 @06:08PM (#29941771)
My feeling, from ~eight years as a mostly-highschool math and science teacher plus parenting as my main work these last few years, is that this motivation to learn is best established very early on, hence my support for universal birth-to-three support (I’m in the USA) in the interest of minimizing adverse childhood experiences (ACEs/trauma) and teaching parents how to cultivate a growth mindset. Intrinsic motivation is powerful. I was not a beneficiary of such care, and have done a lot of re-learning, especially around what I’m feeling, and being okay with not doing “perfect”.
Re:Teaching how to code is broken by protomyth on Friday January 14, 2022 @08:48PM (#29942805)
One of the other places birth-to-three programs pay for themselves is to catch physical (e.g. hearing) problems early. That allow for correction and minimizes the affects in learning, reducing cost in later schooling.
Re:Teaching how to code is broken by wobbly_bush on Friday January 14, 2022 @03:18PM (#29939819)
> How do you motivate kids, if they rather play games rather than coding (and they even ignore in-game scripted coding such ad Minecraft or Roblox coding)?

Do such kids need to start with regular programming languages? Wouldn't visual languages be a simpler starting point for them to get motivated?

Re:Teaching how to code is broken by __mharrison__ on Saturday January 15, 2022 @01:46AM (#29944232)
I have pretty strong opinions on the "best way" to learn as well. My posts discusses the pros/cons of do it yourself projects.

https://www.metasnake.com/blog/learn-python-2021.html