Improving Undergraduate Computer Science Education

These are the notes for a talk that I’m giving tomorrow at Makerere University in Kampala, Uganda.  I’m posting them here because it is a convenient way to write and others might find these interesting.

I’ll talk about MIT because that is where I have the most experience teaching.

MIT operates the same way that it did upon opening in 1865: two semesters with long vacations in between; students do most of their learning in take-home problem sets (6-9 hours/week/course) for which they get some inspiration in lectures (2-3 hours/week); evaluation/grading is done by the same people who are teaching/coaching.

The calendar was designed for rich families.  You want your kid available in the winter so that you can take him down to your estate in Florida.  You want him free to accompany you on a Grand Tour of Europe during the summer.  In 2007, however, most college students are from middle-class families.  Why would you want to pay for the kid to attend four years of college, plus spring break trips to Mexico and summer vacations, when a bachelor’s degree could be obtained in 2.5 years on a normal 48-week/year work schedule?

How about lectures?  You need to broadcast some information to 100 people.  Printing was expensive and cumbersome in 1865.  Telephone, television, and Internet did not exist.  A lecture was probably indeed the most efficient way of getting some information to a large group, despite the fact that humans can read 3X faster than they can listen..  Compare to 2007, however, when you could simply email a list of those 100 people or provide them with a URL. 

Why did people come to lectures in 1865?  Their lodgings weren’t centrally heated and the temperatures in Boston can get down to -10C.  Many came to get warm.  They had no television, no radio, no Internet, no email, no instant messaging, no mobile phone.  Many students came to lecture for entertainment.

What about homework?  Students would do homework either in the library or at home.  In 1865 both places lacked television, video games, email, etc.  In 2007, the students who do best may be the ones with the best study habits, not those who are the most able.  Companies do not rely on lecture+homework for getting work done; they create an environment with limited distractions and keep workers there for most of each day.

Evaluation and grading in 1865 was done by the teachers.  This is an invitation to dishonesty since you are always tempted to give students As, but there was little alternative since student work was not easily accessible to others.  In 2007 in most areas of academia, student work can be viewed just as easily by someone on the other side of the planet as by the teacher.  If we want to ensure quality and that students always regard us teachers as allies, why would we want to be involved in evaluation?

How well does the MIT system work?  It should work pretty well.  We have some of the best and most energetic lecturers in the U.S.  Lectures are generally kept to 50 minutes (more than double the limit established by education researchers).  The lectures are demanding; if you tune out for 5 minutes, you will have a lot of trouble catching up.  Professors do not put up PowerPoints and read them bullet by bullet.  Homework assignments are weekly in most courses and are extremely demanding.  The students are among the most able and best-prepared in the U.S.  Yet when you ask graduates in CS what percentage of their classmates are capable of programming and what percentage they would enjoy working with, the answer is usually 25-30 percent.  People who studied poetry, physics, or civil engineering are often better software engineers than an MIT CS graduate (contrast with medicine; not too many good doctors out there who skipped med school).  A MIT student graduates ready to work for an engineer, not to be an engineer.  Not too impressive considering the near-$200,000 cost and the abilities of the incoming students.  (And the problem is not always fixed on the first job; companies tend to give junior engineers a tiny piece of a big problem, not a small problem to solve by themselves).

6.171: Software Engineering for Internet Applications.  This is a one-semester attempt to address the deficiencies in the rest of the curriculum.  What do we try to teach in 13 weeks?

  • object-oriented design where each object is a Web service (distributed computing)
  • about concurrency and transactions
  • how to build a stateful user experience on top of stateless protocols
  • about the relational database management system (there is no DBMS course at MIT)
  • how to work at every stage of the engineering life cycle: listen to a vague request, write down a precise spec, build a prototype, document for other programmers, test with users, refine, launch, refine, document for decision-makers

 How does it work?

  • Students organized themselves into teams of 2 (ideal) or 3 (acceptable) and are connected with a real-world client.
  • Lecture time is devoted to teams presenting either designs or prototypes and the other teams criticizing.  This prepares students to participate in engineering design reviews.  If nobody makes a suggestion I consider important,  I will make it myself at the end of a review or via email to the class mailing list after class.  If I have something that I want everyone to know, I add it to the online textbook or email it to the class prior to meeting.
  • Occasionally we will use the meeting time for teams to work together (sometimes paired with another team) on a data modeling challenge.  This works great in rooms with a lot of blackboards and after 20 minutes we start asking teams to present their work while others criticize and comment.
  • Most evaluation is done by the clients (usually non-technical), professional interface designers whom I bring in, and professional software engineers whom I bring in as mentors and critics.  The final presentation and write-up is evaluated by a team of business executives and venture capitalists; students are told to pitch the project as though they were seeking follow-on funding.

How well does it work?

Conclusion:

  • Lecturing has been found to be extremely ineffective by all researchers.  The FAA limits lectures to 20 minutes or so in U.S. flight schools.
  • Lab and project work are where students learn the most.  The school that adopted lab/projects as the core of their approach quickly zoomed to the first position among American undergrad schools of engineering (www.olin.edu).
  • Engineers learn by doing progressively larger projects, not by doing what they’re told in one-week homework assignments or doing small pieces of a big project
  • Everything that is part of a bachelor’s in CS can be taught as part of a project that has all phases of the engineering cycle, e.g., teach physics and calculus by assigning students to build a flight simulator
  • It makes a lot of sense to separate teaching/coaching from grading and, in the Internet age, it is trivial to do so.  Define the standard, but let others decide whether or not your students have met the standard.
  • A student who graduates with a portfolio of 10 systems, each of which he or she understands completely and can show off the documentation as well as the function (on the Web or on the student’s laptop), is a student who will get a software development job.

More:

9 Comments

  1. Joshua Volz

    August 23, 2007 @ 4:18 pm

    1

    I don’t mean to nitpick, but do you really think companies do a good job of eliminating distractions so that people can work? How come the majority of programmers I know work off hours at night to try to get something done for their job? The reason is that it’s quiet and nobody is distracting them. Between email, instant messaging, your boss bothering you, the jr. developer asking questions, fruitless and pointless meetings, TPS reports and everything else that comes with working for a company I find it hard to accept the claim that companies eliminate distractions.

    I entirely agree that eliminating distractions and focusing on a problem not only allow you to learn more about it, but allow you to be more productive as well. The challenge in education is whether to prepare someone for the real world, or to prepare someone for the idealized (and correct) way of doing things. If you prepare them for the real world, they don’t reach their maximum potential, and if you show them the idealized way you create “free thinking dissatisfied workers.” While I think creating the free thinkers is good, maybe not everybody would agree with me.

    Wow, apparently I’m jaded.

  2. Charles

    August 24, 2007 @ 12:51 am

    2

    While I agree the state of undergrad computer science education is not where it should be, much of the changes desired require a deep change in the way people view computer science.

    For the typical computer science major, computer science is the study of technology. This means that ideas, languages, tools that are in current use today are likely to be replaced by something else tomorrow, as we gain a better understanding of what it means to program in the real world.

    This is at odds with those who teach computer science who want to see the field like mathematics, a subject that seems steeped in the permanence of its results. The calculus lessons taught 50 years ago might work just as well today as it did then (even as calculus books want to add more colors to their graphs).

    Indeed, some professors stopped learning any new languages after Pascal or FORTRAN, convinced that it was a waste of their time to fill their heads with information that would be replaced with something else in a few years time.

    Despite the importance of mathematics in computer science, software engineering often works at the opposite end, with imprecise specs, languages that aren’t great, making tradeoffs, and deciding what technological tools to use.

    For computer science teachers to become effective, they have to embrace the things that may disgust them most about the field, which is its lack of precision, its current fads and whims (design patterns, Ruby on Rails, agile methodology), and learn skills they didn’t need to get a Ph.D. (managing vague projects).

    In other words, while there is good reason to be critical of computer science education, you have to convince those who teach it that it will never be mathematics, and that they need to learn soft skills such as management, evaluation of technology, and be able to teach that. Right now, it’s so much easier to write a book on a language than it is to write a textbook on software engineering.

    The good news, I suppose, is if enough people listen, then students, even those with a mathematical bent, will be exposed to software engineering (just as theoretical students today learn enough about Java, and possibly tinker with Linux, so they aren’t completely oblivious to widely used programming languages) and know how to teach it.

  3. JP

    August 24, 2007 @ 9:15 am

    3

    The ‘fast track’ component of your suggestion could be applied to any discipline.

    Three things:
    1) Professional basketball players vehemently oppose players being drafted out of high school. It messes with their retirement plans big time. I wonder if similar pressures exist in the CS community, where a sudden influx of cheap labor might push a lot of dead weight out the door sooner than they anticipated.

    2) Assuming someone is starting school at the traditional age, there is a certain maturity process that four or more years of undergraduate “work” imparts. A lot of it involves binge drinking and fraternity hazing, but I also wonder if this lack of “life experience” might also hinder one’s natural progress through an organization.

    3) This would be great for Google, which depends on the perception of a continuation of the college experience in order to get insane amounts of work (and creativity) out of their people. They could easily squeeze two more years out of this scheme before sucking recruits dry.

    Our culture worships the freedom of youth, even if it’s an illusion. Why rush it?

  4. Seth Gordon

    August 24, 2007 @ 10:40 am

    4

    There’s another reason colleges tend to do the lecture-and-homework system: it’s easy for the professors and the grad students, who consider teaching a distraction from their real jobs.

    You might be interested in this article on a community college in Washington State that was designed from the ground up to be effective at teaching: http://www.washingtonmonthly.com/features/2007/0709.careycascadia.html

  5. Ben

    August 24, 2007 @ 9:27 pm

    5

    I’m a tad hesitant about the proposed 48-week/year schedule. I earned undergraduate degrees in CS and EE, as well as a masters in EE, at one of the most academically rigorous engineering schools. By far, the CS courses were better than those my former high-school friends faced at their universities, but they held no match in difficulty to what the EE curriculum put us through. I regularly burnt-out under the stress and used the vacations to try to recover.

    A redesign of the calendar year should also force a redesign of the courses, so that either students aren’t overwhelmed by the workload (and fail-out due to the constant stress) or have some time for recovery and other non-academic activities (e.g. many students work during their summers). Unfortunately the quarter systems is what many schools have tried as a way to allow a full-year cycle, but I have yet to see a school implement it and maintain a level of academic rigor I find respectable.

  6. Stephen van Egmond

    August 25, 2007 @ 12:26 pm

    6

    It’s unclear at what point in the curriculum 6.171 is taught. It seems like it could be the second course in the CS curriculum.

    Here’s the picture in Canada. I’m writing as a 1997 graduate of the school in question, no longer studying there, but I have a friend who teaches there now.

    The University of Waterloo holds about the same stature as MIT in Canadian business. Although other disciplines are taught, it is primarily known for the quality of its graduates in engineering, physics, health science, math, and computer science.

    The CS curriculum — link is below — is strongly rooted in mathematics. In fact, CS is in a department of the Math faculty. All math students follow the same curriculum in year 1, begin to specialize in year 2, and never see their colleagues in Pure Math or Applied Math in years 3 and 4.

    Year 1 is linear algebra, calculus, and statistics. Year 2 is follow-on courses in the same. The CSxxx courses in this time have one training-wheels course — which you can substitute for a 300 or 400-level course — and the early years are spent picking up OOP, recursion, algorithms, and other elementary programming concepts. In the 3rd and 4th years you can steep yourself in whatever corner of CS theory interests you, with various options provided for business (finance, actuarial science), software engineering (below), or bioinformatics (where the money is free these days).

    This broad survey of the mathematical foundations of CS essentially made the students (who got it all) into swiss-army knives of CS theory. But no real-world business experience. More on that later.

    I made the serious mistake of starting (and nearly finishing) the software engineering option. This course is aimed at people who are CMM wonks and would be comfortable at an organization with NASA-like software engineering practices. One entire term on requirements notation. One entire term on design and implementation. One entire term on testing and validation.

    This program was taught using a joint electrical engineering/computer science student audience. The electrical engineers implement call routing in a telephone switch, and the computer science people the customer service system that goes with it. After four months of requirements planning and modelling, and three months of design modelling and notation, we… spent all night three nights in a row implementing it in a wild hack and fix session, and the final system was sort of reminiscent of what we intended.

    After that experience, I staggered into Larry Smith’s entrepreneurship courses and boy, was that a good idea.

    Throughout this academic program, students are spending 4 months on campus followed by 4 months working in industry. They are essentially low-paid slave labour for various companies like Microsoft or (back then) Nortel. Smaller clued-in companies also hire these co-op students for their valuable energy and passion, and I regard those times spent in industry as the most valuable of my time in school.

    The result of all this is that after 4.6 years in school, I had the 2.6 years of education that Philip alluded to, and 2 years of work experience, and was able to pick my favourite job offer, and start work making C$ 50K a year, which was considered good for a fresh university graduate 10 years ago.

    I can certainly see that in a school without a co-op program, 4.171 is the next best thing.

    ref:
    http://www.ucalendar.uwaterloo.ca/MATH/comp_sci.html

  7. Adam Milligan

    August 25, 2007 @ 3:46 pm

    7

    The author of this blog makes, I suspect unintentionally, a fundamentally important point about the education of software developers, and then fails to follow up on it.

    Consider this quote: “People who studied poetry, physics, or civil engineering are often better software engineers than an MIT CS graduate (contrast with medicine; not too many good doctors out there who skipped med school).” This comparison is invalid; there are, in fact, many very good physicians who studied poetry, physics, or civil engineering as undergraduates. Medical schools provide a professional graduate degree program in a practical field. Where is the analogous professional degree program for software developers?

    Keep thinking.

    That’s right, there isn’t one (for those who suggested the “software engineering” graduate degree at CMU, put your hands down). So, let’s take the above comparison to its correct logical conclusion.

    Developing software and providing medical care have similarities. Both are complex processes that require a great deal of technical knowledge, as well as the ability to apply that knowledge in various and frequently changing circumstances. In the practice of both, human factors such as communication and cooperation often outweigh the importance of all else. To this end, medicine (like most applied professions) has distinguished itself from its scientific roots. Undergraduates study the scientific fundamentals — biology, chemistry, physics, etc. — and with this background then choose their career path. Those who choose theory and science go to PhD programs; those who choose application go to MD programs, which emphasize practical skills and hands-on work.

    The software industry needs to wake up and take a lesson from its older brethren. Computer science is useful stuff; people who choose to write software professionally should be familiar with it. But, realistically, an undergraduate CS program teaches only the scientific underpinnings of software development. Upon completing a CS degree, students who choose the path of science and theory can continue on to a PhD program; the vast majority who choose the applied path have nowhere to go but industry, for which they are woefully unprepared. Who do they learn the skills they actually need from? The people already working at their company; who learned those skills from their predecessors; who learned… etc.

    How are we surprised that the way we write software hasn’t fundamentally changed in 25 years? (If you think this isn’t true, go read the silver anniversary edition of books like _The Mythical Man Month_ by Fred Brooks, or _The Psychology of Computer Programming_ by Gerald Weinberg. A disturbing number of the comments look something like “we don’t use punch cards any more, but otherwise the content of this chapter applies equally today as it did 25 years ago.”)

  8. Dietrich

    July 30, 2009 @ 7:01 pm

    8

    @Charles

    Embracing the things that disgust them seems near impossible for most departments. The “we are not a trade school” attitude seems to be overcompensation for the fact that Computer Science is not a pure natural science, but rather a set of engineering disciplines organically formed around a mundane device.

  9. Randal Powell

    August 8, 2010 @ 5:44 pm

    9

    I think Dr. Greenspun is 100% right with regard to grading and appreciate his consistent outspokenness on this issue. The grading of students by teachers is neither good for the teachers or the students. If teachers did not need to grade, they would be able to interact with students in a more honest, collegial way. Students would also view teachers (and the education system as a whole) as more supportive.

Log in