4 ms·
Just Let Basic Die
- mechanical_fish 17y agoI'm glad to read such a positive outlook on Python as a beginner language, as I just sent my eight-year-old niece (and her parents) a book on it. If this gamble pays off she might just succeed in learning Python before I do. ;)
- AlSweigart 17y agoAuthor here. I also wrote a free book on Python programming for beginners called Invent Your Own Computer Games with Python, and you can download it from http://inventwithpython.com http://inventwithpython.com if you're interested.
- imurray 17y agoFor me the best bit on that page was in the comments: “I’d be very careful not to underestimate kids. If you don’t tell them something is supposed to be hard, they will astound you.” Yes! The first step to achieving something, is believing it is possible. Seeing good motivational examples can help with that, so I agree: suggest widely-used languages to kids.
- ajross 17y agoBut there are limits. Kids aren't going to understand decorators or list comprehensions. They aren't going to get the point of doc strings. They don't want to deal with packages and namespace issues in every piece of code they write. None of this stuff existed in BASIC. As a kid in the 80's, I could read code in magazines written by professionals (of sorts) and understand every line. There's nothing like that in the modern world.
- stevejohnson 17y agoKids aren't going to understand decorators or list comprehensions. They aren't going to get the point of doc strings. Define "kid." I know middle schoolers who could get this stuff. I reject the idea that loops and functions are "easy" and other various language features and concepts are "hard." There are some things which are going to be out of reach, but it's not going to be the same for everyone, and what those things actually are might surprise you. And seriously, how are list comprehensions difficult to understand?
- ajross 17y agoIt's not whether it's "hard" or not. It's the sheer volume of complexity in a modern development environment. Seriously, look at the manual to Micro-soft BASIC c. 1980. It's about 12 pages long! I know professional python developers who sometimes have trouble reading the "new" stuff in code they see on the web. Someone just learning the language is going to be totally lost. That's just not a problem in Applesoft; read your 12 pages and you're done. Go code.
- mechanical_fish 17y agoHuman languages like Chinese or Hungarian or English have a greater volume of grammatical constructions, irregular forms, vocabulary, and semantics than any computer language, and yet toddlers learn them all the time. Now, I wouldn't claim that humans are wired to learn Python the way they're wired to learn a human language. Nor would I claim that every child under ten should necessarily be able to navigate Python -- the majority of adults I know cannot navigate Python, or even BASIC. But: I’d be very careful not to underestimate kids. If you don’t tell them something is supposed to be hard, they will astound you. I'm only about four chapters in to Coders at Work, and yet I've already encountered Brad Fitzpatrick, who claims to have learned to program before he was five. When I was a high school senior I met one or two nine-year-olds who could kick my ass in mathematics competition. I myself will never know how much Python I could have learned before age ten -- I encountered my first computer, a C64, when I was about eleven -- but I do know that by age 14 I had gotten bored reading about BASIC and had taught myself assembly and Pascal (though I had to learn Pascal entirely from books, writing programs on paper, because I didn't encounter my first Pascal compiler until I was 15, several years later).
- AlSweigart 17y agoYou can be blissfully ignorant about the advanced features of Python and still program small games, just as you don't need to know everything about BASIC's syntax in order to code in BASIC. The problem is that most books about Python are aimed at adults, when you can just as easily make them for kids. (Which is what I did, and released it for free under a Creative Commons license at http://inventwithpython.com http://inventwithpython.com )
- osswid 17y agoOne of the nice things about Basic was that you didn't need to know how to use a text editor to program in it. Line numbers and the LIST command got you started. vi and emacs are a bit much for the wee ones. You can use a simple text editor, but there's still the concept of files, saving, extensions, vs. the integrated environment that a microcomputer Basic provided. <power on> 10 print "Hello, World." RUN Doesn't get simpler than that.
- cubicle67 17y agoah yes it does... 10 ? "Hello, World" (yes, I know that's not what you were talking about)
- rbanffy 17y agoIIRC (actually I could fire up one and check, but I'm too lazy for that) if you had an Atari 8-bit computer, you could go: 10 PR. "Hello, World" http://www.flickr.com/photos/rbanffy/4208561088/ http://www.flickr.com/photos/rbanffy/4208561088/ The simpler FX-series CASIO BASIC pocket computers used "PRT" for that. Cool gadgets.
- scottdw2 17y agoI can only speak from my own experience, so I don't know if this holds for everybody, but I think the guy misses a lot of important points. When I was 13 I discovered programming, using QBASIC, on my old 286. This was in 1993, before the Y2K and .COM hoopla, and before anyone I knew had access to the internet, or even knew what the internet was. Back then, if you went to the library by my house, they had about 2 books on programing, from 1982, that had nothing more exciting in them than "this is how your draw a maze in BASIC on your Apple II". Every now and then you might be able to find an old issue of Compute, with some code samples in it. For the most part, however, there was a pretty large dearth of information about programming accessible to a 13 year old kid who didn't know any one who knew anything about programming. The thing I did have, however, was a copy of nibbles.bas and access to the QBASIC help screens. The language was small enough that one kid could read through every item in the index, and figure out what the meant. There were a few things, like BLOAD and BSAVE that I couldn't understand because I didn't know what pointers were or how they connected to arrays. Other than that I was able to figure everything out by just reading through the help screens. This, I believe, is what made BASIC suitable for use by kids. It wasn't complicated. There wasn't a vast class library. The ability to produce sound was limited to the PC speaker, and there certainly wasn't any 3D graphics. There wasn't a windowing system, or any kind of scheduler. BASIC certainly didn't have huge libraries to import. Everything was super simple. That made it approachable. It was something a kid could explore by him self, understand, and appreciate. When you are exploring computer programing, writing apps that play pong or let stick figures shoot at each other with laser guns, all the rules on the right way of doing things just get in the way. They keep you from having fun. All you really need is a few variables, SCREEN, CIRCLE, LINE, BEEP, COLOR, and GOTO. You definitely don't need classes, fields, closures, while loops, or even proper indentation. That stuff doesn't add to your DISCOVERY of computing. Yes it makes you a better programmer, but with kids that shouldn't be the goal. The goal should be to HOOK them on programming. Rules just get in the way. Python has way too many of them. A lot more than BASIC. Python has to be taught. You have to teach people: use control structures, indent your code, model things with objects, import these things. That makes it great for, say, college freshman, or AP students. It's not really suited for kids though. BASIC can be explored. Easily. You can hold the entirety of BASIC in your head, at once. Everything. You can't do that with python, or even lisp (because of all the libraries). So I say, give kids basic, and let them roam free for a while. Let them make laser games out of spaghetti. I think sometimes its easy to forget how much fun it was to write crappy spaghetti code that did small amusing things. Think back to when you were a kid, before you were old enough to know better. That's probably what got you hooked. Its what got me hooked. That means BASIC, or something like it. You have to let people be creative, and messy, long before you start throwing rules at them. You can teach kids structure, and recursion, and pointers, and all that stuff later.
- alextgordon 17y agoThere is already an ideal language to teach kids, and it exists right now. PHP. Whether or not you think it's a good language for building real world applications, it does have a lot of going for it when considered as a teaching language. * It's weakly typed, dynamically typed and lacks variable declarations. * It doesn't require learning OOP concepts before you can use it. * The internet is full of free tutorials, documentation and knowledgeable people. * There is only one variant. It's in active development. * It's not so far removed from today's widely used languages. PHP -> Python is going to be easier than BASIC -> Python. * It can be used to build real things. Despite what we'd like to think, command line interfaces are hardly ever used by the general population. Kids use websites on a regular basis. This is what will get them excited about programming.
- plinkplonk 17y ago"Whether or not you think it's a good language for building real world applications, it does have a lot of going for it when considered as a teaching language." You must really hate kids?
- alextgordon 17y agoThe reasons why many hackers (including myself) dislike PHP are totally irrelevant to its merits as a teaching language. I don't like the type system, I don't like how OOP is seemingly an afterthought, I don't like the mishmash of syntax or the irregularities in function naming. These are fine reasons for a programmer to eschew it, but I can't see how they would be a hindrance to anyone learning the concepts of programming.