Jump to content




How to teach kids (13 +) to code?


  • You cannot reply to this topic
40 replies to this topic

#1 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 11 January 2014 - 05:03 PM

Hi,

So, late last year I join this thing at school and some how or another I ended up attempting to teach a few year 8 kids (13-14) in this group thing how to do basic coding. I started with Xcode but threw that out the door about 5 minutes in. I then decided that JavaScript might be a good idea. It sort of worked, but because they didn't really know much about HTML it made it more difficult and I could see that they weren't really getting it. Skip forward to about a week ago and the teacher which was coordinating it emailed me to ask if I'd be interested in running it for all year levels (so from 13yo to 18yo). As I think it would be a good thing to do and I'd like to improve my public speaking I said yes. However, I've spent the last week trying to figure out how to teach quite possibly 30+ people how to code.

JavaScript isn't really ideal, I don't really want to do a visual (block based) language. I should also state that it only needs to support Mac, Linux or Windows support is irrelevant. Now, I know many of you are screaming, "Just use ComputerCraft!" However, I'm not really sure if it's the best place to start, and besides, I don't know how keen the teachers will be with everyone using Minecraft during school.

So, after a rather long winded back story, what is the easiest programming language/environment to teach to kids?

#2 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 11 January 2014 - 05:28 PM

Khan academy has a pretty good Javascript web interpreter that allows for everything from simple "hello world" programs to complex three dimensional graphical objects . Because it is web-based, you don't have to worry about platform issues (you say you care only about mac, but keep in mind that some may want to go home and try on their Windows computers). JavaScript is, in my opinion, a very good language to beginning working with (although Object orientation with prototypes is a bit strange).

If you are intent on not using the net, then why not start with Lua? Lua is an extremely simple, object oriented language that can do everything you might want to teach beginners, and it is easy enough to install/run on any platform.

Edited by Bubba, 11 January 2014 - 05:33 PM.


#3 Symmetryc

  • Members
  • 434 posts

Posted 11 January 2014 - 05:37 PM

LISP, Lua, or Python :).

#4 6677

  • Members
  • 197 posts
  • LocationCambridgeshire, England

Posted 11 January 2014 - 05:41 PM

Python or lua. I actually have a disliking towards lua but have no choice when it comes to minecraft computers.

Personally I find python to be the far superior option while not being harder. As for mac/windows/linux compatibility it has that nailed. Mac and Linux systems all have python 2 preinstalled (the best version :P actually 3 is newest but there are more resources for 2 so that may be an advantage). Most modern linux systems have Python 3 aswell. Windows its dead easy to install either option. 2 and 3 are not 100% compatible.

Ruby could also be added to the list I guess.

#5 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 11 January 2014 - 05:41 PM

There is MinecraftEdu, but not everyone will want to buy that. Lua and Python (my two most favourite languages, at this point) both have simple, elegant syntax. There is this little gem (http://repl.it/languages) that you can use for lua and I think python.
EDIT: two damn ninjas. IP.Board even said that 2 people ninja'd me
EDIT 2: Have you heard of the code.org project? It's trying to get kids to code. You might find some resources there.

Edited by awsmazinggenius, 11 January 2014 - 05:46 PM.


#6 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 11 January 2014 - 06:15 PM

View PostBubba, on 11 January 2014 - 05:28 PM, said:

Khan academy has a pretty good Javascript web interpreter that allows for everything from simple "hello world" programs to complex three dimensional graphical objects . Because it is web-based, you don't have to worry about platform issues (you say you care only about mac, but keep in mind that some may want to go home and try on their Windows computers). JavaScript is, in my opinion, a very good language to beginning working with (although Object orientation with prototypes is a bit strange).

If you are intent on not using the net, then why not start with Lua? Lua is an extremely simple, object oriented language that can do everything you might want to teach beginners, and it is easy enough to install/run on any platform.
Yea, actually I hadn't thought about using plain Lua. The reason I say Mac only is because everyone is required to have a MacBook, but I see where you're coming from. I've used Kahn Academy before for physics stuff but wasn't aware it had JavaScript, I'll take a look.

View Postawsmazinggenius, on 11 January 2014 - 05:41 PM, said:

There is MinecraftEdu, but not everyone will want to buy that. Lua and Python (my two most favourite languages, at this point) both have simple, elegant syntax. There is this little gem (http://repl.it/languages) that you can use for lua and I think python.
EDIT: two damn ninjas. IP.Board even said that 2 people ninja'd me
EDIT 2: Have you heard of the code.org project? It's trying to get kids to code. You might find some resources there.
Repl.it may come in useful actually, I hadn't thought about that.

I'll check out code.org too.

#7 CoLDarkness

  • Members
  • 53 posts
  • LocationVoid

Posted 12 January 2014 - 06:05 AM

View Postoeed, on 11 January 2014 - 05:03 PM, said:

Hi,

So, late last year I join this thing at school and some how or another I ended up attempting to teach a few year 8 kids (13-14) in this group thing how to do basic coding. I started with Xcode but threw that out the door about 5 minutes in. I then decided that JavaScript might be a good idea. It sort of worked, but because they didn't really know much about HTML it made it more difficult and I could see that they weren't really getting it. Skip forward to about a week ago and the teacher which was coordinating it emailed me to ask if I'd be interested in running it for all year levels (so from 13yo to 18yo). As I think it would be a good thing to do and I'd like to improve my public speaking I said yes. However, I've spent the last week trying to figure out how to teach quite possibly 30+ people how to code.

JavaScript isn't really ideal, I don't really want to do a visual (block based) language. I should also state that it only needs to support Mac, Linux or Windows support is irrelevant. Now, I know many of you are screaming, "Just use ComputerCraft!" However, I'm not really sure if it's the best place to start, and besides, I don't know how keen the teachers will be with everyone using Minecraft during school.

So, after a rather long winded back story, what is the easiest programming language/environment to teach to kids?


Well, I'm a kid too from that perspective.

But I could say Python looked the easiest for me.

Before teaching them programming languages, maybe you should start with the main aspects required for coding like algorithms and such.

#8 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 12 January 2014 - 06:13 AM

View PostCoLDarkness, on 12 January 2014 - 06:05 AM, said:

Well, I'm a kid too from that perspective.

But I could say Python looked the easiest for me.

Before teaching them programming languages, maybe you should start with the main aspects required for coding like algorithms and such.

Well, I'm still a 'kid' per say, I'm a student at the school.

The thing I don't really like about Python is the pedantic indentation. I can just seem myself having to spend 90% of the time fixing peoples' indentation.

Well, the thing is, most people find algorithms, etc rather boring. They want to be able to see results as fast as possible. They expect to be able to spend an hour or two and make Angry Birds. For this reason, at the moment I'm leaning toward just using CC with Mimic (hopefully GravityScore updates it soon :D). The drawing is very easy compared to 99% of other mediums and it's a good starting point. But, I'm welcome for further suggestions. Battery life is a fairly large issues, however.

Edited by oeed, 12 January 2014 - 06:13 AM.


#9 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 12 January 2014 - 06:31 AM

View Postoeed, on 12 January 2014 - 06:13 AM, said:

Well, the thing is, most people find algorithms, etc rather boring. They want to be able to see results as fast as possible. They expect to be able to spend an hour or two and make Angry Birds.
If they think this, you should first go over programming standards. You should do some basic boolean logic, standard statements in a pseudo-code kind of way. After that, you should start tutor programming in a specific language. Also, how silly it sounds, you should let them write pseudo-code as an assignment of sorts.

I really would recommend to use this programming diagram concept: http://en.wikipedia....iagram#See_also
For a tool here is one: http://eii.ucv.cl/nessi/

You really should tutor the real programming concepts first, otherwise you are going to get questions: "Why does x and y and z happen?"
If you are going to tutor then in a programming language, you only have to tutor them for instance the type of variables etc.

#10 CoLDarkness

  • Members
  • 53 posts
  • LocationVoid

Posted 12 January 2014 - 06:32 AM

View Postoeed, on 12 January 2014 - 06:13 AM, said:

View PostCoLDarkness, on 12 January 2014 - 06:05 AM, said:

Well, I'm a kid too from that perspective.

But I could say Python looked the easiest for me.

Before teaching them programming languages, maybe you should start with the main aspects required for coding like algorithms and such.

Well, I'm still a 'kid' per say, I'm a student at the school.

The thing I don't really like about Python is the pedantic indentation. I can just seem myself having to spend 90% of the time fixing peoples' indentation.

Well, the thing is, most people find algorithms, etc rather boring. They want to be able to see results as fast as possible. They expect to be able to spend an hour or two and make Angry Birds. For this reason, at the moment I'm leaning toward just using CC with Mimic (hopefully GravityScore updates it soon :D). The drawing is very easy compared to 99% of other mediums and it's a good starting point. But, I'm welcome for further suggestions. Battery life is a fairly large issues, however.

Can't really help if the kids are supposed to be mainly not-going-to-work-hard-but-i-want-angry-birds type.

#11 6677

  • Members
  • 197 posts
  • LocationCambridgeshire, England

Posted 12 January 2014 - 06:56 AM

See I think pythons indentation is a good thing. Always good practise to indent your code no matter what language otherwise it has a tendancy to be unreadable (and as a result I hate reading some of the programs people post here because they seem to ignore the existence of indentation). No better way to teach them from day 1 to indent their code than to use a language where indentation is required.

#12 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 12 January 2014 - 07:12 AM

View Post6677, on 12 January 2014 - 06:56 AM, said:

See I think pythons indentation is a good thing. Always good practise to indent your code no matter what language otherwise it has a tendancy to be unreadable (and as a result I hate reading some of the programs people post here because they seem to ignore the existence of indentation). No better way to teach them from day 1 to indent their code than to use a language where indentation is required.
true, that is a good habit to put into people, but using a language that enforces different indentation levels with different compilers is not a good thing, 'cause more than anything it will deter them from the language - or even programming - due to its annoying nature. its just better to teach people from the very start about good indenting, its not a difficult task to perform, look at most students in my programming course, we all learnt with Pascal and C neither of which enforce indentation, but instead our lecturer drilled it into us for weeks on end, until eventually we were repulsed by ourselves when we did bad indentation, even on temporary or testing code...
one should not pick a language because of coding habits it enforces, one should pick a language based on how easy it is for people to learn and understand basic programming concepts that then can be applied to other languages, the easier the syntax the less time they spend on learning the syntax and the more time they spend on learning the concepts; that is where languages like Lua or Pascal come into play, they're very easy syntactically to pick up.
I'll see if I can find the PhD thesis/paper that my "Introduction to Programming" lecturer/professor wrote at the end of last year about teaching and methods of teaching programming to people who've no idea about anything programming related.

Edited by theoriginalbit, 12 January 2014 - 07:19 AM.


#13 6677

  • Members
  • 197 posts
  • LocationCambridgeshire, England

Posted 12 January 2014 - 07:32 AM

View Posttheoriginalbit, on 12 January 2014 - 07:12 AM, said:

View Post6677, on 12 January 2014 - 06:56 AM, said:

See I think pythons indentation is a good thing. Always good practise to indent your code no matter what language otherwise it has a tendancy to be unreadable (and as a result I hate reading some of the programs people post here because they seem to ignore the existence of indentation). No better way to teach them from day 1 to indent their code than to use a language where indentation is required.
true, that is a good habit to put into people, but using a language that enforces different indentation levels with different compilers is not a good thing,
It doesnt force any particular indentation level. IronPython, Jython, PyPy Cython and CPython all allow different indentation levels for different source files as long as you are consistent with what the indentation level is.
CPython and PyPy the convention is to use 4 spaces for an indent, however if you consistently use 2 spaces it will not error, Google use 3 space indents (parts of their services actually use python, as does part of chrome OS excluding the python scripts already included in the linux underpinnings), I for awhile used tabs because I didnt realise I had GEdit incorrectly configured (forgot to turn tabs to spaces on), I did a test and the standard python interpreter was perfectly happy to take a 2 tab character indent for those who want to be truly obscure. Consistency is the key, choose what you want, just stick to it. Python will crash if you use tabs for the one indent yet use 6 spaces for another.
IronPython and Jython convention however is for a single tab character, I use IronPython with 4 spaces though.

python isn't fussy over what the indent used is, the principle above is actually written in one of the PEP documents somewhere.



With your comment on easy syntax, I fully agree, its just my belief is that Python also possesses the easy to pickup syntax required and that lua actually loses with basic programming concepts. No concept of seperate int or float and the table datatype is just utterly bizarre when compared with a simple list or array, I'm not saying they are bad, but I think again having the knowledge that an integer and a floating point are seperate things and knowing how to handle a conventional list or array might be more useful skills looking forward.

Edited by 6677, 12 January 2014 - 07:35 AM.


#14 Mads

  • Members
  • 604 posts
  • LocationCopenhagen, Denmark

Posted 12 January 2014 - 11:25 AM

Send them off to a flying start. Teach them C or C++.

#15 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 12 January 2014 - 05:07 PM

View Posttheoriginalbit, on 12 January 2014 - 07:12 AM, said:

I'll see if I can find the PhD thesis/paper that my "Introduction to Programming" lecturer/professor wrote at the end of last year about teaching and methods of teaching programming to people who've no idea about anything programming related.
That would be very useful if you have it.

View PostMads, on 12 January 2014 - 11:25 AM, said:

Send them off to a flying start. Teach them C or C++.
Well, maybe after a term or so of Lua/something similar I'll probably switch to something like C, after they understand the basic concepts of functions, variables etc.

#16 surferpup

  • Members
  • 286 posts
  • LocationUnited States

Posted 12 January 2014 - 05:49 PM

Back in the day, we used to teach kids how to program with Apple Logo. Minecraft turtle programs are far superior in that regard, and I think Lua is an excellent first language. Even if you don't use Minecraft, Lua is available in runtime environments for OSX.

#17 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 12 January 2014 - 05:51 PM

View PostMads, on 12 January 2014 - 11:25 AM, said:

Send them off to a flying start. Teach them C or C++.

I did this when I first started programming. It wasn't really a good idea.

Edited by Bubba, 12 January 2014 - 05:52 PM.


#18 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 12 January 2014 - 05:53 PM

Maybe try teaching them the LOVE 2D framework.

EDIT: Another two damn ninjas

Edited by awsmazinggenius, 12 January 2014 - 05:53 PM.


#19 InputUsername

  • Members
  • 231 posts
  • LocationThe Netherlands

Posted 12 January 2014 - 06:27 PM

I agree with what has been said before; first teach them pseudo code and find out what kind of kids they are ("I want to learn" or "I don't want to do anything, but I want Angry Birds"). Then choose a language accordingly.

I think Game Maker is a good start (no hate please). It has basic drag-and-drop functionality to teach the basics of programming, but also has a language to program in. And like GM's creator said: the language (GML) is similar to other 'real' languages, so it's easy to switch when the you understand it.

#20 ikke009

  • Members
  • 224 posts
  • LocationSliding between sunbeams

Posted 13 January 2014 - 05:15 PM

There's a few things I would suggest. For the really young kids (13 or 14) I would suggest using microsoft excel or maple rather than a "real" programming language. I say this because excel is pretty easy to learn how to use, while giving them something they can actually do something with later in their lifes..

As for actual scripting, I would suggest using Love2D (lua). You can come up with a number of excercises/challenges ranging from easy to advanced. Consider using some half-finished scripts that the kids can complete as practice.
Love2D allows for relatively simple excercises, here are some examples:
-making a dot move from left to right on the screen
-making a dot move from left to right on the screen using the right arrow key
-making a dot move up/down/left/right on the screen using the arrow keys
-make a box in the screen where the dot can not move trough

Also for interactive teaching like this a whiteboard or beamer is a must. If you don't have access to this you're gonna have to write down examples on those 30+ computers individually to help those kids :P

Good luck and have fun, if you enjoy teaching as much as I do you're gonna have a great time :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users