Archive for March, 2017

Codecademy Python: Not ready for prime time

March 24, 2017

This summer I will be taking the Joy and Beauty of Computing course on Python at my local university.  From eight to five face to face for five days.  As a pre-requisite, we are working through the Codecademy course on Python.  Online tutorials are tedious.  That is to be expected.  This tutorial is not only tedious but it is a pure brain killer.  It is also full of errors.  I am halfway decent at programming in Python.  (The other half is pretty much hit and miss.)  My knowledge is well beyond what the tutorial is teaching so I can easily pick up the errors in the tutorial.  The first thing that hit me immediately was the fact that Python uses indents to distinguish code blocks seems to have completely skipped the authors list of “important things about Python”.  The indents are just magically there.  “Magically there” is a real bad thing for a tutorial intended for beginners.  Another little detail is the difference between “true” and “True”.  One is a string, the other is a Boolean.  In one of the quizzes, the answer to a question involving “true” is string, which was correct for the question asked.  The previous section had introduced the idea of the Boolean “True” but nowhere was it mentioned that “true” and “True” were different.  For a novice this could be just a bit confusing.

There is an even bigger issue beyond the errors in this tutorial.  The course offered at the local university is intended for beginning programming teachers.  (I am doing it for the professional development credits.  Only thing in the area.)  For some teachers this may be their first encounter with programming.  To give novice programming teachers the idea that tutorials like this are a viable way to teach programming to kids is an absolute and unforgivable sin.

There are people out there that can get through a tutorial like this and benefit.  I suspect they are few and far between.  Is it possible to write an interesting tutorial for something like Python?  I think so.  My thought is that the tutorial should offer an interesting problem up front, think about the problem away from the computer, strategize on how to use the computer to solve it, then investigate the tools (code) to use to solve the problem.  This Codecademy approach is like handing a kid an English – Spanish dictionary then tell them to go shopping in a town market in Mexico.  The result is not Spanish, it is words stuck together in a weird way.  I feel the same is true on tutorials that stress coding vocabulary and syntax.  Without something to do with it, it is just a bunch of unrelated code snippets that probably do not mean much to begin with.

Back in the days when dinosaurs still walked the Earth and I was learning my first programming language, Terrapin Logo, lessons had a different approach.  They started with a goal, “Draw a square”.  First think what a square is, then walk a square, then have someone give directions to someone to walk the square, then write the directions to draw a square.  By the time we hit the computer we knew what we wanted to do in pretty good detail.  Then the lesson went to the things Logo can do.  We did not start with the tools and then go to the task.  Perhaps this teaching style is out of vogue?  Or maybe the people that write these tutorials do not have the slightest idea of how kids learn or how to get kids interested in what they are learning.  This opinion is only backed by 30 year of experience teaching beginning programmers and making sure to the best of my ability kids have fun programming.