Fourth edition of Python Media Computation released today: Teacher resources and desirable difficulties

January 26, 2015 at 8:28 am 10 comments

Python-4ed-MediaComp-cover

According to Amazon, the Fourth Edition of the Python Media Computation book is released today (see page here). That’s the new cover above. I’ve been working on the 4th edition for most of the summer. Some of the bigger changes are:

  • Before we manipulate pictures, we manipulate letters, words, and language, e.g., build “MadLib” and “koan” generators, and encoding and decoding keyword ciphers. Language is a medium, too, and it’s easier to get started (for some folks) with the smaller-iteration loops of text before getting to the thousands-of-iterations loops of pixels in a picture. It’s an optional chapter — everything introduced there gets introduced again later.
  • Since the new version of JES fixed a round-off error in the Turtle class, we can do recursive turtle manipulations now (which tended to get messed up in earlier forms of JES).
  • I juggled content around so that we do more with conditionals and querying the pixel for its position, before we introduce nested loops. Nested loops are really hard for students, and I learned (from seeing the code that my students wrote) that they can do far more than I’d guessed with single loops — even with multiple pictures. I included more of that.
  • I have tried (for the last two editions) to provide screen-scraping examples, e.g., writing code to pull weather, news, or friends’ information from websites.  It’s getting harder and harder to write that kind of code.  Instead, I decided to provide more code that parses CSV files, as can be found at Open Data Journalism sites (like at The Guardian) and sources like the US Census.  The examples are still about parsing out useful information, but it’s a lot easier to parse CSV and encouraged at these sites.
  • There are more end of chapter problems, and new pictures.  And trying to catch all the errors in the Third Edition that master teachers like Susan Schwartz (at West Point) found.

We’re working on teacher resources now. Currently in development (aiming to have ready in the next couple months) the Powerpoint slides for each chapter of the book, a collection of all the code in the book for teachers, and a solutions manual for every end of chapter problem. These are surprisingly controversial. There are lots (mostly University) teachers who think that I shouldn’t provide any of these resources — teachers should be able to develop all of those themselves. Most of the high school and community college teachers I know appreciate having them.

In searching for the Fourth Edition on Amazon, I read the comments on the Third Edition (see here). Authors probably shouldn’t read the reviews of the book — they’re painful. But I did, and even worse, I actually responded.

Here is a quote from one, titled “False Advertising.”

Its biggest problem: false advertising. This is NOT a book on Python, it’s about JYTHON – A Java based imitation of Python.
Why? Well, there’s some pretty software, available to download, which uses the the JRE. The author chose to stick with this “easy learning environment” and basically cripple anyone wanting to write Python code for Blender, Maya, Android etc.

You may learn to program from this text, but don’t expect a trouble-free life when you get exposed to the real language.

Here was my response:

Everything in this book is useful when wanting to write Python code for Blender, Maya, Android, etc. This is an introductory book on data, loops, conditionals, and objects. Those parts of Python are identical in this book and in the Python that you’ll use in Blender, Maya, and Android. For introductory Python programming, Jython and CPython are exactly the same.

I was surprised to see the original commenter responded. His point was that some kinds of friction, in dealing with the “real world” is desirable:

As an introductory book, I would expect a section on how to install and configure Python. Written covering Windows, Linux, and the Mac OSX. There is no such section; the whole point of Jython is to “hide” this technical level. Which is fine for learning loops etc. but leaves a student lost when encountering Python out in the real world.

It’s an interesting perspective, kind of a “rugged individualism” approach. I do agree with the notion of desirable difficulties in learning (see more here),  but don’t agree that installing Python is one of those.  Do most Python programmers install Python themselves, or is it already installed on the servers, computers, etc. that they will be programming? Is it a critical part of learning a language? Is it significantly different than installing JES (try that here)? Are you “lost” and unable to program if you don’t install it yourself first?

A sad addendum to this story: Our Media Computation data structures book (see the Amazon page here) has gone out of print. The publisher didn’t notify us. Someone approached us about using the book, and was told that it was out of print. When I queried Pearson, they admitted it. More, because it’s not out of print everywhere (I guess it’s available in some non-US markets), Pearson won’t let us post the content anywhere. It’s a dead book now.

Entry filed under: Uncategorized. Tags: , , .

New International Conference: Research on Equity and Sustained Participation in Engineering, Computing, and Technology (RESPECT) Why the Maker Movement is important for Schools: Outside the Skinner Box

10 Comments Add your own

  • 1. Lorena Barba (@LorenaABarba)  |  January 26, 2015 at 11:53 am

    I personally do include the “get python” section for beginners, but not right away and taking the easy way. It is preceded by a very short introduction to basics that uses cloud Python services (PythonAnywhere and Trinkets). After that, I direct students to the full Python distros (Anaconda or Canopy) to get them set up.

    But then, that is for teaching Python for scientific computing, where we need NumPy, SciPy, Matplotlib —so installing from source all of these is kind of a pain.

    Reply
  • 2. gflint  |  January 27, 2015 at 11:36 am

    I teach Python in the high school. The kids use their own laptops, I have no lab. They have to install Python themselves. Having an appendix in a book on how and what to install is a make it or break it kind of thing for me. Is installing a language a critical part of learning a language? Sure is. Not everybody has a wiz-bang IT department to do this for them or a computer lab. The kids need to learn computer science, not just how to type code.

    Reply
    • 3. Mark Guzdial  |  January 27, 2015 at 12:02 pm

      The kids need to learn computer science, not just how to type code.

      Completely agreed! How to install software is more computer science than typing in code?

      Why is it “make it or break it” for you that the instructions be in the book? Books last for several years, but versions of software and websites change more rapidly than that. I do say in the book that everything is available at http://www.mediacomputation.org, and that’s where I put one-click installers. Why is it better for the instructions to be in the paper pages of the book versus on a web page?

      Reply
      • 4. Bijan Parsia  |  January 30, 2015 at 11:17 am

        Really this. Putting installation instructions for something with as much ubiquity and tutorials as Python seems rather a waste. One could argue that “figure out how to get it from the net” is, in fact, a skill people should practice.

        Reply
      • 5. Ken Bauer  |  January 30, 2015 at 12:11 pm

        I think putting installation instructions in a book is a waste of paper (assuming print version) and is the exact use-case for including links to live web content that gets updated. So exactly what Mark said above.

        What I really want to see is a way to provide the same material as textbooks online (and synchronized to our mobile devices) to provide an interactive, social and dynamic experience. I have a tonne of ideas about this but little time to make it happen. There are many challenges there but I think the benefits of having truly interactive and social tools around a learning resource like a textbook are just so many that it will happen.

        Of course, a few years later I will be saying “Hey, I thought of that!” right along with “get off my lawn you darn kids”.

        Thanks for the great work Mark and Barbara, I’ll have to dig into the new version this year.

        Reply
  • 6. gflint  |  January 28, 2015 at 8:54 am

    Installing software is not more CS than coding, it is just part of the whole picture. Purists will argue installing software is not really CS but a tech skill. I am not much of a purist, If it has to do with computers I figure it is CS.

    I have looked at a couple of Python texts that seemed to assume Python magically appeared on the computer. The instructions do not need to be in the book but they do need to be somewhere. My experience is shaped by the IT environment in the schools in my state. Most programming teachers are either the IT department or are on their own support wise. For me any text has to assume the instructor is starting at zero, which is where many small school programming teachers start at.

    Reply
    • 7. Bijan Parsia  |  January 30, 2015 at 11:23 am

      I’m confused. As I understand it, the book uses JES. JES is downloadable and pretty much click to run (I do think the web site could be a touch more straightforward about that). Done!

      Given that, you don’t need to learn other ways to install Python or Jython in order to use the book.

      The original complaint was that they wanted to learn those other ways, which is fine, but not clearly a deficiency of the book per se.

      So, I *think* (and please correct me if I’m wrong) that you’d be ok with the JES solution and don’t have the same problem that the Amazon reviewer did.

      Reply
  • 8. Mike  |  January 29, 2015 at 6:31 pm

    I would guess that most K12 schools use Windows computers, and Python is definitely not already installed on Windows computers.

    Reply
    • 9. Chris Barker  |  January 30, 2015 at 8:15 pm

      Oddly enough, it Is installed on some Windows PCs:

      http://pyvideo.org/video/2645/discovering-python

      (interesting story, that)

      But the point is well taken — it isn’t usually “just there”. But it is easy to find and install the python.org version, and there are a number of other options, which regularly change. A book like this should provide a brief description (or link to a web site) that tells you one way to get started for what you need to follow the book. I understand it does that.

      A whole treatise on all the options would be ridiculous for an intro book, and out of dat in no time.

      Reply
  • 10. jkhuggins  |  January 30, 2015 at 11:21 am

    Sad to hear that the data structures book went out of print. It was on my list of “things to try one of these days” … alas, too many things are on that list …

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Recent Posts

January 2015
M T W T F S S
« Dec   Feb »
 1234
567891011
12131415161718
19202122232425
262728293031  

Feeds

Blog Stats

  • 1,269,017 hits

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 4,568 other followers

CS Teaching Tips


%d bloggers like this: