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.
Screencasts, Whiteboards, and Slides produced to help you learn
Learn the tricky corners of Clojure syntax, like for comprehensions and function definitions.
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.
Clojure core.async provides basic building blocks for communication and coordination. This course explores ten patterns you can easily implement using those building blocks.
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.
Pragmatic and in-depth guides to a topic.
A complete massive action plan to get a functional programming job.
Getting to know people who can help you get functional programming jobs.
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.
Your Database is going to contain a lot of important information. When you’re first starting out your app, you don’t know exactly what you’re going to store in there. In addition, you don’t know how you’re 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 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.
We look at a sequence diagram to organize the parts of Re-frame.
Small, precise guides to a particular feature.
Unit testing in Clojure is straightforward. Here are a few testing ideas as they apply to Clojure.
Hiccup is a Clojure DSL for generating HTML. If you’re using it, you might like these tips.
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.
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.
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.
New Relic lets you get more out of Heroku. Install it in 7 steps.
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.
Clojure core.async is a way to manage mutable state. Isn’t that against functional programming?
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.
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?
The JVM JIT is a highly optimized compiler. I present some resources for learning what it does.
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.
Parts of courses on specific topics
Let’s add an action for adding ingredients.
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.
Property-Based Testing has several advantages over regular Example-Based Testing. It’s worth calling them out.
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.
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.
In this lesson, we will see an example of the process of testing an existing function using Property-Based Testing.
PDFs, code, and other downloads to help you learn
A one-page sheet with the basics for creating Reagent components for use with Re-frame. Get started with Re-frame right away.
If you program the web in Clojure, you probably use Ring. Even if you don’t, your server is likely Ring compatible. Ring has a small SPEC. It’s 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’t want to forget. […]
These are all of the commands Eric uses to do TDD in Cider.
Code to accompany The Ultimate Guide to Clojure Concurrency and the Clojure Concurrency Course. It’s example code for a variety of concurrency primitives.
We interviewed Asher Coren about his upcoming Clojure/conj 2016 talk.
We interviewed Bill Piel about his upcoming Clojure/conj 2016 talk.
We Interviewed Brandon Kase about his upcoming Curry On talk called Composable Caching in Swift.
We interviewed Brian L. Troutwine about his upcoming Lambda Days 2017 talk.
We talked to Caitie McCaffrey about her upcoming YOW! Sydney 2016 talk.
Chris Birchall will be speaking at Lambda World 2016. I interviewed him about his talk.
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 […]
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 […]
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 […]
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 […]
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 […]
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 […]
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!