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.
]]>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.
]]>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.
]]>