6 ms·
Why kids don't program
- parbo 17y agohttp://www.zxspectrum.net/ http://www.zxspectrum.net/
- smithjchris 17y agoThe reason they don't program is that the computer is no longer a marvellous box of wonder. It's just a tool like a screw-driver or a book.
- ilyak 17y agoTeach children to draw on a canvas in javascript. You can easily make a page with a javascript editor and immediate evaluation if you wish, and simplified api.
- swannodette 17y agoSomeone should build a social and pedagogical programming environment for kids on the web. The main problem here is the frustrating fact that one stupid browser doesn't support an HTML tag that's now 4 1/2 years old.
- michael_dorfman 17y agoThere are some very nice programming environments for kids. MIT Scratch (http://scratch.mit.edu/ http://scratch.mit.edu/) immediately springs to mind, for example. Any particular reason it needs to be web-based?
- swannodette 17y agoScratch is definitely a cool introduction to the world of programming. But I worry that in its attempt to make programming accessible sets up kids for a rude awakening. Most "real" programming isn't like that at all. Yet the kind of code I wrote in the 80s in Apple BASIC isn't so different "in kind" from a lot of the code I write professionally today. Sorry for posting so many comments: I'm a teacher so the issue of computers, programming, and education fascinates me to no end :)
- vorador 17y agoHow is scratch so different from other programming environments ?
- swannodette 17y agoTyping. The physicality of an interaction is not to be understated. I've seen wizards with specialized interfaces (Flash, PhotoShop, Final Cut, etc) struggle miserably with text based input.
- vorador 17y agoYes, but programming is about patterns, and, in my opinion, patterns are more simple to spot visually than with text. It's maybe more important for a kid to learn that than learning about the "materiality" of programming.
- jacquesm 17y agoYes, because every kid (at least in the 'developed' world) nowadays has web access but not every kid can install software on the machines they are allowed to use (for instance in school, the library or their parents' machine).
- cakesy 17y agoAnd, they can very easily show it to there friends, if it is in javascript. My niece loves designing webpages that she shares with her mates. Of course, getting her to program rather than put up pictures of twilight is another issue.
- netcan 17y agoTrue. I guess these are the same two reasons anything needs to be web-based: (1)Easy to get started. No hurdles. (2) Sharing
- jbert 17y ago> Teach children to draw on a canvas in javascript. I've thought a few times that this is the modern equivalent of the immediate feedback "plot via BASIC". It's even better, given the fact that JS is a decent language and the results are more easily shareable with your friends.
- legooolas 17y agoAre there decent tools to debug and check JS for you, so that you don't have to rely on the browser built-in support (which is incredibly forgiving but also doesn't tell you what is going on)? A massive advantage of BASIC was that it would tell you it was wrong as soon as you typed something with a syntax error in it, and it put a big flashing "?" (or similar) right there until you fixed it. Can JS be made to do that?
- zupatol 17y agoFor me it was exactly the opposite. I started learning programming at 13 reading the zx spectrum manual chapter after chapter until I came to sin and cos which I did not know. My parents hadn't studied, so they could not tell me. Instead of just skipping that chapter, I gave up programming. Much later I studied economics. Working as an economist I discovered the fun of programming with visual basic, and then decided to become a programmer. If in 1983 I could have googled sin and cos or read about it in wikipedia, I would have wasted much less time.
- swannodette 17y agoWhile I understand that everyone needs help, I do think this also highlights a not uncommon lack of drive to go figure it out yourself. Among computer programmers this behavior is particularly common. I have a hunch that it's because smart people (programmers) are of often afraid of "starting over." And honestly I consider this the locus of pointless debates about programming languages, text editors, frameworks, et al. To be like a kid again - and feel out of your comfort zone is the essence of self education. Children are little more fearless in this regard. If they are not, they should be reprimanded. To see this behavior in adults is lamentable (though understandable considering our nation's pathetic public education system). I also remember not knowing what sin & cos were - but I also realized that they didn't have that much to do with programming in general. There was plenty of stuff left to learn.
- johnaspden 17y agoThat makes me feel really sad. My epiphany was your iron curtain coming down. I can see how. In fact I had the same reaction initially (and my parents are graduates, but they don't know the first thing about maths, so they were no help to me either). I have no idea why I wrote the program to plot a circle that made it obvious what sin and cos were. In fact I think I might have misremembered my own story. I had a ZX81 first, and I don't think that had a circle function, so it may be that the ZX81 manual explained how you could use SIN and COS to do that. But I think we can agree that google and wikipedia are wonderful things. The upcoming generations of programmers and mathematicians are going to be Gods. How could they not be with a library like that!
- flatline 17y agoThere are so many more options than when he was writing BASIC programs on a ZX Spectrum. Choose something straightforward and stick with it. Python is about as simple as it gets. PLT Scheme is also a great option, it has a fully self-contained environment that includes much better graphics options than BASIC did, and is well-documented. There are lots of others - this post has some good discussion on a similar topic: http://stackoverflow.com/questions/950619/summer-holiday-programming-club-which-language-suits-best http://stackoverflow.com/questions/950619/summer-holiday-pro...
- swannodette 17y agoHaving more options means you have to figure out what choose. That doesn't make it easier, that makes it's harder. It's also important that there be a lot of reference materials which would be easy for a kid to teach him/herself with. For example: http://www.scribd.com/doc/200861/A-Touch-of-Applesoft-BASIC-1986AppleIIc-IIe-IIGS http://www.scribd.com/doc/200861/A-Touch-of-Applesoft-BASIC-... This was the book I read when I was 10 years old. It was also easy to find BASIC code at the school library and in computer magazines. How many current general computer magazines still publish useful bits of code ("How to access your mouse from Apple Basic", etc) ?
- yangyang 17y agoHow many general computer magazines still exist? The web has made printing code redundant. Why type it in when you can cut and paste?
- Kirby 17y agoIn reality, I'd wager there's a _lot lot_ more kids programming today than 30 years ago. How many people had a computing device at home back then? This anecdote makes the point that a very specific kind of thinking was better suited by the tools of the late 70s, and maybe - I've never been much inclined towards it, so I dunno. And what we consider 'programming' is blurrier than it used to be. Is HTML programming? What if you use a fancy editor like dreamweaver? Only when it becomes dynamic? Does CSS count? A lot of youngsters, when they aren't getting off my lawn, have done web stuff, and the fact that it's a gradual shift from being a user to being a programmer probably makes it even easier. I find the whole premise of this blog post flawed. (Great Scott! Someone disagrees with someone else on the Internet!)
- swannodette 17y agoAnd I disagree with you here. Writing declarative HTML and writing a simple interactive computer game are two activities that could not be more different. Like it or not, the act of programming has become much more difficult than it once was. 1988 I could reboot my Apple IIgs, hold down a couple of keys, and I could start writing a BASIC program immediately.
- tsuraan 17y agoAnd in 1995, I could write interactive (quasi) graphical games on my TI-81. Without rebooting. At the time, a TI-81 was pretty fancy, but I've seen plenty that leads me to believe that nearly every kid today has a TI-83 for their math class. It's not quite basic, but it's certainly programming, and it's just as easy and accessible as an Apple used to be.
- swannodette 17y agoKids are not fooled. Programming a computer and calculator are also not the same thing. While I enjoyed hacking on my graphing calculator as well, the limitations of the calculator (no color, small screen, no keyboard) made it fairly limited for learning any broader concepts about programming.
- ajuc 17y agoI had c-64 and one of the most frustrating memories from my childhood was that I couldn't get it to draw anything in a graphic mode. In manual the code to initiate graphic mode had error in it, or the manual was for different version of the computer, I still don't know. Anyway - 8-bit computers were superb "teach-yourself-programming" machines, but I think novadays kids have internet access, so they will manage :) PS. I would choose python + pygame to teach a kid graphic programming. It is simple, interpretted and has interactive console.
- Tichy 17y agoGraphical mode on the C64 was difficult, ZX Spectrum was much easier for that. C64 ended up being the better game engine, though :-)
- deleted 17y ago[deleted]
- pxlpshr 17y agoNothing will ever stop a hacker from programming and figuring out a machine, especially age. I started when I was a tot during the days of DOS on an IBM box. At least kids these days have the internet, we were left to fend for ourselves.
- yummyfajitas 17y agoIt's actually fairly easy to do what he wants today. ipython -pylab [...boilerplate...] In [1]: n = arange(255) In [2]: plot(n, 88+80*sin(n*pi/128)) http://imgur.com/oSd62.png http://imgur.com/oSd62.png As for the "imaginary diffusion equation" (I assume he means the Schrodinger equation), here is a simple program which solves it on the torus: from pylab import * from numpy.fft import * def freeSchrodingerSolver(input, dx, dt): np = input.shape[0] k = arange(np)*2*pi/dx #Coordinate system in k-space k[np/2:] -= np*2*pi/dx #FFT puts negative frequencies #on right side of array return ifft(exp(complex(0,-dt)*(k**2)/2)*fft(input)) / np I really doubt it was easier to do that on a ZX Spectrum.
- Tichy 17y agoNo boilerplate, no installation of Python, no installation of pylab. I think it was a lot easier on the ZX Spectrum.
- deleted 17y ago[deleted]
- jerf 17y agoI'm pretty sure by "boilerplate" he meant: Python 2.6.4 (r264:75706, Nov 2 2009, 14:38:03) Type "copyright", "credits" or "license" for more information. IPython 0.10 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. In [1]: Not any sort of actual setup the user is expected to perform. As for "no installation", it's not that hard to install ipython on Linux. Windows, well, that's another story. But I think you're focusing on the wrong thing. The problem is not whether it came installed or not, as the effort to install is very low for anybody who's going to be motivated to do this sort of exploration in the first place. The question is, how is anybody supposed to discover that this is possible? I knew about iPython and I didn't even know it was that easy. Additionally, you did not find this because it was sitting right in front of you. I have many friends who had things like Commodore 64s who never learned squat about them. You found them because you found documentation about it that wasn't drowned in gigabytes upon gigabytes of other information. You had limited, high-quality documentation to draw on, or good magazines, in the days that all the good magazines ran stuff like this. That's the missing step here; not the existence of good learning tools, all of which will actually blow away the experience you could get on those older machines (which were easy, but incredibly limited), but a way for anybody to stumble on them and find out what they are in the current environment, when a site full of crappy little flash games is orders of magnitude easier to find that a tutorial on Processing (http://processing.org/ http://processing.org/ ).
- deleted 17y ago[deleted]
- aaronz3 17y agoI remember growing up I was playing on the Internet and found a 10 chapter book online for QBASIC. I printed it out and had it scattered all over the floor, and in no time at all I was writing code that actually did things. I had never written code before and I was in elementary school (9 or 10?). Eventually this led to html, javascript, php, VB, C#, etc. Dad wasn't real thrilled when he realized I used all of the printer ink to do this, but I'd say it was a pretty good return on his investment. EDIT: I'd like to play with BASIC again, anyone know of a way to do that on OSX? VM?
- canadaduane 17y agoDosbox is a great emulator and works in OSX http://www.dosbox.com/ http://www.dosbox.com/
- lepht 17y agoYou should check out Chipmunk BASIC [1]. Nice simple BASIC interpreter that runs natively in Mac OS X and includes basic graphical functions. [1]http://www.nicholson.com/rhn/basic/ http://www.nicholson.com/rhn/basic/
- caffeine 17y agoI miss _why ...
- camccann 17y agoHackety Hack, like all of _why's projects, got adopted by someone else after his departure: http://github.com/steveklabnik/hacketyhack/ http://github.com/steveklabnik/hacketyhack/ Alas, it doesn't seem to be getting much activity.
- steveklabnik 17y agoIt's true. A crazy series of events took lots of my time recently... including the launch of my startup. I'm planning on getting back into the swing of things with Hackety, though, as my local Ruby Brigade just started up, and I feel like I could get a decent helping hand from some of those guys. I'd love to not be the only guy doing something with it. I have one other core contributer, but again, he's busy as well. Every project goes through slow periods. _why has some quite large shoes to fill.
- camccann 17y agoHey, that's awesome, I hope it didn't sound like I was bashing you for neglecting it or anything. _why seemed to be superhumanly productive, so I wouldn't expect any one person to keep up his pace. I'm just happy to see that his projects weren't abandoned, thanks to you and everyone else who took up the torch.
- steveklabnik 17y agoNone taken. We actually had a discussion about this a week or two ago. I'm just glad that you linked to my GitHub. Thanks for still talking about Hackety.
- astine 17y agoI recently sparked my little brother's interest in programming by installing a Ruby interpreter on his computer. I told him I would install things like Shoes and HacketyHack so that he could do fun things at his level. I hope that this begins to pick up speed again as it is such an awesome project.
- shaunxcode 17y agoWhen I was a kid I did not know any adult programmers and thus assumed programming looked like the strange special characters you would get through alt + shift combos. This didn't scare me - it just upset me that I didn't know how to utilize it. If someone had shown me APL I would have been amped hahaah!
- Tichy 17y agoI wonder, is Logo still relevant for children (was it ever)? I know Netlogo or StarLogo are still in active use in academia (for artificial life/complex systems research). I have been toying with the idea to write a Javascript LOGO for the Canvas Element. There used to be Online-Logo Applets, but I think they were all Java. At least it might be a fast way to draw nice things programmatically.
- techiferous 17y agoSome years ago I was a high school Java instructor. I'm a big fan of teaching one concept at a time, so I actually started out everyone on LOGO since it was an introductory programming course. LOGO is a great way to learn the basics about commands, loops, and the exacting syntax of computer languages. The next step was to start learning Java through Karel J. Robot ( http://www.csis.pace.edu/~bergin/KarelJava2ed/Karel%2B%2BJavaEdition.html http://www.csis.pace.edu/~bergin/KarelJava2ed/Karel%2B%2BJav... ), which was a nice, easy segue from LOGO. After going through the Karel material, the students could dive into more advanced stuff. The course was self-paced, so if you mastered the LOGO stuff in one day and wanted to move on, you could. You just had to show that you mastered the relevant learning concepts. All in all, this was a great way to structure a course. So yes, LOGO can still be relevant.
- spatulon 17y agoThis JS-based Logo works nicely: http://logo.twentygototen.org/ http://logo.twentygototen.org/ Here are a few programs I made with it (note that the default is to 'run normally'. You might want to click 'stop program' and then 'run fast'): * Sierpinski triangle: http://logo.twentygototen.org/83EGZPPC http://logo.twentygototen.org/83EGZPPC * Sierpinski carpet: http://logo.twentygototen.org/4c5iy9iU http://logo.twentygototen.org/4c5iy9iU * Sierpinski arrowhead curve: http://logo.twentygototen.org/hYDSZt8h http://logo.twentygototen.org/hYDSZt8h * Hilbert curve: http://logo.twentygototen.org/CFyUSzqG http://logo.twentygototen.org/CFyUSzqG * Hexaflake: http://logo.twentygototen.org/AJeuVkKc http://logo.twentygototen.org/AJeuVkKc
- Tichy 17y agoVery nice!
- erikwiffin 17y agoThe crazy thing is, he just told the exact same story about beginning programming as I would tell. The only difference, is that I'm 21, and my first experience was drawing circles on a TI-83 graphing calculator in high school. It has a graphing mode, where you can put in functions and it'll draw them for you. And it has a programming mode, with a very BASIC-like syntax that I wrote simple graphing programs, ridiculous text-based rpgs, and my own version of the oh-so popular Drug Wars. Having no idea what a ZX Spectrum is, I can only assume that the likelihood of the author having one 30 years ago is about the same as the likelihood my having a TI-83 in high school, especially because the calculator was pretty much required for some of the math classes I was in.
- megaduck 17y agoYou're right, they're pretty similar. The ZX Spectrum was a little personal computer, sold in Britain through the 80's. It was pretty cheap, probably the equivalent of $750-$1000 today. Certainly cheap enough for parents to buy for a bright young boy. Since the ZX ran BASIC, programming for the spectrum and your TI-83 is pretty comparable, although your TI-83 was a bit more powerful. :) http://en.wikipedia.org/wiki/ZX_Spectrum http://en.wikipedia.org/wiki/ZX_Spectrum
- alttab 17y agoThis type of math-programming-graphics-game mind soup resonates with me very well. I did mine on a TI-83 calculator, went to visual basic, and then C++/DirectX. Once I grasped sin/cos/tan, I created Microcosm (missle command, angles, rotation as my primary game mechanic due to my fascination of the power of trig, http://arcade.connersc.com http://arcade.connersc.com). I feel the same way. You put it in words clearly. :)
- deleted 17y ago[deleted]
- lssndrdn 17y agoI am the same age, and I had a very similar experience, especially with regards to the BASIC manual. I would just go through the list of keywords, A to Z, skipping the ones that didn't make sense at first, and then circling back and starting all over until I had them all. In a way, a limited manual made it easier to circumscribe the problem, and gave my little nerdy self a "goal": Finish The Book. I guess the same could be done with the information available on the Internet. If someone wants to learn javascript they have all the info they could possibly ever want. There are so many options now. But learning to program is a question of interest and determination, not availability of information.
- AlSweigart 17y agoI don't agree that programming has gotten harder, I think it has become easier. What is harder now is finding material to learn programming that is simple for kids but also still "real" programming (not just game creation kits). I wrote a freely available book called "Invent Your Own Computer Games with Python" and released it under a Creative Commons license. It's available at http://inventwithpython.com http://inventwithpython.com I think Python makes a great (even superior) replacement for BASIC. Adding in Pygame, and it is much easier and fun to learn programming.
- stevejohnson 17y agoI looked over your book at some point and loved it. Thank you for writing this. I prefer pyglet over PyGame. I wrote a tutorial for it in the style of your chapters 16-19. It's up at [1]. [1] http://www.steveasleep.com/pyglettutorial http://www.steveasleep.com/pyglettutorial
- neilk 17y agoProbably tangential... I learned what sin() and cos() did experimentally. There was a BASIC program in Creative Computing that used sin() to make a long snake of text scroll down the screen. So, in my mind, sin() and cos() were things that made wavy lines. A little while later I was puzzling over how to draw a circle. I had this epiphany that the X component was drawing a wave, just like sin(), and the Y component was drawing a wave that was just out of phase. I went home and programmed it and it worked instantly. We had a Britannica at home, so I finally looked up what sin() and cos() were, and the diagrams made it all obvious. It's good that we now have Wikipedia and all, but kids today are still deprived of a computer that comes with a decent programming environment, that makes fun stuff like graphics dead simple.
- dbz 17y agoAnd when kids download "decent programming environments" they have absolutely no idea how to use them. =/ That one comes from personal experience.
- axod 17y agoJavascript is pretty much the new BASIC for kids these days. 10 print "BAH" 20 GOTO 10 <script> for(i=0;i<100;i++) { document.write("BAH"); } </script>
- abstractbill 17y agoTo some extent, but it's a real shame it doesn't (always) come with PLOT and BEEP.
- stevejohnson 17y agoJavascript has too many layers to be comprehensible to new programmers. Do you see how many extra tokens you have in the second example? Not only that, but you have to open the page in the web browser, rather than 'run the program.'
- asciilifeform 17y agoBarring grotesque hacks, Javascript (and the entire standard WWW stack) will neither emit sound nor write to a disk. Not to mention the inescapable "If InternetExplorer Then CrappyWorkaround" abominations which come with web programming.
- jsz0 17y agoI tried a few times to get into programming but the amount of institutional knowledge required was so off putting. Learning the languages and APIs isn't too hard but I found all the reference material didn't teach me how to actually solve problems. I suppose this is something you need a mentor or at least a strong background in legitimate computer science to understand.
- benwr 17y agoAbout 5 years ago, in 7th grade, almost the exact same thing happened to me, but with a TI-83 graphing calculator. I would estimate that there are approximately the same number of kid programmers as there were. Modern PCs and macs don't come with compilers or interpreters, and there is no "command mode". Why would the ordinary kid ever open up cmd.exe, when everything you could ever want to do on a computer is on the web? I only learned TI-BASIC because a friend's dad is a hacker. He inspired me to check out the only book on programming at our school, which happened to be about BASIC. The truth is that, while kids are closer to computers than they were 30 years ago, they're not much closer to programming.
- dbz 17y agoI started programming around 6th grade, and I am in 11th grade now. I started because one of my "really smart friends" was doing it. He started because his dad made his own linux distro .(That's a lie. I know his dad has made his own linux distro, but I honestly don't know why he started, but I am sure his dad is the cause of inspiration.) The point is that I am sure tons of people would love to learn to program if they are simply given the opportunity- the inspiration (and the tools). Why would I be sure of this? People have come up behind me and asked questions like "Wow, that's a really cool word-like program. Where did you get it?" Of course I tell them I made it and almost always I get asked how. I've even given out a couple of programming "lessons". (That's a lie. I've given out hundreds of programming lessons, and I've written at least ten little programming manuals to help people begin to program.) However, the real point is: If given inspiration, kids are very curious creatures and will start to program.
- samlittlewood 17y agoI have been looking at this for my 7 yr old son. Beyond school, his time is spent getting muddy on a soccer field, swimming, building dens, and generally racketing around with friends. However, along with every other 7 year old, he want to know how things work. I am finding that many of my explanations get from A to B via "and at this point there is a computer that does ...". - Things: Microwave, car, alarm clock, phone, camera etc. and broader systems: exams, shops, banks etc. I could explain things in terms of the model that is embodied in the computer, but that seems wrong - at least as the only explanation. If you pull it apart, you don't find the coresponding physical embodiment. If he does want to dig further into this and explore how to make computers do things, I want to have a good set of resources to draw on - My current short list w/ comments: - Lego Mindstorms NXT Start with the provided graphical environment, move on to one of the several text based development environments, eg: NQC, leJOS. He loves Lego, and I have already set up a mindstorms controller+psx joystick to give him a drive+steering component he can use in his own constructions. I find the graphical a bit cumbersome. - Nodebox (http://nodebox.net/code/index.php/Home http://nodebox.net/code/index.php/Home) I think it is great - python & easy graphics. I have already been showing off some simple drawing animations and fielding requests to: "Make it go the other way, go red, faster, jump etc." - Cool, but I am well aware the he'll get frustrated with syntax errors. - Processing (http://processing.org/ http://processing.org/) Also, cool - not used it so much myself, and I am not sure I want to start explaing curly parens & semis, but it does lead into Wiring and Arduino. One thing I would really love for him to experience is making things w/ embedded cpus - even if it just simple things to spin motors and flash leds. - Scratch (http://scratch.mit.edu/ http://scratch.mit.edu/) Only recently found this. For me, the visual programming was way easier than Lego NXT. Going to have more of a play. - Nintendo DS homebrew - C64 - in the form of a C64DTV (http://en.wikipedia.org/wiki/C64_Direct-to-TV http://en.wikipedia.org/wiki/C64_Direct-to-TV) - Usebox (http://belogic.com/uzebox/ http://belogic.com/uzebox/) When I was mucking around w/ NDS homebrew I had him draw some characters, then we scanned them and displayed them as sprites bouncing around (one was under joypad control - no collisions or gameplay, maybe 20 lines of code) My own experience was that making games was a very powerful motivation - and all these 3 provide a way into that - C64 & Uzebox would provide a similar experence to mine (well, I was a BBC fanboy, but anyway). Nintendo DS would be a bit more up to date, and would have some currency with his mates. Some way of targetting NDS from processing would be a cool halfway house. Assuming he is at all interested, it will be interesting to see if any of this is appropriate. If not, well, there is another son - and maybe I'll just get stuck in myself.
- lisper 17y agoIt's important to keep in mind that one of the reasons it was "easier" to program back in the day is that you had so many fewer options. The flip side of not having to install anything is not being able to install anything. BASIC was cool, but once you hit its limits (which was very easy to do) you were kinda screwed. Sure, you could learn machine language, but that was a lot harder than running Python or Javascript.