Skip to content

Instantly share code, notes, and snippets.

@canweriotnow
Created March 9, 2015 06:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save canweriotnow/ee01541ea91747141d29 to your computer and use it in GitHub Desktop.
Save canweriotnow/ee01541ea91747141d29 to your computer and use it in GitHub Desktop.
Clojure: Next Steps

Clojure: Next Steps

Sorry it's taken so long, but as promised, here's a list of follow-up resources for moving forward with learning and working with Clojure. I'll try to break it down in some coherent fashion, but there will definitely be overlap.

Practice

Places to find exercises to hone your clojure hacking skills

These are web-based exercises that ask you to "fill in the blank" with Clojure forms. Since it's eval'd on the web, there are some general restrictions (no named functions, etc.) for (I assume) security reasons), and some exercises will remove the avaialbility of built-in functions so you can understand how they work by writing them yourself. It even has a code golf component if you're into that. The problems increase in difficulty until they move from Clojure basics to Project Euler territory.

In the tradition of Ruby Koans, Clojure Koans are a downloadable series of exercises that emphasize building on basics and TDD. Complete an exercise, the test suite runs, and you're presented with the next one. Great for making sure you've got the basics nailed down, and nice since they run on your local machine.

Currently my favorite code practice commuity out htere, Exercism is great because it combines the best of all possible worlds: exercises are completed locally, but pushed to the Exercism site for "nitpicks", ot community code review. Solutions can be posted iteratively so that suggestions can be incorporated and reviewed once again.

One of the best things about Exercism is that it's not limited to Clojure; if you're more familiar with Ruby or Python or Haskell, the same core set of exercises are used in each language, so you can complete a problem in CoffeeScript or Rust and Common Lisp alongside Clojure, and the community feedback will help you to get a feel for whether the approach is optimal or idiomatic.

Tools

Probably the most "batteries-included" Clojure web framework, Luminus will generate a project template complete with ClojureScript, database access, authentication, and more, all optionally flagged from the lein template when you generate teh project. It can be a little too batteries-included, and you might find yourself digging in to remove certain components (e.g., it includes the Selmer HTML templating library. The Default was just recently returned to Hiccup, so it's less of an issue, but it was one of the reasons I decided to go minimalist for the workshop.

Mostly interesting if you're into statistical analysis, Incanter provides an R-like environment for statistical computing and graphics generation that's incredibly useful and fun to use.

We looked at Reagent for React developemnt in ClojureScript, and I wanted to share Sente as well, because using it together with Reagent is a pattern I've been using for sometime... and it's glorious. Sente is a library for asynchronous commuication using Clojure(Script), core.async, and WebSockets. It creates a great pattern for synchronizing state without depending on millions of callbacks, handling transport over websockets (with graceful degradation to AJAX where necessary).

Recommended Reading

Books

On the Web

Of the above, I can't recommend Clojure for The Brave and True highly enough... it takes you from installation through setting up Emacs (yes, Emacs!) to project organization... honestly, if the workshop had been a longer-form class, I probably would have used this as the textbook.

One book I haven't had a chance to review (but the pre-release reviews from some credible people are glowing) that looks perfect for diving into serious Clojure development is forthcoming from O'Reilly, entitled Living Clojure. I plan on picking up a copy when it's released, and I'll update accordingly, but if it lives up to its reviews, it's going to be one of the books we buy every new hire at Yet.

Required Viewing

I tried to keep my comments about Clojure's creator, Rich Hickey, to a minimum, but I can't stress enough the importance of watching his talks. There's a greatest hits list at The Changelog, and you should watch them all. But especially, especially watch Are We There Yet? and Simple Made Easy.

Clojure needs more screencasts... local hacker Mike Patella is doing a bunch of pretty sweet ones on YouTube at Doing Computers, so check those out too.

Staying in touch

I've been kinda swamped, so I haven't had much time to keep abreast, but remember the bananas project is open for anyone who wants push access. Adam from class already fixed the Reagent thing, I just haven't had a chance to merge it in. But I encourage everyone to stay in touch as you continue to learn Clojure, it's good to have folks to hack with.

Also, don't forget the Baltimore Clojure Meetup, third Tuesday of every month. I hope to see many of you there, hopefully presenting!

Emacs

So, for all my desire to be a good editor-agnostic instructor, I do have to suggest that you at least give Emacs a chance. In addition to the best possible Clojure interaction experience through CIDER, emacs has client modes for 4clojure and exercism (well, the latter is a personal project, but it mostly works at this point...

I posted a while ago about switching to Emacs and journeying further down the Emacs rabbit hole, so I'll leave you with those to get started.

If you find anything I missed, please comment and I'll work it in here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment