Posts tagged ‘Python’

Confusion over the forms of programming problems: Mathematics/Physics versus CS

I’m teaching Media Computation again this semester, about 250 students (over 50% female) in a huge lecture hall.  It’s hard to wander the room to answer questions, especially during peer instruction, but we do it anyways.

I’ve been thinking a lot about one question on the first quiz in week #2 of the class.  All my students are Georgia Tech undergraduates but not-CS majors, so, very smart, lots of math and science background, but almost no programming background.

Here was one of the two problems that had the lowest score. Students were to write down what this program would print.

def computeSalary():
  rate = 10.00
  hours = 40
  salary = hours * rate
  hours = 30
  print salary
  increase = 1.00
  salary = hours * (rate + increase)
  print salary

I suspect most teachers would think that this is a pretty standard first semester, even first couple weeks problem. I certainly did. I even discussed almost the exact same program in lecture.

The most common wrong answer was to write only what the second print statement generated. The first print statement was ignored.

During the last 5-10 minutes of the quiz, almost everyone was gone, and I answered lots of questions from the remaining students — picking my way through the narrow aisles in the lecture hall. They were struggling, so one might expect that they would try to get clues by asking questions. This was a problem that they asked lots of questions about.

I was struck by the words that students used when they described what was the one number that they were writing. One told me that the number she wrote down was the “result” of the function. Another told me that that was the “answer.” I came away with the sense that the students were thinking about the program as a mathematics function or a physics story problem.

We often talk about how computer programs might lead to misconceptions for students because of flawed transfer from mathematics. For example, Python functions have mutable data, use the “=” sign in a non-mathematical way, and have side effects. I wonder if the confusion here is about the similarity in form of the problem. Students see a series of equations in math, or a description of a situation in physics, and the answer is a number, an answer, a single result. Not so with programs — it’s a series of statements (like those others), but there may be more than one thing that the program does. We’d need to do real research to see if there is anything to this, not just me noting anecdotal comments from a half dozen students.

February 26, 2018 at 7:00 am 11 comments

Stanford CS department updates introductory courses: Java is Gone

See update here: Stanford is NOT switching from Java to JavaScript: I was mistaken

Stanford has decided to move away from Java in their intro courses. Surprisingly, they have decided to move to JavaScript.  Philip Guo showed that most top CS departments are moving to Python.  The Stanford Daily article linked below doesn’t address any other languages considered.

The SIGCSE-Members list recently polled all of their members to talk about what they’re currently teaching.  The final spreadsheet of results is here.  Python appears 60 times, C++ 54 times, Java 84 times, and JavaScript 28 times.  I was surprised to see how common C++ is, and if Java is dying (or “showing its age,” as Eric Roberts is quoted below), it’s going out as the reigning champ.

When Java came out in 1995, the computer science faculty was excited to transition to the new language. Roberts wrote the textbooks, worked with other faculty members to restructure the course and assignments and introduced Java at Stanford in 2002. “Java had stabilized,” Roberts said. “It was clear that many universities were going in that direction. It’s 2017 now, and Java is showing its age.” According to Roberts, Java was intended early on as “the language of the Internet”. But now, more than a decade after the transition to Java, Javascript has taken its place as a web language.

Source: CS department updates introductory courses | Stanford Daily

ADDENDUM: As you see from Nick Parlante’s comment below, the JavaScript version is only an experiment.  From people I’ve talked to at Stanford, and from how I read the article quoted above (“more than a decade after the transition to Java, Javascript has taken its place”), I believe that Stanford is ending Java in CS106.  I’m leaving the title as-is for now. I’ve offered to Marty Stepp that if CS106 is still predominantly Java in one year, I will post a new blog post admitting that I was wrong.  Someone remind me in April 2018, please.

April 21, 2017 at 7:09 am 36 comments

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: https://github.com/sportsracer48/mediapy. 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 1 comment

Do blocks equal “making” and text equal “coding”? Doing MediaComp in Blocks-Based Languages

Interesting perspective from a blogger in the Scratch community, liked below.  I do frequently hear the pattern described in the post quoted below.  “I’ve started by daughter/niece/local-school on Scratch, and now I want to know how to move them into something ‘real’ (e.g., text).”  I typically point them to amazing things that can be done in Scratch (like Alex Ruthmann’s beautiful livecoding of music in Scratch).

I recently got a chance to play with GP, a new programming language from John Maloney (of Scratch fame), where all blocks and texts are isomorphic.  There’s a slider that lets you switch from one to the other.  Even the debugger and class browser show up with tiles.  Where does that play out in this debate?  GP is the first blocks-based language I’ve used with the right primitives to do MediaComp, so I built one of my examples in it.  Took me about three times as much time to write and four times as much space (in screen real estate) as in Python (even with John looking over my shoulder guiding me).  Maybe that’s not a bad thing — maybe that encourages a different style of use.  Next time I try something like that, I’m far more likely to think about building my own blocks and using more abstraction to save on dragging-and-fitting effort.

I’ve been a part of the Scratch community for about 8 years now (yes, really). During this time, I’ve noticed a pattern that seems to apply to a lot of people:

join Scratch => create projects => discover text-based programming => quit Scratch because of “real programming”

Note the scare quotes around “real programming”. Generally, a “real” programming language is text-based (C, Python, etc.) and apparently qualifies as real because it’s used by well-known developers for something.

Obviously I disagree with disqualifying Scratch as a real programming language.

via Making vs Coding | byte.

July 8, 2015 at 7:14 am 23 comments

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

JES 5.02 is now released at https://github.com/gatech-csl/jes/releases/tag/5.020.  I have links to all the main downloads at http://mediacomputation.org .

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 http://coweb.cc.gatech.edu/mediaComp-teach/60. 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 1 comment

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

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.

January 26, 2015 at 8:28 am 10 comments

African-American students preference for graphical or text-based programming languages depended on career goals

One of the results from Betsy DiSalvo’s dissertation on Glitch (see a post on that work) that I found most interesting was that there wasn’t a clear winner between graphical, drag-and-drop programming (Alice) and text-based programming (Python).  She has now written up that part of the dissertation work, and it’s linked below.

Cursor_and_Betsy-Alice-Python_pdf__page_3_of_4_

To determine appropriate computer science curricula, educators sought to better understand the different affordances of teaching with a visual programming language (Alice) or a text-based language (Jython). Although students often preferred one language, that language wasn’t necessarily the one from which they learned the most.

via IEEE Xplore Abstract – Graphical Qualities of Educational Technology: Using Drag-and-Drop and Text-Based Programs for Intro….

January 12, 2015 at 8:39 am 7 comments

JES 5 Now Released: New Jython, Faster, Updated Watcher, with Jython Music

Matthew Frazier is an undergraduate at North Carolina State University who contacted me this last Spring.  He was going to be in Atlanta for a couple of months and was looking for a research opportunity.  Barbara and I had just been talking about how JES needed to be updated.  I checked his references and hired him without ever meeting him.  Wow, did that work great!
JES 5 (the Jython Environment for Students) has just been released at: https://github.com/gatech-csl/jes/releases/tag/5.010.  Matthew did a great job updating our workhorse for Media Computation Python (which was originally developed in Summer 2002 and is still used daily).  JES includes a full implementation of Jython, plus support for media manipulation — libraries, help functions, and explorers for looking at individual pixels and samples. Here’s a one-screen overview of JES (click on it to make it bigger):
introJES
JES window to left with program area and command area (REPL), Watcher button for debugger, two image explorers, and one sound explorer.  Help is under JES Functions menu and Help menu.
Some of the things he did for JES 5 include:
  • First, we’re on github!  Come join us in stomping out bugs and making JES even better!
  • Upgrading the Jython interpreter to version 2.5, making available new language features and speeding up many user programs.  I have been working on the 4th edition of the Python MediaComp book this summer, and have introduced the time library so that users can actually time their algorithms (one of those CS Principles ideas), so I had ready-made programs to run in both JES4.3 and JES5.0.  The speed doubled.
  • Adding code to JES and the installers to support double-clicking .py files to open them in JES, on all supported platforms.
  • Bundling JMusic and the Jython Music libraries, allowing JES to be used with the text “Making Music with Computers” by Bill Manaris and Andrew Brown.  This is super exciting to me.  All of their examples (like these) work as-is in JES 5 — plus you can do sampled sound manipulations using the MediaComp libraries.  The combination makes for a powerful and fun platform for exploring computation and sound.  My thanks to Bill who worked with us in making everything work in JES.
  • Adding a plugin system that allows developers to easily bundle libraries for use with JES.
  • Fixing the Watcher, so that user programs can be executed at arbitrary speeds.  This has been broken for a long time, and it’s great to have it back.  When you’re looking for a bug in a program that loops over tens of thousands of pixels or sound samples, the last thing you want is a breakpoint.
  • Adding new color schemes for the Command Window, which allow users to visually see the difference between return values and print output.  This was a suggestion from my colleague Bill Leahy.  Students when first learning return can’t see how it does something different from printing.  Now, we can use color to make the result of each more distinctive.  Thanks to Richard Ladner at ACCESS Computing who helped us identify color palettes to use for colorblind students, so we can offer this distinction in multiple color sets.

