Joe Rawlings Software Engineer

27Nov/100

Functional Programming with Clojure – PeepCode Screencast Review

I finally got around to watch the PeepCode Screencast titled 'Functional Programming with Clojure'. It's about 65 minutes long and can be purchased here. This is my review.

LIKES:
The screencast was well done with pretty high production value. I thought it had just the right amount of background information with the rest being purely technical. It had a good introduction to the language. The Mire example was pretty sweet which covered what would appear to me to be a majority of the functionality I would need to get started (e.g. basic collection usage and manipulation, concurrency, exception handling, testing, etc). The simple command line examples helped quite a bit, although they went quite fast.

GRIPES:
For a beginner, some of the earlier topics were covered fairly quickly (the let vs binding syntax, alter), but reviewing afterwards, I understood what was going on. Some more explanation on why certain imports were used (for what specific purpose like duck-stream) would've. Also, at first, I didn't understand the dot at the end of 'java.util.Date.' and how that worked but it was covered later when more java functions were used. The only thing that would have really made this screencast amazing would have been some independent work examples for the listener to do. I'm a visual learner but doing things hands-on is very appropriate for a lot of people (I like it as well :)). A quick review of the 'answer' would have really sealed some concepts.

TAKEAWAYS:
REPL: Read-eval-print loop
Binding are thread-local
Usually a bad idea to call def inside a function body
Transactions work like database transactions (dosync ...)
Only modify refs in transactions to guarantee predictable behavior
@ is a shortcut for deref
It's OK to use java libraries for system level operations (e.g file io)
Names can have punctuations in them, such as a question mark
(doc map) or some other function or type to get the documentation on it in the REPL
Lazy sequences are only evaluated when their return value is used
test-is is Clojure's test library
Function order matters
You can't compile code in a namespace less than 2 segments

CONCLUSION:
All in all, the screencast was very well-made and informative. After finishing the screencast, I'm sort of glad they went over material fast which allowed more material to be covered. Then, as I start to program my own stuff, I can just reference the screencast as needed. Although, seeing the same code over and over help solidify the concepts quite a bit. The $12 price tag for an hour's worth of technical content is well worth it. I would recommend this to others.