Isla, a programming language for young children
isla.herokuapp.com
isla.herokuapp.com
I agree with the people who say that a programming language that apes natural language can be frustrating. Inevitably, it cannot support even a fraction of the constructions that a human brain can parse. What made me try a natural language approach is the following (contentious) ideas:
* Children find it hard to type punctuation. Natural language can be parsed without punctuation.
* Someone new to programming probably knows nothing of conditionals, loops, logical operators and functions. So, a language that codifies these concepts as jargon in the form of keywords is going to be alien.
* If you ruthlessly constrain the features of a natural language-like programming language, it's possible that you can keep the advantage of human readability and dodge the disadvantage of the "uncanny valley", as `antihero` succinctly put it. In Isla, the only expressions are instantiations, assignments (with support for objects), `if this then that` style rules (maybe), and invocation of built in functions.
* The joy of programming is in building something. To get children interested in programming, the language they use needs an application. Children love telling stories, so why not make the application a story-telling environment? This gels nicely with the sparse feature set of the language: writing a story is mostly a matter of data definition.
This is the first programming language I have ever made. All these ideas are theories. Isla is just my first shot in the dark.
java -jar isla.jar
then follow the instructions starting from the part about connecting with a web browser. On some operating systems and configurations, you can just double-click it and open your browser.It's not as complete as I would like, but I am working on it.
Is that enough to get you started? I'm happy to help out if you email me at maryrosecook@maryrosecook.com or tweet @maryrosecook
For instance, you also need to allow users to define "vocabulary words", including some way to import it from one or more external libraries that haven't necessarily been designed either well, or together. To remain unambiguous without sacrificing capability or becoming unnecessarily verbose, you then end up needing the same sorts of features for scoping, renaming, and qualified names you'd have in a more traditional language, versioning problems if you allow anything beyond fully qualified and explicitly imported vocabulary terms. AppleScript does little to prevent terminology conflicts — if anything, certain aspects of its design seem to encourage them — leading to unexpected behavior and hard-to-find bugs.
Also, you may as well introduce "unnatural" syntax like parentheses for regrouping arithmetic and conditional expressions, as all the ostensibly "natural" alternatives I can think of (requiring a series of assignments to often arbitrarily chosen variables to force subexpression evaluation, say) seem worse.
Furthermore, the simplest side effecting subexpressions can easily lead to hopelessly "unnatural" situations: suppose I have two objects "Alice" and "Bob", each with an integer property "age", defined as follows:
Bob's age is twice Alice's age.
and Alice's age is 35 minus the number of previous calls to Alice's age.
Then, assuming we have not previously asked for Alice's age, the sum of Alice's age and Bob's age
is either (2 * 35) + 34
or 35 + (2 * 34).
Given that integer addition is naturally commutative, unambiguous "natural language" seems to require some way to express explicit sequencing, whether sequential assignment to temporaries, or by some special syntactic device along the lines of the sum of first getting Alice's age, then getting Bob's age.
This is also necessary when any other observable side effects differ: perhaps Bob is always 70 and Alice is always 35, but that each "age" is recorded at the end of a shared log file immediately before it's returned.And so on. Seems to me that starting with a less ad hoc natural language would, at best, only help with the easiest parts.
Here is the forword to his book:
http://www.papert.org/articles/GearsOfMyChildhood.html
From the link:
* One day I was surprised to discover that some adults--even most adults--did not understand or even care about the magic of the gears. I no longer think much about gears, but I have never turned away from the questions that started with that discovery: How could what was so simple for me be incomprehensible to other people? My proud father suggested "being clever" as an explanation. But I was painfully aware that some people who could not understand the differential could easily do things I found much more difficult. Slowly I began to formulate what I still consider the fundamental fact about learning: Anything is easy if you can assimilate it to your collection of models. If you can't, anything can be painfully difficult. Here too I was developing a way of thinking that would be resonant with Piaget's. The understanding of learning must be genetic. It must refer to the genesis of knowledge. What an individual can learn, and how he learns it, depends on what models he has available. This raises, recursively, the question of how he learned these models. Thus the "laws of learning" must be about how intellectual structures grow out of one another and about how, in the process, they acquire both logical and emotional form.*
This kind of programming environment despite the stars in here scolding it is exactly how to teach IMHO.
What this allow children to do is to tinker with words and through an input/output model allow them to learn about variables.
There is no right or wrong output here (perhaps besides gramatically) there is only input/output.
The basic of computer-science is it not?
And yes that book is great if anyone want to understand and truly develop ways to better teach children (and adults).
So many insights it's almost sickening.
I am currently teaching a Saturday morning LOGO class at my daughters school. Who'd a thunk kids (and parents) would forsake Saturday morning in the mall to futz with a little turtle on a screen... But they love it and for once the kids are learning a non-consumptive use of computer technology.
you see that it makes grammatical sense and then the brain infers that it can understand anything that makes gramatical sense. In the end, it's just as hard to remember what subset of the english language it can understand as it is to learn a new grammar.
But yes, if you're new to programming you'll probably be quite frustrated by the limited grammar.
Care to experiment?
If someone learns the logical meaning of these words, they are better off learning a proper programming syntax.
Using symbols is a vital skill and makes things easier to understand, not harder.
You don't start with the abstract. You start with the concrete.
The point here is to teach children (not just hacker wiz kids) some basic premises of programming without making it about programming.
It's pretty clever IMHO and it allow children to create exactly the world they want to create whether that is vampires or bunny land.
True, but the fact that we used to do it also doesn't mean that it must be broken. I doubt many of would be better programmers if we had a more child-friendly programming language to learn when we were young.
Think of this as php for children. An easy to use forgiving environment that welcome everyone not just the few who have the stamina and interest to learn assembler.
And think of this as the future of programming languages as they will become more and more abstracted from the core.
Those who want to dig deeper can.
I started with BASIC, but didn't really get in to it before being introduced to Hypercard. With that, I could make cool stuff almost immediately. A year or so later, I was told that real programming meant programming in C, so I tried that. It made me lose interest in programming for quite some time, as I couldn't imagine making any of the things I wanted to make with it.
It's more or less the same issue that affects technically cool products that don't actually address the needs of consumers.
There are a lot of children to whom programming isn't even in their vocabulary, but storytelling is.
I think it's pretty helpful to get young kids to understand the logic first and then get introduced to programming operators and other weird characters.
It would be interesting to see if there's any research or papers on this.
When I was eight we had a turtle in our classroom, driven by Logo on a BBC Micro. No child had trouble understanding Forward 30, Left 10 and seeing the physical turtle make those moves. Adding in recursion was pretty straightforward too, and you could see the results (right or wrong) straight away as the little guy makes his moves.
I'm not suggesting Logo is right, but kids shouldn't be underestimated. This language seems patronising. App Inventor is much more in the right direction http://www.appinventor.mit.edu/.
It has very simple syntax (lisp without parentheses), and the imperative style is easy to reason about. Direct control of the turtle has a lot of appeal-- probably more than making a text adventure.
[How to train your robot](http://drtechniko.com/2012/04/09/how-to-train-your-robot/) is a programming game that follows similar ideas.
The power of the computer is that it can simulate virtually everything and thus allow for children (or anyone else) to build their knowledge by using models they already have an intuitive understanding about.
If you're not familiar with it, Scratch was developed by the Media Lab and heavily influenced by Logo. It's used in thousands (tens of thousands?) of elementary schools to teach programming concepts. It's a really great language, and is incredibly visual.
One of the great things about Scratch is that whilst it's certainly heavily slanted towards children it's not exclusively for them. Actually, Scratch is used at Harvard for the first week of their Intro CS course. If you're interested in programming languages for children and those new to CS then Scratch is well worth a look.
I think it might be slightly confusing for younger people, because it's almost 'real' programming, especially once you try implementing things like side-scrolling animation. But it's certainly powerful, and the way the code is created by dragging and snapping parts together is neat.
Give it a try with your young cousins, and give them an early taste of programming! When they're modding their games in the future they'll thank you for it.
[1]: Kaminski et al., "The Advantage of Abstract Examples in Learning Math", 2008 — http://www.physics.emory.edu/~weeks/journal/454.pdf
I'm not going to get the abstract unless you start with a concrete example and then head for abstract territory. "Learning abstraction" is memorization. Until you can tie it in to something real, the concepts aren't. Coincidentally, I suspect this is the difference between "computer scientists" and "programmers."
There is a reason we don't start with the most complex. Learning a language like this teaches you symbolic manipulation. Each word is a variable. You intuitively get that as you start playing around with it.
This serves as a bridge for later.
I've also encountered people who prefer abstraction over concreteness and it works for them. So the best is for each student to learn according to his preferred style. I hope courses like udacity and coursera slowly evolve into something where each student learns by his/her preferred method.
http://comments.gmane.org/gmane.comp.lang.smalltalk.fonc/317...
Don't worry about trying to simplify modern general purpose language. Modern languages are already as simple as they could get. [And whatever you do, don't make them write machine code in binary. Although it is a lot of fun for a kid, that could seriously screw them up. Don't ask me how I know...]
You can even use 'add' instead of '+' if it helps. http://www.rebol.com/r3/docs/functions/z-plu.html
It also has a neat gui dialect, although a little retro looking.
The best way to interest kids seems to be to show them ways to do things better. Like draw perfect circles and rectangles with very little effort using a program like logo. Or show them how to write python programs to solve their math homework at top speed.