Open Letter to Future Students: On the Shortage of Computer Science Faculty

Thanks to Pat Yongpradit for sending the below links article to me. I knew that CS faculty have been complaining about the costs of the enrollment pressure.  This was the first I’d heard of the students rising up to complain, and even to recommend to future students not to go into CS.

Being able to take on and graduate its own majors, which the department already strains to do, is the bare minimum of what we should expect from a department at a liberal arts college. As much as Haverford likes to present itself as an environment where each student can explore a diversity of academic interests and cultivate a multifaceted worldview, right now the CS department is unable to help broaden the education of non-majors. It has even been forced to eliminate the CS minor, because non-majors simply cannot get into upper-level courses to complete it. That this should be necessary at an institution of our caliber is shameful, and as the situation continues to deteriorate it will actively undermine the institution’s status. What kind of a college, prospective students are (appropriately) thinking, cannot offer its students the ability to understand how computing works? Deception by omission from the admissions office about the availability of CS courses is a very limited tool in holding back this information, as illustrated by the recent open letter to admitted Bryn Mawr students urging them to consider not enrolling if they are interested in science (especially CS).

Source: Open Letter: On the Shortage of Computer Science Faculty

April 23, 2018 at 7:00 am Leave a comment

Teaching Computational Thinking across an Entire University, With Guest Blogger Roland Tormey

During Spring Break, Barbara and I were invited to go to Switzerland.  Sure, when most people go someplace warm for Spring Break, let’s head to the mountains!

Roland Tormey organized a fascinating workshop at EPFL in Lausanne, Switzerland (see workshop page here) to inform a bold and innovative new effort at EPFL. They want to integrate computational thinking across their entire university, from required courses for freshman, to support for graduate students doing Computational X (where X is everything that EPFL does).  The initiative has the highest level of administrative support, with the President and Vice-President of Education for EPFL speaking at the workshop.  The faculty really bought in — the room held 80-some folks, and it was packed most of the day.

Roland got a good videographer who captured both of the keynotes well.  I had the first keynote on “Improving Computing Education with Learning Sciences: Methods for Teaching Computing Across Disciplines.”  I argued that we need different methods to teach computing across the curriculum — we can’t teach CS the same way we teach CS majors as future software developers.  I talk about Media Computation, predictions (and they caught my audio demo with ukulele playing well), subgoal labeling, and Parsons problems.

Shriram Krishnamurthi had the second keynote on “Curriculum Design as an Engineering Problem.”  He talked about the problems of transfer and how Bootstrap works.  I liked how he broke down the problem of transfer — there there are three requirements: Deep structural similarities between the problems, explicit instruction, and a process for performing tasks.  He showed how all other design disciplines have multi-stage processes, use multiple representations in their designs, and look at problems from multiple viewpoints.  Mostly in CS classes, we just code.  I learned about how Bootstrap scaffolds problem-solving, and includes all of those elements.  I recommend the talk.

Barb’s panel on teaching computational thinking wasn’t captured.  She talked about the methods she’s developed for teaching computing, including her great results on Parsons problems.  In a short talk, she gave a lot of pointers to her work and others’ on how to teach CT.

Roland sent me a note with what he took away from the workshop. I thought it was a great list, so with his permission, I’m including it here:

For me, we also had a lot of other valuable take home points from the day:

(1) We need to work on putting Computational thinking (and maybe Math and Physics too) into the context of the students’ own disciplines — at least, though the examples and exercises we choose.

(2) The drive to better develop scientific thinking in disciplines like chemistry and life sciences and the development of CT are entirely consistent, but one shouldn’t eclipse the other. It’s not about replacing existing scientific processes with CT. It’s about augmenting them.

(3) We need to help professors gather data on effective methods of teaching as well as help them become aware of methodologies with demonstrated effectiveness (like the Parsons Problems for example).

(4) The exercises and exercise sessions will be crucial for making the link between CT and disciplines, but this implies giving the doctoral and teaching assistants a clear understanding of the goals and methods of CT. They have to understand what we are trying to achieve.

(5) CT provides an understanding of, a language for, and a toolbox for analysing processes, and these can be applied in a lot of domains. However that is not going to happen unless we explicitly teach CT in ways that promote near and far transfer

(6) We need to make the most of the EPFL initiative by properly evaluating the impact, which implies the need to collect some pre-intervention data now.

April 20, 2018 at 7:00 am 9 comments

Finding a Home for CS Ed in Schools of Ed: Priming the CS Teacher Pump Report Released

Thursday April 12, the report on finding a home for CS Ed in Schools of Education was released at Microsoft’s Times Square offices.  Leigh Ann DeLyser and Frances Schick of “CS for All” did a great job pulling it all together.You can see the play-by-play (or tweet-by-tweet) of the event on the Twitter stream #home4CS.  The report is available on the website

Some of the points that I found particularly interesting or compelling:

  • Yasmin Kafai talking about the tension between standalone CS classes and integrating CS into other disciplines.  The latter is likely how CS is going to end up in K-8, and budget concerns may make that the most common path to giving high school students access to CS education. But our research shows that it’s really hard to make that work well.  CS will likely get little attention, if programming is just used as the tool for some STEM learning activities.  Questions from the audience were skeptical that we could get teachers to pay attention to both CS and the integrated subject well.
  • A big question was how to add something to US Schools of Education that are facing enrollment declines and budget cutbacks.  Aman Yadav addressed that point head-on, by identifying the courses that we’re already teaching in pre-service development programs where CS education could be integrated.
  • The discussion afterward was really great.  Participants stuck around for more than an hour to talk about these issues.  A common theme I heard was, “Give us the answers.  What are the best pre-service CS teacher PD programs?  What are the models we should be using?  Where are the syllabi for these courses?”  I don’t think that these are answerable questions in the US.  We don’t have one education system. We have one in each state.  Almost nothing transfers as-is from one state to another, from one university to another.  I’m more interested in the points that Joanna Goode made — how do we grow education leadership to understand the issues of CS Ed?  We need to inform the leaders who know their contexts to help them integrate CS Education.
  • I spoke about the challenges of growing a pipeline of CS Education Research PhD’s. One of the questions I got about my topic was, “What is the biggest lever for increasing the number of CS Ed PhD’s?  Is it just money?”  For my colleagues in Schools of Ed, money would really help — they don’t get enough funding.  For those of us in CS, it’s also the creation of PhD programs that meet the needs of CS Ed researchers.  Georgia Tech’s Human-Centered Computing PhD is great for that.  A traditional CS PhD is not a great fit, because it typically requires courses in systems development and theory that don’t help a CS Ed researcher and cost time and effort.

The report makes a bunch of recommendations, but doesn’t offer many answers.  It does start a conversation about how to make CS education sustainable in the US, which is a critical topic for long-term survival of the “CS for All” movement.


April 16, 2018 at 7:00 am 10 comments

A job is a strange outcome measure: Udacity drops money-back guarantee on finding a job

Udacity has dropped a money-back guarantee that they were offering to students in some of their Nanodegree programs. The guarantee (with stipulations and caveats) was that students would find a job after getting the nanodegree, or they would get their money back.

An article in Inside Higher Ed (quoted below and linked here) describes some of the tensions. Other for-profit coding schools offer similar or better guarantees, but others do not. Ryan Craig, quoted below, suggests that Udacity might not have been hitting its targets for job placements. Does that mean that Udacity was doing something wrong?

A job is such a strange outcome measure for any kind of educational program.  I know some techniques for evaluating someone’s knowledge of programming, and I know how to create educational opportunities that might lead to successful evaluation.  There are factors like student attitude and motivation and whether students engage in deliberate practice that are not entirely within my control.  Even then, I’d be willing to say, “I can design a program where the majority of students will achieve this level of proficiency in coding.”  But a job?  Where I can’t control how the students interview, or where they apply, or what the companies are looking for (if they’re looking at all)?

A job is not a well-defined outcome measure for an educational intervention. That may be what the students are seeking, but they are being unrealistic if they think that any school can guarantee them that.

Ryan Craig, managing director of investment company University Ventures, noted that none of the major employers associated with Udacity will publicly commit to hire or interview nanodegree candidates. Craig pointed to a 2017 report from VentureBeat, which stated that of around 10,000 students who had earned nanodegrees since 2014, around 1,000 had found jobs as a result. “A placement rate of around 10 percent should spell the demise of any last-mile training program,” said Craig.

Craig said the effectiveness of Udacity’s job guarantee was likely very limited for students. “Money-back guarantees don’t address the real guarantee that students are seeking: a job,” said Craig.

Daniel Friedman, co-founder of coding school Thinkful, wrote in January 2016 that Udacity’s guarantee was vaguer and weaker than the guarantees offered by his own company and others such as Bloc and Flatiron School. Such guarantees are common at coding schools, though Friedman noted that some schools have had to drop guarantees because they conflicted with state regulations.

April 13, 2018 at 7:00 am 3 comments

High School CS Teacher’s Experience like University CS Teacher’s: “Code Shock”

Jeff Yearout has been teaching for over 25 years, and is just in his second year of teaching CS.  His concerns in his blog echo many of the same ones that I hear from higher-education CS teachers, e.g., dealing with the wide variance of students, and getting all students to engage around code (pseudo or otherwise).

I think one of the hardest things to manage in designing a curriculum is how to dial the difficulty up at a proper pace for the “center mass” of the class skill level. And in this new curriculum from PLTW this particular unit starts out manageable, but suddenly shoots up rapidly, thus the “code shock” mentioned above. I also have the challenge of having a lot of kids in class who simply don’t want to interact in class when, for instance, I’m working through pseudocode on the board.

From “Teaching CS is Hard

April 9, 2018 at 7:00 am 2 comments

Teaching to develop a mental model of program behavior: How do students learn the notional machine

“To understand a program you must become both the machine and the program” – Perlis 1982, cited in Sorva 2013

I’ve been thinking for a few years now about an open research question in computing education. How do students come to understand how programs work? Put in a more technical way, How do students develop their mental model of the language’s notional machine?

I have been thinking about this question in terms of Ashok Goel’s Structure-Behavior-Function (SBF) model of how people think about systems.

  • Structure is the parts of the system — for us in CS, think about the code.
  • Function is what the system does — for us in CS, the requirements or the description of what the program is supposed to do.
  • Behavior is how the structural elements interact to achieve the function. It’s the understanding of the semantic model of the programming language (the notional machine) plus how that plays out in a specific program.

There are studies of students learning notional machines (e.g., Raymond Lister and Juha Sorva are some of the top researchers here). What I don’t know is how it develops and how to help it develop. Lister tells us the stages of development (e.g., of tracing skill). Sorva tells us about theories of how to teach the notional machine, but with little evidence. We have models for how people learn to read and write code (e.g., Elliot Soloway’s plans). But we not have a cognitive model for how they develop a mental model of how the code works.

A Pedagogical Problem That I Faced

I’m teaching Media Computation (n=234) this semester, and students had a disappointing performance on two programming problems on a recent quiz. (We have a 30 minute quiz every other week.) They didn’t really bomb, but an average of 82% on one programming problem (Problem #3 below) and 76% on the second (Problem #4) was lower than I was hoping for. Those are all mostly due to partial credit — only 25 of my 234 students got full credit on Problem #4. Worse yet, we had a “simple” matching problem where we offered four pictures and four programs — which program generated which picture? More than half the students got at least two wrong. The score on the matching problem was 72%, even lower than the programming task problems. My conclusion is that my students can’t yet read code and understand it.

How do I teach my students to understand code?

With my researcher hat on, I don’t have a solid answer. With my teacher hat on, I have to do something. So, I drew on what I know from the research to come up with a best guess solution.

I decided to drop the next two lecture topics from the schedule, to instead re-focus on manipulation of pictures. I know from the learning sciences literature that it’s much better to go deeper than broader. Teaching for mastery is more important than teaching for coverage. Things that students know well are more likely to persist and transfer than things that students are merely familiar with.

I decided to do a live-coded session revisiting the quiz. I had graded a bunch of the programming problems on the quiz. I saw several different strategies for solving those two problems. I had a unique teachable moment here — every student had attempted these two problems. They were primed for the right answer. I decided to solve the problems in a live-coding session (starting from a blank editor, and talking aloud as I wrote the code) in each of the ways that I saw students doing it — three ways for the first problem, four ways for the second problem. While I wrote, I drew pictures to describe the behavior, drawing from Sorva’s visualization approach and the SILC emphasis on sketching rather than diagrams. After writing each program, I tested it on a picture. Along the way, I answered questions and wrote additional examples based on those questions.

This idea is based on Marton’s Variation Theory. You have to vary critical aspects of examples for students to figure out the differences. Janet Kolodner talks about a similar idea when she emphasizes contrasting cases for learning informed by case-based reasoning.  In SBF terms, I was keeping the Function constant, but varying the Structure and Behavior. In Goal-Plan-Code terms, I was achieving the same Goal, but varying the underlying Plan and Code.

Could an exploration of these variations/contrasts help students see how the code changes related to behavior changes?  I don’t actually know how to evaluate the result as a researcher, but as a teacher, I got good response from students.  I’m looking forward to seeing how they do on similar problems on future quizzes.

The rest of this blog post is a static replay of the lecture. I’ll show you the slides I showed, the sketches I made, and the code I wrote (while talking aloud).

Problem clearTopHalf

Solution #1: Iterate through all pixels

def clearTopHalf1(pic):
  h = getHeight(pic)
  for pixel in getPixels(pic):
     y = getY(pixel)
     if y < h/2:

Solution #2: Iterate through half of the pixel indices

def clearTopHalf2(pic):
  all = getPixels(pic)
  for index in range(0,len(all)/2):
    pixel = all[index]

Solution #3: Iterate through all x and y positions in the top half

def clearTopHalf3(pic):
  h = getHeight(pic)
  w = getWidth(pic)
  for y in range(0,h/2):
   for x in range(0,w):
    pixel = getPixel(pic,x,y)

A student asked, “Could we do x first and then y?” Sure!

def clearTopHalf3b(pic):
  h = getHeight(pic)
  w = getWidth(pic)
  for x in range(0,w):
    for y in range(0,h/2):
       pixel = getPixel(pic,x,y)

Pause for Reflection and Discussion

At this point, I asked students to turn to the person next to them and ask, “Which one do you prefer? Which makes the most sense to you?”

I always encourage students to discuss during peer instruction questions. I have never had such an explosion of noise as I did with this invitation. From wandering around the room, what I heard students discussing was, “This is what I did, and this is what I got wrong.”

When we had the whole class discussion, the first and third approaches (all pixels or coordinates) were the preferences. Students who spoke up disliked the index approach — it felt “like there’s too much indirection” (said one student).

Problem copyThirdDown

Solution #1: Iterating through all pixels

def copyAThird1(pic):
  h = getHeight(pic)
  for pixel in getPixels(pic):
    x = getX(pixel)
    y = getY(pixel)
    if y < h/3:

Solution #2: Iterate through first 1/3 of pixels

def copyAThird2(pic):
  all = getPixels(pic)
  h = getHeight(pic)
  for index in range(0,len(all)/3):
    pixel = all[index]
    color = getColor(pixel)
    x = getX(pixel)
    y = getY(pixel)
    targetPixel = getPixel(pic,x,y+(2*h/3))

Solution #3: Iterate through top 1/3 of picture by coordinates

def copyAThird3(pic):
  h = getHeight(pic)
  w = getWidth(pic)
  for x in range(0,w):
   for y in range(0,h/3):
    pixel = getPixel(pic,x,y)
    color = getColor(pixel)
    targetPixel = getPixel(pic,x,y+(2*h/3))

At this point, someone said that they did it by subtracting y from the height. I showed them that this approach mirrors. This is the first incorrect solution that I demonstrated.

def copyAThird3b(pic):
  h = getHeight(pic)
  w = getWidth(pic)
  for x in range(0,w):
    for y in range(0,h/3):
      pixel = getPixel(pic,x,y)
      color = getColor(pixel)
      # Mirrors instead of copies
      targetPixel = getPixel(pic,x,h-y-1)

Solution #4: Iterating through the bottom 1/3 of the picture by x and y coordinates

This was an unusual approach that I saw a few students try: They used nested loops to iterate through the bottom 2/3 of pixel coordinates, and then compute the top 1/3 to copy down. They iterated through the target and computed the source.

def copyAThird4(pic):
  h = getHeight(pic)
  w = getWidth(pic)
  for x in range(0,w):
    for y in range(2*h/3,h):

After I wrote that program, someone asked, “Couldn’t you make an empty picture and copy the top third into the new picture at the top and bottom?” With her guidance, I modified the program above to create a new version, which does exactly as she describes, leaving the middle third blank. So, this was the second incorrect version I wrote to respond to student queries.

def copyAThirdEmpty(pic):
  h = getHeight(pic)
  w = getWidth(pic)
  canvas = makeEmptyPicture(w,h)
  for x in range(0,w):
    for y in range(0,h/3):
      pixel = getPixel(pic,x,y)
      color = getColor(pixel)
      targetPixel = getPixel(canvas,x,y)
      targetPixel = getPixel(canvas,x,y+(2*h/3))

When I asked students a second time which version made the most sense to them, there was a bigger split. Indexing the array continued to be the least preferred one, but students liked both versions with nested loops, and many still preferred the first version.

April 6, 2018 at 7:00 am 14 comments

States requiring CS for all students may be making a mistake: Responding to unfunded mandates

As of this writing, New Jersey and Wyoming are the latest states to require CS for all their students (as described in this article) or to be offered in all their schools (as described in this post and this news article), respectively.  Wyoming has a particularly hard hill to climb.  As measured by involvement in AP exams, there’s just not much there — only 8 students took the AP CS A exam in the whole state last year, and 13 took AP CS Principles.

In 2014, I wrote an article titled “The Danger of Requiring Computer Science in K-12 Schools.”  I still stand by the claim that we should not mandate computer science for US schoolchildren yet. We don’t know how to do it, and we’re unlikely to fund it to do it well.

I can’t find any news articles describing what funding New Jersey and Wyoming are going to put toward the goal of teaching CS across their state.  How do you teach every student CS or teach CS in every school without any increase in funding?

Based on what we’ve seen in other US states, I predict one of three things will happen:

  • States will have to loosen the definition of “computer science,” as happened in South Carolina.  90 classes count for the CS requirement in South Carolina, and only 6 of which have programming in them.  Most of them are about keyboarding skills or application software use. If a state doesn’t fund real CS, something else will have to count as real CS.
  • States will rely heavily on virtual high schools and on-line classes to provide CS class “access” without hiring more CS teachers, as we are seeing in several states. That is particularly concerning since recent studies are showing that remedial students do poorly in on-line classes.
  • Independent CS classes will be deemed too expensive. Instead, the mandate to teach CS to all will lead to integration into math and science classes, which are already funded. School will have changed the reform, again (see Papert’s “Why School Reform is Impossible.”)

Neither of the first two options furthers the goal of having high-quality CS education for all students. The third one may be the best position, if funding doesn’t appear.

April 2, 2018 at 7:00 am 24 comments

Older Posts

Recent Posts

April 2018
« Mar    


Blog Stats

  • 1,498,647 hits

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

Join 5,248 other followers

CS Teaching Tips