Why we ought to teach Java: Computing education and social practice

August 23, 2011 at 9:31 am 14 comments

We’re re-examining/reconstructing our reading list for the qualifying examination for our PhD in Human-Centered Computing. One of the papers I’ve had the chance to read (and re-read — it’s a dense piece) is by James Greeno, Allan Collins, and Lauren Resnick, three top-notch education researchers.

Greeno, J., Collins, A., & Resnick, L. (1996) ‘Cognition and learning,’ in Berliner, D. & Calfee, R. (eds.), Handbook of Educational Psychology, Macmillan, New York: 15-46.

They contrast three views of education, which are paradigm shifts in the Kuhnian sense.  It’s not that one is better than the other.  One looks at different things than the other, creates different theory, leads to predictions about entirely different things.  The first was behaviorist/empiricist — learning was observed responses to stimuli.  Behaviorism explains a lot, and can lead to strong predictions. The second is the cognitive/rationalist view, the view of learning as have knowledge structures in the brain. This was the view started by Piaget, and it has had the greatest impact on schools.  The third view is the “situative/pragmatist-sociohistoric.”

A third perspective on knowing focuses on the way knowledge is distributed in the world among individuals, the tools, artifacts, and books that they use, and the communities and practices in which they participate. The situative view of knowing, involving attunements to constraints and affordances of activity systems, suggests a fundamental change in the way that instructional tasks are analyzed. The change is away from analyses of component subtasks to analyses of the regularities of successful activity…When knowing is viewed as practices of communities and abilities of individuals to participate in those practices, then learning is the strengthening of those practices and participatory abilities.

This is the perspective described in Lave & Wenger’s classic Situated learning: Legitimate peripheral participation (also on our HCC reading list).  The situative view is most powerful in describing learning in naturalistic settings, from apprenticeship to life-long learning (e.g., how professionals get better at what they do).  An important difference between the situative and the cognitive is in defining “what’s worth knowing.”  The situative is focused on learning how to participate in a community of practice, to be part of the discourse and activities of a group of people who work towards similar sets of goals in similar ways.

Computer science education is feeling the tension between the cognitive and the situative today.  I see it in the discussion about Greenfoot. We CS educators talk about our foundational concepts, and we talk about learning the tools of our community.  We say that “We don’t teach languages, we teach concepts,” but then we talk about our courses as “the C course” and “the Java course.”  Once, the community of practice in computing was mathematics and electrical engineering.  That’s what people knew and talked about, and that’s what we now call our foundational concepts.  Today, there is a huge community of computing professionals and scientists with lots of activities and tools.  They have a practice and an on-going discussion.  Knowing the common knowledge and practices in use in computing today is not vocational — it’s about being able to communicate with others in the practice.  Java is the the most common language in the discourse of computing education today.  No  computer science undergraduate is educated without knowing it.  This fact has nothing to do with what languages best make evident the concepts of computing.  This has everything to do with being part of a community.

What we teach in our Media Computation data structures book when we teach about simulations in Java  is absolutely harder than when I taught similar content in Squeak.  But it’s harder, in part, because we’re dealing with how to make this work around the strong typing in Java, and we’re making sure that students understand interfaces. Those are worth knowing, too.  Strong typing and interfaces are part of what the community of practice of computing values and talks about today.  Students are not well-educated if they cannot be part of that conversation (even if only to say that they don’t like the existing practices!).

As a computing educator, I have a responsibility to stay informed about the activities of computing — in part, that’s what Stroustrup is arguing when he says that professors ought to be building software. I have a whole collection of recent computing books on my shelf that I’m still working through.  There are books on Ruby and Lua, Django and script.acul.ous. Are these the right ones?  I don’t know. They’re my best guess, and once I read up on them, I’ll have a better sense of whether I think they’re worthwhile.  I should be able to talk about the best ideas in tools used by practitioners in my community, the community that I work in and that my students will work in–and importantly, critique them.  Part of my job, in the Lave & Wenger sense, is to exemplify the center of the community of practice for my students.  To do that, I have to be able to speak the language in that community of practice.

I’m not arguing that Java is a great language, and I’ll continue arguing that Java is a poor beginner’s language.  But our students do need to know Java, because Java exemplifies the current ideas and practice of our community. Our students are not well-educated if they can’t participate in that discourse.  That’s why it is important for us as computing educators to learn how to teach Java and how to motivate the learning of Java.  Not teaching them Java is not an option.  Not teaching them Java leaves them uneducated. Not teaching Java only means that our students will be at a disadvantage. Our students don’t win because we refuse to play the game.

