Pre-West Interview: John Hume
From OO to Clojure Workshop!
Watch my free workshop to help you learn Clojure faster and shift your paradigm to functional.
This summary was graciously written by Nola Stowe. She's a programmer, the co-founder of DevChix, and a prolific teacher. She recently ran ClojureBridge Austin. Please shout out to her and say thanks!
John Hume's talk at Clojure/West is about Clojure internals.
You can get a lot done in Clojure without understanding much about its internals. But when your code doesn't do what you expect, whether in terms of behavior or performance, it can be extremely useful to dig into the underlying Java code.
John's presentation will walk the audience through some of that code by
following a simple map-literal expression through Clojure's reader and
analyzer, particularly focusing on code generation in
clojure.lang.Compiler, and then onto runtime evaluation. The hope is
that you'll come out of the talk better able to analyze what's really
happening in your own Clojure code.
About John Hume
This interview was graciously conducted by Nola Stowe. She's a programmer, the co-founder of DevChix, and a prolific teacher. She recently ran ClojureBridge Austin. Please shout out to her and say thanks!
Interview with John Hume
Nola: How long have you been doing Clojure and how did you get into it?
John: I started playing with Clojure in late 2008---the fairly early days. It was interesting to me because I'd always heard that Lisp was amazing, but I'd never spent any time with one. Since Clojure runs on the JVM and has simple Java interop, it was far more accessible to me than any other Lisp. Since it was a new language and community, there seemed to be a lot of other people going through the same learning process I was, so the mailing list was very helpful. And back then it was low-traffic enough that I could actually keep up, which hasn't been the case for a long time.
Nola: What languages did you do before Clojure?
John: I'd been doing Ruby full-time for a few years before getting interested in Clojure---and continued to spend most of my time working in Ruby until 2012. Previous to that I'd done Java for about 5 years. Ruby really opened my eyes to how much power and expressiveness Java had been keeping from me. But after an exciting learning period with Ruby, I'd gotten a bit bored. Clojure came into my life at just the right time!
Nola: Any suggestions for someone wanting to dive into Clojure?
John: That's a tough one. A background in Java and Ruby made it easy for me to deal with some of what can make Clojure difficult for newcomers: Java helped with the JVM, the API, and the ecosystem, while Ruby had already made me comfortable with strong but dynamic typing and some functional concepts. For someone with a similar background, I'd definitely recommend giving Clojure a try.
- Start with tools you're comfortable with, rather than learning a tool you don't find intuitive while also learning a new language.
- Start with a problem space you're familiar with, whether that's web, graphics, or data analysis, and find libraries that don't hide away too much magic.
- Read the code! Lots of clojure.core and most other standard and contrib libraries are implemented in straightforward, idiomatic Clojure. Hopefully your tool of choice makes it seemless to jump into that code from your own. The only caveat with that advice is that sometimes---and it's not always obvious when this will happen---a library fn will be implemented in an unidiomatic way for reasons that aren't clear.
- When in doubt, lean on the mailing list or IRC to find out from more experienced Clojurists whether what you're reading or writing is idiomatic or idiosyncratic code.
- For someone with a different background, that advice might all be good, but there are probably aspects of the learning curve that I underestimate, so I'd recommend trying to find Clojurists with a similar background and getting their advice.
Nola: Thanks for the interview. It was very informative.