8

I was talking with some of the mentors in a local robotics competition for 7th and 8th level kids. The robot was using PBASIC and the parallax Basic Stamp. One of the major issues was this was short term project that required building the robot, teaching them to program in PBASIC and having them program the robot. All in only 2 hours or so a week over a couple months. PBASIC is kinda nice in that it has built in features to do everything, but information overload is possible to due this.

My thought are simplicity is key.

When you have kids struggling to grasp:

if X>10 then <DOSOMETHING>

There is not much point in throwing "proper" object oriented programming at them.

What are the essentials needed to foster an interest in programming?

Edit: I like the notion of interpreted on the PC as learning tool. Due to the target platforms more than likely being somewhat resource constrained, I would like to target languages that are appropriate for embedded work. (Python and even Lua require more resources than the target likely to have. And I actually kinda like Lua.) I suppose that is one of the few virtues BASIC has, it has been ran on systems with less than 4K for over 30 years. C may not be a bad option if there are some "friendly" tools available such as Ch.

3
  • 1
    The proposed duplicate (stackoverflow.com/questions/2436092/…) is certainly a relevant see also but it is not a duplicate of this question. Mar 25, 2010 at 19:34
  • Simplicity is key. Unfortunately, BASIC is pretty archaic. I'm not real familiar with Python, but it comes strongly recommended. Definitely not C, and only Java out of desperation, if you can't find something else. It's important that whatever language you use not reenforce the "magical thinking" that certain obscure incantations will somehow do wonderful things, and the key to programming is learning all the secret incantations. The key to programming is clearly understanding what's going on, at the level of detail where you're exposed to it.
    – Hot Licks
    Aug 23, 2013 at 15:48
  • Of course, if you want something that's really simple there's always Whitespace. How can a language be any simpler than one that has NO keywords or symbols? (;))
    – Hot Licks
    Aug 23, 2013 at 15:53

14 Answers 14

11

The most important is not a lot of boiler plate to make the simplest program run.

If you start of with a bunch of

 import Supercalifragilistic from <expialidocious>
 public void inherited security model=<apartment>      
    public : main .....

And tell them they "not to worry they aren't supposed to understand that" - you are going to put off both the brightest and the dumbest.

The nice thing about python is that printing "hello world" is print "hello world"

2
  • 2
    Just to provide a different perspective, when I was learning to program at this age, I saw things like that, and saw it as an unexplored depth. I knew there was some kind of thing happening that made that stuff significant, and it piqued my curiosity to explore even deeper. I don't think programming is a field that rewards those seeking instant gratification. Instead, it's a field for people who like problem solving. Mar 26, 2010 at 0:30
  • Good point - I used to recommend TCL/TK because you could start with a gui, it meant that kids could feel they were actually making 'real' programs. Commandline examples felt disconnected from the apps they were used to using, today I would probably start with Javascript Mar 31, 2011 at 15:31
7

Fun, quick results. Capture the attention span of the kid.

Interpretive shells like most scripting languages offer (command line) that lets the student just type 1 or 2 liners is a big deal.

python:

>>> 1+1
2

Boom, instant feedback, kid thinks "the computer is talking back". Kids love that. Remember Eliza, anyone?

If they get bogged down in installing an IDE, creating a project, bleh bleh bleh, sometimes the tangents will take you away from the main topic.

BASIC is good too.

Look for some things online like "SIMPLE" : http://www.simplecodeworks.com/website.html

1
  • 1
    Good point... "10 ? "I AM GREAT! ";:goto 10" A typical quick and dirty BASIC program would make me giddy when I was that age. Mar 30, 2010 at 12:03
5

A team of researchers, beginning at Rice, then spreading out to Brown, Chicago, Northeastern, Northwestern, and Utah, have been studying this question for about 15 years. I can't summarize all their discoveries here, but here are some of their most important findings:

  • Irregular syntax can be a barrier to entry.

  • The language should be divided into concentric subsets, and you should choose a subset appropriate to the student's level of knowledge. For example, their smallest subset is called the "Beginning Student" language.

  • The compiler's error messages should be matched to the students' level of knowledge. If you are using subsets, different subsets might give different messages for the same error.

  • Beginners find it difficult to learn the phase distinction: separate phases for type checking and run time, with different kinds of errors. For this reason, beginners do better with a language where types are checked at run time, i.e., a dynamically typed language.

  • Beginners find it difficult to reason about mutable variables and mutable objects. If you teach pure functional programming, by contrast, you can leverage students' experience with high-school and middle-school algebra.

  • Beginning students are more engaged by an interactive programming environment than by the old edit-compile-link-go model.

  • Beginning students are engaged by splash and by interactivity. It's good if your language's standard library provides built-in support for creating and displaying images. It's better if those images are supported within the interactive programming environment, instead of requiring a separate player or viewer. And it's even better if your standard library can support moving images, or some other kind of animation.

    Interestingly, they have got very good results with just 2D images. Even though we are all surrounded by examples of 3D computer graphics, students seem to get very engaged working with just two-dimensional images.

These results have been obtained primarily with college students, and they have been replicated at over 20 universities. However, the research team has also done some work with high-school and middle-school students. The first papers on that work are just coming out, so I'm less aware of the new findings and am not able to summarize them.

1
  • I like the "Phase" comment, I'm thinking I like the notion of something that has a clean "C like" syntax, but the interpreted nature of old school basic. Ch, PicoC, and TinyC look like they may be approaching something that would be useful. PicoC was actually designed to be embedded too, which is kinda interesting. Mar 30, 2010 at 11:50
4

When you have kids struggling to grasp:

if X>10 then <DOSOMETHING>

Maybe it's a sign they shouldn't be doing programming?

What are the essentials needed to foster an interest in programming?

To see success with no or little effort. To create something running in a matter of minutes. A lot of programming languages can offer it, including the scary C++.

In order to avoid complication with #includes, multiple source files, modularization and compilation, why not have a look elsewhere? Try to write some Excel macros or use any other software with some basic built-in scripting language to automate certain tasks?

Another idea could be to play with web pages. It is not exactly programming, but at least easy to achieve something and show to others with pride.

6
  • I agree. I learned to program using C++ (although it was taught rather C-style), and the fact that I could do a simple calculator-type program copied from a hand-out on the first day of class was magic.
    – justkt
    Mar 25, 2010 at 19:23
  • 2
    -1: We are talking about kids, do you have any? Plus, you can't do: "if X>10 then <DOSOMETHING>" in Java, C#, C++ without... #include, use, int main() {}, compile, run.
    – mrjoltcola
    Mar 25, 2010 at 19:24
  • @mrjoltcola: I see your point. Actually a good one. But can't a teacher just prepare it and tell the kinds ignore it and leave it for the "upper classes"?
    – user151323
    Mar 25, 2010 at 19:27
  • I agree about 1/2 of your point. Every kid isn't suited for it. Depends on the age. At certain ages it might be too early to thin the ranks, so to speak, so the key is to capture their imagination and attention. Anyway, my downvote reversed, since the asker said 7th and 8th grade. Usually the bright ones are evident by then, except for those lacking opportunity (poor kids without a PC).
    – mrjoltcola
    Mar 25, 2010 at 19:31
  • Yes, you're right again.
    – user151323
    Mar 25, 2010 at 19:36
2

This has been said on SO before, but... try Scratch. It's an incredible learning tool for kids. It teaches the basics of programming concepts in a hands-on and language-independent way. After a bit of playing around with it they can get down to learning a specific language's implementation of the concepts they already understand.

2

The common theme in languages that are easy for beginners - especially children to pick up is that there's very little barrier to entry, and immediate feedback. If "hello world" doesn't look a lot like print "Hello, world!", it's going to be harder for people to pick up. The following features along those lines come to mind:

  • Interpreted, or incrementally JIT compiled (which looks like an interpreter to the user)
  • No boilerplate
  • No attempt to enforce a specific programming style (e.g. Java requiring that everything be in a class definition, or Haskell enforcing purely functional design)
  • Dynamic typing
  • Implicit coercion (maybe)
  • A REPL
1

Breaking the problem (read program) down into a small set of sections (modules) that do one thing and do it very well.

1
  • 1
    "do it very well" for kids == "does more or less what they were expecting for the limited parameters they considered"
    – Beska
    Mar 25, 2010 at 20:00
1

You have to get them to stop thinking like a user and start thinking like a programmer. They need to take it one step at a time. Ask them what they have to think of in order to figure out the problem them selves and then write them down as steps. If you can then you break each step even more in the same mater. When done you will have the program in english making it simpler to program for real.

I did this with a friend that just could not get it and now he can. He used to look at something that I did and be bewildered and I would say that he has done more complex stuff than this.

1
  • Yeah, I think you have a good point. It's the difference between "modern" computer users and computer users when I was a kid. Today you just click and run, then you more than likely had to know BASIC at least. Mar 30, 2010 at 11:46
1

One of the more persistently-present arguments I have had with other programmers is whether or not one's first language should require explicit type languages. Many are of the opinion that learning a language which requires you to explicitly declare type information is one which will teach you to program typefully. Conversely, it can be said that dynamic languages might present a less demanding learning curve. It goes either way, I suppose.

3
  • +1 for bringing this up. I like the idea of teaching early on that types are important, and I think it's a pretty simple concept, so it's not a large hurdle to overcome...but I imagine that others would (strongly) disagree.
    – Beska
    Mar 25, 2010 at 20:02
  • Yes. I have taught with Processing before and it is based on Java. There is the Java ugliness there but it's great for beginners! processing.org
    – yonkeltron
    Mar 26, 2010 at 17:00
  • I can remember "getting" the difference between "strings" and numeric types in BASIC back when I was a kid. It was like a light bulb came on when it clicked that a byte of ram and character were the same. (Thanks to liberal amounts of PEEKING and POKING) Some of there earliest programs I wrote "DUMPED" the contents of memory on a 64K Atari, when you got to your program in ram you could see all your string constants and comments interspersed between BASIC Tokens. (I didn't know they were called tokens at the time, but you learn all the jargon in college.) Mar 30, 2010 at 12:01
0

My advice: start with a simple model of how a computer works. I am particular to stack machines as good tools for teaching computation.

0

Remember that beginners are learning two disciplines at the same time: how computers work and the abstract logic involved (the basics of Computer Science), plus how to write programs that match their intended logic (learning a specific language's syntax and idioms). You have to address both concerns in an interwoven fashion in order for the students to quickly become effective. This is also the reason experienced programmers can often pick up new languages quickly.

It's worth noting Python grew out of a project for a language named ABC, which was targeted at beginners. For example, the required colon isn't strictly required, but was found to improve readability:

if some_condition:
  do_this()
0

I got 3 words : Karel the Robot. it's a really really simple 'language' that is designed to teach people the basis of programming :

Look for it on the web. You can look at this, though I never tried it : http://karel.sourceforge.net/

0

While this isn't related to programming a robot, I think web programming is a great place to start with kids that age. It's how I started at that exact age. It easily translates to something kids understand if they use the web at all. Start with HTML, throw in Javascript, and soon they want to be doing features requiring server-side scripting or some sort, and things progress from there.

With the kind of kids who are already interested in robotics, though, I'd actually go for a different language like the ones already described. If you want to work in a field like robotics, you don't need to be convinced to try something hard. You need to be challenged.

1
  • Eep, careful if a kid starts with web programming, he might run away screaming and never find out about the other types of programming.. :)
    – mrjoltcola
    Mar 25, 2010 at 19:33
0

A few years ago I saw a presentation at Ignite! Seattle from one of the people working on the project now known as Kodu who envisioned as a programming language for children. He spent time talking about what common language features could simply be thrown out in a programming environment meant to teach fundamentals.

A lot of cherished imperative constructs, like C-style for loops, were simply left out in favor of a simple object-messaging approach. Object-oriented programming isn't hard to understand when you think about "objects" and "messages"; the hard part is when you deal with things that programmers, but not children, care about, like inheritance and contracts and sweeping abstractions. I've got this thing (noun), now act on it (verb), in this way (adverb like quickly), when thing (sees/bumps into) something (with some attribute) (that's your if). Events are really conditions, and have all of the power of conditions, but it's up to the runtime to identify when those events happen.

This kind of event and messaging driven approach probably translates even better to robots than procedural programming would, anyway, so it might be a good way to look at the problem. Try not to think about what you'd "need" to know to program in C or Pascal or something; think about what you'd want to be able to make something do.

2
  • Kudu looks more targeted towards elementary school level kids. When I was that age (Jr. high), I was programming in Atari Basic, Apple BASIC, Z80 Basic, MS BASIC. So I have a certain amount of "faith" in the ability of the student to grasp programming concepts. Mar 30, 2010 at 11:53
  • Yes, as did I, but BASIC didn't teach me anything about objects, and the only convenient data structures were arrays. So in many ways, this object-messaging approach is actually more sophisticated than that.
    – JasonTrue
    Mar 30, 2010 at 14:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.