acm-header
Sign In

Communications of the ACM

BLOG@CACM

How We Teach Introductory Computer Science Is Wrong


View as: Print Mobile App Share:
Mark Guzdial

Georgia Institute of Technology professor Mark Guzdial

I've been interested in John Sweller and Cognitive Load Theory since reading Ray Lister's ACE keynote paper from a couple year's back.  I assigned several papers on the topic (see the papers in the References) to my educational technology class.  Those papers have been influencing my thinking about how we teach computing.

In general, we teach computing by asking students to engage in the activity of professionals in the field: by programming.  We lecture to them and have them study texts, of course, but most of the learning is expected to occur through the practice of programming.  We teach programming by having students program.

The original 1985 Sweller and Cooper paper on worked examples had five studies with similar set-ups.  There are two groups of students, each of which is shown two worked-out algebra problems.  Our experimental group then gets eight more algebra problems, completely worked out. Our control group solves those eight more problems.  As you might imagine, the control group takes five times as long to complete the eight problems than the experiment group takes to simply read them.  Both groups then get new problems to solve. The experimental group solves the problems in half the time and with fewer errors than the control group. Not problem-solving leads to better problem-solving skills than those doing problem-solving. That's when Educational Psychologists began to question the idea that we should best teach problem-solving by having students solve problems.

The paper by Kirschner, Sweller, and Clark (KSC) is the most outspoken and most interesting of the papers in this thread of research. Their title states their basic premise: "Why Minimal Guidance During Instruction Does Not Work: An Analysis of the Failure of Constructivist, Discovery, Problem-Based, Experiential, and Inquiry-Based Teaching." What exactly is minimal instruction?  And are they really describing us? I think this quote describes how we work in computing education pretty well:

There seem to be two main assumptions underlying instructional programs using minimal guidance. First they challenge students to solve “authentic” problems or acquire complex knowledge in information-rich settings based on the assumption that having learners construct their own solutions leads to the most effective learning experience. Second, they appear to assume that knowledge can best be acquired through experience based on the procedures of the discipline (i.e., seeing the pedagogic content of the learning experience as identical to the methods and processes or epistemology of the discipline being studied; Kirschner, 1992).

That seems to reflect our practice, paraphrasing as, "people should learn to program by constructing program from the basic information on the language, and they should do it in the same way that experts do it."  The paper then goes on to present all the evidence showing that this "minimally-guided instruction" does not work.

After a half-century of advocacy associated with instruction using minimal guidance, it appears that there is no body of research supporting the technique. In so far as there is any evidence from controlled studies, it almost uniformly supports direct, strong instructional guidance rather than constructivist-based minimal guidance during the instruction of novice to intermediate learners.

There have been rebuttals to this article.  What's striking about these rebuttals is that they basically say, "But not problem-based and inquiry-based learning! Those are actually guided, scaffolded forms of instruction."  What's striking is that no one challenges KSC on the basic premise, that putting introductory students in the position of discovering information for themselves is a bad idea! In general, the Educational Psychology community (from the papers I've been reading) says that expecting students to program as a way of learning programming is an ineffective way to teach. 

What should we do instead?  That's a big, open question.  Pete Pirolli and Mimi Recker have explored the methods of worked examples and cognitive load theory in programming, and found that they work pretty well.  Lots of options are being explored  in this literature, from using tools like intelligent tutors to focusing on program "completion" problems (van Merrienboer and Krammer in 1987 got great results using completion rather than program generation). 

This literature is not saying never program.  Rather, it's a bad way to start. Students need the opportunity to gain knowledge first, before programming, just as with reading.  Later, there is a expertise reversal effect, where the worked example effect disappears then reverses.  Intermediate students do learn better with real programming, real problem-solving.  There is a place for minimally guided student activity, including programming.  It's just not at the beginning.

Overall, I find this literature unintuitive.  It seems obvious to me that the way to learn to program is by programming.  It seems obvious to me that real programming can be motivating.  But KSC respond to this, too.

Why do outstanding scientists who demand rigorous proof for scientific assertions in their research continue to use and, indeed defend on the bias of intuition alone, teaching methods that are not the most effective?

This literature doesn't offer a lot of obvious answers for how to do computing education better.  It does, however, provide strong evidence that what we're doing wrong, and offers pointers to how other disciplines have done it better.  It's a challenge to us to question our practice.

References


Comments


Ralph Johnson

I would like to point out a CACM article published in March 1992; "The Case for Case Studies of Programming Problems" by Marcia Linn and Michael Clancy.

In my opinion, they describe very well how we should teach introductory program primarily by reading programs and only seconarily by writing them. I was originally attracted to this paper by its emphasis on learning patterns of programming, which are called "templates" in the paper. The authors used this approach for several years at Berkeley and it resulted in a remarkable improvement in teaching effectiveness.


Mark Guzdial

Hi Ralph! I completely agree -- Linn and Clancy's case studies are a great example of using findings from the learning sciences to design effective computing education. So where is the use of case studies today? Why do so few introductory classes use case studies? Similarly, the results of using cognitive tutors for teaching programming are wonderful (and now, CMU makes a collection of tools for building cognitive tutors readily available at http://ctat.pact.cs.cmu.edu/), yet few are used in our classes. The bottom line for me is that there are some great ideas out there, and we're not doing enough to build on these past successes. Perhaps we need to remember as teachers some of the lessons of reuse that we try to instill in our students.


C C

I always thought I was just retarded in computer programming things when I took those courses necessary to graduate at Gatech. Now I have the style of teaching to blame instead of myself ;) I did do very well in the courses related to my major. Just CS 1321 gave me nightmares since I didn't know anything about anything, was thrown in the pool and expected to swim.


K Wampler

From my experience, the "minimal guidance" part is probably the key. One of the best ways to master a new language, library, "paradigm", etc. is to read lots of exemplary code. However, after lots of exposure to such examples, nothing cements that knowledge like actually writing similar code yourself. In fact, there's a small movement among practitioners to create and practice "dojos" and "koans" (e.g., in the TDD and Ruby communities).


Clif Kussmaul

Another way to think about this:
Why does CS expect students to learn to write before they learn to read?


Jake Swanson

This interests me because I'm a lab TA and paper grader for introductory java courses. Students I help fit the mold you describe. They don't know ANYTHING about programming, yet they're expected to sit down and do it. It is easy material, but they just don't know where to start.

I'm exploring the cognitive tutors you mentioned. Who knows, maybe I can make some available to these classes. Any other examples would help greatly!


Mark Guzdial

K Wampler, are you familiar with Richard Gabriel's proposal for a Masters of Fine Arts in Software (http://www.dreamsongs.com/MFASoftware.html)? Seems similar in goal. Clifton and Jake, agreed! I don't mean no programming in CS1 -- I believe we need hybrid approaches where students engage in a variety of activities.


Polar Humenn

I've always taught introductory programming with first lessons in reading programs, understanding their structure, and analyzing them. It is a written language after all. And we usually learn those languages first by reading, then by writing, and continuing on in complexities of both. Unfortunately, it frustrates the "ringers" in the class who want to dive right in and start programming right away. It's a balance game, especially trying to rid the ringers of their bad habits, approaches, etc.


Michael Lewchuk

I fail to see why this information is considered surprising or counterintuitive. Perhaps look at CS education as follows:
* Until about 2000 or so, CS programs could not rely on any courses taught in schools. It would be as if someone going for a B.Sc. in math was not eduated in differential calculus and algebra, or if a B.Sc. Chem freshman could not balance a Redox reaction. Thus CS usually had to start from the beginning, teaching all of the relevant material: discrete math and logic, procedural and object-oriented styles, decomposition of problems, and so on. I'm sure CS education would be easier if some of the relevant material was taught in school.
* Second, the proper way to teach, at least for beginners, is practice against an "ideal model" with corrections. It is the last part that "minimally guided instruction" fails at. If you want that "they should do it the same way that experts do it", experts must be on hand to correct errors and show improvements. If this is not the case, bad habits will creep in and stay.


Ralph Dratman

Clearly, I never should have started programming on my own! I would have been a better programmer if I just let my teachers or sites like this


Displaying comments 1 - 10 of 15 in total

Sign In for Full Access
» Forgot Password? » Create an ACM Web Account