returnedPrinted

  • Fixing numerous bugs, especially threading issues.  When we first wrote JES, threading just wasn’t a big deal.  Today it is, and Matthew stomped on lots of threading problems in JES 5.  We got lots of suggestions and bug reports from Susan Schwartz, Brian Dorn, and others which we’re grateful for.

Thanks to Matthew for pulling this all together!  Matthew’s effort was supported by NSF REU funding.

September 18, 2014 at 8:49 am 1 comment

Python is the most popular intro language: But what about CS Principles?

Philip Guo did an analysis of what top CS departments teach in their introductory courses (see link below) and found that Python now tops Java.  MATLAB tops C and C++ (though not if these are combined), and Scheme and Scratch are near the bottom.

Philip’s analysis did include CS0 and CS1 courses, which points to a problem for adoption of CS Principles as an Advanced Placement exam.  Scratch is the only one of the popular CS Principles languages now used in the CSP Pilots that is also being used in CS departments.  Other CSP popular languages include App Inventor, Alice, Processing, JavaScript, and Snap!.  Those don’t appear in Philip’s results to any significant degree.

It’s reasonable to say that an AP will only succeed (e.g., students will take it) if they can get credit or placement for the exam in college or university.  Typically, colleges and universities give credit for courses that are currently taught.  Will we see colleges and universities start teaching CS Principles?  Will they give credit for a course that they don’t teach? For languages they don’t teach?  Maybe we’ll see more of an influx of CSP languages and courses into colleges and universities. I predict that we won’t.

Scratch is the only visual, blocks-based language that made this list. It’s one of the most popular languages of this genre, which include related projects such as Alice, App Inventor, Etoys, Kodu, StarLogo, and TouchDevelop. The creators of these sorts of languages focus mostly on K-12 education, which might explain why they haven’t gotten as much adoption at the university level.

via Python is now the most popular introductory teaching language at top U.S. universities | blog@CACM | Communications of the ACM.

August 3, 2014 at 9:45 am 38 comments

Seeking advice on Python Media Computation, Fourth edition (for Q1 2015)

Pearson has asked me to update our Python Media Computation book, “Introduction to Computing and Programming: A Multimedia Approach.”  This will be the fourth edition.  I plan to address the errata (as well as the ones I haven’t yet posted to the website), add new assignments, and change out the pictures (a lot of those pictures are 12 years old now).  I think I’m going to give up on trying to do screen-scraping off a live website — they keep changing too fast.  Instead, I might add something about how to parse CSV files, which are common and useful.

I have a couple of bigger ideas for changes, and I’d appreciate feedback from readers. (And I’m certainly interested in other advice you might give me.)

(1) CPython cross-platform libraries have come a long way since the 3rd edition was written. It’s likely that we could write a media library for CPython that works much like media library in JES. A CPython version of Media Computation would likely be faster. We probably would not re-create JES in CPython. It will take some time to develop a CPython version, so a Jython/JES-based 4th edition could be available in early 2015 (aiming to be out before SIGCSE 2015), but a CPython version would probably be mid-2015.

  • (a) Is a CPython version something that you would find interesting and worth adopting?
  • (b) Would you have a preference for one or the other? Or would you see value in having both versions?

(2) At Georgia Tech, we have started teaching the book with a brief excursion into strings and lists before introducing pictures. We talk about the medium as being language or text, and we manipulate characters in the strings using algorithms like those we later use with pixels in a picture or samples in a sound. For example, we can “mirror” words as we later mirror sounds or pictures. The advantage is that students can see all the characters in the string, and print out every step of the loop — where neither of those is reasonable to do with pictures or sounds.