An argument from the cognitive perspective (the one I grew up in) is that students who have a strong set of concepts, who understand the core of their field well, can easily teach themselves the current tools and practices of the community.  That may be true.  What we know about transfer suggests that it’s true.  I want to believe that’s true, but I realize that I’m crossing paradigms.  I do recognize that the knowledge of the language and tools don’t come for free. Yes, Ruby is like Smalltalk — but just because I know Smalltalk, doesn’t imply that I know Ruby. Just because I know English and Latin and French, doesn’t mean that I know Spanish.  It might be easier for me to learn a related language. But I still have to do the work to learn it.

All the tools and languages in common practice in computing today have important ideas embedded in them from some smart people — and maybe some less-important ideas from some not-so-smart people. But they are the ideas that our community is talking about. I’m not a fan of strong typing, but I realize that my students need to know what it’s about, because there are reasons why it’s part of our dialogue today.  E.D. Hirsch writes books about “cultural literacy” and has made up long lists of the vocabulary that children need to know at various ages. One can critique Hirsch’s approach for being uninformed by the cognitive. Students need to know the concepts and have the knowledge structures to think about these ideas appropriately, not just know the words.  But a focus just on the concepts leaves one open to a reasonable situative criticism.  Our students must also be able to talk to the practitioners in our community.

We absolutely need to create better computing education.  Java is a poor beginner’s language.  We have to continue to critique and develop our practices.  Our students are going to join this community, and that involves not just having a set of powerful knowledge structures.  It means knowing the language and common practices of this community.  Java is important to learn for the situative learning goal. The goal of an education in computing is a set of concepts and the fluency in the languages and practices of the community.

Entry filed under: Uncategorized. Tags: , , , .

Rising grades in UK A-Levels, but not so much computing Programming is for entrepreneurs and thinkers–and coders, too

14 Comments Add your own

  • 1. Alan Kay  |  August 23, 2011 at 10:04 am

    I certainly agree that it is a good idea for agnostics to know not just the Bible, but as much as possible about religions and anthropology. Especially if one is interesting in not just doing science but also being able to explain it and to help those who believe otherwise to learn it.

    So I definitely agree that the kids need to “learn Java”.

    However, I think that it is difficult to learn medicine in a Christian Science hospital (if there were any). And it is difficult to learn science in a fundamentalist church.

    So I definitely think it is difficult to learn computing in a Java sect (which so much of academia has lapsed into).

    For many years I’ve put forth the idea that “there is no language good enough to be learned as ‘the one’ in isolation”.

    Because of “imprinting of concepts” and even though it is difficult, several (maybe three) very different languages should be taught at the same time.

    In other words, the epistemological stance of the educative environment is what is really important here. For most things, including science, religion and computing, this should be a “critical of everything” and comparative stance whose purpose is not to trash but to learn for both good and bad features.

    Another worthy point here is that academia (and business) have been chasing the red herring of “programming” for far too long, and have missed that the main concerns should be “systems” and “scaling”. Once the ARPA community started thinking about “intergalactic networks” (as Lick termed them), it also had to start thinking about “communication with aliens” (also a Lick idea).

    In other words, at intergalactic scales (say, over the entire planet to start with), it won’t be possible to create any kind of detailed orthodoxy, so a real problem to be solved is how to inter-operate and coordinate diverse offerings successfully into larger systems.

    This was what OOP was supposed to be all about in supplying modules that were essentially virtual machines with some form of pure messaging between them. This was successfully done at the physical computer level with TCP/IP, and Smalltalk at Xerox PARC was a lesser gesture at the software level, but a pointer in this direction.

    But the C community, etc., completely missed what was really going on in computing vis a vis systems and scaling, etc. And it is this set of misconceptions that we find in many universities and businesses today — and one of many poor results in this directly was Java.

    The big purpose of education goes far beyond knowledge and fluency — to critical multiple perspectives that allow shifts to more powerful points of view.

    If computing could get back to this, then it would know in what fashion students should “learn Java”.

    Best wishes.


  • 2. Bijan Parsia  |  August 23, 2011 at 4:55 pm

    I certainly agree that it is a good idea for agnostics to know not just the Bible, but as much as possible about religions and anthropology.

    What about atheists? I don’t see any particular value to me of knowing very much at all about religions. It’s not necessarily valueless, but it’s no huge imperative. There are plenty of alternative things to fill my mind with and many of them will be as usefully effective if I am interested “in not just doing science but also being able to explain it and to help those who believe otherwise to learn it.” I certainly don’t need extensive education in religion (any religion or study of religion) to be a principled, educated atheist, just as I don’t need to extensively study astrology or homeopathy to be a principled, educated non-astrologer or homeopathy ridiculer.

    The analogy just doesn’t hold. I may find Java obnoxious, but it’s not a religion (vs. science). It’s a perfectly reasonable part of computing science. It’s a workable, if not to my taste, part of our common set of idioms. People think great thoughts from a Java mindset and write great programs in Java.

    (Ewww! Defending Java. Brrr!)

    On the flip side, since I feel like disagreeing with EVERYBODY today, I’m not so very convinced by your line Mark, at least, in the extreme, sine qua non version. Java is a highly defensible choice as the basic language of a comptuer science department, but I think there are others as well, even fairly outre ones. You do need to have some acquaintance with Java (it’s hard to avoid), but I don’t think even mild programming competence in Java or comprehensive knowledge is required. Javascript, for example, is pretty close to being a clear, comprehensive, no brainer alternative (balancing well the capability, ubiquity, and vocational viability).

    (And I don’t like it very much either!)

    In particular, I don’t see how Java per se exemplifies the current ideas and practices of our community, as a whole. It is a common language for a very large community. It’s a programming language, so it can be bent in lots of directions. There are lots of often quite distinct communities of practice inside the Java community, and so we have to pick and choose there. It’s not clear to me that the division of a common language is so much less than the division of uncommon languages in many cases.

  • 3. gasstationwithoutpumps  |  August 23, 2011 at 9:20 pm

    In the community of bioinformaticians, Java is a fairly unusual language, mainly used by computer science students who never learned anything else.

    For really big problems, people end up using C or C++ to get maximum efficiency from the computers (some bioinformatics problems are big and growing faster than Moore’s Law). C++ is a little less elegant than Java, but has similar strong typing. C is very close to machine language, so is harder to work in, but allows extensive optimization—it also tends to more portable than Java, which achieved “platform independence” of sorts, but not “version independence”.

    For problems that are not big, people tend to use Python or Perl, which allow rapid prototyping (though I’m trying to wean all our students off of Perl, since Perl code is almost always unmaintainable).

  • 4. Errol Thompson  |  August 24, 2011 at 10:14 am

    I am not a great fan of Java but I can see Mark’s point although I might word it as a need to learn a language in common use in the community of practice. Depending on the business context, this could be any of a range of languages including Java, C#, C++, … However, I would contend that most practitioners do not focus on a single language or programming paradigm. They have learnt to be flexible and use tools that fit the context.

    This leads me to what I see as the core issue of what Mark has raised. That is our student’s need to be able to take part in the dialogue. This dialogue includes recognising the limitations of the tool set being used and its strengths. I don’t see this being possible if the only language they have encountered is Java or C# or C++.

    In the introductory course that I teach, I now explicitly talk about different programming paradigms. I start with a functional approach followed by objects and then imperative. Why? I am giving them tools to structure code and think about code design early. But it also gives us a chance to dialogue about paradigm differences as I go through the course.

    As to language, I am using Java even though it doesn’t help with some of what I want to teach but I am not tied to it. I see Java as a political decision and not a pedagogical decision. If the concepts that I believe are important for our discipline are transferable then I need to help students understand how transferability is applied so I may need to implement them in a context which isn’t as tidy as I would like. It may just help them see why an alternative language would be a better solution.

    In a research interview someone said that object-oriented could be implemented in any language. We need to understand that the core concepts that we want our students to learn can also be implemented in any language but some do so more easily than others.

    As Mark has argued, all of this should assist to make our students part of the community of practice and to participate in the dialogue.

    • 5. Mark Guzdial  |  August 24, 2011 at 10:37 am

      Errol, I agree with both you and Alan — Java should never be the only language learned. We don’t talk about only one thing or one language in our community of practice. It is a common one, though, and it’s worth knowing for that respect. My overall point was that we need a situative as well as a cognitive perspective in our curricular decisions, and these are frequently in conflict.

      In response to Bijan: I think you’re saying that we need some ethnographic studies to determine what is going on in our community of practice, what is the discourse, and how should we best prepare our students to participate. That would have to be on-going since the toolsets and dialogue change. I would agree with that. My guess is that Java represents many of the issues in common discourse and practice today, so it’s a safe bet. Is there a better choice? Good question.

      • 6. Bijan Parsia  |  August 24, 2011 at 8:35 pm

        I wasn’t saying that per se, but I’m happy to say that!

        I totally agree it’s a safe bet wrt lots of things (lingua franca for sure; job prospects, sure; mature infrastructure, yet; significant intellectual interest, yeppers; coverage of fundamental concepts, bien sur). Whether that safety overrides the poverty of it as a first language or other problems it may have is an interesting question. Probably? Esp. if we, I don’t know, make a simpler language for starting?

        (It’s not just for starting that it’s not the best: It’s currently a suck for client side web programs. It does better on the back end. And for loads of people who don’t want to be professional software developers but nevertheless computing professionals — bioinformatics folks are a good example — it may be systematically wrong. We’re facing this a bit in our MSc program where the backgrounds and prospects vary enormously and a good chunk of our students are aiming to be something like business analysts plus architects. It’s not clear that the pain they go through to get booted up enough in Java to write a simple SAX vs. DOM assignment is productive. Whereas, I suspect they could have a much easier time with a Python SAX vs. DOM assignment and get the *value*, i.e., stream with roll your own stack management vs. a tree.

        Another way of putting it, in various constrained situations, how much worse educated are you going to make your students if you force them to learn via Java? Granting that if they don’t know Java they’ll be somewhat undereducated? Interfaces or preorder tree traversal?)

  • 7. Errol Thompson  |  August 25, 2011 at 5:56 am

    I am not arguing that Java should be the first language. I think there are others in the market place that would serve equally as well or possibly better as a way of introducing them to the dialogue of the market. However, the politics of most universities land up dictating what is taught and not necessarily individual preference. In some cases that is good in others I think it is questionable.

  • 8. Gilbert Bernstein  |  August 26, 2011 at 5:27 am

    To echo Alan, I don’t think the choice of language is anywhere near as important to practitioners as large system issues. Academia does close to nothing to prepare graduates for being dropped into 100K-1000K+ line legacy codebases. We also don’t teach how to best write and design code on that scale.

    Then again, many/most of us in academia have never really worked on projects that large for extended periods of time, so how could we possibly teach students about it. And even if we had, it would still be impractical/impossible to give an undergraduate that epiphany of working on a project so large and convoluted that they look at their own code and think, “What the hell is this? Who wrote this? …wait, me?”

    So maybe we should admit that we can’t really teach students how to function in the community of practice. Maybe the best we can do is to be consistent but incomplete relative to practice.

    • 9. Alan Kay  |  August 26, 2011 at 9:02 am

      Hi Gilbert

      If this were “designing and building bridges”, and there was considerable evidence that the bridge building industry was building poorly designed, fragile, and bloated bridges, what would we think of an academia that meekly prepares their students to go out and participate in continuing the bad practices of industry?

      One of several powerful points of view we could take is that “dealing with scaling of systems” in computing should be a center of research, practice and training in university.

      Besides learning about how important systems have been designed and built well (the Internet) or poorly (the operating systems, user interfaces and main tools of personal computing, the web browser, etc.), there should be a concerted effort to teach students (a) how to “assess entropy” of problems, and (b) how to work in “action groups” to make real systems.

      One way to approach the first is by using a strong analogy to “real science” by making models that produce similar phenomena to seemingly complex systems. In computing, we can make the models out of computer stuff, and thus run them, debug them, and use them as kernels for new design approaches. Many of these models will reveal that much of industry practice is “producing complications” rather then “dealing with complexity”.

      For example, what if a familiar artifact — such as the several millions of lines of code used to do “vanilla 2.5D antialiased composited graphics” that is pervasive in personal computing could actually be programmed in a few hundreds of lines of code (because “relationally” it is only that complex, and just needs an appropriate design and a runnable-math language to write it in)? This is well within the reach — and right at the center of mission — of university practice. It reveals that there are very often factors of 100s and 1000s difference between “actual complexity” and “unsophisticated complications” in industry systems. Most students do not realize the actual state of affairs and are not told about these possibilities for designing and building systems.

      If we have some sense of history, we can see that much of industry computer practice is rather like what tinkering and engineering were like before the inventions of modern math and science. It is important to realize that it took engineering, both as a discipline and in industry practice, quite a long time to incorporate how real science could vastly improve its methods. And, except in precious few exceptions, this has been the case in computing over the last 50 years.

      One way to look at this is that “on the job training” is a great idea if the job environment is above threshold in practice. If it isn’t, then it is the duty of the universities and other educational and training facilities to send graduates out with better notions than industry so they can be properly critical of practice and to gradually start to improve the practical world.

      Best wishes,


  • 10. Daniel Green  |  August 30, 2011 at 1:56 pm

    Mark, we had a “Java workshop” where we helped junior high and high school students make projects with Greenfoot and Alice, both of which have a Java endpoint, Greenfoot being closer to Java coding and Alice being more drag-and-drop blocks which just happens to be export-able as Java later. Seems to have gone well, and although one could put forward that Java is not the right “beginner language,” we’ve had a pretty good experience in having students build projects in scratch and then build the same projects in Greenfoot. Some of the student comments and results are available off of http://www.oracle.com/technetwork/topics/newtojava/javasummerworkshop-403742.html and I’m pleased with the student engagement level, note the comments about students interested in going on to study computer science based on the experience. I wanted to suggest that tools like Greenfoot and Alice might be good entry points to avoid the “I hate this!” nature of dropping students into a command line / compile environment. Best regards, — DanG

  • 11. John "Z-Bo" Zabroski  |  September 2, 2011 at 1:15 pm

    E.D. Hirsch writes books about “cultural literacy” and has made up long lists of the vocabulary that children need to know at various ages.


    Interesting reference to E.D. Hirsch! Are you familiar with the story behind Dr. Seuss? William Ellsworth Spaulding, his friend, supplied him with 348 words he could use to create a story for 6 and 7 year olds. The Cat in the Hat was the first of his books to constrain vocabulary deliberately to create a story.

    Also, another good reference here would be Guy Lewis Steele’s inspiring OOPSLA speech “Growing a Language”.

  • 12. Mark Miller  |  September 3, 2011 at 5:54 pm

    Your post clarified this topic for me. Yes, it is important for students to know the language(s) du jour, but I see it as useful for points of comparison, not for practice in terms of CS. SE is a different story. My main complaint has been the apparent monoculture of Java in CS. I don’t see it as a good beginner language, but one that could be reserved for more advanced students.

    Your post brought to mind Plato’s analogy of “the cave.” The process of enlightenment is like getting out of the “cave of shadows” and coming to see the real world. If those in the cave thought it important to confer honors about unenlightened concepts, the enlightened would prefer to not take part, but it is important nevertheless for them to revisit those in the cave, to share in their troubles and honors–whether they are worth having or not, to hopefully guide more of them out. This requires a good familiarity with their world. Anything they know about their world, even in the minutest detail, that you don’t causes a loss of respect for what you have to offer.

    In terms of how this should be taught, I see now the difficulty your profession faces. I offer up an analogy that may be helpful. A couple years ago I heard a physics professor talk about teaching mathematics–real mathematics, not what’s called “math” in school. He talked about how some math teachers didn’t get into arithmetic right away with young kids. Instead, one teacher he spoke of, got kids thinking by estimating, with a problem like, “How many trees do you think you could fit in this room?” So it got them thinking about the concepts of volume, space, quantity, shapes, orientation, etc., in 3D space, without making it overly complicated. This physicist said that contrary to the way “math” is taught, once a good grounding in mathematics was established, arithmetic could come later, like in the kids’ pre-teens. It could be taught to them relatively quickly, in a few weeks, rather than taking a six years to do it, because it would be relatable to the underlying concepts they’ve already learned. Though I don’t know that he has real expertise in this, since it’s doubtful he’s taught students of that age range.

    I relate this to this topic, because learning Java as a beginning computing student vs. learning it as an experienced computer scientist are two different things. The experienced student has already learned some fundamental principles of computing, and does not have to learn them through a specific language (hopefully). The task of learning a new language becomes learning the syntax and the semantics, what artifacts are created, and how to access features of the underlying system through it. There are no mysteries like “What’s a variable,” unless the language introduces a new computing concept with which the learner is unfamiliar.

  • […] I just got from one of bigger, more well-known companies in this space.  Reminds me alot of the situative issues raised earlier in this blog.  They’re not asking what subjects or concepts, but what tools and in what […]

  • […] and Media Computation.  The argument being made here is another example of the tension between the cognitive (abstract conceptual learning) and the situative (integrating students into a community of…. A math curriculum that focused on real-life problems would still expose students to the abstract […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trackback this post  |  Subscribe to the comments via RSS Feed

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

Join 10,185 other subscribers


Recent Posts

Blog Stats

  • 2,060,404 hits
August 2011

CS Teaching Tips

%d bloggers like this: