Zuckerberg Shows Kindergartners Ruby Instead of JavaScript
theodp writes "If one was introducing coding to 10 million K-12 kids over 5 days, one might settle on a programming language for examples more than a few weeks before D-Day. But the final tutorials for the Hour of Code aren't due now until the day they're to be taught, so Code.org was able to switch the example Facebook CEO Mark Zuckerberg uses to illustrate Repeat Loops from JavaScript to what looks like Ruby (earlier /. discussion of the JavaScript example), which will no doubt make things clearer for the kindergarten set working on the accompanying Angry Birds tutorial. Khan Academy, on the other hand, is sticking with JavaScript for its Hour of Code tutorial aimed at middle-schoolers, which culminates in a project showing the kids how they can draw a circular plate by invoking an ellipse function with equal major and minor axes. By the way, as Bret Victor might point out, the 2013 Khan Academy lesson looks a lot like circa-1973 PLATO!"
If one was writing a summary, one might settle on a summary that explained the point it was trying to make rather than providing a set of disconnected statements...
Ruby finds it's niche. IIRC Twitter switched anything that mattered from ruby to scalar / JVM the very moment their platform became more than a toy.
He'd probably be better off showing them javascript, no need to install 3rd party software. Kids already have access to all runtime libraries and development tools with a web browser and a text editor. Really makes no sense to show them ruby.
Is it just me that thinks that, when aiming at kids, BASIC still probably is the easiest language to understand (if not the most rigorous)?
The first example is just HORRENDOUS anyway - boilerplater and ternary crap getting in the way. The second is simplified using specific language facilities and objects.
So what would have been wrong with a BASIC-like:
FOR EACH USER IN USERS
SENDMESSAGE(USER, "Happy Birthday")
NEXT USER
As I get older, I believe more and more than the creators of BASIC knew what they were doing, and make something kids and beginners could understand quickly even if it wasn't perfect.
Kids today are lazy. Back in my day, knowing assembly language was a pre-kindergarten requirement.
He says it's all C or nothing. C++ if you're weak but want to look cool. I can't believe how hard core he is. I had no idea 5 year olds could form such hard ideals about programming. He says at school, all the kids who use Java are picked on. Some of the teachers tried to front Ruby, but they just got all up in her grill.
Kids will be choosing to work at a McD's or writing JavaScript code. This is all tech industry's goal of making programming and development a skilled trade - much lower paying trade.
So this is kind of like letting them play with elemental mercury instead of chewing on chips of lead paint.
I hope to god this post is some kind of bizarre troll attempt.
Mod me down, my New Earth Global Warmingist friends!
Ok, so technically learning to program doesn't have the same set of requirements as production programming. Back in the day you were likely to get BASIC and then moved on to Pascal, C, Fortran or (god help you) COBOL. Once you realize that all languages have essentially the same structures, you start to say things like "languages are just syntax. Learn to program in one language and you can pick up any other language very easily." This is not actually completely true, but I'll get to that in a moment. They also didn't tell you much about the environment beyond giving you the "vi cheat sheet" and instructions on how to invoke the compiler. Near as I can tell they don't do a much better job of it today.
Rolling objects into the mix really doesn't change that much. You still need to know structural programming because you're going to need to write your methods and you don't want to write them as spaghetti. You have a whole other set of concepts to master for OOP. You can show people objects, but until they're ready for them, they're not going to understand them. I don't know how many people remember learning to program, but when you're looking at it for the first time, even basic language structure like function parameters (and functions) and variable initialization are confusing.
So yeah, Ruby and Javascript might make OK learning languages, inconsistencies and all. Of all the ones I looked at when I was a wee programmer (And I looked at them ALL,) Logo and Pascal seemed like the most sensible. We did Pascal in my high school (in the '80's) in a programming environment on Apple II machines. They environment was mildly quirky, but didn't take long to pick up. That let us concentrate on the language. Logo offered the most immediate feedback about how your changes affected the behavior of the program. At least for me, immediate feedback was very helpful to the learning process. You can definitely get that with the interpreted languages. The same things that make them reasonable languages to learn programming also make them not-so-great for production projects, at least not without a lot of unit testing that no one ever bothers to write.
Of course, the more you work with different computer languages, the more you start to realize that the statement that "all languages are the same" is not really true. You discover things like the ones mentioned in the presentation I linked to at the beginning of this post, and find yourself having to work around deficiencies in the language. At a basic level all languages are the same and once you learn the control structures you can write simple code in any language very quickly. To actually learn the quirks of a specific language and truly master it, that could take years. I'd go so far as to say that most programmers will go their entire career never having truly mastered a single language. What they give you in school are the tools to achieve that mastery, and I don't feel that anyone even does a good job of doing that.
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?