News for hackers. Stuff that matters.
Re:How I learned to program by cabaalis on Tuesday December 26, 2017 @03:38PM (#16010867)
> We were exposed to some kind of lego-related programming, uhhh, thing in school, but none of us had any idea how to do anything beyond what was in the instructions. While it was fun, it was no more educational than a video game and had a similar impact.

I wonder how many of these "teach your kid STEM" toys have this result. I learned to program when my mom got me a vtech precomputer 1000 for Christmas when I was a kid. But becoming a "developer" took many years of effort. Hopefully more kids will be set on the path like I was.

Re:How I learned to program by jaequery on Tuesday December 26, 2017 @04:24PM (#16011134)
I've always felt that the "Scratch" programming that the kids are doing these days may actually get them turned off on programming. While easier to get the kids started, I think the kids quickly start to feel just how mundane and boring programming is when they are just dragging and dropping pre-set elements on their screen all day. The ones that are meant to program would flourish under a computer with just a black and white Terminal app on their disposal. But give them Scratch and I think they will be thinking of other careers.
Re:How I learned to program by mtpn on Tuesday December 26, 2017 @05:12PM (#16011372)
> The ones that are meant to program would flourish under a computer with just a black and white Terminal app on their disposal.

I don't know about "meant to". I avoided writing anything but plain HTML and CSS for years because I thought I wasn't a programming type person (wasn't smart in the right way, didn't like math, hit brick walls with basic as a teenager, etc). The terminal did nothing for me and still isn't my favorite place to be, but I do really like writing little web apps that solve problems and work. Programming, like most things, is available to anybody who wants to do the work to understand it and can put in the hours to get competent.

I see the risk in Scratch turning some kids off and would never suggest just providing anybody with one option for how to learn a skill. But I don't know about this "meant to program" idea. I'm more in favor of fostering the curiosity that can fuel real learning by any means that work.

Re:How I learned to program by trgn on Tuesday December 26, 2017 @08:40PM (#16012225)
HTML/CSS is the right kind of programming to introduce to kids. It teaches a lot of the cognitive skills that you need as a programmer (attention to detail, what you see is _not_ what you get, ability to abstract a problem); that combo teaches a lot of programming concepts (encapsulation, separation of concerns); and it is,last but not least, REAL and eminently useful. A lot of that lego-scratch-type-programming is completely useless once you take it out of that sandbox. HTML/CSS will be there at the heat death of the universe.

HTML/CSS does not teach things like algorithms and data-structures, but it doesn't need to. It's complex enough that kids with an affinity for programming will find it stimulating, but not so complex that dumbo Timmy over there can't do at least something productive with it. And it straddles that line between nerdy-programming and design, so you can engage the creative kids as well.

Family member's been teaching HTML/CSS to 14-15 year olds, with good results. Like all class topics, the engagement-distribution is a bell curve. 10% is lost like a puppy at sea, 80% is following along with varying degrees of success, and 10% are absolutely doing amazing things and taking it way beyond the class contents.

One difference with the other type of kids-programming isn't that some robot scoots around the gym, but that at the end these kids are making goofy 90's websites, with bonker color-schemes and bouncing images. Parents and administration love the former. The latter only really clicks for parents with some familiarity in the domain.

Re:How I learned to program by evanmoran on Wednesday December 27, 2017 @12:13PM (#16016154)
I think this great advice for teaching, but I'd stress that Javascript should be included as well.

HTML and CSS are great for learning because everything they change will adjust the webpage instantly. This is the web's biggest teaching advantage: insanely fast iteration time. To folks learning this speed feels like a super power. (And when they try iOS/Android programming, they will miss it)

Where Javascript comes in, is it helps tie that fast iteration into a place where variables and functions can exist. Functions are especially hard to grasp, so starting those pretty early matters a lot. Simply put: if you don't understand functions, then all the HTML/CSS in the world won't save you!

Re:How I learned to program by geezerjay on Wednesday December 27, 2017 @03:28AM (#16013609)
> HTML/CSS is the right kind of programming to introduce to kids. It teaches a lot of the cognitive skills that you need as a programmer (attention to detail, what you see is _not_ what you get, ability to abstract a problem);

I strognly disagree. Playing around with markup languages only trains a person to expect a computer to map a particular input to an output. That's far from programming, let alone real-world programming practice. Writing software is much more than getting a computer to output something in a one-shot process. Making these sort of claims does a diservice to anyone interested in programming because it paints a rosy picture of how programming is trivial and free from any intellectual challenge, which goes directly down the crapper once the first crash or bug needs to be solved.

Re:How I learned to program by csallen on Wednesday December 27, 2017 @03:49AM (#16013677)
The parent comment said HTML/CSS the right kind of programming to introduce to kids. Your disagreement is based around it not being the final end-all be-all representation of the complete set of features and challenges of programming. You're optimizing for accuracy and completeness, whereas the parent was optimizing for appeal and ease-of-learning.

As someone who's spent many months teaching people to code from scratch, it seems to me you're ignoring just how tough it can be for people (especially kids) to learn challenging new information. Most will quit when they hit a wall.

In my opinion, baby steps are much wiser when the goal is to teach.

Re:How I learned to program by trgn on Wednesday December 27, 2017 @08:55AM (#16014738)
I agree, they're not a full programming language, they lack the aspects you describe. But they are a simple introduction to programming, work on a lot of levels, and can engage a broad range of students.

I would disagree with one thing. Writing HTML/CSS most certainly is an intellectual challenge, especially for beginners, and does engage parts of the programmer's brain.

Re:How I learned to program by henrik_w on Wednesday December 27, 2017 @04:31AM (#16013796)
This fall, I helped teach programming to my son's grade 8 class. They had done Scratch before, and wanted to learn "real" programming, so we taught them a subset of Python. It turned out really well. With basically just for-loops and if-statements they were able to write quite a bit. I liked that the concepts they learn were the actual fundamentals I use every day at work when I program in Python.

I wrote it up here: https://henrikwarne.com/2017/12/17/programming-for-grade-8/

Re:How I learned to program by jaequery on Wednesday December 27, 2017 @02:48PM (#16017468)
that is remarkable! this is the type of teachers i wish i had growing up!
Re:How I learned to program by kbsletten on Tuesday December 26, 2017 @08:03PM (#16012087)
Yeah, this "meant to" attitude seems a little be self-aggrandizing. I feel like that's a very convenient way to say, "programmers only club, no _others_ allowed." My favorite thing has been teaching scratch in middle school and realizing how non-obvious programming aptitude is. Some real "nerd"-types don't have any actual skill and others who are little socialites or behavior problems take to it with ease. Makes you realize how not special us programmers are.
Re:How I learned to program by c-smile on Tuesday December 26, 2017 @04:20PM (#16011118)
Sometimes you just need one joke from elders, here is my story:

https://www.quora.com/Are-there-any-lies-that-your-parents-t...

Re:How I learned to program by megaman22 on Tuesday December 26, 2017 @06:03PM (#16011619)
I still think QBasic is one of the better ways to get people interested in programming. It starts off very simple, but you can really go a long ways with it. Plus it's got some pretty powerful, yet easy to access graphics and music capabilities built right into it. My first programming class in high school, we went from Hello World to creating an animated Christmas card, with MIDI Christmas carols accompanying it, in the first semester.

QBasic might not have been the greatest language, but it had a pretty sweet IDE, fantastic live documentation, and was really just fun to play with. I feel like there ought to be a packaged up Python distribution with the same kind of attributes, but I've never really seen anything that really aced that spot the same way.

Re:How I learned to program by Waterluvian on Tuesday December 26, 2017 @03:59PM (#16010984)
Same! I had a logic gates robot game for my apple II, Lego mindstorms, and FIRST robotics through high school. Which really helped because I didn't come close to the grades needed to get into CS or engineering.

I didn't Hello World until my 20s, and it took years to really grok the programming world, but I think my lifelong exposure to logic and programming of sorts made all those concepts accessible outside of a classroom environment. Ie. I could understand what a python snippet was doing because I knew what a loop and conditional was.

Re:How I learned to program by anonemouse145 on Tuesday December 26, 2017 @05:02PM (#16011328)
This. A logic class could do the same thing if you could get a good, modern logic class. Internalizing for loops, if-else, while, boolean, etc is a universal benefit that would help anyone break into programming.

Sadly, I've taken some really bad logic classes. Usually this is because they use terrible toy languages that are artificially difficult to work with. They should just do those classes in Javascript or python or something, after they cover the old Aristotelian logic bit. (Socrates is a man, all men are mortal...)

You could rig up a test suite to brute force truth tables and verify when you create correct logical statements. It would be a blast.

Instead you spend all year having to derive known logical theorems from scratch. Because reasons?

Example:!(x and y) == (!x or !y). I had a class where in the toy language it took a whole hour to derive that theorem. Instead, how about we have to draw out a truth table or actually use that statement? You can do that in half the time and get more from it. I've had to use that in programming all the time. You can flip if!(!x.isEmpty and !y.isEmpty) into if(y.isEmpty or x.isEmpty)... If I typed that right. Comes up all the time refactoring or simplifying logic.

Re:How I learned to program by philippejara on Tuesday December 26, 2017 @06:54PM (#16011826)
A logic class teaches logic, worrying whether people get interested in programming because of it is at best irrelevant and at worst detrimental to the subject(such as allowing the students to brute force it all, missing the point completely). That's like expecting the calculus class to foster programing interests because they use matlab.

Maybe i'm missing something, but what does for-loops have to do with logic in a way that it might be part of the class?

Re:How I learned to program by abecedarius on Tuesday December 26, 2017 @07:26PM (#16011947)
As Leibniz put it, it's a goal of logic to be able to say "well, let's calculate" when you have a dispute. Truth tables are about the simplest way to calculate logic, but they don't scale. I think a good intro course could be made starting there and working up to fancier methods, explaining logic and computing together. My article https://codewords.recurse.com/issues/four/the-language-of-ch... aimed in that general direction, though it's for people who can already program, because I wasn't ready to tackle anything more ambitious.
Re:How I learned to program by philippejara on Tuesday December 26, 2017 @07:59PM (#16012074)
My problem isn't with the idea of using truth tables to solve problems or using languages to assist in the class, but with the bizarre expectation that logic classes that make you to actually use the subject matter and prove stuff in a -supposedly- scalable way are somehow not modern(whatever that means) and the "right" way to teach such logic classes is teaching the basics of control flow.

You can go in a direction of explaining logic and computing together, and by what I skimmed from your article it does seems to be a cool way to tackle the problem, but that's not what someone who takes a logic class should expect from it, they should expect it from the "topics of logic in computing or something like that" class.

Re:How I learned to program by Waterluvian on Tuesday December 26, 2017 @10:11PM (#16012561)
My two cents is that teaching logic, without bogging down in mathematics is teaching how to practically use chisels, saws, sandpaper. It gives you the tools for woodworking, but it alone does not instill the love for woodworking.

You absolutely need something more. Maybe the teaching of logic as a means to solving a larger problem, whose result is beautiful, exciting, engaging. This is why I love robotics for children. How do we make a hand-built toy robot do the things we want it to do using logic?

Re:How I learned to program by aorloff on Wednesday December 27, 2017 @12:03AM (#16012955)
If you are teaching youngsters, you probably don't want anything more. Show them how to use the tools, and present the higher order concepts as how others have used them. But for young adults and adults, yes we need a map of the bigger picture.
Re:How I learned to program by abecedarius on Tuesday December 26, 2017 @10:48PM (#16012693)
See http://www.cs.toronto.edu/~hehner/aPToP/ for a textbook treating programming and proving in an integrated way with a unified formalism. I think generally how subjects get divided up into courses is too fossilized, especially pre-college, so I might have too little respect for the conventional meaning of a "logic class".
Re:How I learned to program by barbersturgeon on Tuesday December 26, 2017 @06:34PM (#16011741)
Sounds like prolog or minikanren would suit this - built in search is great as long as you don't accidentally make it exponential tine complexity
Re:How I learned to program by Jemmeh on Tuesday December 26, 2017 @03:47PM (#16010919)
Eh, I get that it is limited in a "Okay but how do I step out of this toy environment and actually do stuff" kind of way, but I think it teaches people how to use their logical thinking without overloading them with information. I think that almost gets taken for granted, but I did an escape room recently and it really showed me just how bad most people are at just generally putting two and two together and solving problems.
Re:How I learned to program by lomnakkus on Tuesday December 26, 2017 @06:01PM (#16011610)
> vtech precomputer 1000

I had no idea that was even a thing, even though I'm definitely of your generation, though probably not in the same general area, situation, etc.

You should have had an Amiga, C64, or C128 or... I'm happy that you made it, though!

Re:How I learned to program by mlinksva on Tuesday December 26, 2017 @04:57PM (#16011302)
I misread "lego" as "logo" when reading the post, because that was my experience. Before having a computer at home took an extracurricular BASIC class which in hindsight I learned almost nothing from but it whet my appetite. The intermediate class had us draw stuff with Logo, which I felt was stupid, and turned me off of programming for awhile. Probably my fault, now Logo looks like an interesting language.
Re:How I learned to program by coupdejarnac on Tuesday December 26, 2017 @06:52PM (#16011815)
I just finished creating a LOGO class, and I feel it's best for elementary school aged children. If you took LOGO over the age of say 12, it probably seemed childish and useless. But for younger kids, I think they can get interested in computing with LOGO.

You can do some cool stuff with LOGO like create state machines, implement sorting algorithms, and create simple games.

Re:How I learned to program by jacobolus on Tuesday December 26, 2017 @10:54PM (#16012711)
Logo is a great tool to use to learn visually about basic shapes and their properties (circles, polygons, conic sections, spirals, various sorts of roulettes, ...), logic, graphs of data and functions, fractals, cellular automata, synthetic geometry including projective geometry, transformation geometry and symmetry, basic number theory, complex arithmetic, polar coordinates, trigonometry, the logarithm/exponential functions, matrix algebra, linear regression and other statistical tools (Kalman filters!), optimization, basic probability, dynamical systems, lattices, group theory, graph theory, vector calculus, mechanics, optics, electric circuits, special relativity, 3d vector graphics, searching and sorting, trees, mazes, robot planning, game AI, ....

Or really anything you want, though after several years of experience students might find other tools more convenient for some types of modeling.

Re:How I learned to program by flavio81 on Tuesday December 26, 2017 @10:44PM (#16012679)
>If you took LOGO over the age of say 12, it probably seemed childish and useless.

Yes. However, at a fundamental level, LOGO is actually an advanced programming language.

Re:How I learned to program by tomsmeding on Tuesday December 26, 2017 @06:55PM (#16011828)
My first programming exposure was with Logo, and it caught on... Still programming with fervor now at university.