School Days, School Days

Just a couple random notes today, following up on a few threads and reminiscing about school days.

My old friend and erstwhile professor Prabhakar Ragde has some good comments and related links on my recent posting about trends in Computer Science education in the United States.  This is a subject which I know Professor Ragde has been interested in for a long time -- I recall reading a magazine article clipping on his office door in the Davis Center in, oh, must have been 1991, with the headline "Study Shows Women Executives Interupt People As Often As Men".  Funny what things stick in one's memory. 

Anyway, Professor Ragde has at least three, probably more, ambitious projects underway.  First, I assume that he's still maintaining his position as the youngest curmudgeon on campus -- no mean feat given the massive influx of young talent in the CS department alone.  Second, it appears that he's attempting to dominate the classical music world by raising highly talented children.  Just as ambitious, he's redesigned the introductory computer science curriculum at Waterloo.  There are a lot of interesting ideas about functional languages as pedagogic tools in there.  Should be fun -- when I took the introductory (non-functional) CS134 course at Waterloo from Professor Ragde in 1991, it was a brand-new course then, and still had a lot of bugs to get worked out -- I recall getting photocopies of the proofreaders' galleys rather than a textbook, for instance.  I am very excited and interested to see where this goes. 

Introductory courses are hard to design in so many ways.  For instance, I noticed when I was taking CS134 that the distribution of marks in the class was bimodal -- there were a big chunk of people getting 95-100% and a big chunk barely passing.  Those people in the former group weren't really learning any new technical material, and those people in the latter were struggling to keep up.  I think for that reason alone it would be interesting to see how first year students handle functional languages; most high school students have little experience with Scheme, and so not only might the playing field be more level, but everyone might learn some CS fundamentals rather than coasting through easy, old-hat procedural programming.

Introductory courses are also the place where a lot of people discover that they're really not interested in a subject and quit early.  That's not necessarily a bad thing -- I'm very glad that I learned early that though I find astrophysics fascinating, I'm really not very good at it.  The risk of course is that you end up accidentally getting rid of people who would add value and thrive in a particular profession; the trend lines for women entering computer science are particularly worrisome, as I've already noted.  Professor Ragde comments:

I am currently designing a first-year course from scratch and would welcome comment on how it can be more effective at attracting and retaining women in the profession [...] But whatever I do will not be sufficient. We need a general cultural change.

If you've got anything germane to add, comment here and I'll make sure that it gets passed on.

Finally, while Professor Ragde was in the process of proposing his Scheme scheme, a lot of people commented on the proposal.  Reading the comments was not only interesting for the varied positions and takes on the subject -- technical, political, pedagogical -- but also because it brought back a lot of fond memories. It's nice to see that many old friends and acquaintances are still active in University politics.  

As you can see from my comments (towards the bottom), I was thinking a lot about some of the issues that I've blogged about recently when I wrote them.  At the risk of being somewhat redundant, I'll reproduce them here.

Your proposal is quite interesting.  I have often wondered why schools concentrate upon teaching principles of object oriented programming.

The most obvious alleged benefit is that OOP languages such as C++, Java, C# are in widespread use in industry.  But I don't really buy that argument.  Yes, UW is a highly practical school, but still surely the purpose of a UW CS degree is to study theoretical computer science. 

And really, most people in industry do not have a good grasp of theoretical OO principles.  More: they do not need a good grasp of OO principles except insofar as those principles serve their needs.  Heck, I design and implement programming languages for a living and it's not like we're in code reviews saying "Well, Bob, this code works, but doesn't it violate the Liskov Substitution Principle?" 

Which brings me to my second point -- why do we have OO principles in the first place?  Not because they are cool, I hope.  Rather, because OOP is a style of programming which emphasizes encapsulation, abstraction, contracts, information hiding, extension through inheritance, etc, etc, etc.  These are things which help in the design and implementation of large scale software

Super.  That's goodness for me -- I work on systems like that.  But in an introductory course in computer science, typically the students are working on small, simple programs by themselves.  OO languages are not necessarily good pedagogically at the introductory level.

