
Clojure for the Brave and True (2015) - severine
http://www.braveclojure.com/
======
ff_
This is by far the best book around for learning Clojure from scratch (IMO).

If you always wanted to learn Clojure but never had the time, 2017 is the
right year, and Clojure for the Brave and True is your companion. Buy it, or
just read it for free on the website.

(Disclaimer: I'm not in any way associated to the book or the author, I'm just
super thankful for all the times this book has helped me to learn new things
and solve issues :)

~~~
pacomerh
I can corroborate :) The book is well organized and pleasant to read. If you
want to hear from the author about this book and other stuff, check out this
episode
[http://blog.cognitect.com/cognicast/098?rq=brave%20and%20tru...](http://blog.cognitect.com/cognicast/098?rq=brave%20and%20true)

------
plinkplonk
The best Clojure book _in my personal experience_ (and fwiw) is O'Reilly's
"Clojure Programming" by Chas Emerick, Brian Carper, and Christophe Grand.
Extremely clear writing, and very knowledgeable authors. I really enjoyed
working through the book.

Due Disclosure:

1\. I was an experienced Haskell _and_ Java programmer, when I read the books,
so I didn't have to go through any culture shocks wrt either Java or FP.

2\. I have used Clojure only for toy projects. My 'daily use' tools are
Haskell, C and Lua.

3\. I am not in the audience targeted by 'cute cartoons and corny jokes'
books. the _why style, _nothing wrong with that_ , I just find most of this
'cute' style to be wasting my time. If it works for you that is awesome

4\. I found the tooling around Clojure weird and unintuitive, especially
Leiningen. Apparently there are better alternatives now

All that said, if I had to work on the JVM again, I'd use Clojure in a
heartbeat. If I start a Clojure based company, Clojure Programming would be
what I ask new employees who are unfamiliar with Clojure to work through.

I can't recommend the book enough. There was some talk of an updated edition,
which I'd buy the instant it came out.

~~~
snowcrshd
Just adding my 2 cents.

I've found the writing of Clojure Programming to be very dull, to be honest.

Sure, it is clear and detailed, but it gets boring after a while.

I think the Joy of Clojure is a better read (at least for me). The upside
about Clojure Programming is that it covers the language's syntax right
upfront, which (IIRC) Joy of Clojure does not.

~~~
smnplk
you should try Programming Clojure then ;)

~~~
snowcrshd
That's on my to-read list hahaha.

Though, for some reason, I've never seen many people recommending it.

Would you care to share your thoughts on that book? I'd really appreciate it!

------
jstewartmobile
This was a good book. It would have been better if he had a more critical
perspective of the language. As much as I love Rich Hickey and Clojure, the
language does have pitfalls and rough edges, and this book was a little too
starry-eyed to tackle them head-on like Crockford's book on JavaScript.

~~~
jraines
I agree.

A sibling comment recommends "Joy of Clojure" but I feel that's better as a
second or third book.

My personal recommendation, YMMV as always, is

Kyle Kingsbury's "Clojure from the Ground Up" series
[https://aphyr.com/tags/Clojure-from-the-ground-
up](https://aphyr.com/tags/Clojure-from-the-ground-up), then "Clojure
Applied", then "Joy of Clojure". Hard to say an ideal order for the last two
-- "Clojure Applied" is more approachable IMO, but "Joy of Clojure" is more
comprehensive and covers more "cool" applications that spark curiosity and
creative thinking.

~~~
ice109
is there any rhyme or reason to the order of the links on that page? the
welcome post is bottom left.

~~~
jraines
They're in chronological order unfortunately, so you need to start with the
bottom left and work backwards.

------
ekzy
This is a very good intro book. I skipped the emacs chapter and there was no
dependency to emacs through the rest of the book. I used light table. I
enjoyed the exercises, there is a good level of complexity and the author
often suggests and helps to reimplement some core functions of clojure. It
took me about two weeks to complete the book entirely (on the evenings and a
bit more on the weekends) with no previous experience in functional
programming. I was dragged into the book really quickly, more than 2 other
books I started to read about Clojure (on which I gave up quickly). I also
bought the paperback version to support the author but I was a bit
disappointed on the quality. Overall I highly recommend this book as an intro
to FP with clojure. Thanks a lot for writing this book.

------
decebalus1
I don't know what's wrong with me but I gave Clojure 3 tries in the past and
every time I try to actually build something (aside from 4clojure and solving
hackerrank problems with it) I get lost in the tooling and just give up then
fallback to familiar frameworks\languages.

It just doesn't click with me and the whole leinengen\ring\compojure just
seems weird and backhanded.

~~~
kls
For me lisp in general was like that. But I just kept on until it clicked
(mainly because I was getting sick of hearing all the hype and wanted to fully
understand what all the fuss was about). A lot of people talk about when lisp
clicks its an ahh-haa moment much like when your first programming language
clicks and that is the best way to describe it. When it finally clicks it
clicks but you have to put aside so much C rooted concepts and just keep
beating Lisp concepts into your head until it clicks.

I once heard C described as learning programming in the constraint of time
(e.g A happens first then B) where lisp executes in distance or space (e.g A
happens over here and B happens over there). It's probably the best way to
describe it but it does not click to somebody that is still thinking in time.
It just seems weird and painful. Because you can't do things the way your
brain thinks they should do them in the constrain of time.

It finally clicked for me when I build a simple file parser and I think that
is a great project to use to understand a lisp.

~~~
terragon
Would you recommend I start playing around with Lisp before I do clojure?

~~~
straws
I've found
[http://www.ccs.neu.edu/home/matthias/HtDP2e/](http://www.ccs.neu.edu/home/matthias/HtDP2e/)
to be the best resource to drill the "code as data" mindset necessary for Lisp
programming. And I would recommend going through as many exercises in
[http://sarabander.github.io/sicp/](http://sarabander.github.io/sicp/) as
possible using the Racket IDE: [https://docs.racket-lang.org/sicp-
manual/index.html](https://docs.racket-lang.org/sicp-manual/index.html)

------
olieidel
Apart from learning Clojure, Daniel's humor made it a really fun read for me.

If you enjoyed the style of the book, it's also worth checking out his talk on
parallel programming [1], I caught myself laughing out loud and actually
learning something at the same time.

Thanks, Daniel!

[1]
[https://youtube.com/watch?v=eRq5UBx6cbA](https://youtube.com/watch?v=eRq5UBx6cbA)

------
babbeloski
Try spacemacs everyone, it's incredible, and the cider repl for clojure is the
real deal. I was a long time vim user who tried to switch to emacs for a month
but abandoned it for intelli j, and then atom for while. The spacebar
mechanism to trigger the top level navigation that you drill into is an
amazing mechanism for memorizing key short cuts (or not remembering and being
able to use the menu to get what you need). spc p f inside a project has
changed my life, I can't go back to a tree directory for navigation. Frees a
lot of my working memory up.

Kind of a rant and off topic, but I think it's the bees knees and it's ace for
clojure / common lisp / javascript / flow / anything else.

~~~
luck_fenovo
I use Spacemacs for Clojure at the moment and I quite enjoy it. My only
problem is there doesn't seem to be a way to insert a newline in the repl
without submitting the line for evaluation (I want to be able to structure a
function definition for readability, for example, rather than having to have a
single huge line).

I did also have to stop smart-parens from auto-closing backticks, but that was
a simple fix.

~~~
jivux
Use C-j to insert a newline in the repl.

~~~
luck_fenovo
Thanks!

------
shadowmint
I didn't enjoy this book; the examples used clojure constructs before
introducing what they did making them arcane and difficult to understand, and
it focused on the language without showing why you would use it or how to use
it for real world projects.

It's like... a detailed guide to the language, for people who already know
clojure.

I recommend 'Living Clojure' by Carin Meier for new comers.

(Also, avoid the clojure cookbook; it's just a list of 'how to do X' for a
bunch of X questions, kind of like a FAQ of best practices; it's in no way an
introduction to the language)

Like rust, I feel if you want to push someone into using clojure you have to
pitch it at them with more than just 'hey look at this syntax. So
functional!'. I know the clojurescript people are all enthusiastic these days,
but the strength of clojure is its concurrency and seemless interop with the
java ecosystem; if you don't need those, it's just another lisp.

You lose both of those with clojurescript, and I fail to any benefit in it.
/shrug

~~~
smnplk
I agree with you about the book, it's not for everyone.

> I know the clojurescript people are all enthusiastic these days, but the
> strength of clojure is its concurrency and seemless interop with the java
> ecosystem; if you don't need those, it's just another lisp. You lose both of
> those with clojurescript, and I fail to any benefit in it.

No, it's not just another lisp. There are very compelling reasons why one
would chose Clojure even if it didn't have those nice concurrency
abstractions. Built in persistent data structures give you the ability to
separate values with identities, because of awesome sequence abstraction you
usually don't have to care about the exact type of some sequence, the same
functions just seem to magically work on all of them, which enables you to
think on a higher level, about data streams and transformations. Lazy
sequences are also a big benefit, when you want to deal with data that is just
too large to fit into memory. Then there are transducers, the decoupling that
OO can only dream about.

So I beg to differ.

------
sbov
After learning syntax, the most valuable Clojure book to me was "Clojure
Applied". Most books seem to cover the what of a language, Clojure Applied
focused more on when and why. Which is extremely important, because I found
that there tended to be lots of similar ways to tackle something in Clojure,
which created mental gridlock whenever I tried to code a larger project.

------
thom
I love Clojure, and have spent most of the last seven years in a Clojure REPL
inside Emacs. But it still doesn't feel like critical mass has been reached.
If anything, large efforts like Incanter have mostly died off, because most
Clojure people are smart and resourceful enough to build their own stuff.
There's an aversion to frameworks and a reliance on gluing together smaller
libraries, which is totally valid as a philosophy.

Me, I'm fairly dumb and lazy, and basically at the point where I wish I'd
stuck with something like Python all along.

~~~
base698
Kind of reminds me of this:
[http://web.archive.org/web/20160304105922/http://www.lambdas...](http://web.archive.org/web/20160304105922/http://www.lambdassociates.org/blog/bipolar.htm)

"Another feature about this guy is his low threshold of boredom. He'll pick up
on a task and work frantically at it, accomplishing wonders in a short time
and then get bored and drop it before its properly finished. He'll do nothing
but strum his guitar and lie around in bed for several days after. That's also
part of the pattern too; periods of frenetic activity followed by periods of
melancholia, withdrawal and inactivity. This is a bipolar personality."

~~~
westoncb
That's a very nice essay—and unfortunately, I found myself described very
accurately in it. I'm currently unemployed, sitting adjacent to a large pile
of empty Indian food takeout bags, skimming a book on Abstract Algebra to
better understand a paper on theory of deep neural networks—all of which has
no connection to any lasting thing I'm doing aside from not working on a side
project which happens to be at a local minimum of interest at the moment.

I wonder if anyone here has figured out good ways of compensating for this
personality type, who has managed to somehow turnout relatively well-adjusted
in spite of it ;)

~~~
mos_basik
An ADD diagnosis in my twenties and an Adderall prescription have done wonders
for my depression (gone), unemployment (working), self esteem (good), ability
to maintain interest in projects (more fun than video games), sleep schedule
(regularish) and social life (I now actually initiate plans to do things with
humans now and then).

Before consulting with professionals, I'd never considered this might be my
problem because I've never been hyperactive... But after doing some reading,
it seems that this sort of disorder can present in a variety of ways, only one
or two of which include hyperactivity.

If you are reading abstract algebra books because you _want_ to, maybe this
would encourage you as much as it did me - many people with various
presentations of ADD are diagnosed in grade school because they "hit the wall"
\- they reach a significant level of dysfunction re: attention span, etc. and
people around them are able to notice. However, the more a student is able to
rely on their own natural intelligence to carry them (rather an ability to
study), the longer it can take for a problem to appear. I was a junior in a CS
degree at an excellent university when I finally hit my wall and realized I
had to change something or everything would fall apart.

~~~
westoncb
I've wondered about this. I think I'm gonna see a psychiatrist soon and just
present the anomalies in my background and see if they come to the same
conclusion...

------
LargeWu
The entire second chapter is devoted to learning emacs. I find this to be a
baffling editing decision.

"Thanks for reading this book, but before we cover what you came for, let's do
this other completely orthogonal thing first."

~~~
chrisoakman
I totally agree the overhead of learning Emacs is orthogonal from learning
Lisp. IMO, it's a shame that there is such a strong association between that
tooling ecosystem and Lisp languages. I think it pushes a lot of newcomers
away from the learning process.

One of the design goals of Parinfer[1] is to help reduce the cognitive load of
Lisp syntax for newcomers. Hopefully more introductory texts adopt it as part
of their environment setup.

[1]:[https://shaunlebron.github.io/parinfer/](https://shaunlebron.github.io/parinfer/)

~~~
snowcrshd
Wow, those docs are pretty good!

------
bootload
Really appreciate the access to the book online
[http://www.braveclojure.com/clojure-for-the-brave-and-
true/](http://www.braveclojure.com/clojure-for-the-brave-and-true/) more
likely to buy products that you can see. This years challenge, learn two new
languages. Clojure might be one of them.

The reason? Lisp based and in spite of the fact it uses _cough_ , Java (JVM),
it runs on JavaScript. A better language to run/work with JavaScript. That is
a good enough reason to learn and use.

~~~
shadowmint
I hear this a lot, but it totally mystifies me.

You lose all the good parts of clojure when you go into the js runtime; stm,
parallel processing, java interop, hot reloading, and it pulls in some really
quite large js dependencies, and it's impossible to debug. Even console
logging becomes a case of 'convert to readable object and log' using special
helpers.

What's the benefit?

I don't see any meaningful reason to use clojure in this context; what's the
draw? Why would you bother over any other compiles-to-js language?

You.. just like the syntax? That's the best answer I've gotten so far.

~~~
chrisoakman
I'm not sure when your last exposure to the ClojureScript ecosystem was, but
almost nothing you mention is a problem as of 2016: debugging, hot reloading,
large JS deps, etc.

I'm biased, but I think ClojureScript is the best way to use the JavaScript
platform today. Awesome core library, consistent build process, best of breed
tooling, persistent data structures, flexible syntax (JSX is madness compared
to hiccups); I could go on.

JavaScript the platform may have it's warts, but ClojureScript is all beauty
:)

~~~
shadowmint
Got a link with specifics?

I've never seen breakpoints & source maps working properly; just a series of
blog posts by various people who've tried and failed to get it working.

~~~
iLemming
That's like 2 years ago. Source maps work fairly well today.

~~~
shadowmint
come on, dont just wave your hands in the air and say its all good.

 _how_ do you do it then?

~~~
iLemming
What do you mean how? Clojurescript compiler today has four different, well
documented options related to source maps:
[https://github.com/clojure/clojurescript/wiki/Compiler-
Optio...](https://github.com/clojure/clojurescript/wiki/Compiler-
Options#source-map-timestamp) Just yesterday I placed `(js* "debugger;")` in
my .cljs code and it stopped exactly where I wanted it. And showed exact piece
of Clojurescript (not compiled JS)

------
joeevans1000
I found the jokes and humor in Clojure for the Brave and True actually
hilarious, to where I just read it now occasionally just to laugh a bit. I
don't know why I like his humor and writing so much, but I suspect that it's
the same way some people at a party will laugh at my jokes and some will not.
It's all about finding your audience. The book (I did the online version)
actually 'unstuck' me from where I had bogged down in learning Clojure. It's
the humor that made it less intimidating a subject. I am deeply grateful to
this book and it actually made a big difference in my life. My brain is wired
for a book like this, and so I'm very, very glad he took the time to put it
all together.

------
pyrrhic
After reading that book, I also suggest trying this free MOOC,
[http://iloveponies.github.io/120-hour-epic-sax-
marathon/](http://iloveponies.github.io/120-hour-epic-sax-marathon/)

It really helped solidfy some concepts for me by presenting concepts one at a
time with built in unit tests to provide fast feedback.

~~~
GigaMos
I can confirm that. I did the same route. Afterwards I read the "Living
Clojure" book and solved the Wonderland Katas
([https://github.com/gigasquid/wonderland-clojure-
katas](https://github.com/gigasquid/wonderland-clojure-katas))

------
mbrodersen
It's funny how most programming languages have die hard fans that truly
believe (and will tell any stranger they meet in the street) that language X
is "the best". There is no such thing as "the best" programming language for
any given task. I like Clojure and Haskell and Javascript and Erlang and C++
for _different_ reasons. They all have strengths and weaknesses, depending on
the context and task at hand. And given the choice, I pick the language I use
depending on the context and task that I need to solve.

~~~
codygman
> There is no such thing as "the best" programming language for any given
> task.

I think there is definitely a language that is the best "general" language,
however general differs for everyone.

I'm not sure it's possible to get an average of everyone's definition of
general and make a test to measure languages with though.

For me though, Haskell has been the best "general use" language.

------
dorsatum
I love this book. Can someone recommend something similar for Go or Elixir?

~~~
jasonm23
For Elixir try The Little Elixir OTP Guidebook

[https://www.manning.com/books/the-little-elixir-and-otp-
guid...](https://www.manning.com/books/the-little-elixir-and-otp-guidebook)

~~~
dorsatum
thanks!

------
agumonkey
One of the most practical yet detailed clojure "book". Thanks again.

------
bronz
brave clojure is really straight forward and well written

------
bleah_yuck
This book is painfully unfunny, filled with corny drawings and poorly
structured with weak examples.

I have the book, and I do not like it. I read it while learning, and returned
to it only to realize what it did wrong, and why I learned nothing from it.

It saddens me to see this post.

~~~
macmac
I would agree with you on unfunny and corny points, but I guess it is very
much a personal taste issue. On the matter of substance I have found the book
to be quite OK. Could you point to any specific examples of what it does
"wrong"?

~~~
bleahYuck
Coming at clojure as a java developer with a firm grasp of programing
necessities, trying to bootstrap my awareness of the language, and re-apply
existing experience and establish a frame of reference by reading this book
alone was not possible. The book was not written for consumption by java
developers.

Having been a _novice_ programmer in the past, as a natural starting point,
trying to start with clojure as a blank slate using this book as an
introduction was also ineffective. When I tried to read the book and approach
clojure on its own terms, as if I knew nothing and would not be aided by prior
experience, the book's attempts at cuteness were tangential and distracting.
It's examples did not build on each other.

This was one of the first books on the book shelf at the book store that I
noticed as being specifically about clojure. After getting nothing out of the
book, I went elsewhere and searched other books that gave me the information
that I needed.

After gaining further awareness of the language, and establishing competancy
through the use of other resources, I revisited the book, to figure out why it
didn't help me.

One of the books that did bootstrap my core concepts was:

[https://pragprog.com/book/btlang/seven-languages-in-seven-
we...](https://pragprog.com/book/btlang/seven-languages-in-seven-weeks)

In the first sentence it plainly states clojure is a lisp. In its forty pages
on clojure, that book gave me most of what this book did not provide in 300
pages.

Knowing now that clojure is a lisp, I went and got Land of Lisp:

[http://landoflisp.com](http://landoflisp.com)

That is an example of a book with jokes that are clever and informative. I was
able to approach lisp on its own terms in isolation with that book. That
book's table of contents are properly structured for reference, rather than as
a framework for layered jokes.

Only after I was able to bootstrap the fundamentals of lisp, and drawn
parallels with java, was I able to see where this book goes wrong. It is not
written for new or non developers. It is not written for developers familiar
with other languages.

It's written for people who already know clojure, and might applreciate the
cute inside jokes it makes, that you might get if you already know clojure. I
don't envision anyone else gaining anything from it.

New developers are not informed of _why_ data structures are useful and when.
Things like primitive data types (booleans, integers, characters, strings) are
not highlighted as foundational building blocks. Execution scoping is not
properly addressed. Project structure and source code files trees, and
namespacing are poorly explained. An entire chapter on _emacs_ is inadequate
for practical learning, and actual essentials for handling lisp or clojure,
within an editor like _emacs_ is beyond the scope of the book.

Based on these details, I have no use for the book as a reference manual, and
I also cannot recommend it as starting point for first time programmers, or
even inexperienced programmers searching for more learning exercises.

I can't even recommend it to other clojure developers for the jokes, because
even the jokes are not funny.

~~~
GigaMos
I think you're right, the book is not suitable for first time learners without
any or much background in programming. This as lots of concepts are explained
in passing. It quite frustrated me and I think Carin Meyers "Living Clojure"
or Aphyr's "Clojure from the ground up" are in this respect a much better job.
However, after having gained some experience with Clojure I thought the book
was quite rewarding.

As of the Jokes, it seems this is a matter of taste. I quite liked the jokes.

Concerning the book "Land of Lisp" I wished Conrad Barski had used Clojure
instead of Common Lisp.

------
joelbirchler
This is a fantastic book-- but it's hardly news. It was released in 2015.

~~~
bootload
_" hardly news"_

still ^interesting^ though. news is such a low bar these days, I'll settle for
interesting over news.

~~~
severine
That's what I thought... Now I see there was an interesting discussion
([https://news.ycombinator.com/item?id=10426106](https://news.ycombinator.com/item?id=10426106))
when it went free online and so _actual_ news.

