Ontological Categories in Computer Science

March 10, 2011 at 8:57 am 12 comments

We’re in the thick of it in my data structures class this semester: Doubly-linked lists last week, trees (scene graphs) this week.  And I’m running headfirst into my students’ misconceptions, which are surprisingly similar and pervasive.  Here’s an exchange that’s really had me thinking.

  • I was creating a linked list of picture elements.  I declared a variable for holding the pictures, Picture p.  Then, I created a picture object, and stuffed it into a new node, e.g., “p = new Picture(…); node1 = new PictureNode(p);” and repeated this for node2, node3, and node4. A student raises her hand. “How many picture objects did you just create?”  I counted: “3.”  “But you only declared one Picture variable p?  Isn’t that just one object?”
  • I then executed the statement (this is all DrJava, so I could do it interactively, like an interpreter): “node1.setNext(new PictureNode(p))”  Another student took up the questioning, with the question that’s been bugging me since: “If you just created a new node there, what’s its variable?

Clearly, there’s a connection for these students between objects and variables.  I can imagine where it came from.  In CS1, students probably only ever dealt with data or objects that have a variable referencing each.  What I’m actually more interested in is how students think about objects, such that a variable reference is in some sense a necessary and connected part of it.  What is their category or conceptualization of objects?  How do students categorize these ideas?  What are their computational ontologies?

In the current issue of Journal of the Learning Sciences, there is a fascinating pair of articles that have had me think about students’ categorization of CS ideas. Last year, Gupta, Hammer, & Redish (2010) published an article that challenged a theory by Micki Chi (2005) on how students categorize physics ideas.  In the current issue (Jan-March, 2011, Vol. 20, no. 1), Jim Slotta defends Chi’s theory, and Hammer, Gupta, & Redish defend their claims.  What’s nice about these pair of articles is that they slow down and explain the theories in understandable (for me) language.  I’ve read Micki Chi’s papers on conceptual change before, but I feel I understood them much better after reading Slotta’s piece.

The basic idea is that people categorize physical phenomena into ontological categories.  For example, kids often think of heat as a material, in part because of how we talk about heat in daily life, e.g., “Close the door, you’re letting the heat out.”  Kids think about electricity as being a flow like ocean current, when that’s not really how it works.  The problem is that, once categorized, people find it hard to shift categories.  Chi and Slotta claim that they are “static” ontologies — you can’t conceptualize heat as being a bit like material and a bit like an emergent process (which is how physicists tend to think about heat today, that it emerges from the activity of molecules).  It’s one or the other, and it’s hard to get people to re-categorize an object across categories.

Or maybe not.  Hammer et al. seem to suggest that people can draw on “cognitive resources” that can help them make a move:

A flexible systems view also provides an explanation of how, as in the history of physics, a “wrong” idea such as the Bohr atom or the matter-based caloric theory of heat can be productively generative for students. Thus, the idea of heat as a weightless substance called “caloric” can activate reasoning about a conserved, extensive quantity, resources that contribute to understanding the first law of thermodynamics. That is, what begins as matter-based reasoning need not remain there.

Both groups (Slotta & Chi; and Hammer, Gupta, & Redish) point out that you never really get rid of the old ontological categorization.  Even physics experts remember how they “used to” think about physics ideas, and can even occasionally trip up and use those.  Once you have a conceptualization, it is with you always.  How do we learn new ones?

Slotta and Chi (2006) figured out one way to do it (which Hammer et al. doubt really works).  They were working with physics students to get students to see electricity as a “constraint-based interaction” (i.e., not a flow of matter).

Slotta and Chi (1996, 2006) offered empirical support for the incompatibility hyptohesis, noting that it should be possible to facilitate conceptual change in physics topics like heat or electric current by first helping novices establish the appropriate ontological category, then providing physics instruction.  They developed an “ontology training module” that included substantive textual treatment, rich examples, simulations and reflection prompts to help physics novices (in a laboratory setting) develop a deeper understanding of the ontology of “constraint-based interactions.”  [Following that, both a control group and the experimental condition received physics instruction on electric current.]

Hammer, Gupta, & Redish doubt that a two-hour laboratory intervention really constructed a new ontological category for the students.  Rather, they feel that the two-hour “ontology training module” helped students draw on other experiences to create a new category.  In their 2010 paper, they describe how students developed new analogies in their class (e.g., electricity as being more like blood flow) that helped them take steps toward a new ontological categorization. They believe that is possible to build new ontologies “dynamically,” partially building a new understanding and using that some, while still relying on the old understanding.

Now, it doesn’t really matter whether you agree with Chi & Slotta, or Hammer, Gupta, & Redish — what they are talking about is something that I’ve never heard of being explored in computer science education, and it’s something that suggests a new way of teaching these hard-to-learn ideas.

  • What are the ontological categories of computer science?  What do students understand as the relationships between objects and variable references, or other ideas, like FOR loops, WHILE loops, and recursion?  Are their large distinctions in CS, like the matter vs. process distinctions in Physics?
  • Following a Slotta & Chi approach, how would we teach new categories apart from their representation in any programming language?  If you wanted to teach students a new conceptualization for objects that had nothing to do with variables, for example, how would you construct an “ontology training module” that would precede (and not rely on) instruction in any given language’s approach to dealing with objects and variables?
  • Or if we prefer a Hammer et al approach, we should be having conversations in class where we develop analogies for computational ideas, in order to develop new conceptualizations that are more powerful than the flawed ones that students develop early on.

I’m reminded of Jim Hamos’ talk at the CE21 meeting: We have such a long way to go.  Physics is at the point where they can develop ontologies that explain how students conceive and misconceive physics ideas.  They are testing different ways of shifting students between those ontologies.  In computing education, we’re just starting to identify common ways that students get things wrong.  We haven’t constructed ontologies yet, nor applied methods for tracking students’ conceptualizations between ontological categories.  There’s a lot of fascinating work to be done, to apply the lessons learned in physics about how students categorize reality, to understand how students categorize computational reality.


Gupta, A., Hammer, D., & Redish, E.F. (2010). The case for dynamic models of learners’ ontologies in physics. Journal of the Learning Sciences, 19, 285-321.

Chi, M.T.H. (2005). Common sense conceptions of emergent processes: Why some misconceptions are robust. Journal of the Learning Sciences, 14, 161-199.

Slotta, J.D. & Chi, M.T.H. (2006). The impact of ontology training on conceptual change: Helping students understand the challenging topics in science. Cognition and Instruction, 24, 261-289.

Entry filed under: Uncategorized. Tags: , .

Impact of increasing number of post-docs in CS SIGCSE Board: CS programs being canned or downgraded

