Wednesday, November 29, 2017

Why Python and Pygame Are Perfect for Beginning Programmers

I published an article on opensource.com explaining why you should start with Pygame and Python instead of JavaScript and Phaser.

After six years of teaching my kids Python and Pygame, I've been teaching my daughter JavaScript and Phaser for six months. I have real-world observations of how pre-teen children learn, encounter problems, and overcome problems with both Python and JavaScript.

If you're teaching your kids programming or are considering learning Python or JavaScript yourself, consider reading the article.

Sunday, November 5, 2017

Computer Programming Courses for Middle School Children

As my daughter is in middle school, I recently reviewed courses designed for middle school children. Eight years ago, there was limited curriculum for middle school children.

Today, there is a wealth of curriculum. Instead of developing your own curriculum, I suggest using existing curriculum that a professional has built. code.org has a good list of curriculum for middle school kids. Although I'm not using the curriculum on any of the lists, the offering at CodeHS looks interesting. There are introductory courses for both Python and JavaScript. The JavaScript course is designed for 9th graders.

Pythonroom also looks promising. The video looks like they have a great vision, but I'm a bit concerned that they have 5 thumbs up and 2 thumbs down at the time I looked at it.





I'm still experimenting with different mixtures of Python and JavaScript. I recommend starting with Python as it is easier and the structure helps with learning. My daughter also feels that Python is easier than JavaScript.

If Python is better for learning and teaching, why I am teaching her JavaScript? Well, JavaScript is everywhere. It's used to quickly distribute web applications, build mobile applications with PhoneGap and build server applications with node.

Here's what I ended up doing:


  1. started with Python and Pygame using my drills and used the drills for a month
  2. taught HTML, CSS, and basic JavaScript, including JQuery for about a month. Not using any type of graphical animation such as HTML canvas or any framework
  3. Used the JavaScript game development framework Phaser for a month, including the Making your first Phaser game tutorial
  4. went back to Python and Pygame for another few months and used RAPT Pygame to run the apps on a mobile phone
  5. went back to using JavaScript canvas for a month, which is where I am right now. I'm planning to go back to Phaser in about 2 to 4 weeks.


Examples from Lessons


This game was built entirely in Python and uses RAPT Pygame to run it on an Android mobile phone. It's running on a Moto G 3rd generation. Age 12.
Teaching objective: loops and game levels



The test below was made with Unity and some pictures she took at the local Stanford museum.
Teaching objective: 360 image photography and basic 3d asset usage



This one is done entirely in Python. Age 12.
Teaching objective: association of attributes for an object. Did not actually use objects.




This is another Pygame example. Age 12.
Teaching objective: if statements


This one is done in JavaScript.
Teaching objective: Use of arrays.