how long does this course typically take, etc?

413 views
Skip to first unread message

Harold Carr

unread,
Nov 30, 2013, 11:31:02 PM11/30/13
to haskell-...@googlegroups.com
I am really learning a lot doing your NICTA course on my own.   The structure of your course is by far the best I have seen.

Questions:

- where/when do you give this course?

- how long does the course generally take?

- what supplemental material is used?

I just finished Course.State.hs.   I came up with:

    isHappy :: Integer -> Bool
    isHappy x = contains 1 $ eval (findM ih (produce sumOfSquares x)) S.empty

    ih :: Integer -> State (S.Set Integer) Bool
    ih x = (\s -> (const $ pure (S.member x s)) =<< put (S.insert x s)) =<< get

    sumOfSquares :: Integer -> Integer
    sumOfSquares = sumOfSquares' 0 . show
      where
        sumOfSquares' acc [] = P.toInteger acc
        sumOfSquares' acc (x:xs) = sumOfSquares' (((P.^) (C.digitToInt x) 2) + acc) xs

which is a LONG way from your point-free solution:

    isHappyC :: Integer -> Bool
    isHappyC = contains 1 . (`eval` S.empty) .
                   findM (\j -> State $ \s -> (j == 1 || S.member j s, S.insert j s)) .
                       produce (P.sum . (<$>) (join (*) . toInteger . digitToInt) . show)

Is a typically student generally able to come up with something like yours?

All I had to go on was what I had seen earlier in the file.  It would have taken me years (well, a long time) to figure out yours!

Thanks for a great course!

Tony Morris

unread,
Nov 30, 2013, 11:37:05 PM11/30/13
to Harold Carr, haskell-exercises
Hello Harold,


On Sun, Dec 1, 2013 at 2:31 PM, Harold Carr <harol...@gmail.com> wrote:
I am really learning a lot doing your NICTA course on my own.   The structure of your course is by far the best I have seen.

Questions:

- where/when do you give this course?

It is given by NICTA and has so far been held in Sydney and Brisbane. We have plans to do it in Canberra early next year, but nothing concrete just yet. We don't have a regular schedule. I run it with Mark Hibberd (NICTA) and we really just work out a time when both of us can commit to, as well as participants.
 

- how long does the course generally take?

We had been doing an introductory over 2 days, but we recently updated that to preferring 3. We do not cover all of the material, or anywhere close to all of it. We have also performed a "follow-on" course over 2 days in Sydney, just once, and it went OK for the first cut (we typically have to perform large revisions to the material when we find all the kinks).


- what supplemental material is used?

Just narrative and help from Mark. Mark has skills in areas that I do not and vice versa, which helps everyone.
 

I just finished Course.State.hs.   I came up with:

    isHappy :: Integer -> Bool
    isHappy x = contains 1 $ eval (findM ih (produce sumOfSquares x)) S.empty

    ih :: Integer -> State (S.Set Integer) Bool
    ih x = (\s -> (const $ pure (S.member x s)) =<< put (S.insert x s)) =<< get

    sumOfSquares :: Integer -> Integer
    sumOfSquares = sumOfSquares' 0 . show
      where
        sumOfSquares' acc [] = P.toInteger acc
        sumOfSquares' acc (x:xs) = sumOfSquares' (((P.^) (C.digitToInt x) 2) + acc) xs

which is a LONG way from your point-free solution:

    isHappyC :: Integer -> Bool
    isHappyC = contains 1 . (`eval` S.empty) .
                   findM (\j -> State $ \s -> (j == 1 || S.member j s, S.insert j s)) .
                       produce (P.sum . (<$>) (join (*) . toInteger . digitToInt) . show)

Is a typically student generally able to come up with something like yours?

It's not really a big step between what you have and what I have. I think the fact that you came to your solution is the biggest step of all. Point-free tricks after the fact is often less significant. Although, sometimes it can be a vast improvement (even sometimes with some initial protest by others).
 

All I had to go on was what I had seen earlier in the file.  It would have taken me years (well, a long time) to figure out yours!

Yeah, if you can get some of these exercises done on your own, you're doing pretty good. They really are designed to be done with some help along the way, but more power to you.
 

Thanks for a great course!

I am glad it helps.
 

--
You received this message because you are subscribed to the Google Groups "haskell-exercises" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-exerci...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Harold Carr

unread,
Nov 30, 2013, 11:47:36 PM11/30/13
to haskell-...@googlegroups.com, Harold Carr


On Saturday, 30 November 2013 20:37:05 UTC-8, Tony Morris wrote:


It is given by NICTA and has so far been held in Sydney and Brisbane. We have plans to do it in Canberra

Who knows, maybe I'll be there someday (but its a long way from the Western U.S.A. where I live)!
 

- how long does the course generally take?

We had been doing an introductory over 2 days, but we recently updated that to preferring 3. We do not cover all of the material, or anywhere close to all of it. We have also performed a "follow-on" course over 2 days

2-3 days + 2 days.   Intense!   To get through src/Course/* + projects/* seems like it going to take me weeks/months going it alone - even "in-person" a week would be extremely hard.

 
It's not really a big step between what you have and what I have. I think the fact that you came to your solution is the biggest step of all.

Fortunately I have had a 4-day holiday weekend here in the US to work on this on-and-off.   Really enjoying it.

Thanks for the fast response,
Best regards,
Harold
 
Reply all
Reply to author
Forward
0 new messages