Fork me on GitHub

I bought SICP a long time ago when I didn't even know any lisp, tried to read it, and left it unfinished. After 1y+ working with Clojure I'm reading SICP again and I think it's being much easier to read and more informative now...maybe not a beginner book but definitely one to read


I know Clojure for the Brave and True is the most recommended book for beginners (and I like what I’ve read a lot), but what are the others? And what are the most accessible (by which I mean easy to understand from zero background) books on programming in general? I may have an Amazon voucher or two to use up...


Joy of Clojure is quite high-level, not really a beginner's book


i've heard Living Clojure is good


and i can heartily recommend Programming Clojure


@amelia Try The Joy of Clojure. One of the most profound books I’ve read. Its more into “Why Clojure”. Very nice and quite philosophical read 🙂


I like the look of it, thank you!


This showed up in my inbox today - I’m still working through it, but it’d be good to know if everything in here is true of Clojure too


Thinking things like this: “The most common data structure mistake is probably the use of lists instead of maps to manage a list of records.”


It seems like fine general advice. I think "always" use a map is too strong, but I agree with the recommendation to consider data structures carefully. Kernigan & Pike, in their excellent book Practical Programming, point out that the choice of data structure will dominate the shape of your program. Deciding between maps and lists/vectors is a key decision point.

Rachel Westmacott11:03:15

YES. This is really important.


i agree that most of it is good advice; however i think this is not: >Duplicating code. If you copy/paste a code section to only change a line after that, you are simply duplicating code and making a bigger mess. In the context of the messy room example above, this would be like introducing another chair with a lower base instead of investing in a new chair that is height-adjustable. Always keep the concept of abstraction in your mind and use it when you can. premature abstraction is a much bigger issue than duplication. abstraction should only ever be about separating out the essence from a number of concrete examples. see:


What does abstraction mean?

Rachel Westmacott11:03:41

Different things depending on context! Often some code that draws out a common pattern from a bunch of very specific bits of code will be called an abstraction.

Rachel Westmacott11:03:50

eg. if you have (defn add-1 [x] (+ 1 x)) and (defn add-2 [x] (+ 2 x)) then someone might create (defn add-n [x n] (+ n x)) and say that it “abstracts over” the first two bits of code.


Thank you!


@amelia just yesterday I read a nice explanation of Abstraction in the coding context. From the preface of How to Design Programs ( >Abstraction acknowledges that many [...] functions [...] look alike. No programming language should force programmers to create pieces of code that are so similar to each other. Conversely, every good programming language comes with ways to eliminate such similarities. Computer scientists call both the step of eliminating similarities and its result abstraction, and they know that abstractions greatly increase a programmer’s productivity.


@sundarj Deduplication is a good starting point for beginners to learn about refactoring and the essences of code reuse. And only when you do that you can learn the disadvantages of deduplication of code yourself. So I would say its better to deduoplicate early as a beginner to gain more experiences in general and keep the code base at least a bit sane. It needs a lot of experience to extract the essence of something and also do that in a useful way.


fair enough i suppose 🙂


@amelia good question! it means taking concrete details and hiding them away behind some higher-level concept. so for example, you could test for evenness like so: ((fn [x] (zero? (mod x 2))) x); but reading that means you're reading the details of checking whether a number modulus 2 is equal to 0. so you can abstract those mathematical details out into a function, and express only what you're trying to do, not how it happens: (even? x).


Just got my first friend into Clojure 😁


She’s been trying to learn Python, we got to talking about programming last night and I spoke highly (of course!) of Clojure. Today she’s said she’s still really interested and wants to look into it. ✌️:skin-tone-4: