Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make exercises less mathy/numbers oriented #159

Open
vilmibm opened this issue Apr 21, 2015 · 4 comments
Open

Make exercises less mathy/numbers oriented #159

vilmibm opened this issue Apr 21, 2015 · 4 comments

Comments

@vilmibm
Copy link

vilmibm commented Apr 21, 2015

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.

@davidchambers
Copy link
Contributor

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.

@MaxMartin
Copy link

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.

@k4y3ff
Copy link
Member

k4y3ff commented Apr 21, 2015

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.

@lindboe
Copy link

lindboe commented Apr 16, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants