Posts tagged ‘Media Computation’

Where are the Python 3 Libraries for Media Computation

My Blog@CACM post for this month is on JES, the Jython Environment for Students, which at 14 years old and over 10,000 downloads, is probably one of the oldest, most used, and (by some definition) most successful pedagogical Python IDE’s.

The SIGCSE Members list recently had a discussion about moving from Python 2 to Python 3. Here’s a description of differences. Some writers asked about MediaComp. With respect to the Media Computation libraries, one wrote:

I’m sad about this one, because we use and like this textbook, but I think it’s time to move to Python 3.  Is there a compatible library providing the API used in the text?

Short answer: No. There are no compatible Media Computation libraries for CPython 2 or 3.

We keep trying. The latest attempt to build Media Computation libraries in CPython is here: It doesn’t work on all platforms yet, e.g., I can’t get it to load on MacOS.

We have yet to find a set of libraries in Python that work cross-platform identically for sample-level manipulations of sounds. For example, PyGame’s mixer object doesn’t work exactly the same on all platforms (e.g., sampling rates aren’t handled the same on all platforms, so the same code plays different speed output on different platforms). I can do pixel-level manipulations using PIL. We have not yet tried to find libraries from frame manipulations of video (as individual images). I have just downloaded the relevant libraries for Python 3 and plan to explore in the future, but since we can’t make it work yet in Python 2 (which has more mature libraries), I doubt it will work in Python 3.

I complained about this problem in my blog in 2011 (see post here). The situation is better in other languages, but not yet in Python.

  • I have been building Media Computation examples in GP, a blocks-based language (see post here).
  • Jeff Gray’s group at U. Alabama has built Blockly-like languages Pixly and Tunely for pixel and sample level manipulations.
  • Cynthia Lee at Stanford has been doing Media Computation in her classes in MATLAB and in C++
  • The Calico project supports Media Computation in IronPython (based on Python 3) and many other languages, because it builds on .NET/MONO which has good multimedia support.
  • We’re able to more and more in JavaScript-based Python implementations (like Pythy and Runestone), because JavaScript has excellent cross-platform multimedia support.

When we did the 4th edition of our Python Media Computation textbook, I looked into what we’d have to change in the book to move to Python 3. There really wasn’t much. We would have to introduce print as a function. We do very little integer division, so we’d have to explain that. The focus in our course (non-technical majors, first course) is at a higher level than the differences between Python 2 and 3. I am confident that, at the end of our course, the majority of our students would understand the differences between Python 2 and 3. As we move more to browser-based IDE’s, I can support either Python 2 or 3 syntax and semantics. Preparing students for industry jobs using exactly CPython 3 is simply not a priority in our course.

August 19, 2016 at 7:46 am Leave a comment

The Future of Computing Education is beyond CS majors: Report from Snowbird #CSforAll

Last week, I attended the Computing Research Association (CRA) Snowbird conference of deans and chairs of computing. (See agenda here with slides linked.)  I presented on a panel on why CS departments should embrace computing education research, and another on what CS departments can do to support the CS for All initiative. I talked in that second session about the leadership role that universities can play in creating state partnerships and influencing state policy (see the handout for my discussion table).

Andy Ko was in both sessions with me, and he’s already written up a blog post about his experiences, which match mine closely (including the feeling of being an imposter).  I recommend reading his post.

Here, I’m sharing a key insight I saw and learned at Snowbird.  Before the conference even started, our Senior Associate Dean for the College of Computing, Charles Isbell, challenged me to name another field that is overwhelmed with majors AND offers service courses to so many other majors. (Maybe biology because of pre-meds?)  Computer Science is increasingly the provider of courses to non-CS majors, and those majors want something different than CS majors.

The morning of the first day was dedicated to the enrollment surge.  CRA has been gathering data at many institutions on the surge, and Tracy Camp did a great job presenting some of the results.  (Her slides are now available here, so you don’t have to rely on my pictures of her slides.) Here’s the bottomline: Student growth has been enormous (across different types of institutions), without a matching growth in faculty.  The workload is increasing.


But here’s the surprise: Much of the growth in course enrollment is not CS majors.  A large percentage of the growth is in other majors taking CS classes. The below graph is for “mid-level” CS courses, and there are similar patterns in intro and upper-level courses.


Tracy also presented a survey of students (slides available here), which was really fascinating.  Below is a survey of (a lot) of intro students at several institutions.  All the differences described are significant at p<0.05 (not 0.5 as it says).  The difference in what non-majors want and CS majors was is interesting.  Majors want (significantly more than non-majors) to “make a lot of money.”  Non-majors more significantly want to “Give back to my community” and “Take time off work to care for family.”


U. Illinois has the most innovative program I have heard of for meeting these new needs.  They are creating a range of CS+X degree programs.  First, these CS+X programs are significant parts of the “X” departments.


But these stats blew me away: CS+X is now 30% of all of CS at U. Illinois (which is a top-5 CS department), and 50% of all admitted first years this year! And it’s 28% female.


It’s pretty clear to me that the future of computing education is as much about providing service to other departments as it is about our own CS major.  We have suspected that the growth is in the non-majors for awhile, but now we have empirical evidence.  I’ve been promoting the idea of contextualized-computing education, and the notion that other majors need a different kind of CS than what CS majors need.  We need to take serious the education of non-CS majors in Computer Science.

July 25, 2016 at 7:16 am 8 comments

How Can We Include Students with Disabilities in Computing Courses?: DO-IT Video

AccessComputing and DO-IT does terrific work.  I get the question in the title a lot with MediaComp, since it’s a curriculum that lends itself towards producing just visual or just audio products, while exploring the same computing concepts.

With the increasing demand for computing professionals, it’s important that students with disabilities are included in computing courses. This video includes profiles of successful computing students and professionals who happen to have disabilities. Learn how accommodations, assistive technology, and universal design strategies can make computing courses accessible to students with disabilities.

Year: 2015

Runtime: 10:24 minutes

via How Can We Include Students with Disabilities in Computing Courses?: DO-IT Video.

September 4, 2015 at 7:30 am Leave a comment

JES 5.02 Now Released, and Media Computation 4th Edition Slides Available

JES 5.02 is now released at  I have links to all the main downloads at .

This is a maintenance release.  Thanks to Nina Koch’s student, Henry, we have fixes for colorizing and some other problems.  Henry has also written code to allow for capture of keystrokes and mouse movement in a picture window, so that you could build some simple games.  I’ll save that for JES 5.10.
I don’t do JES releases that often, so in-between, I forget how painful cross-platform development is. JES is all written in Java and Jython, which means we “write once, test everywhere.”  I developed mostly on Mac OS X, but makensis (for Windows Installers) doesn’t work on Mac OS X.  So I ran Ubuntu in VirtualBox to build the Windows installer and test the Linux version.  But I still had to test on Windows (e.g., to make sure that the Sound Explorer was fixed).  It’s all details —  ls here vs. dir/w there, can’t install Oracle Java from Ubuntu installer, remembering sudo apt-get, Lenovo toolkit updater interrupting installations…
From Github:
 Fixes in JES 5.02 (with many thanks to HenryStevens and sportsracer48 for fixes):
  • Fixes a problem if you quit during raw_input that you can’t do another raw_input
  • Makes the Sound explorer fully functional again
  • Fixes colorizing
  • Makes autosave work again
  • Fixes a threading error if you hit return too rapidly in the Command Area
  • Unicode characters in input file get flagged. (Jython can’t execute a line with unicode characters on it.)

In addition,

You can find all the fourth edition Powerpoint slides (including a 68Mb zip of all of them) at I’ve put some of the Peer Instruction question slides into the chapter PPT slide decks, but you can find more at the instructors-only website (see the Media Computation website for more on the teacher website).

Most of the changes are in the early chapters. Chapter 3 on text and language manipulation is all new. The latter chapter PPT slide decks have a few new slides in each deck, including:

  • Creating state-preserving versions of picture manipulation functions in Chapter 16 on Functional Programming
  • Subclassing Picture and Sound to move functions into methods in Chapter 17 on Object-oriented Programming
  • Recursive turtle patterns, which are possible with an improved Turtle class in JES 5 in Chapter 17

May 15, 2015 at 7:59 am Leave a comment

Showing Google Maps in JES from Susan Elliott Sim

Cool example of using JES to access external data!

I’ve been teaching CCT 374: Technologies for Knowledge Media course this term. It seemed a natural fit to use a Media Computation approach to teach Python programming. The students have a term project where they had to design an application that uses City of Toronto Open Data. Just about every team decided to make something that involved displaying something on a map. So, I had to figure out how to display arbitrary maps programmatically, as simply as possible. Using the Google Maps API would have been beyond most of the students. Then I found a blog post with a Python program to retrieve static images from Google Maps.

I have adapted the code from the blog post to work within JES (Java Environment for Students) using the Media Computation libraries. I’ve made the code available on a gist.

via Showing Google Maps in JES | Susan Elliott Sim.

April 24, 2015 at 8:29 am Leave a comment

Sorting Is Boring: Computing Education Needs to Join the Real World, like MediaComp and worked examples 

Agree that we get it backwards in computing education.  We ought to do more with worked examples (a form of “word problems”) — see the argument here.  The point of Media Computation has always been to focus on relevance — what the students think that a computer is good for, not what the CS teacher thinks is interesting (see that argument here).

There are people who love math for math’s sake and devote themselves to proving 1 + 1 = 2. There are more people, however, who enjoy using math to prescribe medication and build skyscrapers. In elementary school, we use word problems to show why it’s useful to add fractions (ever want to split that blueberry pie?) or find the perimeter of a square. We wait until college, when math majors choose to devote four years towards pure math, to finally set aside the word problems and focus on theory. We do so because math is a valuable skill that is used in so many different professions and contexts, and we don’t want kids to give up on math because they don’t think it’s useful.

So, why does computer science start with theory and end with word problems?

via Sorting Is Boring: Computer Science Education Needs to Join the Real World | Jessie Duan.

March 7, 2015 at 8:29 am 30 comments

EarSketch Workshop at SIGCSE 2015

I’m an advisor on the EarSketch project, and it’s really cool. Recommended.

Next month, the EarSketch team will be offering a workshop at SIGCSE in Kansas City. This is a great opportunity to learn more about EarSketch, get hands on experience with the curriculum and environment, and learn how to use EarSketch in your classroom. This year’s workshop will also offer advice on integrating EarSketch into Computer Science Principles courses, though the workshop is of relevance to anyone teaching an introductory computing course.

For more information about SIGCSE, visit
To register for the workshop, please visit
Please contact Jason Freeman ( with any questions.

Workshop #20: Computer Science Principles with EarSketch
Saturday, March 7th, 2015
3 pm – 6 pm

Jason Freeman, Georgia Institute of Technology
Brian Magerko, Georgia Institute of Technology
Regis Verdin, Georgia Institute of Technology

EarSketch ( is an integrated curriculum, software toolset, audio loop library, and social sharing site that teaches computing principles through digital music composition and remixing. Attendees will learn to code in Python and/or JavaScript to place audio clips, create rhythms, and add and control effects within a multi-track digital audio workstation (DAW) environment while learning computing concepts such as variables, iteration, conditionals, strings, lists, functions, and recursion. Participants write code to make music, with a focus on popular genres such as hip hop. The agenda outlines the pedagogy of connecting musical expression to computation to broaden participation and engagement in computing; the underlying concept of thickly authentic STEAM that drives this approach; the alignment of the curriculum and learning environment with CS Principles; and basic musical concepts underlying EarSketch. The intended audience for this workshop is secondary and early post secondary CS educators. The course is of particular relevance to CS Principles teachers but also applicable to any introductory programming or computing course. No prior musical knowledge or experience is expected and no prior programming experience with Python or JavaScript is required.

February 14, 2015 at 8:18 am 1 comment

Older Posts

Recent Posts

August 2016
« Jul    


Blog Stats

  • 1,257,167 hits

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

Join 4,244 other followers

CS Teaching Tips


Get every new post delivered to your Inbox.

Join 4,244 other followers