ClojureBridge/curriculum

Make exercises less mathy/numbers oriented

Opened this issue · 4 comments

While I had a handful of students who were already very comfortable with math and didn't have an issue with things like (rem) and (mod), most of my students were a little exasperated by the numbers-based orientation of many of the exercises.

Is it appropriate to go through and re-think some of the exercises to be less numbers oriented? I'd love to see zero usage of modulo or remainder as if one isn't already math-familiar, they're just more new concepts to learn.

I'd love to see zero usage of modulo or remainder as if one isn't already math-familiar, they're just more new concepts to learn.

I agree.

I think in addition to presenting new concepts that students have to learn, including arithmetic-heavy material also throws up lots of flags for people inexperienced with programming that say, "Math! Scary stuff! This is going to be hard!" Many students will already feel very overwhelmed and flustered by what they're encountering, and this content likely worsens the problem.

Is it appropriate to go through and re-think some of the exercises to be less numbers oriented?

@nathanielksmith, yes! Please do offer suggestions for replacement exercises, if you have them.

I agree! I was looking at the code for where mod is used, and I found

(defn leap-year?
  "Every four years, except years divisible by 100, but yes for years divisible by 400."
  [year]
  (and (zero? (mod year 4))
       (or (zero? (mod year 400))
           (not (zero? (mod year 100))))))

I think that could be replaced with a similar predicate-type function that looks for "words" that match certain conditions. Something like: returns true if number is even or zero and also is greater than 10, or if number is odd, but not if the number is 18.

(defn good-number?
"Returns true if I like this number."
[number]
(and
  (or (even? number) (= 0 number))
  (> number 10))
  (not (= 18 number)))

You could probably also replace it with a similar predicate-type function that looks for "words" that match certain conditions, but I'm having trouble working with just the functions they've already seen - since the earlier examples are also number-oriented. Something with "first", "rest", and "last" maybe.