3 ms·
This is really not a good way. Kids are naturally interested in tools that are magical. You need to show that power right away and without having to lecture the
by sytelus 9y ago
This is really not a good way. Kids are naturally interested in tools that are magical. You need to show that power right away and without having to lecture them for an hour. Here's how I would do it. Go to some online interpreter for BASIC[1]. Type
10 PRINT "Hello World"
Tell kids that you can make computer print any message. After some fun suggestions, put next line,
20 GOTO 10
Kids would immediately get it what just happened. Then introduce, how to print message just 5 times,
5 FOR i = 1 to 5
Then ask them to sum numbers from 1 to 5 verbally. As they do it, ask them to sum numbers from 1 to 100 and watch the frowns. Now ask them what they would want in return if teacher really told them to do it and how long it would take them. As they reply, write 5 lines of code that does that.
10 SUM = 0
20 FOR i = 1 to 100
30 SUM = SUM + i
40 NEXT
50 PRINT SUM
At this point kids with programming aptitude should be hooked. Rest would be still puzzled a bit. To get them onboard, switch to graphics mode and start writing code for fun stuff like expanding circles. Making series of beeps. Doing piano tunes. Gradually move towards more visual stuff like basic fractals, equation plotting, random color noise. Generate sound waveforms and play it. Before you run code ask them how things would look and then run. Start adding interactivity. If you are doing great, there would be suggestion to make a game. Go for it! Watch wishlist keep flowing and hours pass by.
Note that I have purposely chose BASIC language above. It's fairly forgiving with syntax. It gives error messages which are much more digestible.There is no overhead of includes and imports that very often trips off new comers in mystery land. All you really need is kids to understand just two constructs GOTO and IF-THEN. Its extremely easy to understand these two and they would be able to grow from there.
PS: before anybody cries about GOTO considered harmful and suggest everyone needs to start with functional programming, I'd suggest try that idea first on real group of kids. There are always 1 or 2 kids who would be lucky enough to survive through and "get it" but you will turn rest of them against programming very quickly.
[1] http://www.calormen.com/jsbasic/ http://www.calormen.com/jsbasic/