Camen Design Forum

Why isn't JavaScript like BASIC?


Just some random thoughts about this, but first a minor rant. I disagree with the basic premise that computers now lack any 'direct interface' to creating computer programs. Every OS ships with at least a basic text editor, and good free ones are readily available. That and a browser are already a better programming environment than I had on the Commodore PET in my high school's chemistry lab.

On that computer, writing BASIC programs was pretty much the coolest thing you could do, and just about the only thing. What's different now is that there are a _whole lot_ of cool things you can do with a computer. Kids are using them creatively for photography and movie making, art and design, communication, music, and of course games. The cheesiest online flash games are way more exciting than all but the very best old time BASIC games I could write and play. So while the programming environment has generally improved, it's obscured by an avalanche of additional functionality that computers now have.

So why can't Johnny code? We had three Commodore PETs in our chemistry lab, and J.B. was always sitting in front of one of them. But it was hardly ever a problem finding an open one after school. Most people just aren't that interested in programming. Back then those people just left the computers alone. Now they've got them for other things, but they still aren't interested in programming and that's fine. You could just as easily ask why more people aren't growing their own food or carving their own gunstocks. Life is short and everyone has to make decisions about what to do with it.

If anything there are more people involved in coding than there were 20 or 30 years ago. All you need is a few dollars a month for a hosting account and a Wordpress theme to be a web design firm. There are probably thousands - millions - of people doing that very thing. And little by little, some of them are being drawn deeper and deeper into the code.

The opportunities for teaching kids programming are better than ever. Kids have ready access to computers and are already familiar with their basic functions. The internet is a source of inspiration, a resource for learning, and an incredible opportunity for self-publishing. HTML and CSS are easy to learn. A kid can make a pretty cool web page from scratch in a short time with very little instruction and see immediate results in a browser even without a web host. If they could just add a little JS action, now that would be shiny!

That's what sounds so great about your JavaScript project. JavaScript is the next logical step, but it's suddenly no longer so fun and easy. If you could bridge that chasm, I'd use it. Python is often suggested as a beginner's programming language, and in some ways it seems like today's BASIC. But at least in the initial stages of learning, it's too tied to the command line. Most kids (myself included) are going to want to get more quickly to the explosions without wading through a lot of text and math experiments. Using JavaScript in a browser would be a great alternative as far as being able to play around with real, functional programming and make something satisfying with it.

It sounds like what you have in mind is a sort of KrocBASIC written with JavaScript. Or is it meant to be more of a simplified JS? Either way, it's a great idea. A kid could create a game or another app and send the html file to their friends and family or post it online to publish and share it. It would be something real they could actually own.

Educationally, it would be cool if it was also a sort of simplified JavaScript, so that it would be a small step leading naturally toward learning to program with JS rather than being just another programming language on its own. This is what you seemed to be saying at first, making JS itself more accessible. That would certainly add a layer of complexity to the project, making it "fit" naturally with JS. How will you make JavaScript easier to understand and use? What exactly are the rough spots that need smoothing over, and how can it be done without sacrificing too much functionality? In what ways would it be different from any other JS library like JQuery? What then would be the path from this simplified JS to full-blown JS programming? Using JS also involves using the DOM, HTML and CSS, so all of that is lurking in the background.

The main things that make BASIC (and Python) simple and accessible seem to be *natural language* and a certain *linear logic*. It's easy to call a function in BASIC. You just `GOTO 550` and `RETURN`. You don't even need to think of it as a function. You just go there, do that, return.

One thing I think is important to keep in mind is kids' expectations of what a computer program does. When I was first learning BASIC, it was pretty exciting just to be able to make my name repeat and fill up the screen. (OK, at least the first time.) But my kids are accustomed to 3-D graphics, realistic physics, immersive U-I, surround sound, rich and dynamic websites.… They judge the success or failure of what they create by the standard that's available to them in the real world. So hopefully you'll be able to give them the tools to achieve something that lives up to their expectations.

You're probably aware of the Scratch project ( It's sort of like the Lego bricks of programming. It's a fun way for kids to get started and have immediate success in programming. It's not a Camen Design style project by any means, but it might be helpful to you in researching the set of straightforward functions to include in your language, as well as understanding the educational underpinnings of a beginning programming language for kids.

It won't be easy, especially to do it well. But helping to expose the creative power of the browser without burying it under a proprietary, pre-packaged interface is a worthwhile project and I hope this idea will continue to grow.


(Leave this as-is, it’s a trap!)

Only the original author or a moderator can append to this post.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn