Why Johnny can't code
salon.com
salon.com
Why Johnny can't repair a carburetor.
Why Johnny can't stack his vinyl records properly.
Why Johnny can't ride a horse.
Why Johnny can't prepare a basic white sauce.
Why Johnny can't find the outhouse.
</JustKidding>I've been around long enough to understand OP's argument and sympathize with him. I've also been around long enough to appreciate that there has never been a better time to learn programming.
Why? Two words: "View Source".
I've been through many modes of programming (all the way back to punch cards and once a day compiling) and I am nostalgic for none of it. I can't imagine going back.
Today, anyone can learn HTML, CSS, and Javascript. Resources are everywhere. Results are instant. And best of all, examples are everywhere. How many times have you been to a webpage and wondered, "How'd they do that?" "View Source" is often your window into so many other worlds. It's hard to believe that there was a time when you couldn't do this.
Like OP, I get nostalgic, too. I miss a lot of things about the good old days, like Willie Stargell hitting 500 foot home runs without steroids, 35 cent Stroh's drafts, and hot Big Macs. But not old technology, even BASIC.
OP, turn your kid on to the "basics" of web programming and let him find his way with his generation's technology, not yours. You'll think he's missing something because his experience won't be your experience. You'll be partially right, but don't forget about all the stuff he'll be able to do that we couldn't.
ar _IG_MD = _IG_MD_Generate({ct:0,t:[{i:0,n:"Home"},{i:1,n:"arxiv.org"}],dt:[0,1],m:[{i:2,mt:25,u:"http://www.quotationspage.com/data/qotd.rss",ti:"Quotes of the Day",sn:"A3",t:0,dd:["ed","del","ming","shg","rg","ag"]},{i:139,mt:25,u:"http://lwn.net/headlines/newrss",ti:"LWN.net",sn:"Ne",t:0,dd:["ed","del","ming","shg","rg","ag"]},{i:137,mt:25,u:"http://blog.jgc.org/feeds/posts/default",ti:"",sn:"",t:0,dd:["ed", [...Lots more snipped...]
This will help Johnny learn to code how?"View Source" doesn't help on every web page.
But it does expose more examples of code than ever before. That's all.
Also, the example given above is an excellent example of the fact that Javascript has become the assembly of the web and that there are a large number of tools that are going to spit out code like that.
This isn't an issue of generations at all; it's an issue of accessibility. Doing the same educational tasks in a Web development environment that you would also do on a household microcomputer like the Commodore 64 is comparatively much more difficult. On the Web, you're learning HTML, Javascript, and potentially something like PHP. That's two or three different languages just to get out the door! On the other hand, on the C=64, you're learning only Microsoft BASIC. The barrier to entry is lower.
Face it. He's a kid. If he's enough of a nerd, he's invariably going to want to write cute little games to show off to his friends (I know I did when I was the tender age of nine, which was in 1996), so if you really want to make it a generational gap issue, give him a TI graphing calculator and tell him to have a ball. He'll thank you for it later.
Just you, javascript, and a canvas tag. No CSS, PHP, or further HTML required.
The biggest impetus to my programming excitement as a kid was how hard it was to share what I'd done with my friends. A website is the easiest way to share a program I've ever known.
Javascript is a very simple and forgiving language. Basic might be easier to learn, but I've never seen any evidence for this. I know I found it incredibly tricky, in hindsight largely due to limitations and design errors in the language.
Imagine all those kids learning JS/jQuery first, and having an implicit understanding of callbacks/evented programming from the beginning. <sigh>. Some of those kids have a massive advantage which I admit I find a bit intimidating at times. They certainly don't seem to be suffering from a lack of BASIC.
I would also like to point out: http://www.u.arizona.edu/~rubinson/copyright_violations/Go_T...
Basic only really forms a decent introduction to assembly.
10 print "I am great"
20 goto 10
Now after it has booted and you have logged on and started the visual blah IDE you start programming with
from microsoft.java.net.jrhvbieurbv import sun.microsoft.jobs security model com.apartment.nice_view
#include <stdio>
public virtual void extern _main():
And tell little jonnie that he isn't supposed to understand any of those words - they are grown up computer stuff, he should just type in whats in the book.
I figured, maybe I'll port some basic program for linux, so I did a search of basic in debian and found:
http://packages.debian.org/lenny/basic256
Click on the homepage link and:
Perfect! I'm about to write to the author of the post and then I notice:
Check out "Why Johnny Can't Code," the article that inspired BASIC-256.
LOL
Someone should update the title to point out that the article is from 2006, and the link above is the answer.
(The actual link on debian is http://kidbasic.sourceforge.net/en/index.html but that no longer works, so I adjusted it.)
I think all it takes is the right personality and the right inclination. The idea that you have to subvert modern technology to teach kids how to program is ludicrous; the kids who actually want to learn this stuff are going to learn it.
And it goes without saying that the "black boxes" or function calls that make OO programming or functional programming so efficient to do in groups are hell on someone learning to code.
In order to get people involved, its much better to make it easier instead of telling people to try harder.
Most people seem to be pleased with it, but I'm starting to wonder if it's the right approach; maybe it's the C64 and not BASIC that's the key. I recently downloaded a C64 emulator and the "Programmer's Reference Guide" that I had as a kid; you almost have to try NOT to understand how a computer works in order to not get something out of a C64 and that guide.
Right away they delve into changing bytes in memory to draw on the screen, and I remembered drawing sprites on graph paper and figuring out what the binary representation would be. I was in second and third grade at the time, figuring this out on my own.
There is something about the C64. It's at the perfect spot of advanced and simple that makes learning easy.
I still remember the day I learned about strings in variables - that simplified my program quite a bit from a mass of hard coded strings combined with gosub.
If I have just one suggestion it's to increase your visibility. About a year ago I actually searched quite a bit for program exactly like yours. And didn't find it. I eventually found an online BASIC emulator in a browser.
_why would have kind of agreed. It's not about BAISC, it's that everything was really accessable.
http://wiki.github.com/steveklabnik/hacketyhack/the-little-c... http://wiki.github.com/steveklabnik/hacketyhack/the-hackety-...
1) How hard would it to write a JavaScript/HTML port of it? I don't see why anyone in the modern day and age should need to download and install a program to play with BASIC. It should be possible to interpret BASIC directly in JavaScript, all within the browser. I don't believe any server round trips should even be necessary.
2) Have you let David Brin know about your effort? He seems to be doing talks on the subject still as recently as '09, so he might be able to at least mention it to people.
http://www.calormen.com/Applesoft/ - Starts right at the interpeter
http://www.ngbasic.com/ - Has more of the classic BASIC feel, opening a window that looks like ye olde BASIC interpreter, but requires two clicks before you can find it.
http://www.quitebasic.com/ - Also starts at the interpreter, but with a more complicated example program.
Then I got my first "freelance" programming "contract" to write some stock prediction code. I still didn't have a clue, but my second project - still in 1979 - was a restaurant layout and waiter allocation program. It used what I now know to be simulated annealing to find good (not optimal) layouts for the restaurant given the sizes of parties that were book.
All in 16K RAM on a 1.77 MHz Z80 processor.
Why not write a simulator for a simple machine that goes into a full-screen window and emulate the simplistic language and graphics of the time? Most kids would blow it off with scorn and go back to their play-stations or whatever, but some would love it.
Which ones would become programmers? Shouldn't we encourage them?
Kids need sandboxes in which to build sand-castles and let their imaginations run wild. Can we build one for them?
In 2006 Johnny could download Visual Studio Express on his Dell. In 1976 Johnny would be typing in programs from magazines and hoping the power wouldn't glitch out before he could save to tape.
But then, we have an ongoing transition to 3.0, and it turns out the turtle module from 2.6 is "an extended reimplementation" that is "(nearly) 100% compatible" with the prior version included in 2.5. This is probably not a problem for textbooks being written today, but it does make me wonder how durable an actual source code listing in any 'modern' language would be. How long would the average code listing remain usable?
PyGame is quite a fun resource for learning programming, there's something there about pressing play and seeing your code changes translated into direct visual feedback which is particularly appealing.
PyGame might be fun, but I don't really see it as a true beginner's environment. It's a serious library, so it takes a lot of initialization, requires flip() calls, and runs in event-oriented style. It's also not included in the standard library.
In fact, for graphics, anything that doesn't create its own window and give you calls like drawPoly/drawEllipse is probably not simple enough to approach AmigaBASIC or QBASIC.
I think the sandbox of today would need to run inside the browser to achieve the instant gratification of BASIC back in the day. I wonder if JavaScript could be the new BASIC - I find it hard to judge how hard it would have been to learn for my 9-year-old self. The barrier to entry for JS programming is probably a little too high (you need to know HTML, need to host your code, etc.) but a simple web based JavaScript environment with a REPL and some wrapper functions for a Canvas element and keyboard & mouse input might just do the trick.
A technical problem I can see with that is the event-based model of the browser, which is probably harder to understand than the explicit event loop. You'd need a blocking waitForNextFrame() of some kind. I guess you'd have to precompile and transform the code into continuation-style closures. Or just call their code periodically with setInterval(). Either way, the framework could gather up relevant events between frames to make them available more easily.
Damn, I really want to make this now.
Great idea for a library that builds on what modern browsers can do to provide an environment that is similar to the old micros (I started programming on a Apple II).
As do Firefox (with Firebug) and Opera (Dragonfly). The mental model of raw client side JS, along with actually saving your code isn't exactly "instant gratification" though. This should be a web service that lets you easily save your code, and gets rid of most of the accidental browser complexity. And while we're at it, you should be able to embed the stuff you made elsewhere, hosted or not. (though IE throws a spanner in the works if you're using Canvas and want to embed it to show others)
This is sounding better and better the more I think about it.
If you'd like to see the source, http://github.com/Sophrinix/TryRuby
TryRuby's history (if I remember right) is that it comes straight from Hackety, so I don't think graphics displaying was really a consideration...
That said, why didn't he install a C-64 emulator or an Apple II emulator - no need to buy the box. Also, Logo, another good starter language has implementations, including 3D extensions. Processing + JavaScript is another decent alternative, or Canvas if that's your cup-of-(tea|joe).
It's a nice rememberence of a language many of us started with, but it's okay to let it go and move on to other things.
As a child, I loved the idea of computer programming. I got books at the library that told you how, but they always needed equipment I didn't have. I actually wrote fake programs in Ami Pro because of sample code I found in books! My parents were cutting-edge with computer purchases, but were otherwise nontechnical. They didn't know that toy programming languages existed, and probably didn't care. They just wanted me outside!
Time passed, and in 8th grade I needed to sign up for high school classes. I saw "Computer programming" in the class listing and I registered immediately. I didn't want to enter the class knowing nothing, so I researched C++ (the language taught by the class) and came across DJGPP. I spent a lot of nights that summer careening through internet tutorials and wrote a mountain of crap, but it was fun!
The first day of school was very disappointing - I got the syllabus, and saw that I'd already learned everything on the sheet. I was equally disappointed 2 years later when I signed up for the AB C++ exam and realized I knew nothing on the sheet. The next year was the worst yet - I knew everything on the AB Java exam, but I had to spend the year relearning it all in Java! Yuck!
When the first sentence is not credible, what does that say about the rest?
However, I'm also exposing them to logic circuits, machine language, and assembly so that they have a better understanding of how the computer actually works. I want them to understand the basics of what the compiler and VM are doing so that Java is not completely abstract to them. As experienced developers know, these abstractions have leaks so it's helpful to know what's going on underneath. I see BASIC as a dead-end abstraction. I would rather use assembly to teach a low-level understanding, and then use modern languages at the higher level.
I got my start in programming working with qbasic as a 12 year old, then graduating to some VB programming. I loved being able to go to any house, quickly type up a program I knew by heart, then mess around with new ideas I had. So I'm pretty nostalgic towards basic as well.
Having said that, today's situation is better. Anyone who wants to can get started on any computer with some simple HTML. In fact, people can come very close to replicating the look of their favorite sites, without needing anything but their computer and access to a few tutorials. Not to mention the fact that the other languages (Python, Ruby) are much better. Better for working, but also better for learning. I don't understand what his problem with Python as a beginner language is: it lets you do actual stuff you want to do much more easily, which is especially important when learning.
"Lots of people wrote in to say that HTML and JavaScript are the new BASIC. NO!!! You can’t be serious!!! So people have to write two languages now, which are intertwined in an almost inexplicable and unfathomable way? This doesn’t do it.
Hello world should be one line." - _why, "The Hackety Manifesto" http://wiki.github.com/steveklabnik/hacketyhack/the-hackety-...
I'm inclined to agree with him. (Surprise!) Don't get me wrong, I love HTML/CSS, but I think it's far too much to get started with.
I disagree with that though. Especially the sentence "Hello World should be one line". In html, it is. You create a new text file, put the line "Hello World" in it, then you can open it up in your browser and voila. You've got something everyone recognizes: a website.
Of course the more you code, the harder it gets, and eventually you have to add CSS, then JS, and then all hell breaks loose. But you can coast pretty far on basic HTML, with either no CSS, or inline CSS. And I'd argue that that's the direction we should be sending people just getting started in programming.
It depends. It's one line in the sense that 'it works.' It's not one line in the sense that "it works but enables quirks mode and it won't necessarily work right equally in all browsers unless you do all this stuff ..." and that's why I dislike HTML/CSS for learning. Yeah, in the simplest cases, it's kind of easy, but it can get really complex really quickly.
That's not even counting the fact that markup is not really programming, and if you'd like to add some, you've now got TWO languages to learn, HTML + Javascript. And then you might want to do something server side, so now you've got three.
The complexity explodes really quickly.
Mind you, I'm not comparing HTML to other languages for learning, I'm comparing it to QBasic as a "first try at programming" language. The basics had their own problems.
Now that I've experienced everything from PL/SQL to PHP, I would agree to a certain extent that beginning your programming experience with the language supplied with your machine has its advantages, but I would question the long term benefits - there's no harm in learning how to set up a new programming environment in order to be taught the rudiments behind how a computer works, and arguably having that base level knowledge is more advantageous.
Because python can do much more complicated things doesn't mean you can do basic code in it either.
Author is stuck whining rather than finding real world solutions to this problem.
Wow, and here I thought I was using conditions in P&P all these years--I'll have to run a "grep if *p[ly]" when I get back to the office. Though I do agree that there is a certain satisfaction in coding at a lower level, if the level is assembler.
I don't know what the story is in the Mac world, but as far as I can tell most of the Windows boxes out there will let you code and run VBScript if you have a passion for that sort of thing.
If you calculate the years, I wasn't even born in the days of the commodore 64, the earliest OS I remember is Windows 3.1. But even then I was too young to comprehend what a computer was. What truly got me started was Texas Instruments.
7th grade: I was a TI-BASIC pro. Wielding my TI-89, I learned more about graphing calculators than any kid should have, ported existing games from TI-83 to '89s and '82s, and instead of solving tedious math problems by hand, I would write FOR loops in BASIC to do my work for me.
There is something truly simple and zen-like about BASIC on a calculator that makes it (imho) one of the best languages to learn "programming" on. In that sense I mean learning all the basics of what variables, functions, if/else statements, loops, ... etc.
By the time I made it to my intro to programming (Java) course in college, I barely had to go to lecture and easily pulled an A.
So for parents/teachers trying to get young kids into programming, get them a calculator with TI-BASIC for the following reasons:
* fixed screen size -- you can easily make visual ascii games and use each character as a "pixel"
* full documentation = right in the back of the instruction manual!
* do maths! -- if nothing else, learning how to program functions to do often used math functions is reason enough
* community -- when I was at that age, everyone had a graphing calculator, and everyone would transfer games and programs with those little transfer cables. I became (in)famous as the kid with all the games and programs and kids would even ask me to write and port games for them. There was also a decent community online full of other people trying to program in TI-BASIC as well. I could easily program a few helpful math functions and share with my friends to help them and get that sense of instant gratification that I created something to help the world around me.
Hopefully the era of TI-BASIC isn't over, anyone know of the current status of graphing calculators in middle/high schools?
My dad was a EE, and he set me up with GW-BASIC after I checked a book out from the library that had each chapter ending with a "Try it in BASIC!" section. I figured that there would be no problem getting GW-BASIC up and running under dosbox.
Now, kids want to learn how to do things that look as nice or do as much as the rest of the computer (or web) features they are used to.
For those that get interested some will go back to the roots and become hackers, some will continue to work in higher level languages. I don't see the problem.
> arrived in good shape. It took us maybe three minutes to
> attach an old TV. We flicked the power switch ... and up
> came a command line. In BASIC.
And the cheaper and easier solution would be type three words into google: basic interpreter javascript
Low and behold: http://www.ngbasic.com/ngbasic/
Is there a CLI program out there which does text-only Q&A via some web service?
You could probably whip something up in Python, httplib2 and BeautifulSoup in a couple of hours. If I can't sleep tonight, I might play around with this.
http://viewsourcecode.org/why/hacking/theLittleCodersPredica...
Also, he explicitly mentions why he doesn't like Python in the article.
Whoa, an "epic problem" because of the absence of "line-by-line" programming language?
Brin harkens back to an earlier time, when tinkering with line-by-line programming was a large part of the reason why a computer was purchased. That the buyer was a financially endowed nerd already passionately motivated and inclined to what was, for that time, a solely hobbyist pursuit. Today, the price of computer hardware has plummeted, making a PC purchase within reach of nearly all. And the entry level barrier for youth to enter into the discipline of programming computing machines has never been lower.
* As stated, the cost of machines that 20+ years ago would preclude ownership for many kids, is now, in most all cases, a total non factor.
* In the good old days of BASIC PEEK and POKE, your only link to programming prowess was a geeky magazine article, or provided by a fellow nerd friend. There were a few books, but rare. No googling for help, no vast internet repostiory of tutorials and how-to guides that exist in 2006, however.
* The machines of yester-lore were no more than glorified calculators. In fact, the machines that sit on our desktop (and in our laps) have much more in common with old school mainframe computers than the early IBM/PC and Apple computers. Point is, running a comptuer today, in many ways requires a whole heap more of
* Apple Macs and Linux machines all come with all the programming tools a budding programmer could wish for. Even Windows machines, though less endowed, come packaged with C# programming environment.
* But all that really is needed to write programs and see the output of basic algorithms is a web browser and a text editor. Both of these come standard with any machine today. There are still BASIC programs in textbooks? Brin is dismayed over his the internet choir's emphasis on his repeated references to BASIC, but there are at least 30+ mentions of BASIC in his article.
Yes, and the problem, according to Brin, isn't the textbook publishers who add program exercises in an archaic language that some computer science luminaries consider to be "life corrupting". it's Microsoft's fault for not maintaining lingua franca on its machines!
Not all of Brin's missive is misguided. I understand his sentiment, but he laments for an age that has come pass, and because of his own nostalgic remembrance, distorts reality. The computing landscape has indeed changed, but you don't have to run BASIC programs to gain an understanding of how a computer works. BASIC is no different than any of the newfangled scripting languages. Furthermore, the fundamental model of "how a computer works" is radically different today — the simplistic model Brin details is less instructive than the state of the computer circa 2006.
But while Brin bemoans the current status of programming tools for aspiring programmers, here is what is happening in the golden age of programming.
* Millions are busy creating home pages, scripting game macros, writing Microsoft Office VB scripts to access databases and perform Excel functions.
* Others are creating web applications or writing social networking applications such as MySpace.
* Millions are downloading and installing free and open source (F/OSS) software, including the various Linux and FreeBSD distributions. And by doing so, are receiving far greater instructive benefit by learning how a modern day computer works, encountering firsthand, the challenging experience of installing, configuring, maintaining and even scripting/programming in nearly all the layers of software and services that make up a contemporary computer system. Even if Brin's claims have merit, the contention that its a "problem for our nation and civilization" is unbelievably far fetched. The discipline of computer programming differs from other fields of science — most programmers are, in large part, self taught, and gravitate to the field, based on their inkling and proficiency in being able to tell the computer what to do. Years ago, when the government went recruting programmers, they attempted over and over, to discover who would make a good programmer. Chess wizards, mathmeticians, bookkeepers, etc... were all once viewed as being optimal programmer candidates. But it was discovered that there was no common theme, and good to great programmers came from all walks of life, that a small segment of folks just had a knack for it. Even back when I went to school (I changed majors halfway through), it was expressed by professors that they viewed their job as weeding out those who won't cut it, who are pursuing the field for the money or because they think they'll dig it. And just examine the successful programmers — it's quite evident formal schooling and/or training is not necessary to ordain a great programmer. Therefore, even if all of the other points Brin contain some merit, that "computing is not as easy" without a "lingua franca", there are those that still will be drawn to the field. Incidentally, Steve Jobs and Bill Gates are both college dropouts.
Sad to see such as stupid article.
It's hard to fault him because his time machine wasn't working.