When you are looking at a variable, how do you know what it refers to? The rules that determine what variable names refer to are collectively called the scoping rules. Learning the three kinds of scope and when to use each will help you make your code more maintainable.
Video Courses
Screencasts, Whiteboards, and Slides produced to help you learn
Clojure Syntax
Learn the tricky corners of Clojure syntax, like for comprehensions and function definitions.
Concurrency
You’ve heard that Clojure is great for concurrency. But what tools does Clojure give you? And how should you use those tools?
These lessons are meant to each answer a specific question and help you build the skills you need to address a wide variety of concurrency problems.
core.async Patterns
Clojure core.async provides basic building blocks for communication and coordination. This course explores ten patterns you can easily implement using those building blocks.
Data Formats
With so many data formats out there, it’s good to see some example code for reading and writing different formats. I’m talking JSON, CSV, EDN, and more. This course explores how to read and write data formats using Clojure.
Written Guides
Pragmatic and in-depth guides to a topic.
Job application action plan
A complete massive action plan to get a functional programming job.
Join and build a social network
Getting to know people who can help you get functional programming jobs.
Optimistic Update in Re-frame
How do we deal with that little bit of time between when the user clicks and the server confirms the change is saved? Well, like many things in life, there are two ways: optimistically and pessimistically.
Re-frame Database Best Practices
Your Database is going to contain a lot of important information. When you鈥檙e first starting out your app, you don鈥檛 know exactly what you鈥檙e going to store in there. In addition, you don鈥檛 know how you鈥檙e going to want to access it. Both of these will evolve over time as you understand more of the domain and you uncover the complexities of your UI. We want some help from the framework (Re-frame) to help us deal with this evolution.
Re-frame Tutorial with Code Examples
Re-frame adds a beneficial amount of structure to your frontend app. This guide goes over all of the pieces of that structure and how to use them.
Re-frame, a Visual Explanation
We look at a sequence diagram to organize the parts of Re-frame.
Mini Guides
Small, precise guides to a particular feature.
Example-based Unit Testing in Clojure
Unit testing in Clojure is straightforward. Here are a few testing ideas as they apply to Clojure.
Hiccup Tips
Hiccup is a Clojure DSL for generating HTML. If you’re using it, you might like these tips.
How can you test ClojureScript applications and libraries?
Although it’s still early, ClojureScript is rapidly maturing its testing story. There are a Leiningen plugin and a Boot task for autocompiling ClojureScript as it changes and running tests in a variety of engines.
How I made my Clojure database tests 5x faster
Setting up and tearing down a test database can be slow. Use a rolled back transaction to quickly reset the database to a known state. You can do that in an `:each` fixture to run each test in isolation.
How to Read Clojure Code Like an Expert
As you get better with Clojure, it becomes easier to read. Why not jump ahead of the learning curve and read like an expert? Focus on the first thing, use the indentation, and read the evaluation order.
How to Use New Relic with Clojure on Heroku
New Relic lets you get more out of Heroku. Install it in 7 steps.
Technical Articles
How do Clojure Programmers Deal with Long Startup Times
Clojure startup times suck. Let’s just be honest. How do Clojure programmers live with that? Maybe that’s the wrong way to think about it.
Is core.async Against the Clojure Philosophy?
Clojure core.async is a way to manage mutable state. Isn’t that against functional programming?
Java Generational Garbage Collection
The JVM’s garbage collector allows for Clojure’s persistent data structures to be practical. It’s one of the benefits of being a hosted language: you can take advantage of the millions of dollars invested into the JVM’s development.
JVM Deployment Options
When you’re working at a company, you usually inherit their deployment system. And that’s great because then you just do what they do. But what if you are on your own? What are the options for deploying a Clojure server?
JVM JIT Optimizations
The JVM JIT is a highly optimized compiler. I present some resources for learning what it does.
Lambda Abstraction
Lambda abstractions are always leaky, but some are leakier than others. Clojure programmers recommend keeping most of your functions pure and containing the leaks as much as possible.
Video Lessons
Parts of courses on specific topics
Adding ingredients
Let’s add an action for adding ingredients.
Adding static scope information
We modify the compiler to add static scope information. Even though we don’t know the value of variables until runtime, we do know the names of the variables at compile time. We can use that to make missing variables a compiler error.
Advantages of Property-Based Testing
Property-Based Testing has several advantages over regular Example-Based Testing. It’s worth calling them out.
Agents
Agents are another reference type. Each one has a queue of work to be run on it, and those bits of work get run in a thread pool. They’re great because each Agent is a unit of parallelization. Three Agents mean three things can run at the same time.
All about Flow
Flow is a mental state where we feel totally immersed in our activity. We feel deep enjoyment and are energized by it. It’s the state the repl-driven programming promises us. In this lesson, we look at Flow, its benefits, and what is needed to maintain it.
An overview of property-based testing with an example test
In this lesson, we will see an example of the process of testing an existing function using Property-Based Testing.
Download Resources
PDFs, code, and other downloads to help you learn
Reagent Components Reference Sheet
A one-page sheet with the basics for creating Reagent components for use with Re-frame. Get started with Re-frame right away.
Ring Spec to Hang on the Wall
If you program the web in Clojure, you probably use Ring. Even if you don鈥檛, your server is likely聽Ring compatible. Ring has a small SPEC. It鈥檚 centered around defining the keys one can expect in the request and response maps. And the exact names for keywords are easy to forget. I don鈥檛 want to forget. […]
TDD in Emacs Clojure Reference Sheet
These are all of the commands Eric uses to do TDD in Cider.
The Ultimate Guide to Clojure Concurrency Code
Code to accompany The Ultimate Guide to Clojure Concurrency and the Clojure Concurrency Course. It’s example code for a variety of concurrency primitives.
Speaker Interviews
Asher Coren Clojure/conj 2016 Interview
We interviewed Asher Coren about his upcoming Clojure/conj 2016 talk.
Bill Piel Clojure/conj 2016 Interview
We interviewed Bill Piel about his upcoming Clojure/conj 2016 talk.
Brandon Kase Curry On 2017 Interview
We Interviewed Brandon Kase about his upcoming Curry On talk called Composable Caching in Swift.
Brian L. Troutwine Lambda Days 2017 Interview
We interviewed Brian L. Troutwine about his upcoming Lambda Days 2017 talk.
Caitie McCaffrey YOW! Sydney 2016 Interview
We talked to Caitie McCaffrey about her upcoming YOW! Sydney 2016 talk.
Chris Birchall Interview
Chris Birchall will be speaking at Lambda World 2016. I interviewed him about his talk.
Newsletter Issues
PurelyFunctional.tv Newsletter 411: is it easier after Clojure?
Issue 411 – January 19, 2021 路 Archives 路 Subscribe Design Tip 馃挕 is it easier after Clojure? The challenge I put in the last issue was about sequence manipulation. It was considered hard in Java by the challenge site I found it on. Many people submitted answers. There was almost a consensus on a […]
PurelyFunctional.tv Newsletter 410: don’t encode your policy
Issue 410 – January 11, 2021 路 Archives 路 Subscribe Design Tip 馃挕 don’t encode your policy After I published the timeless in an unstable domain, generous reader Tim Cross shared his experience with me. I’ll quote him (with permission): One of the first ‘rules’ I learned and often one of the first things I […]
PurelyFunctional.tv Newsletter 409: the 3-stakeholders model
Issue 409 – January 04, 2021 路 Archives 路 Subscribe Design Tip 馃挕 the 3-stakeholders model Last week, we talked about a model of the three stakeholders of programming. They were: Users Programmers Computers I thought I’d use it as the focus for a discussion about systematic model-building. I like to build models. That’s one […]
PurelyFunctional.tv Newsletter 408: 3 stakeholders of programming
Issue 408 – December 28, 2020 路 Archives 路 Subscribe Design Tip 馃挕 3 stakeholders of programming Last time I was on the defn podcast, Vijay mentioned the 3 tribes of programming. In the article, the author specifies three archetypes of programmer: Poet mathematician Hacker Maker Vijay noted that I was self-identifying as the “poet […]
PurelyFunctional.tv Newsletter 407: two layers of design
Issue 407 – December 14, 2020 路 Archives 路 Subscribe Clojure Tip 馃挕 two layers of design In John Ousterhout’s A Philosophy of Software Design (see review below), the author suggests that the Java InputStream API is poorly designed. In order to read from a file, the standard, recommended way to do it is to […]
PurelyFunctional.tv Newsletter 406: design, false nominalization?
Issue 406 – December 08, 2020 路 Archives 路 Subscribe Clojure Tip 馃挕 design, false nominalization? Most verbs have a noun form. For instance, you can take the verb to read and get a reading. Or you can take the verb to submit and get a submission. Linguists call this phenomenon nominalization. You nominalize a […]
Programmers
Guy Steele
Guy Steele is an amazing figure. He was instrumental in writing the specs for C, Common Lisp, Scheme, and Java. He’s also a great speaker. His talks are always concise and to the point. He seems like such a nice guy. He never says anything harsh!