12 Comments Add your own

  • 1. Rob St. Amant  |  March 10, 2011 at 12:06 pm

    All this is fascinating, Mark.

  • 2. gasstationwithoutpumps  |  March 10, 2011 at 12:11 pm

    Interesting. I think that the variable/object confusion is reduced by starting with a language with typed objects and untyped variables (like Python or Scheme). Variable typing can then be later introduced in languages like Java or C++ as a restriction that can be checked at compile time to catch errors before running the code and make execution more efficient. I believe that this approach puts less cognitive load on the students than starting with typed variables, and does make the variable/object distinction somewhat clearer.

  • 3. Juha Sorva  |  March 10, 2011 at 12:48 pm

    Exciting stuff! Research on ontological categories might produce some very concrete results for teachers to use. Some of the more common misunderstandings seem to involve conflating two or more concepts.

    In a study I did a few years ago, some of my interviewees (CS1 students) thought that a property of each object was the name of the variable that the object was most recently assigned to (stored in memory along with the object’s other properties defined by its instance variables). They relied on this notion quite consistently, and it colored their understandings of programs in different ways. For one student, the assignment a = b would mean renaming the existing object (changing one of its stored properties from b to a). For another, it would mean making a copy of “the object whose name is b” except that the new object “has the name a” instead.

  • […] rest is here: Ontological Categories in Computer Science « Computing Education Blog This entry was posted in Uncategorized and tagged different-ways, explain-how, point, […]

  • 5. Lisa  |  March 10, 2011 at 9:48 pm

    “In computing education, we’re just starting to identify common ways that students get things wrong. ”

    Formally, perhaps. But in my practice as a 10-12 CS teacher, this is the root of my practice. Identifying common misunderstanding leads to better teaching practices, which leads to better learning.

  • 6. Leigh Ann Sudol-DeLyser  |  March 11, 2011 at 10:19 am

    Perhaps we ourselves are guilty of propagating some of these misconceptions through careless language. I know many textbooks and teachers (myself included for a while) who described a variable as a “container”. So if I have a container then its not a far reach to get to many of the misconceptions your students expressed about variables.

    Analogies are important to learning, but the analogies we construct can sometimes have more power than we anticipate. There is lots of work in the education sciences about analogical reasoning and constructing appropriate “targets” and “bridges”. I would recommend Clement and Vosniadou as some authors that would be good to start with.

    • 7. Mark Guzdial  |  March 11, 2011 at 12:00 pm

      I’m sure that almost all of the misconceptions are created by us. Students don’t see pointers, linked lists, and null in their daily lives — we introduced them, and so any misunderstandings the students have came from us. Students also see variables in math. If students connect the mathematical ideas to CS ideas, then some misconceptions may stem from misunderstandings of the mathematics or misaligned mappings. Jeffrey Bonar and Elliot Soloway showed years ago that some CS programming language misconceptions stemmed from inappropriate mappings from the same words in natural language.

      There may be no “guilt,” though. As Hammer et al. point out, it might be appropriate to start with a simpler model (like container), but we want that can be shifted to a more accurate model without a complicated ontological shift. We need to understand the conceptions that our students have so that we can track productive and unproductive models.

      • 8. Leigh Ann Sudol-DeLyser  |  March 11, 2011 at 2:53 pm

        One of the great things that Stella Vosniadou talks about is intermediate states (Synthetic models) from misconception to correct scientific understanding. Identifying and mapping that misconception space would be a really interesting undertaking.

    • 9. Rob St. Amant  |  March 11, 2011 at 3:48 pm

      I think the mapping is a little bit tricky. For example, we talk about registers and memory locations “holding” data, and at that level of abstraction the container metaphor seems reasonable, even inevitable. If we teach students that variables are names for memory locations, then it still seems reasonable to talk about variables “holding” or “storing” values, and I guess this is where the problem arises. Different terms that might otherwise be useful for describing the situation already have other uses, such as “pointing” or “labels”. At least, this is my take.

  • 10. Peter Boothe  |  March 11, 2011 at 6:52 pm

    I have a project I make them do in one of their final classes where they build a program which debugs a running Java program and draws the connectivity structure between the objects.

    This almost inevitably leads to a question for them of “where do I draw the variable name” and eventually all of them are forced to conclude “on the arrows, not on the values”. An example of this output (this particular team used the JUNG graph drawing library) for a program which contains a binary search tree and a linked list can be seen here

    • 11. Mark Guzdial  |  March 14, 2011 at 1:18 pm

      Very cool, Peter! So your students are explicitly calling the drawing library to draw all the nodes and arrows? It’d be nice if I could call a single powerful library with a link to an object with arbitrary links, and it would generate a similar graph. I know my students could use it.

  • […] implementation structures that I (and my students) have seen their misconceptions highlighted, like the ones I talked about in my ontological categories post.  I continue to struggle with my students’ understanding of object, variable, reference, and […]


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 )

Twitter picture

You are commenting using your Twitter 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 9,052 other followers


Recent Posts

Blog Stats

  • 2,030,557 hits
March 2011

CS Teaching Tips

%d bloggers like this: