teaching machines

Funeral of Trite Ideas

The art teacher at my son’s elementary school once held a special ceremony called the Funeral of Trite Ideas. My son and his classmates said goodbye to some friends that they had known for years in their drawings: stick figures, flat outlines of cars, suns with smiling faces.

I am considering holding my own Funeral of Trite Ideas to bury some friends from our introductory computer science courses. Here are the friends I will invite:

  • Fahrenheit to Celsius conversion
  • The Animal hierarchy used to introduce inheritance, and maybe his buddies Shape, Vehicle, and Employee
  • Letter grade calculation used to introduce conditionals
  • The Towers of Hanoi problem used to introduce recursion

Some of these friends are reasonable computations but are just overdone. Others are too contrived and don’t adequately illustrate the computational need.

Let me know if I should invite anybody else.

Comments

  1. Andy says:

    For university level maybe, but these ideas are great for school level students if they are learning about coding and mathematics. The tower of Hanoi recursion though will be challenging. Others to invite could be printing a times table (iteration) and/or a program for testing prime??

    1. Chris Johnson says:

      Some of these definitely have algorithmic merit, but I choose not to use them because I see them so frequently in CS1 textbooks. If my university students have taken a computer science course before, then they are likely to have encountered these examples.

      I’ve always been concerned about telling the same person the same story twice as if they hadn’t heard it before. It feels inauthentic and impersonal. When I use someone else’s stories, especially those that come from a CS1 “canon,” I fear that students will dismiss me and the discipline.

  2. Paul says:

    I love the inspiration and the examples. I would strengthen the claim for Shape, Vehicle, and Employee: they all need to go away, along with Animal. I’m pretty sure these directly contribute to students’ misunderstandings of domain modeling and object-oriented design.

    I think you got the biggest culprits in your first pass, but we could think about adding Fibonacci as an example as well. If everyone in the class is also a math major, then Fibonacci is probably pretty neat. Otherwise, not so much. It’s still better than Towers of Hanoi, though, since at least it has some pop-culture traction.

    1. Chris Johnson says:

      I considered adding Fibonacci and possibly even factorial-via-recursion, but I feared offending too many people!

      Though I don’t use Fibonacci in CS1, I do bring it up in my programming languages class when we write a higher-order memoize function to cache the lookups and make it run in O(N) time.

Leave a Reply

Your email address will not be published. Required fields are marked *