What I sometimes see when I interview people and review code is symptoms of a disease I call Object Happiness.  Object Happy people feel the need to apply principles of OO design to small, trivial, throwaway projects.  They invest lots of unnecessary time making pure virtual abstract base classes -- writing programs where IFoos talk to IBars but there is only one implementation of each interface!  I suspect that early exposure to OO design principles divorced from any practical context that motivates those principles leads to object happiness. People come away as OO True Believers rather than OO pragmatists. Hopefully the co-op program shocks them out of it, but better to not get Happy in the first place.

So I agree with you that earlier exposure to functional programming is a good idea.  Not just from a theoretical standpoint, but also from a practical standpoint.  I strongly believe that as programming languages evolve we are going to see an increasing number of functional language and declarative language features in mainstream industry production languages.  (In the latest version of C#, for example, there is improved support for delegates, moving towards a first-class-function model, and also some support for declarative attributes.  But both could be greatly improved further.)

Of course, I might be somewhat biased.  I spent five of the last eight years working on JScript, which can be used as an imperative, object-oriented and functional language, and is usually found embedded inside declarative languages such as HTML, XML.  (My colleague at Netscape, Waldemar Horwat, once told me that Javascript was just another syntax for Common Lisp -- he was a pretty hard-core functional programmer.)

Come to think of it, JScript might make a very interesting pedagogic language.  It's very easy to get productive right away by writing little imperative scripts, it implements functional language features such as closures and anonymous functions, and it has an interestingly non-standard approach to OOP (prototype inheritance).

Comments (15)
  1. Robert Sayre says:

    Although Professor Ragde is certainly aware of this finding, the authors of HTDP (his intro textbook that uses Scheme) found that their approach was vastly more successful with female students than the intro course that used Java.

    I’m going to lapse into total conjecture and and posit this: women will succeed and enjoy an introductory course the less a language requires delving into implementation and syntax details. This not because it is too difficult or some such nonsense, but rather that they find it uninteresting and a source of endless debate and conflict. For introductory assignments, C/C++ allow the maximum amount of arguing possible about syntax and implementation, and are therefore the worst choice for such a course. The result is that females are more likely to drop the course, and males are more likely to become unproductive micro-optimizers.

    Scheme, Python, JavaScript. Doesn’t really matter. BTW, Macromedia’s Flash Actionscript dialect of JS is appealing to a vast number of people who wouldn’t get near an intro CS course, and beginners tend to produce much more advanced results than you see in a typical webpage script block.

  2. Tarjei T. Jensen says:

    I agree quite a lot with Robert above.

    Men (we) are probably intested in details for details sake, not because they have a useful application. I belive women are exactly the opposite.

    Languages like C/C++ interfaces directly to the tinkerer area of male brains. We love the tinkering and forget the time.

    BTW. Whatever makes CS palatable for women will do wonders for us men as well.

    Peter Moylan did an interesting experiment which he reported on comp.lang.modula-2. The couse was run using modula-2, but they allowed a project to be done in C. The good students went with C and had problems delivering on time (none did the extra credit stuff). The ordinary students which used Modula-2 had no problems delivering on time.


  3. <curmudge>"Erstwhile professor?" I am still a professor. And I’ve never heard raising children referred to as a "project" before.


    I can’t take credit for the design of what I am attempting; that’s been done before, by the authors of HtDP and others. I’m only foolish enough to try to port it to UW. I think if I can convince women to take the course, they will like it, but the trick is in getting them to take it. The conventional Java sequence has "practicums" where students solve problems in small groups, highly detailed and structured assignments and lectures, and the possibility of stretching intro programming out over two courses instead of one — in short, what looks like a better support system, though I think it stifles creativity and fosters dependency. But women tend to underestimate their abilities, and men tend to overestimate theirs. I need to overcome the tendency of women to turn down the opportunity the new course offers because it looks unusual, or difficult, or for the "elite".

    Note that the pilot section of CS 134 Eric took was full of people skipping the intro programming course (134 is a "CS 2" course in elementary data structures, and it was their first term of university). I think that was the reason for the bimodality — men overestimating their abilities. Some of the arguments I got over 135 sounded like "We can’t give students choice, because they’ll make the wrong choices and then blame us." History gives evidence for this, though I still think it’s better than dictating to students what they should do.

    Robert: the evidence that the HtDP approach is attractive to women is anecdotal, but apparently a proper study is being done ( and followup). Your conjecture is supported by research described in Margolis and Fisher.

    Tarjei: You are right that making CS palatable for women will do wonders for men as well. We don’t have a critical mass of women in CS to effect change, so we need to convince men of this fact. The trick is to really do what will make a difference in the right way and not just enrich our positions or make us feel better about ourselves.


  4. D. Brian Ellis says:

    I disagree with the comments above from Professor Ragde. I respect the amount of thought that has gone into them and the general idea is great (just that SOMEONE is thinking outside the box). However, when I was in University (less than 2 years ago) my professors were hopelessly behind the times. In the interest of full disclosure, I am a C#/C++/C programmer by nature.

    Most of my professors were born academics, spent more time worrying about grants and politics (I know, necessary evils to the system) than students or teaching. We were lucky to get object oriented and procedural programming taught to us in my opinion. Some of the more advanced professors openly longed for the days of FORTRAN and PDP-11’s. Also, most of them went straight into academics and didn’t understand how the real world works in business. In the course of things I’ve used LISP, JScript, and many other languages. Don’t get me wrong, most of these have a great purpose and many of them do things better than my beloved C family in some area. However, the University was not there to teach me higher level theoretical CS for the pleasure of it. It was there to give me the skills to maximize my chance of getting a job in the real industry.

    Overall, most of my development is done in OO programming. Most of my friends that I keep in contact with are working at larger companies with source control trees holding object libraries as well. Most of the major companies I have seen have loads of COM, object libraries, etc. The skills I learned focused more on what I needed to survive in industry, while the higher theories taught me the variance and the thinking skills to use those languages well to actually get myself a job and not teach CS for the rest of my life. Learning Modula-2, Prolog, LISP, and Scheme may get me a great job somewhere but without C++, Java, OO principles or something similar in my toolset I’m going to find it a VERY tight job market.

  5. I’m currently studying a Computer Science degree. In the first year, we started with functional programming, and later on moved to some very basic procedural programming. This year, we’ve been introduced to the wonders of OOP in Java.

    As someone who already had reasonable knowledge of OOP languages, I found this first year somewhat frustrating – but existing programmers were certainly in a level playing field with everyone else, because no one in their right mind had ever touched Haskell!

    This year, however, the non-programmers are still struggling to get to grips with Java, and the programmers are coasting…. The functional programming course certainly introduced me to a different way of thinking – and to realise quite how elegant functional programs can be for solving certain problems. However, what my course has failed to do entirely (and this isn’t just limited to its programming modules) is demonstrate *any* sort of "real world" applications for functional programming. Theory is fine – but if no clear benefit or practical use evident from it, then all but the most dedicated students will entirely lose interest.

    Just my random 2 cents! 🙂

  6. MilesArcher says:

    Are you trying to train Scientists or Engineers? Big difference.

  7. Brian: Just to clear things up, what’s quoted above from me is the two lines beginning "I am currently…". The long quote starting "Your proposal is…" is from Eric’s response to my proposal.

    My proposal involves a first course in Scheme devoted not to the esoteric details of continuations and macros, but using a small subset of the language to prepare students for OO concepts. It is immediately followed by a second semester making the transition to Java, which is used for two courses, with C++ introduced in the second semester of second year in a "programming in the medium" course. Eric’s point, and mine, is that it is very hard to motivate OO technique when students are learning to write small programs. They learn to mimic patterns which don’t make any sense for toy examples, instead of learning the ability to decompose and master small computational tasks.

    I’m an academic lifer, and a theoretician, but I don’t see any conflict between teaching people how to think and preparing them for jobs in industry. What distinguishes a university from a two-year college is that current technologies are taught in a context which enables graduates to move on when those technologies are superceded by new ones.

    James: I gather you used something like Richard Bird’s "Introduction to Functional Programming Using Haskell"? HtDP is very different, as is any course based on it. Take a look at the course design I’m proposing and see if it is "real world" enough for you. –PR

  8. Mike Dunn says:

    The question I always ask when this topic comes up is, "Why do people think it’s _bad_ that there aren’t more women in programming?" If programming is a profession that just doesn’t appeal to women — whether it’s for social or biological reasons* — then what’s the big deal?

    If women don’t like programming then don’t study programming. When you’re in college, take some intro courses in various fields and find something you do like and feel passionate about. This is, by the way, just what men do.

    Notice how it’s only the male-dominated professions that are subjected to this scrutiny. Again, I ask why is it bad that there are more men programmers then women. I never hear anyone say "There need to be more men in HR."

    *The feminist police are going to hang me for suggesting the genders are fundamentally different for biological reasons beyond our control. Oh well.

  9. Prabhakar: Yup, that’s the one. Sadly Richard Bird hasn’t taught the Functional Programming course himself here for a couple of years.

    If you can cover everything you need to know for functional, without the complexity of Haskell, then I’m all for it…. your suggested course design does look like a good idea. (although I’m biased at the moment – I think largely any change to the current course structure that I’m taking would have to be an improvement!)

  10. Mike – I think the issue at the moment is no-one is really sure *why* CS doesn’t currently appeal – so we should certainly take steps to ensure that the *only* reason women are not studying CS is because they’re not interested.

    When I take a look at my current year studying CS, 9 in 10 are male. And yet if you look at those studying something like Mathematics, the figures are much better. To me, that seems to suggest that there must be deeper reasons than "not interested".

  11. Mike: It’s bad that there aren’t more women in CS because the field is not achieving its full potential as a result. Half of our potential talent pool isn’t there. Attrition rates — fewer and fewer women the further along you get in the process — suggest that it’s not interest that’s the issue. Nor are women just flunking out. They’re being discouraged. And, I would suggest, certain kinds of men are being discouraged as well. Fix that problem, and we’ll have a better discipline.

    I think we also need more men who are nurses and nurse-practitioners, and especially we need more men who are elementary school teachers. It’s not easy to think of skilled professions in which women dominate. But these are different issues. It’s our field we have the best chance of changing.

    My thinking on biological determinism is that it’s an easy out to avoid solving difficult problems. I believe some differences may exist, in a statistical sense, but they are swamped first of all by the enormous variations within each sex, and second of all, by social influences — about which we can do something. We’re biologically predisposed to eat meat, but generations of my ancestors were vegetarian, and though I’m not, the bulk of my diet consists of stuff I wouldn’t be eating in nature. Being human is all about overcoming biology. At any rate, we’re not going to resolve the nature/nurture question in a hurry, so, as James says, I would like to work on taking away the barriers thrown up by "nurture", of which I would argue there are plenty. –PR

  12. Tarjei T. Jensen says:

    I think this takes off in a completely wrong direction.

    Studying at university is about getting knowledge to serve for a lifetime and not just enough to cover the current fad in programming languages.

    We know that programming languages that look like C is not good for learning. Why on earth would we scamble the students brains before they have a chance to learn enough to cope?

    It seems to me that those institutions who start students off with Ada/Delphi/Eiffel, seems to have no need to find a beginners language. Is Scheme just a way to cover up the fact that the next language in line is not really suitable for the task?

    We got Java because C++ is a mess. People still have problems with Java. What is the next version of C going to be called?

    I know too little about C#, so I can’t tell if it solves any problems with Java.


  13. Stepheh Arehart says:


    You’ll probably want to check out the book "Unlocking The Clubhouse: Women in Computing", by Jane Margolis (listed on the link below). This might give you some insight into the issues faced by women who wish to enter into the computer-related fields. From this, you might be able to adjust your lectures accordingly. Good luck


  14. Stephen Arehart says:


    You’ll probably want to check out the book "Unlocking The Clubhouse: Women in Computing", by Jane Margolis (listed on the link below). This might give you some insight into the issues faced by women who wish to enter into the computer-related fields. From this, you might be able to adjust your lectures accordingly. Good luck


Comments are closed.

Skip to main content