Clojure Learning Pathλ︎
Practicalli recommended approach for learning Clojure programming.
A journey into Clojure should start with these foundational aspects
- Become comfortable evaluating code in the Clojure REPL
- Review the fundamental syntax of Clojure (its small and consistent)
- Configure a REPL connected Editor and create projects to save experiments
- Start discovering clojure concepts (give context to practical experience)
- Practice Clojure by solving challenges and discover more about the Clojure Standard Library (hundreds of functions available)
- Connect to the Clojure community for advice and shared experiences
The foundational aspects are inter-related so a slice through each of them is usually the most effective approach.
Build on that foundation by understanding the design approach to effectively create solutions in Clojure
- Designing for simplicity
- Appreciating Immutability
- Data centric design
- Common Clojure idioms (patterns)
- Common libraries
Clojure REPLλ︎
Practice writing and evaluating Clojure code using a simple REPL prompt that also provides help and documentation for standard Clojure functions.
Experience the Clojure syntaxλ︎
Take a quick look at the Syntax of Clojure. The syntax is very small, so this will take about 15 minutes to 1 hour (dependent on your own experiences with coding). Don't try to remember all the syntax and functions, they will come through practise.
REPL Connected Editorλ︎
Build on the REPL experience by connecting a Clojure aware editor to the Clojure REPL process.
A REPL connected Editor provides an effective set of Clojure development tools to evaluate Clojure expressions.
Understanding common Clojure project structures (src, tests, namespaces) helps organise code effectively and consistently.
Practicalli provides editor install and usage guides for
Practicalli overview of Clojure Aware Editors
Web based Clojure environments
Exercism includes a web-based editor for solving its challenges (and challenges can be downloaded locally).
repl.it provides web based repl you can share / fork via a GitHub account.
Clojure Conceptsλ︎
Gain an appreciation that a software system should strive for a simple design is a crucial step to truly understanding Clojure.
Spend an hour watching the author of the Clojure Language, Rich Hickey, talk about Simple made Easy or read the ( transcript of talk) to emerse in the foundational concepts of Clojure.
Review the Clojure Big Ideas presented by Stuart Halloway and further video presentations by Rich Hickey.
Rich Hickey video lecture series
Practice Practice Practiceλ︎
Practice Clojure. Write lots of small and relatively simple examples in Clojure and experiment with the code in the REPL.
Regular practice helps learn and retain the many of the 700+ functions within the Clojure Standard API
Aim to become comfortable in the understanding of:
- basic values (strings, numbers, etc) and persistent collections (list, vector, map, set)
- binding names to values and their scope (def, defn, let)
- calling functions, defining functions, arity options for functions
- Higher order functions and basics of functional composition (map, reduce, filter, etc)
- Designing with data, Extensible Data Notation (EDN), data manipulation
Activities to help practice Clojure include:
- 4ever Clojure - aim to complete the first 50 exercises and experiment with various functions from the Clojure standard library (
clojure.core
). - Exercism Clojure Track
- Code Kata repeat exercises taking different design decisions
- Small Projects
Community Helpλ︎
There are many ways to get help from the Clojure community
Often starting to ask questions of the community is an effective way of solving the problem yourself. Asking specific questions helps the community help you. Posting the specifics of the solution helps the community grow.
Clojurians Slack community is very active and the Clojurians Zulip community is specifically active around data science.
In-person Code Dojo events
A local Clojure community may run Code Dojo events which are an excellent way to learn and practice with others. e.g. London Clojurians
The Clojure dojo is a collaborative way to learn Clojure/ClojureScript through practice. The aim is to learn a little more than before you started.
Collectively decide on a challenge to complete and split into small groups (2-4 people). Discuss and start to solve the challenge by coding the next simplest thing possible. Spend around 90 minutes in groups and come back together to show what was learned. The dojo is about sharing lessons learned rather than completing a challenge.
Building a frame of referenceλ︎
Find an introductory book that you like which provides lots of example code to help you feel more comfortable with the syntax and more importantly the major concepts of functional programming with Clojure. Type in the exercises as you read and don't be afraid to play around with code examples
Clojure.org Book page has a comprehensive list of commercially available books
Freely available books Practicalli recommends:
Clojure for the Brave and the True
Commercial books Practicalli recommends:
Clojure Essential Reference - Renzo Borgatti
Starter Projectsλ︎
Work on a relatively small project that is care about enough to invest time on regularly, either several hours over the weekend or a couple of hours over several days in the week.
- eg. a tool to help you at work