Clojure Vade Mecum
vade mecum: Latin, "go with me"
The Way of the New Clojure Programmer
The process of learning Clojure can be split in the following steps:
- Level 0: acknowledging that all those parentheses are good ;-)
- Level 1: Learning the basics
- Level 2: Solving "programming katas"
- Level 3: Becoming as productive with Clojure as with your favorite languange
- Level 4: Perform magic which you cannot perform with your favorite language
Overcoming Level 0 is your decision.
Level 1 is the subject of many excellent books (I recommend Living Clojure)
Level 2 depends on your interest.
Level 3 is Very Hard - at least for programmers with an "imperative" background (which includes all OO programmers).
Level 4... I don't know! I'm just a beginner!
Whom Is This Site For
This site should be useful for those who think that it helps learning together with another newbie which is going from Level 2 to Level 3. As I said above, I am not an expert, therefore if you are looking for a guru, then you have to look elsewhere.
What's the problem?
There are three basic tools in the imperative paradigma:
- sequence ("do this and then do that")
- selection ("if this do that else do something else")
- iteration ("keep on doing this until/while that")
The problem is that those "tools" are somehow unwieldy in Clojure:
"sequences" are done somehow via
(do (...()))but you learn very early that
dois not really "lispy" ("only for side-effects"??!!)
"selections" are done using just a (macro that looks like a) function! You would feel better if you had a nice keyword.
- "iterations" are done using those funny
(loop (... (recur)))constructs. (You have heard that it would be idiomatic to use the sequence (!) functions, but you don't "get" it yet).
And to make things even worse: There is no assignment operator!
As a result, many FP newbies experience something similar to the "writers' block";
Writer's block is a condition, primarily associated with writing, in which an author loses the ability to produce new work or experiences a creative slowdown
Vade mecum! In order to ovecome the New Clojure Programmer's block we will write in the next installment a lightweight Sudoku solver!