Bjarne Stroustrup on Teaching C++
//: You left Bell Labs to accept a position at Texas A&M working with !eek! college students. How long ago did you do this and why?
Stroustrup: I left New Jersey for Texas more than three years ago.
Students aren't "!eek!". Teaching was one of the reasons I went to academia. Had I not wanted to teach, I could have stayed at AT&T Labs - my job there was full-time research. I felt that I - after 25 years of research and application - had something pretty unique to teach the students. Unfortunately, the average professor have never practiced what they preach and that sometimes weakens the message they send.
It was time for a change. How many people today have stayed in one job for 25 years? It was the most varied of "jobs" and actually, I still do part of it because I didn't sever my connection with AT&T Labs completely (they didn't allow me to :-) and there are continuation in my projects. Academia is different from industrial research in many ways, some good, some not so good, but it is different, and "different" is stimulating.
Texas A&M university is one of the few major US universities that is currently going through a period of major expansion - in quality and quantity. For example, our CS department hired 4 new assistent professors this year. You can see and feel the rapid improvement of department . It is great to be part of an improving and expanding organization! This year, I have papers in POPL and OOPSLA with colleagues - for good and bad, writing papers is a much more central part of academic life than the life of an industrial researcher.
//: What level of students do you teach?
Stroustrup: I teach freshmen and graduates. Currently, I teach my graduate students practical language design through case studies from the C++0x effort. Before that, I was focussing on the software frameworks for distributed programming (CORBA, .Net, J2EE). I think that graduate students know a lot about the science of computer science, but too little about the theory and practice of constructing quality software. For example, they tend to know their algorithms, data structures, and machine architectures, but not how to combine the knowledge from those academic fields into maintainable and well-preforming software at a real-world scale.
So, with my freshmen, I teach what I plan to be the basis for a more effective approach to designing and implementing software. Together with experienced colleagues, I have taught a first programming course for engineering freshmen, which from this fall will also become the standard first course for computer science freshmen.
We are completely overhauling our undergraduate curriculum, and I expect the graduate curriculum will have to be revised to keep up.
//: What have you learned from observing students as they learn C++?
Stroustrup: They are bright, but mistaught. The high schools have drilled them more than educated them and given them an unrealistic idea of what it takes to succeed in today's world. Most think that doing well is to regurgitate information and to be able to compute the answer to a question that you have seen in many slightly different versions before! Real search for answers and synthesis of systems from parts seems very novel to most. Most - being bright (most of our engineering students were near the top of their class) - also found it too easy to succeed in highschool. They therefore are surprised that in university it takes more work and smarter work just to be average!
None of this has much to do with C++, but the most important aspect of teaching freshment is to reajust their expectation of what is required. We would do them a severe disservice if we allowed them not to grow.
Fortunately - being bright and ambitious - many seem to be stimulated by the new challenges and approaches.
//: Has this changed the way you feel about C++ or its future? What changes to the standard language or library might we see because of what you've learned while teaching?
Stroustrup: My view has not been fundamentally changed, but some views have been reinforced. I felt that C++ had become too "expert friendly" and unnecessily hard to teach. I hope to deal with some of that in C++0x, but it is a tough task because of course everyone voting in the standards committees is an expert of some sort, so attention naturally shifts towards what helps experts. I constantly try to yank their attention back to novices - "novices of all backgrounds" because as long as we keep learning we are all novices at something.
For concrete examples, see my writings on C++0x.
//: For awhile, Java was all the rage in college curriculums. Has that changed or are college grads with C++ knowledge going to be getting rare?
Stroustrup: I don't have the global view to answer that question with any certainty, but it seems that most students have some knowledge of C++. C++ still dominates the "harder" areas where performance (time or space) is important or where the distance between Java and the machine is a problem. I have seen a few school switch to C++ recently and a lot of embedded systems projects (mostly in industry) move to C++. The apparent shortage of C++ programmers is partly an increased demand and a mismatch between what is taught (fairly mondane PC projects) and where the increase in C++ usage occur (demanding, large, high-performance, high-reliabily applications).
For a short list of C++ applications, see the list on my home page.
Interestingly, we (I personally and TAMU CS) have had quiet a few requests from industry (big name companies) to increase our emphasis on software development skills and skills that prepare the students to work closer to the hardware. That, of course means C++ and I'm keen to make sure that it means modern C++ rather than glorified assembly code expressed in C style.
//: There are a number of good C++ books for professionals (including several that have been written or edited by you), but the story is different for C++ text books. What is your opinion of the C++ text books currently on offer? What do you use in your classes? Might we see a text book by Bjarne Stroustrup in the future?
Stroustrup: I have not been impressed by the current crop of C++ books for beginners (the books by Francis Glassborow and Koenig&Moo are exceptions, but address niche markets), so yes, I had to construct the materials for my beginning programming course from scratch. Of course I use C++. This is likely to become available as a book next year after being field tested on a few hundred freshmen for a couple of years.
I call my approach "depth first". The aim is to get to writing realistc code as soon as possible (e.g. file processing is week 6 and GUI is week 8) together with an emphasis on correctness and maintainability.
We teach the basic use of the STL together with the basics of its implementation and general principles.
Fundamentals are important in this time of rapid change because fundamentals is what changes the least.
//: Who do you think authored the Shakespearean canon?
Stroustrup: No opinions. I'm not really a Shakespeare buff. I like history better; try the world's oldest blog.