Revisiting Why Johnny Can't Code: Have We "Made the Print Too Small"?
theodp writes: In What is Computer Science?, the kickoff video for Facebook's new TechPrep diversity initiative, FB product manager Adriel Frederick explains how he was hooked-on-coding after seeing the magic of a BASIC PRINT statement. His simple BASIC example is a nice contrast to the more complicated JavaScript and Ruby examples that were chosen to illustrate Mark Zuckerberg's what-is-coding video for schoolkids. In How to Teach Your Baby to Read, the authors explain, "It is safe to say that in particular very young children can read, provided that, in the beginning, you make the print very big." So, is introducing coding to schoolkids with modern programming languages instead of something like BASIC (2006) or even (gasp!) spreadsheets (2002) the coding equivalent of "making the print too small" for a child to see and understand?
Kids should be introduced to programming using marble runs and physical switches or conditionals. Get them interested in the toy aspect, introduce rewards for working out how to achieve goals, and gradually introduce virtual modelling of the physical layout as complexity increases - they will gradually move completely to the virtual model, and then you can introduce the next stage of exposing the code when managing click and drag objects becomes a hassle.
Baby steps. Literally.
I have seen a lot of programmers who are totally dependent on the IDE to develop the code. They have no idea how it works or where it runs from once it deploys.
Because all the coding classes are for women only and all the jobs are for Indians only.
I think there's something to be said for learning programming on a very simple machine.
First, you need to keep in mind that kids have absolutely no idea how a computer works, at even the most basic of levels. It's a box with a keyboard and stuff happens on the screen. You need to cement the idea that you have to tell the computer to do stuff, and link the idea of coding to that stuff.
This is much easier to do when you have a computer that does pretty much nothing when you turn it on. A flashing cursor comes up and it's waiting for you to tell it what to do. 10 PRINT "HELLO" RUN and it does something. 20 GOTO 10 RUN and it does something else. You get the link between what you're telling the computer to do and what the computer is actually doing pretty quickly.
Compare that with booting up Windows/MacOSX/Linux, getting into your desktop environment, loading up a browser or IDE, creating a new project, explaining the UI of the IDE, making sure you have the right includes to do IO, directing your output to console or a UI object, etc...
My Other Computer Is A Data General Nova III.
Here in Australia, a TV show called "Good Game SP" (which does gaming news, game reviews and other gaming related stuff aimed at kids) did a series of segments using the Scratch environment to build a game. I thought it was a great way to introduce kids to programming in a simple way (with things like if statements, loops etc) but without (as far as I can tell) teaching any of the bad habits you might get from something like BASIC.
The LEGO Mindstorms robotics kit also seems like a great way to teach the simpler programming concepts without teaching bad habits (coincidentally both LEGO Mindstorms and Scratch came out of the MIT Media Lab)
for decades. I learned it when I was 7, learned basic when I was 9 and was using proper programming languages within 2 years of that.
Give them LOGO and turtle graphics.
It was the best tool for the job in 1967. It's still the best tool for the job today.
The reason is because nobody has tried to build a better one. You don't teach 7 year olds ruby or javascript or python but FFS you don't teach them BASIC either - give them LOGO, and when they mastered that, they will be able to grasp any modern language you throw at them.
And if you want something new and shiny, then design that something FOR CHILDREN. That's why LOGO remains the best for the job - because it was designed specifically for children by a team that included a behavioral child psychologist.
Unicode killed the ASCII-art *
As the parent of a 12 year old girl, I can assure you all, kids today are not having trouble learning to code. They have resources today that I couldn't have dreamed of when I was their age, and they are using them. There are two major problems that I see happening: there are too many languages out there and no one works in text/console mode anymore.
Computers were text based when I was learning basic 3 decades ago. As such, BASIC made a perfectly sensible starting point. Instead, today, a web or mobile app requires knowledge of HTML, JavaScript, CSS, some backend language such as C# or Java, SQL, and probably some other things AI haven't thought of.
Really, if you want to bring back a version of BASIC that was reasonably accessible but could still write something resembling a modern app, bring back Visual BASIC 6.
But like I said, kids today aren't really having much of a problem. My kid and her friends are learning JavaScript and C# and C++ and I have no idea what else. There are lots of resources out there and kids are taking advantage of them.
If you were as clever as the image you try to portray, then you'd realize that if everybody was an engineer, you wouldn't have it so good. So either you do realize this, and you're just chest-thumping (like, ahem, a lesser being), or you don't realize it, and thus you're not so clever after all.
The thing that BASIC got right was simple IO: PRINT and INPUT. The reason "real" languages are usually unfriendly to beginners is the amount of hoops you have to jump through to get that input and output. Back when C was the language of choice for CS classes, I think the mistake was to start with "hello world" in C -- they should have started with BASH scripting and then introduced C in its original natural context -- writing commands to extend the shell. Input and output handling could have come later.
Now, the problem with saying "we should go back to BASIC" is that people's expected I/O channel is not a scrolling text shell window, so PRINT and INPUT are no longer adequate. As they are the only specifically meritorious features of standard BASIC dialects, suddenly, BASIC is valueless. We can fit any language with a dialog "This is equivalent to print." and variable = inputDialog "Enter number of whatever:" and we're just as well off as we would be doing that to BASIC.
Making a "simple" language is hardly even a question of language architecture (although JS's variable scoping rules are a right pain), because most are largely straightforward, if you leave OO models out of it. It's the general purpose nature of modern languages, and thus the reliance on libraries, that makes languages unfriendly to beginners (which also drags OO models back into the equation). Scratch isn't considered good for learners because of its programming model (it's just a standard C-alike, really) but because it has a specific purpose and therefore a very limited set of actions.
Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'
Pascal is still probably the best.
For 4th graders? I don't think so. With Scratch, they can have something up and moving around on the screen the first day. In a week, they can get a shooter working (boys) or an animated dollhouse (girls). With a language like Pascal, they are going to be bogged down in syntax, and there is no native graphical output.
Pascal is a poor choice for older kids as well. It has no OO, and uses ancient BEGIN END syntax. Java or Python are much better choices. They use modern syntax, are object based, are widely used in industry, prepare the kids for college, jobs, etc. Java is also the language used for the AP-CS test.