Additional material to fit in?

1 view
Skip to first unread message

John Hume

unread,
Mar 15, 2015, 9:20:05 PM3/15/15
to clojurebridg...@googlegroups.com
This is sort of a dump of my notes from the ATX session yesterday.

There were a few things not covered before students started on the Capstone app that seem like they could be fit in (though I may be overly optimistic). In no particular order:

Overloading functions on arity.
(defn foo
  ([a]
   (foo a "default b")
  ([a b]
   ...))

Rest args.
(defn foo [a & more] ...)

Macros -- definitely too much to have students writing them, but they often come up in the short list of "what makes clojure awesome?" Maybe somewhere in the intro or Functions section, it would be helpful to at least explain what a macro is. Maybe use the example of defn, a plain clojure macro that's a shortcut for (def...) and (fn...), both of which have been seen by the end of module 5.

Files and ns -- Long before we got to the Capstone app, some students had experimented w/ saving their instarepls as files so they could have something to come back to later. That led to weirdness if the file didn't have a .clj extension, which they'd never been told to create. Would it be worthwhile to do a quick walkthrough of the structure of a typical lein project for a hello world app?

Atoms and swap! -- obviously this could be a big topic, but it seems like a letdown to spend so much time on immutability and not deliver on the promise of Clojure making it easy to manage shared mutable state. Once the students have seen map and reduce, swap! doesn't seem like much of a stretch.

Katherine Fellows

unread,
Mar 15, 2015, 9:36:10 PM3/15/15
to clojurebridg...@googlegroups.com
Hi again, John! \o/

First off, apologies for typos, as I'm on my phone. ;)

Overloading functions on arity.

This seems easily doable in the "Functions" section, and I don't see why we couldn't or shouldn't add it.

Rest args.

This seems doable for students who have some coding experience in another language, but I can also see this being pretty confusing for someone who comes to a ClojureBridge workshop with no experience--and taking up a fair amount of time during a one-day workshop. So, I'd lean on the side of leaving it out for the time being.

That said, we've been talking about writing an "intermediate" curriculum for a while now, and I think this is something we should definitely include--whenever we actually start writing that. :-/

Macros

Ditto.

> Files and ns

This is 100% a thing that we should do.

Atoms and swap!

This also seems like a thing that should go in a different curriculum.

The attendees in Austin felt like they had quite a bit more experience than the ones we've had in San Francisco; they had seemingly already gone through boot camps, years of coding experience, etc. at a minimum. 

In SF, people with little coding experience latched onto immutability fairly quickly, but then had no frame of reference for understanding mutability--in the same way that people with a heavy imperative background often experience the reverse. I can't see how we would have been able to fit a discussion of what mutability is and how to manage it within the timeframe of those workshops.

Anyway, sorry for being brief; just getting the discussion started. I'm now walking onto the plaaaaaaaane...! ;)

Cheers,
--
kf

--
You received this message because you are subscribed to the Google Groups "clojurebridge-curriculum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurebridge-curr...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurebridge-curriculum.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages