Sunday, February 22, 2015

The Launch of Python Programming for Children

I started programming at age 12, after my friend showed me how to do a little basic on his Commodore 64.  I went back home to my Tandy Color Computer and started writing programs for myself.  You almost had to program to get much out of a computer back then, but I am so glad I did.  It has enriched my life to understand the concepts behind computer programming at an early age.  Not only was I better around a computer, and led me into a career in computers, but I was better in math, science, and an array of other subjects and topics because of it.  So, I have always wanted to teach kids how to program and now, I have that opportunity with two students.

My students are in the 4th and 5th grades and I plan to post regular outlines of what we covered and the tools I used to teach so that others teaching how to program have a few ideas.  This is the reason for this blog, http://childprogramming.blogspot.jp/.

Class Setup

First, I selected the Python 2.x programming language.  I chose this because of its flexibility and it is a nice language to work with.  Let me say this, however, I am not a Python expert.  I have a degree in Computer Science and have programmed in many languages, but I am learning Python as I go.  The point of my class is the fundamental understanding of imperative programming.  So I will focus on language basics, algorithms, and problem solving - computer science.

Second, I ensured both students had a laptop and could load Edubuntu.  I chose Edubuntu because it contained a lot more educational software and it would run on their lower-end, older laptops.  Python is installed on Edubuntu by default, the only changes were to install the Gnome fallback environment during installation, to add the Scite programming editor with, "sudo apt-get install scite",  and to remove shopping dash plugins with:

gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"

I teach this class with a very casual style.  It is basically an open dialog where I am explaining, guiding, and showing them how to do things.  I am not strict as I am not a school teacher and I do not have to control a large group of students.

I have a laptop with Edubuntu hooked up to my TV screen so everyone can see, me, the students, and the parents if they stick around.  We take turns typing and I lead the discussion and ask them what they think about different ideas, or how they think something can be done.  I try not to tell them their answers are wrong, I found out the logic towards their answers, and get them to the right answer.  I always try to be enthusiastic, which at this point, is really easy.

Hopefully, you're reading this and you like where I am going with this class and you'll subscribe and better yet, also give input to my class notes as I put them out as future posts.  I would love to get feedback, to hear from others teaching programming to kids, and get questions.  I hope to hear from you.

(Also, all code we create on this blog is free for you to use with no guarantees.)

Friday, February 20, 2015

Projects Page has been published.

I have started a projects page that will list the programs we have completed, are in progress, in planning, or just an idea for now.  This will be updated as we make progress.

http://kidspython.blogspot.jp/p/projects.html

Friday, January 30, 2015

Lesson 1 - Computer components and of course "Hello World"

This is the point where I start the sales pitch about computer programming, because it is important to have a student who wants to learn.  My students did not start on the same week so I did the introduction session separately.  This was good because I found out their interests and sold programming tailored to them.  Generally, however, I intend to make the programs as fun as possible to keep interest.  Games and creation of games is one way that we will make it fun.

In the first class I opened up a desktop computer and went over the different components.  Luckily it was their first time to see the inside of a computer, so this was great.  During follow on sessions, I tied back into the different components.  When we create a variable, I ask them, "What component is the variable stored in when the computer is running?  Or when we save a python file, I ask, "Which component is it being saved on?"  The knowledge level here is fairly basic, but I will grow it as we proceed. We covered a little more than the short list below, but here are the big take-aways:

CPU - Brains of the computer - Executes the programs
RAM - Temporary storage - Stores programs and program data during execution
Hard Drive - Permanent storage - Stores programs and program files.
Motherboard - Main circuitry - Connects the CPU to the other components.

We opened up Edubuntu and navigated through the GUI.  Although it was a new GUI to them, my students had no problem with this.  I tested their typing a little bit with the tux typing game and encouraged them to play it from time to time.  We then opened the terminal and went to the CLI, this was new territory.

I explained you are located inside of a working directory and navigate with "change directory, cd". What I found that helped was to open up the home folder in the gui, navigate those directories and "ls" to list the contents.  We created a python folder inside of the home directory and created a new python file called "hello.py" with the contents below:

print("hello i am a program")

We ran the program with the command "python hello.py" I explained, this isn't much of a program but it is one and showed various other linux programs like top, df, pwd, whoami, and id.

Next session we created a high-low guessing game and I taught them the binary search technique.