s

p

Pseudocontext in Computer Science

Can you imagine a programming assignment or example where "common sense and real-world knowledge are not needed"?  Math teacher (and now PhD student in education) Dan Meyer proposed that many math problems fit into this category, exhibiting what he calls pseudocontext.

Dan settles on the following definition of pseudocontext:
  1. context that is flatly untrue: "a basketball team scores two points every minute for the duration of the game."
  2. operations that have nothing to do with the given context: "the age of Mark's dad is three more than four times Mark's age." 
 And in an earlier post on the topic, describes why it's a problem:
We need to call pseudocontext out when we see it, call it out by name. If we invite pseudocontext in our classrooms without condition, it becomes harder and harder to tell the difference between the real and the unreal. It becomes easier to excuse all kinds of bizarre unreality because, well, I mean, this is math class and in math class it's possible to know that "in January of the year 2000, I was one more than eleven times as old as my son William while in January of 2009, I was seven more than three times as old as him" and yet not know how old your own son is.
I've been thinking about some of the assignments we can see in computer science classes and how far from reality they can seem, and wondered whether we suffer from the same issues.  While it's true that you can rarely make totally realistic assignments in undergrad courses due to limited time and a wide variety of issues involved from security to scalability, I do think that the context of some assignments and examples ends up off the mark.

It's certainly not as clear as with math problems, however.  In some cases, questions seem boring and pointless, but may not exhibit pseudocontext (in fact, many may just lack any context).  For instance, upon looking at some of my first-year C-programming assignments, I found a lot of utterly useless stuff.  The first coding task involved asking for someone to input a number, checking if it was a valid integer, then outputting it again.  Is this a complete lack of context? Or is it pseudocontext since nobody would ever do it in that form, even if we do occasionally ask for input in larger programs?

The last assignment from the same class makes use of a text file containing a list of dictionary words.  The story is that we're implementing a simple spell checker, but even someone who had never programmed before university (like me) could tell that you'd never check spelling by linearly searching a giant linked list of words.  I mean, it's possible, but nobody would actually ever do that.  I'd put this one under part two of the above definition, and knowing how much of a toy example the assignment is could be really demotivating for those who aren't passionate about code itself (and the assignment is far too easy for those who are!).  At least if we had to implement something we can tell is a toy example, it could be more interesting than a spell checker.

I have to consider assignments from my favourite first year class and professor, though I don't think these are the worst offenders (at least they tend to be more interesting topics).  The second one has us build up a few classes representing aspects of a movie theatre: the patron, the theatre, and the box office.  This seems reasonable and is certainly more fun than the spell checker, but the context of it is strange.  Why would the patron be represented in code? In a real ticketing system, wouldn't the patron simply be the user (assuming an automated system)? There doesn't seem to be a need to store his/her name, age, and tickets in the actual program.  Are we just trying to create a simulation for testing purposes? If so, why isn't that explained? I'm guessing the same level of complexity and learning objectives could have been achieved with an assignment that felt a bit more like a real theatre system.  Or, perhaps it's better to stay away from trying to create a system that you can't possibly do justice in a small assignment?

While searching for more examples, I ran into the issue of deciding whether they had pseudocontext or not over and over again.  Many assignments have boring context or none at all, which I think is a big issue in computer science itself.  There's no doubt that many assignments during my undergrad felt unrealistic.  However, there are collections of great assignments that do feel real (example), so it is possible!

This is something that needs more deep thought, and I'm hoping you'll share any examples you might come across! If you blog about it, leave a link to your post in the comments so I can check it out.

Post a Comment