These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.
- π΄ Mandatory (for both beginners and intermediates)
- π© For beginners
- π¨ For intermediates
- Getting into the language
- Exercises
- Sit back and understand the language
- Rationale
- Books or Courses
- Getting comfortable with the editor and REPL
- Application programming in Clojure
- Error handling
- Debugging
- Modeling, and Organising code
- Functional programming for people coming from OO
- Beyond the basics
- JVM
- Other such lists
Use these to get a hang of the language in a quick manner. Deeper than a hello world, less deep than a book.
- π΄ Clojure from the ground up: This is Aphyr's excellent introduction to the language. Follow along with your editor and REPL set up, write every line of code. Explore as you feel like. Following the entire course will take a few days at most, and is excellent at bringing you up to speed on the basics.
- π© Rich's introduction / demo of the language to Java and Lisp Programmers. Straight from the horse's mouth, this is an authoritative introduction to the language. Rich himself spent a lot of time teaching programming, so this is a pretty good course to follow along. Tag along with your REPL, pausing the videos when you want to try things out. Doesn't matter if you're not from a Java / Lisp background.
- Clojure for Java Programmers Part 1 (Jun 2008)
- Clojure for Java Programmers Part 2 (Jun 2008)
- Clojure for Lisp Programmers Part 1 (Sep 2008)
- Clojure for Lisp Programmers Part 2 (Sep 2008) (I too mostly follow along these footsteps when I'm actively training people in Clojure.)
- π© Learn Clojure in Y minutes: useful as a quick revision of the basics once you've done one of the above "courses".
- π΄ 4clojure: This was a big part of how I learnt Clojure. Do all the elementary, easy, and medium ones. Do some hard ones too. Look at other people's solutions, and re-write your solutions. This is a drill in Clojure basics, and is very effective.
- π© Exercism
- π© Clojure Koans
- π© Mars Rover: This is a simple problem (not just plain math/data munging) that lets you explore some domain modelling, writing tests, etc.
A language influences the way you think. It can change your paradigm of thought, and you need to let it do that so that you can really understand it when you use it. These videos, especially the ones by Rich are powerful, and are a large part of the reason for Clojure's adoption today. Watch / read these (maybe one or two per day) on the side as you learn Clojure.
- π΄ Simple made easy: This talk transcends the language, and makes its way into changing how you think about.. thinking. Un-twine those ropes, separate those concerns, and decomplect your life.
- π© Simplicity Aint easy: A nice follow up to Rich's talk, with specific examples and how it applies to every day programming.
- π¨ Value of values: This will take a few re-watches to grok. Alternatively, watch this when you've got your feet wet with Clojure.
- π¨ Clojure's approach to identity and state: Rich hickey looking over his glasses, telling you you're doing it wrong.
- π΄ JoC chapter 1, 2: This is what my peers and I used when we initially learnt Clojure. It's what I would prescribe time and again if asked for one textbook to follow. At least read the first 2 chapters to understand the philosophy.. I somehow find other books lacking on that front.
- π΄ Solving problems the Clojure way: I've seen this talk repeatedly make people go "oh yeah, that makes sense, the puzzle sort of came together with this".
- π© Hammock Driven Development: Generally good advice on sleep, and using "thinking" as a tool.
Why was the language designed this way? It helps to get into the maker's mind a little to make effective use of the language.
- π΄ Rationale page in guides: Start there, but mostly read all the guides. They're well done.
- π¨ Are we there yet?: Consider this a must-watch if you're coming from an object oriented programming background.
- π¨ Rich's A History of Clojure (2020): the whole story, and some fun comparisons with other language evolutions.
- π¨ Maybe Not (Nov 2018): On the choice of a dynamically typed language, with some Haskell bashing on the side.
- Joy of Clojure: What I normally suggest. It's a bit old school (imo), and what's considered a textbook at nilenso. It's a bit dry, but effective if you're up for a slightly steep learning curve.
- Clojure programming: This is what the new kids on the block are reading, I hear good things about it. It's also writted by absolute rockstars.
- Clojure by example: This was used in IN/Clojure workshops for 1 day introductory crash courses. Consider it strongly if you like learning by example.
- Clojure for the brave and true: A fun book, and easy to follow along. Has a good section on macros.
- The little schemer: Not Clojure, but an excellent read.
- Eric Normand's Courses: They're paid, but I would recommend these if you're looking for full courses that'll get you upskilled in a relatively short time period.
- Lambda Island's courses: Check out the episodes on React/Reagent, and Testing. They're free!
- π© Sandy's videos: Sandy made these excellent tutorials on youtube about setting up the editor, using the REPL, and debugging. They'll set you up well for success, I think.
- π΄ Structural editing: Writing a lisp isn't like writing most other languages. You're editing the AST, yo. Gotsto use the right tools for it.
- The Clojure Guide on it
- IntelliJ/Cursive: Structural editing tutorial
- Emacs: Animated Paredit
- VS Code: Calva's instructions
- Vim: Conjure, or Vim iced, but vim-sexp seems to be used for sexp editing either way.
- π΄ Stu's Repl Driven Development talk: People say the REPL is Clojure's best feature, so you got to learn how to use it well. This talk helps.
- π© Sean Corfield's demo: I've heard people say this hit home for them. Sean builds a web app from scratch in Clojure, using the REPL.
- π© The official guide: Multi part tutorial.
- π© Just google "REPL Driven Development", you'll see a whole bunch of videos and tutorials other than these.
When you're serious about using Clojure for your job, you got to sharpen certain edges, and polish up. Here are some resources I usually point people to:
- π΄ Community style guide: Format your code right. Read this end-to-end once you've written some Clojure, and then come back to it as a reference when you're unsure.
- π΄ Linting: Set up clj kondo, it'll help you adhere to that style guide, and then teach you some Clojure guidelines along the way.
- π΄ Destructuring: I see a lot of newcomers missing out on good destructuring, and this is the article I usually point them to.
- π΄ Prismatic/Plumatic guides: Read all 3 of these. I keep linking people to them whenever they are grappling with datastructure decisions.
- π© Stuart sierra's dos and donts list: Read all of these. I keep referring people to the article on naming functions, read that one at least.
- π© Running with scissors: Another talk by Stu, reminding you to use the REPL.
- π¨ Data > Functions > Macros: I wish there were more material on this. It is a large influence on design in FP.
The community doesn't have a canonical answer to this. And your approach would largely depend on whether you like exceptions or not. There are a lot of articles and discussions around this, but nothing that summarises it perhaps.
- Might be worth going through some interesting discussions in clojureverse: 1, 2, 3
- Want a monadic approach? Use Failjure. But also read the related blogs.
- [WIP] Railway oriented programming
- [WIP] Erlang style error tuple
- [WIP] Exceptions, and how to use them effectively
- π΄ Sandy's video about scientific debugging: A much more accessible, every day debugging tutorial.
- π¨ Debugging with the scientific method: How Stu uses the REPL to debug. Remember: he's really good at debugging.
- π¨ Clojureverse Discussion: This is a very detailed (and long) discussion, with a few different views. It'll be good to have these ideas in a condensed form somewhere.
- π¨ Functional Core Imperative shell: This is a predominant way of structuring code in functional lanugages, and Shantanu does a great job of eludicating the rationale and benefits here.
- π¨ How to name functions: This is a great article that I keep referring people to.
- π¨ Redundant map: One of the top suggestions in my refactoring sessions, usually.
- π¨ Elements of Clojure: This is a gold mine on naming things well.
- π¨ Namespace organisation: The fundamentals are solid in this article. I might use namespaces for large sections of code though.
- π© The sequences part of Programming Clojure: This is a lucid introduction to interface design used in clojure.core for sequences. However, it's broadly applicable for interface / protocol design in applications as well.
- π¨ FP for the Object Oriented Programmer
- π¨ When to use OO data structures in Clojure
- π¨ SOLID in Clojure, Design Patterns in Clojure
- π¨ Clojure for Java programmers
These aren't essential to learning Clojure, but they open up your mind to certain surprising paradigms of thought. I haven't had the time to write about them yet.
- π¨ Clojure vs the static typing world
- π¨ Zachβs abstraction talk
- π¨ Tim Baldridgeβs talk about core-async implementation
- π¨ TDD vs REPL DD
- π¨ Generative testing
- π© Sandy's video
- π¨ Lambda island, and Eric normand episodes
I find this Clojure cheatsheet very helpful for destructuring.