We’re considering adding an OPTIONAL chapter at the beginning of the book in the 4th edition. We wouldn’t remove the introduction to loops in Chapter 3. We would move some of the string processing from Chapter 10 into this new Chapter 2.5, but leave methods and file I/O for Chapter 10. You would be able to use the book as-is, but if you want to start with characters and words as a text medium first, we would support that path, too.

  • Does that seem like a chapter that you would find useful? Or would you rather just keep the book with the chapters as they are now?

Thanks for any advice you would like to give me on producing the 4th edition of the book!

 

March 8, 2014 at 1:30 am 1 comment

Thoughts from Toronto on teaching code to librarians

The blog post linked below felt close to home, though I measure it differently than lines of code.  The base point is that we tend to start introductory programming courses assuming way more knowledge than is already there.  My experience this semester is that we tend to expect students to gain more knowledge more quickly than they do (and maybe, than they can).

I’m teaching Python Media Computation this semester, on campus (for the first time in 7 years).  As readers know, I’ve become fascinated with worked examples as a way of learning programming, so I’m using a lot of those in this class.  In Ray Lister terms, I’m teaching program reading more than program writing.  In Bloom’s taxonomy terms, I’m teaching comprehension before synthesis.

As is common in our large courses at Georgia Tech (I’m teaching in a lecture of 155 students, and there’s another parallel section of just over 100), the course is run by a group of undergraduate TA’s.  Our head TA took the course, and has been TA-ing it for six semesters.  The TA’s create all homeworks and quizzes.  I get to critique (which I do), and they do respond reasonably.  I realize that all the TA’s expect that the first thing to measure in programming is writing code.  All the homeworks are programming from a blank sheet of paper.  Even the first quiz is “Write a function to…”.  The TA’s aren’t trying to be difficult.  They’re doing as they were taught.

One of the big focal research areas in the new NSF STEM-C solicitation is “learning progressions.”  Where can we reasonably expect students to start in learning computer science?  How fast can we reasonably expect them to learn?  What is a reasonable order of topics and events?  We clearly need to learn a lot more about these to construct effective CS education.

I’m not going to articulate the next few orders of magnitude, both because they are not relevant to beginner or intermediate programmers, and because I’m climbing the 1K → 10K transition myself, so I’m not able to articulate it well. But they have to do with elegance, abstraction, performance, scalability, collaboration, best practices, code as craft.

The 3am realization is that many, many “introduction” to programming materials start at the 1 → 10 transition. But learners start at the 0 → 1 transition — and a 10-line program has the approachability of Everest at that point.

via thoughts from Toronto on teaching code to librarians.

January 29, 2014 at 1:49 am 26 comments

Try an Hour of Code in an Ebook for #CSEdWeek

It’s CSEd Week this week. Code.org and Computing in the Core have effectively merged now, and that’s the organization that owns and promotes CSEd Week. The big focus this year is the Hour of Code — getting all students to do some kind of coding activity for one hour. There are a lot of tutorials now available at the CSEdWeek site.

As readers of this blog now, one of my research activities is to create an electronic book to support high school teachers learning computer science. (Here’s our project webpage.) We’ve been exploring ideas like how best to create videos about computer science (hint: use subgoal labels!) and how to reduce cognitive load (hint: Parson’s problems). We’re also working on multi-modal explanations (evidence suggests that audio narration for code is more effective than text descriptions) and worked examples.

Barb Ericson put together an Hour of Code activity using some of our ideas for learning Python with turtles here, as an Hour of Code activity: http://interactivepython.org/runestone/static/IntroPythonTurtles/index.html. Please do try it and let us know what you think!

If you have an Hour of Code activity that isn’t making it to the main CSedWeek.org site, please feel free to link to it here in the comments!

December 9, 2013 at 1:01 pm 6 comments

Visiting West Point to give the Castle Lecture

Barbara presenting the Castle Lecture at West Point

Barbara Ericson and I gave the Castle Lecture at West Point in April.  The Castle Lecture is a big deal — we spoke before the entire first-year class at West Point.  (Last year’s lecture was David Ferrucci, PI of the IBM Watson project.)  We received this honor because West Point requires Computer Science of everyone, and this is the first year that they all the first years used our Media Computation Python textbook in that class.  So, we got a chance to lecture to 1200 future Army officers and their instructors who all knew Media Computation.  It was a stunning experience.

The whole day was amazing.  If you’ve never been to West Point, I highly recommend that you take the opportunity.  The campus is beautiful.  The traditions and stories about the place are amazing.  There’s such a sense of history, such a buzz about the place.  We ate lunch with a group of cadets (in an absolutely enormous mess hall where thousands of students eat lunch in 20 minutes) and were deeply impressed. These are undergraduate students who are making a huge commitment to service to their country.

The biggest intellectual treat for me was learning more about their course, IT 105.  700 students every semester take the course — in groups of 20.  16 instructors are involved in teaching the course.  We met with the instructors who teach just about nothing but IT 105, but also met some of the other West Point EECS instructors who teach a section or two of IT 105 along with their other courses.  (Like Dr. Tanya Tolles Markow, a GT alumna, who teaches IT 105 and database classes.)

The person who makes this all work is Susan K. Schwartz (CAPT, USN, Ret).  Her attention to detail is phenomenal.  Susan is going to give me her errata for the third edition when she finishes this semester, which is more detailed than all the corrections that all instructors have sent me for both of the previous editions combined.  Susan creates detailed lecture notes and assignments that drive all the sections for every day across the entire semester.  All the students who take the course take the same exams, so Susan provides enough detail so that all the instructors know what to do in each class so that all students get to the finish line.

Barb and I each got to sit in one section.  This is the opposite of a MOOC.  The teacher knows every student.  She (I attended one of Susan’s classes) calls on individual students, prods students to engage, and gives them activities in class.  It’s small, interactive, and individualized.  Yet, there are 700 students taking it at once.  It’s an enormous effort to make that large of a class work such that students can all have that small class experience. We’re going to try to get Susan’s materials available to other Media Computation teachers.

The lecture was fun and exciting to do. We talked about how media was going to influence them for the rest of their lives.  I gave a brief audio lecture, then we talked about computers that can process all that we can hear and see, and have the processing power of ten year’s forward.  What does that mean for the rest of their lives?  Barb gave a great overview of advances in robotics and cyber-security and even prosthetics. Afterward at the reception, we each had 9-12 cadets asking us follow-up questions for about an hour.  We got back to the Thayer Hotel (what a place!) just buzzing from the amazing adventure of the day.

 

May 16, 2013 at 1:20 am 4 comments

Six Reasons Why Computer Science Education is Failing Students

Interesting arguments from the CEO of LiveCode.  These two points are particularly interesting.  The first is: What sits between Scratch, or Alice, or App Inventor, and professional-class languages like JavaScript or C++?  I would put Python in there, but I still see that the Scratch->Python gap is a big one.  The second paragraph is really striking, and I’d like to see more evidence.  Does Israel’s great CS ed system lead to the strong startup culture, or is it because Israelis value technology that they have both a great startup culture and a great CS Ed system?

Up to about age 13 there are some excellent tools in widespread use, most notable among them being the free and popular Scratch from MIT and MIT App Investor  However students outgrow Scratch by around age 13 and schools often don’t make a good choice of language for the next phase in a child’s education.  Many traditional programing languages such as JavaScript or C++ are completely inappropriate for this age group.  Students struggle to understand what they are learning and often spend their lessons searching for a missing symbol.  The current generation of students use smartphones and so selecting a tool that allows them to create their own apps is another great opportunity to make learning directly relevant to them.  Our own LiveCode platform provides a handy solution to these issues by allowing students to create their own mobile apps using a programming language that is close to English.

I firmly believe that a strengthening computer science education program has to be one of the most obvious and cost effective things we can do to ensure future economic prosperity.  Israel has the highest rate of startup per capita anywhere and that in part stems from its strong computer science education program.  Estonia, another country with both a strong tech sector and economy, recently announced a plan to expand teaching of computer science to all primary school children.  Do we want to be left in the dust by these countries, or left unable to compete with the growing economies of India and China?  What is it going to take to get computer science education moved up the agenda in the USA and here in the UK?

