Jump to content




How to teach kids (13 +) to code?


40 replies to this topic

#21 oeed

    Oversimplifier

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

Posted 13 January 2014 - 06:17 PM

View Postikke009, on 13 January 2014 - 05:15 PM, said:

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 :)
The problem with excel is I believe the Mac version doesn't support Visual Basic anymore (at least I think so).

Love2D is a great idea though, I hadn't thought of that. Maybe after some basic Lua in CC well move on to that.

Most (if not all) of the interactive whiteboards are in the junior school (ankle height midgets to 12-13), but theres more than enough normal projects around the place.

#22 6677

  • Members
  • 197 posts
  • LocationCambridgeshire, England

Posted 14 January 2014 - 02:36 PM

View Postoeed, on 13 January 2014 - 06:17 PM, said:

The problem with excel is I believe the Mac version doesn't support Visual Basic anymore (at least I think so).

Love2D is a great idea though, I hadn't thought of that. Maybe after some basic Lua in CC well move on to that.

Most (if not all) of the interactive whiteboards are in the junior school (ankle height midgets to 12-13), but theres more than enough normal projects around the place.
VBScript is x86 windows only yes. Slightly buggy on x64 office even. Scrapped from the windows ARM port of office entirely and not included on mac either.

With my python bias: there is pygame too. Having not looked into love2d with my dislike of lua I can't say which is easier/harder. Personally I've found monogame to be the easiest graphics library though over time, but that wouldnt be suitable for the kids at all (C# or VB.net being harder and I wouldnt expect kids to understand the interface between ironPython and .NET libraries - which is possible by the way)

#23 mrpoopy345

  • Members
  • 148 posts
  • LocationMy Computer

Posted 18 January 2014 - 09:37 AM

Well, as an 11 year old, I can say python was the easiest for me to learn. Code.org does a good job of teaching, also.

#24 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 18 January 2014 - 02:18 PM

I like LÖVE too. Simple but can do advanced things. Try that with them.

#25 oeed

    Oversimplifier

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

Posted 18 January 2014 - 05:47 PM

View Postawsmazinggenius, on 18 January 2014 - 02:18 PM, said:

I like LÖVE too. Simple but can do advanced things. Try that with them.

Yea, would you say it's easier or harder than CC?

#26 ikke009

  • Members
  • 224 posts
  • LocationSliding between sunbeams

Posted 20 January 2014 - 04:35 PM

Slightly harder than CC but CC seems very inapropriate to use as a proper teaching method, since CC is a game..

#27 oeed

    Oversimplifier

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

Posted 20 January 2014 - 06:40 PM

View Postikke009, on 20 January 2014 - 04:35 PM, said:

Slightly harder than CC but CC seems very inapropriate to use as a proper teaching method, since CC is a game..
I see where you're coming from, but I'd be using an emulator. CC it self isn't really a game, I just feel that going straight in to a game is a little silly.

#28 ikke009

  • Members
  • 224 posts
  • LocationSliding between sunbeams

Posted 21 January 2014 - 02:50 PM

A modification on a game is still a game imo..
also LOVE's graphic system is obviously 10000x better than CC's. Instead of making your students draw stuff trough cursor positions and pixel art you'll acutally be able to use a normal system.
If you're not very familiar with LOVE2D, goature on youtube has a very decent and in-depth guide on how to make a game with it.

#29 oeed

    Oversimplifier

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

Posted 21 January 2014 - 04:42 PM

Ok, I'll take a look at it.

#30 Jguy

  • Members
  • 12 posts

Posted 21 January 2014 - 04:42 PM

I've been rather successful on starting people out on Python. While the indentation requirement for different blocks of code it teaches people to indent, which is sadly what some programmers lack even after "going to school", their indnetation isn't correct.

Python also has the benefit of not needing line closing and the if, elif else structure is easy to grasp. You also don't need to declare variables like you do in C (int f, char t, etc.) and function defining and usage is easy and flexible.

Out of all of the programming languages I have under my belt I tend to pick up Python for any simple to do stuff most of the time. It was also fairly easy; I taught myself most of the basics in a few hours, while I still don't have a full grasp on C or C++.

Edited by Jguy, 21 January 2014 - 04:43 PM.


#31 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 21 January 2014 - 06:44 PM

I would teach them java. First the basics, then, if they know enough, I would try some 'practical' stufg with the bukkit api and a craftbukkit server. You can learn much from bukkit imo :D
Maybe you set up a bungee server which has access to every student's local server. Then they can show their friends what they are able to do with bukkit in minecraft :D

At the end you get them to code a big minigame which they then play :D

#32 Agoldfish

  • Members
  • 451 posts
  • LocationSome Fish Bowl in Ohio.

Posted 21 January 2014 - 07:09 PM

I first got into coding from this mod, and Codeacademy. Codeacademy is a wonderful website, with some starter languages like Ruby, Python, JavaScript, and some other ones I can't remember. I'd try that first. :)

#33 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 21 January 2014 - 08:18 PM

LÖVE is actually a little bit like CC in some ways. And you shouldn't teach them one drawing method, and then make them use a different one (same with the other functions in LÖVE and CC). I would use LÖVE.

#34 oeed

    Oversimplifier

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

Posted 22 January 2014 - 03:51 AM

View PostJguy, on 21 January 2014 - 04:42 PM, said:

I've been rather successful on starting people out on Python. While the indentation requirement for different blocks of code it teaches people to indent, which is sadly what some programmers lack even after "going to school", their indnetation isn't correct.

Python also has the benefit of not needing line closing and the if, elif else structure is easy to grasp. You also don't need to declare variables like you do in C (int f, char t, etc.) and function defining and usage is easy and flexible.

Out of all of the programming languages I have under my belt I tend to pick up Python for any simple to do stuff most of the time. It was also fairly easy; I taught myself most of the basics in a few hours, while I still don't have a full grasp on C or C++.
Quite a number of people on this topic (almost 50%) have recommended Python. I personally haven't had much of a look at it, but I probably will.

View PostFreack100, on 21 January 2014 - 06:44 PM, said:

I would teach them java. First the basics, then, if they know enough, I would try some 'practical' stufg with the bukkit api and a craftbukkit server. You can learn much from bukkit imo :D
I tried making an Inception mod for Minecraft a while ago, it was the first time I used Java. At let me tell you, it's probably the last. The arrays/dictionaries/tables and the most ridiculous rubbish I've ever seen. Words can not describe how much I hate them.

View Postawsmazinggenius, on 21 January 2014 - 08:18 PM, said:

LÖVE is actually a little bit like CC in some ways. And you shouldn't teach them one drawing method, and then make them use a different one (same with the other functions in LÖVE and CC). I would use LÖVE.
Once I've finished my top secret project I'll take a look at LÖVE, I've got a lot on my plate at the moment so I don't really have time for it.

#35 6677

  • Members
  • 197 posts
  • LocationCambridgeshire, England

Posted 22 January 2014 - 08:17 AM

A java array kinda works like an array in just about every other programming language except lua...




Oh. For python + games you get pygame.

With python rather than asking what you can do its better to ask what you can't do :P The answer to that pretty much consists of the usual standard answer for interpreted languages which is "anything that needs to be incredibly quick".

I still think python meets your requirements best, you mentioned not wanting to install things and I think that the systems being used were macs. Just open the terminal on OSX and type "python" and your straight into the interactive Python 2.7 interpreter.



You also mentioned javascript. Take a look at node.js which is pretty much a standalone javascript runtime (actually forked from chrome-v8 which is pretty high performance) allowing you to use javascript as a normal alternative to python or lua without any reliance on the browser. There are graphics libraries etc available for it too. I actually had it running as a crude serial terminal (talking to a stellaris launchpad over bluetooth) on the windows command line a few days ago.

#36 oeed

    Oversimplifier

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

Posted 22 January 2014 - 05:14 PM

Macs don't come with Python, but it shouldn't be too hard to install.

The main issue is I don't want to teach a language I don't have much experience with.

#37 6677

  • Members
  • 197 posts
  • LocationCambridgeshire, England

Posted 22 January 2014 - 05:44 PM

View Postoeed, on 22 January 2014 - 05:14 PM, said:

Macs don't come with Python, but it shouldn't be too hard to install.

The main issue is I don't want to teach a language I don't have much experience with.
Yes they do..... I already told you how to launch it and regularly do it in the apple store just to piss the staff off (the so called apple genius staff are usually rather thick and don't know how to deal with a terminal window running a simple counter program)

From python:

Python on the Mac Posted Image

Python on the Mac has the ability to work with
and much much more of the Mac infrastructure!

Python comes pre-installed on Mac OS X, but due to Apple's release cycle, it's often one or even two years old. The overwhelming recommendation of the "MacPython" community is to upgrade your Python by downloading and installing a newer version from the Python standard release page.

If you are using Mac OS X 10.5, see the Leopard wiki page for detailed information.

If you're just curious...

You don't have to download anything. You can run a Python interpreter by double-clicking on Applications / Utilities / Terminal (here's a picture), then typing "python" into the window that opens up.

You'll see a prompt that looks like this:






Last I checked on my dads mac it was 2.7.3 and I think a bit newer on mavericks (off the top of my head I think the most recent python 2 release is 2.7.5)


#38 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 23 January 2014 - 08:34 PM

For Python, I saw this book called "Python for Kids" in the bookstore when I was browsing there today. I looked through the first couple of pages for you, and apparently there is a website if you want to look. http://python-for-kids.com/

#39 oeed

    Oversimplifier

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

Posted 23 January 2014 - 09:58 PM

View Postawsmazinggenius, on 23 January 2014 - 08:34 PM, said:

For Python, I saw this book called "Python for Kids" in the bookstore when I was browsing there today. I looked through the first couple of pages for you, and apparently there is a website if you want to look. http://python-for-kids.com/

That looks great, thanks!

#40 6677

  • Members
  • 197 posts
  • LocationCambridgeshire, England

Posted 24 January 2014 - 04:29 PM

Huh sweet.

Another python related help source. There are quite a few programming guides revolving around python on the raspberry pi, many of which are child friendly. Thanks to the cross platform nature there isn't actually anything pi specific on some of them (a few of them do things like blinking LED's etc which uses a raspberry pi specific library, besides you dont have a GPIO port on your mac or PC to attach said LED). Might require a bit more effort on your behalf to sort the rubbish from the great, but there should be some useful resources out there.

Edited by 6677, 24 January 2014 - 04:30 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users