Started programming when I was 8 using basic.
Things have changed a lot since then, but one thing probably hasn't:
The best incentive I got to continue learning how to program was my ability to impress others.
I would develop screen savers (Lines floating on the screen, lines being drawn randomly on screen, ball bouncing off the edges of the screen, flying into a star-field as the stars move away from the center of the screen), and show them off to my friends and family.
I would develop a small game (spaceship moves up and down to avoid hitting incoming asteroids) - I'd show it to my friends. Let my brothers play the game.
These were the type of rewarding tasks that led me to keep on learning and experimenting.
If you're doing Python - I strongly recommend "Inventing computer games with python" https://inventwithpython.com/
Using pygame, you can get really quick graphical results, and start showing off some awesome things.
I even built a Tetris game based on pygame a while back when I was learning python myself.
Also - if you're doing turtle programming, check out http://pythonturtle.org/ - an awesome implementation of turtle graphics for python.
That matches a lot of my experience. I created a bunch of those lines floating on the screen which never failed to impress classmates who didn't frequent the computer lab and were stuck doing "write a program to calculate compound interest".
My neatest trick at that point was to make a 'fake' pre-loader where the progress bar showed a fake percentage with a cool graphic. My next 'impress project' was build a menu in QBasic
where you could use the arrow keys on the keyboard to graphically move the highlighter on a menu. Almost everyone else at that time was doing menu selection pressing the number of the menu item. At that point I thought of it myself since there wasn't any internet in our lab so I still feel really good about it :) It also got me a spot on our school programming team primarily because no one else did the menu as quickly as I could then.
I'd like to think that I'm an interaction designer today partly because of the feedback and enjoyment I got out of doing projects like that.
I agree with you since I had a very similar story with computers. Some day my brothers and I discovered the computer had something called QBASIC and it had a few games, which we then noticed you coudl change and totally mess up. And it had a HELP that explained everything! And it had a way to do prettier graphics than what NIBBLES.BAS and GORILLA.BAS had! Eventually my older brother found the QBASIC compiler and we kept copies of that floppy just in case some failed.
When I got older I did a few things in C, but didn't get the chance to go too deep much into it because when I started university at 18 I pretty much stopped programming for fun, until my graduation project began and I got in touch with Python.
Most "Teach Kids Programming" are build on the idea that programming means sitting still in front of a keyboard typing stuff. Most kids under 10 can manage at most about 15 minutes of that before getting bored and either wanting to get up and jump around or watch YouTube / play games.
Scratch (https://scratch.mit.edu/) helps a bit but it's still "stuck in front of a screen" and reaching a "reward", in terms of a meaningful result takes longer than the average childs attention span.
Best starting point I've ever seen is this "How to Train your Robot" real world game - https://drtechniko.com/2014/07/09/teaching-the-how-to-train-... - which is based on the idea that adults play the robots and kids get to tell them what to do. That's immediately a fascinating starting point for kids to hold their interest while they pick up some basic ideas of logic and creating instruction sets for a 3rd party to execute.
There was an iOS game out about 5-ish years ago where you did essentially this. You had a robot on a small grid/map with a start and end point. The objective was to get the robot from the start to the end. You had a set of icons/commands, each one indicating a different instruction (step forward, turn left, turn right, jump, etc) that you used to navigate the robot. Successfully completing each map unlocked a more challenging map with more steps and obstacles to avoid.
It also gave you a way to combine a set of instructions into what was essentially a function/method so that you could then call the function/method instead of retyping all the steps. My kid was too young at the time but now that he's older I can't find it or it was never updated.
Anyone happen to know of this app, or something similar?
Attention span varies considerably from one child to another.
The 'How to Train your Robot' game appears to be aimed at a 2.5 year old and as the mother of a 2.5 year old myself, it seems ludicrous to try to get a child that age into programming.
On the other hand, my 5 year old needs something more than directing robots around - Robot Turtles is too easy now for example, but he does enjoy playing with ScratchJr on the iPad, sometimes for quite long periods of time. It also of course has the big advantage at this age of not requiring literacy.
> The 'How to Train your Robot' game appears to be aimed at a 2.5 year old and as the mother of a 2.5 year old myself, it seems ludicrous to try to get a child that age into programming.
I've found it works best as a party game with a group of kids where it can have a competitive dimension - whoever can "write a program" to get the "robot" to achieve some goal fist e.g. navigate an obstacle course and pick up an object. Even better when kids are in pairs; one pair might focus on winning, another pair might get absorbed on getting the adult to do stupid things which is hilarious etc.
And from what I've seen it can be fun for kids up to 10 at least, if you add some additional dimensions e.g. "robots" that can "fight" by throwing rolled up paper balls at other.
It's just a fancy way of saying what it really is (estimating pi with increasing accuracy using geometry). I remember doing the pencil circle drop calculation for pi in middle school which is a similar concept just physical instead of on a computer.
The problem I've found with pygame is that the time from starting to producing a playable game is too long, the kids get frustrated and lose interest when you need to type 20-40 lines of boiler plate to just get an image and a moving character on the screen before anything even happens. I've had much greater success with "boring" projects that produce the final result in 10-20 lines.
They already have games that we'll never be able to come close to in terms of quality. There's nothing that I can make in even 20 hours that is even close to as interesting as Minecraft or a high budget xbox game - there is effectively a very small difference to them between building a game with "boring" dynamics and solving math problems.
This mostly only applies to first projects, once you complete a few projects and have separated out the children who actually enjoy programming - that's when you can start doing multi-week epics. But you need to build confidence and give them some easy "wins" before you are going to be able to do that in my experience.
When I was learning programming in my bedroom as a kid, games and animations were the key - just far and away the most interesting and engaging things you could do. And while it was impossible in BASIC to get anything approaching commercially-produced games, it was possible to easily knock up something that was playable and fun, especially if you salted it with a bit of machine code; I fondly remember my PacMan (very slow), ET (ripoff of the infamous Atari 2600 klunker) and Minesweeper-like thing that was deceptively addictive, all done for yuks in a few hundred lines.
But for kids today, I see these problems:
- Haven't seen anything that gives the simplicity and ease of use for graphics that my old Spectrum had. This is what pygame should be providing, but I agree with you that it is actually pretty disappointing in this regard; I find its API a bit cumbersome and nonintuitive, although others' mileage may vary.
- Modern 3D games set the bar very high, and it's difficult to get kids to understand that they need to aim much lower to get going. And whereas the maths required to write a 2D game is pretty basic first principles stuff, 3D is a whole discipline that needs to be learned.
- Scratch is fun, but very limiting and, if you have a lot of stuff going on, really unplayably slow. My daughter has fun doing little animations in it, but it needs a better object system IMO in order to be able to allow users to push on with it.
I agree, it's hard to actually engage kids with boring games, and anything that involves boiler plate.
The boiler plate should just be hidden away if possible.
I think a small coding exercise that kids would like is something that automatically solves their simple algebra homework. Although, do 12 year olds just go on wolframalpha now?
> I think a small coding exercise that kids would like is something that automatically solves their simple algebra homework.
I don't think recursive tree algorithms and reverse Polish notation, the bedrock of computer algebra systems, would be so much fun to kids. Could you elaborate on what you had in mind?
There are much better resources for kids to learn Python. I recommend Chris Roffey's excellent series of Coding Club books. They are engaging, well-written and have more meaningful exercises.
This is great, thank you! I teach a weekly Python class to kids and have been slowly refining my curriculum (Shameless plug, the Sphinx docs are up online here for anyone to critique! http://justbartek.ca/python-curriculum/)
One of the more popular exercises thus far for us has been the "Bagels" program. I can't even remember where I found the game, but they find it a lot of fun as it mixes a bunch of mental challenges into one program.
Back when I was kid, I chose Flash programming over C++. It was just more fun, with results that you could show off to your friends. I didn't care how things work, I just wanted to build stuff. Once I started building tiny little games, I automatically started to learn how things work and developed interest in the science behind it, be it maths, physics or computer science itself. Today, I would suggest Racket's big-bang.
I always thought fractals and similar were great introductory programs for children.
The fractals need only a few lines of code, with a bit of extra boiler plate. Tweaking the formula can give dramatically different results. You get to use a variety of programming concepts in a short program.
Sadly neither book is suitable for general 11 year olds, but a modern version certainly could be.
And A.K. Dewdney obviously has a bunch of books which could be used to inspire young programmers. The Armchair Universe, or The Magic Machine and similar launched many programmers, with "Core War", "Wator", "Bugs", etc
I doubt it very much. Children have an amazing capacity to learn and are usually constrained by adults thinking that kids can't cope with more than simple challenges.
Some of those are even to hard for some adults I teach to. One of the most important thing in pedagogy is to never mix several notions in the same theme. E.G: making exercices involving maths.
absolutely. if maths, etc had have been framed like this I would have been a model student. as it was, I spent my time coding other (not useful) things instead of homework
Slush Smackdown is also a fun way for children (not maybe for the youngest children) to learn to code. It is not in Python though. Basically you code your wrestling moves in Javascript and begin fighting against other people's code http://slushsmackdown.com/
I remember growing up wanting to build AOL chatroom bots, nothing like Eliza, but trivia or combat bots - maybe around the age of 11-12. Though a bit dated, an IRC trivia bot might be a fun exercise for them.
Or a text-based adventure to teach arrays. They build the map, then move through it in the same manner.
The title kind of assumes all kids are amateurs. I feel age has nothing to do with programming prowess. I may sound like I'm nitpicking but it should be "Python Exercises for Beginners".
These exercises can be too tough for a 50 year old beginner, and a 15 year old can breeze through them.
I don't see this working well with kids. I'm a course assistant for an introductory Python course at a {top 5} CS school. It's shocking to see the sheer lack of intuition and inability to think about loops some beginners have.
Although now that I think about it, I think I'd trust a 13-year-old with a fresh mind more than most of the college students I work with.
I teach myself to program in basic when I was 10 without the assistance of any adult an made my own "for loops" because I only knew "GOTO", "IF" and variables. You can do a lot of shit with only "GOTO" and "IF", I made a Black Jack game. :)
I sometimes think the best way for people to learn about loops is not to tell them they exist at first.
Give them lots of repetitive assignments, (print the numbers 1 through 50, or all the powers of 2 until 65536) until they're so frustrated they start demanding a solution.
That's just mean, no need to got that high up, and you also risk the students getting bored and giving up. I'd go to fewer amounts (5 to 10) and then explain the loop. If they then complain it's complicated you tell them "imagine you had to copy this thing million times!".
I would develop screen savers (Lines floating on the screen, lines being drawn randomly on screen, ball bouncing off the edges of the screen, flying into a star-field as the stars move away from the center of the screen), and show them off to my friends and family. I would develop a small game (spaceship moves up and down to avoid hitting incoming asteroids) - I'd show it to my friends. Let my brothers play the game.
These were the type of rewarding tasks that led me to keep on learning and experimenting.
If you're doing Python - I strongly recommend "Inventing computer games with python" https://inventwithpython.com/ Using pygame, you can get really quick graphical results, and start showing off some awesome things. I even built a Tetris game based on pygame a while back when I was learning python myself.
Also - if you're doing turtle programming, check out http://pythonturtle.org/ - an awesome implementation of turtle graphics for python.