via Six Reasons Why Computer Science Education is Failing Students.

April 5, 2013 at 1:41 am 24 comments

Surveying Media Computation Students: Self-Efficacy, Worked Examples, Python, and Excel

I’m back from Oxford, after an intense six weeks of teaching “Computational Freakonomics” and “Media Computation.” Since I did new things in Media Computation this term, I put together a little survey to get students’ feedback on what I did — not for research publication, but to inform me as a teacher.

It’s complicated to interpret their responses.  Only 11 of my 22 students completed my survey, so the results may not be representative of the whole class.  (The class was 10 males and 12 females. I didn’t ask about gender on the survey, so I don’t know gender of the respondents.) The first thing I was wondering was whether the worked examples was perceived by students as helping them learn. “I found it useful to type in Python programs and figure them out at the start of class.” 4 strongly agree, 6 agree, 1 neutral.

That seems generally positive — students thought that the worked examples were useful.  How about helping with Python syntax?  “Getting the characters exactly right (the syntax of Python) was difficult.” 2 agree, 1 neutral, 8 disagree.  That’s in the right direction.

In the written portion, several students commented that they liked being able to focus on “understanding” programs “rather than just executing them.”  One student even suggested that I could have questions about the program after they studied them, or I could have them make a change to the program afterward, to demonstrate understanding.  I loved this idea, and particularly loved that it was suggested by a student.  It indicates seeing a value in understanding programming, even before doing programming, while seeing value in that, too.  This worked examples approach really does lead to a different way of thinking about introductory computer science: Programs as something to study first, before designing and engineering them.

When I asked students what their favorite part of the course was, and what their least favorite part of the course was, Excel showed up on both lists (though more often on the least favorite part).  Here’s one of the questions that stymied me to interpret: “Python is harder to learn and use than Excel.”  Could not be a more perfect bell curve — what does that mean?!?

“I wish I could have learned more Excel in this course.”  An almost perfectly uniform distribution!

Their reaction to Excel is so interesting.  On the written parts of the survey, they told me how important it was for them to learn Excel, that it was very important for their careers.  But they did not really like doing something as inauthentic (my word, not their’s) as pixel manipulation in Excel.  They wished they could have done something more useful, like computing “expenses.”

The responses above suggest to me a hypothesis: The students don’t really know how to think about Excel in relation to Python. It’s as if they’re two different things, not two forms of the same thing.  I was hoping for more of the latter, by doing pixel manipulations in both Python and Excel. This may be someplace where prior understanding influences the future understanding.  I suspect that the students classify these things as.

  • “Excel is for business. It’s not for computing.  Doing pixel manipulations in Excel is just weird and painful.”
  • “Python is for computing.  I have to go through it, but it doesn’t really have much to do with my future career.”  On the statement, “Learning programming as we have in this course is not useful to me,” 3 were neutral, and 8 disagreed.  I read that as, “It’s okay. Sorta.”

Something that I always worry about: Are we helping students to develop their sense of self-efficacy in an introductory course, especially for non-majors?

“I am more confident using computers now, after taking this course.”  Quite positive: 10 agree, 1 neutral.

“I think differently about computers and how they work since taking this class.”  Could not get much more positive: 8 strongly agree, 6 agree!

And yet, “I am not the kind of person who is good with computers.”  Mostly, students agree with that: 3 strongly agree, 4 agree, 1 neutral, 3 disagree.  One average, my students still don’t see themselves as among the people who are “good” with computers.

There was lots for me to be happy about.  Some students said that the lectures on algorithmic complexity and the storage hierarchy were among their favorites; that they would have liked to have learned more about the “big questions” of CS; and they they liked writing programs.  On the statement, “I learned interesting and useful computer science in this course,” 3 students strongly agreed, and 8 agreed.  They got that this was about computer science, and some of them even found that useful.

Even in a class of only 22, even seeing them every day for hours, even with grading all their papers — I’m still surprised, intrigued, and confounded by how they think about all of this.  That’s fine by me. As a teacher and a researcher, my job isn’t done yet.

August 8, 2012 at 9:43 am 8 comments

Older Posts


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

Join 7,966 other followers

Feeds

Recent Posts

Blog Stats

  • 1,783,869 hits
August 2020
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930
31  

CS Teaching Tips