
A Clojure learning journey - robstu
https://www.stuttaford.me/2018/02/18/a-clojure-learning-journey/
======
whalesalad
Not sure why the excitement around ditching Lein when it looks like there is
little or nothing to be gained at this time? The author describes a handful of
other tools that are necessary to do things Lein does out of the box (uberjar)

The Clojure ecosystem (specifically through the lens of this post) reminds me
of the Linux desktop ecosystem. Lots and lots of tweaks and knobs and dials
for the sake of having tweaks and knobs and dials.

That’s my biggest gripe with Clj... there is hardly ever a “right way” to do
things and usually a dozen esoteric approaches to organizing your application.
It’s a blessing and a curse. All the rope to hang yourself with.

That being said I really like _writing_ Clojure in the pure sense but have yet
to see a really pleasant 1. App architecture and 2. Web application and
routing layer. Ring/compojure don’t do it for me.

~~~
platz
> Lots and lots of tweaks and knobs and dials

This is the case with all big-tent, "community-driven" PLs that have a high
expressiveness, and attract contributors that have a multitude of preferences:
Ruby, Javascript, Scala, Clojure, Haskell, Racket

Alternatively, are the 'prescriptive' cultures, that tend to select for
predictability and high cohesion: C#, Elm, Go, Python (circa-2007).

~~~
jxub
It would be interesting to study the MBTI psyche types in each of the major
language communities.

~~~
sk5t
Would it be fair to say phrenological study of the same groups might be
similarly interesting?

~~~
platz
No.

------
scardine
I just got rejected in a hiring process at Nubank (a sexy fintec from Brazil
that uses clojure a lot) because I used a database for the take-home code
challenge they sent me (writing a REST API). Since I'm a Python developer who
knows little about concurrency in clojure and I would not like to use locks, I
thought it would be better to delegate these things to the database.

Apparently I was supposed to use a global shared collection instead of a
proper database because they want to see if I'm able to map/filter/reduce.

Recruiting is such a gamble - I have this former colleague that I've
introduced to functional programming and he passed with flying colors at
Nubank's recruiting hoops. I would not say I'm smarter than him but he would
agree that I know more about our trade.

~~~
_sdegutis
Having 5 years professional experience with Clojure, I applied a few months
ago to a remote Clojure job, and the coding test was none other than recursion
via zippers, literally my weakest point. I could have done the job just fine
since they said they didn’t use zippers on the job, but failed the test and
they passed on me. Coding tests are the real problem. I’ve had some great ones
where you can tell someone put effort into it and will review it fairly, and
I’ve had some that were hacked together like this one where it’s clear they
weren’t given enough time to put it together by their superiors.

~~~
zdragnar
Coding tests aren't always the problem, but coding tests that evaluate skills
the company doesn't even use? That's just disrespectful.

------
pvinis
Everytime I use clojure for some new project because I think it will help, I
end up spending too much time on tooling and setup, and in the end change it
to something easier to setup, which strangely that's javascript sometimes. I
want to go work in a team where they have it ready for me and I can learn the
tooling on the way, without needing to do that up front..

~~~
akmiller
I don't know how long it's been since you tried but I'd suggest giving it
another go. The tooling today is what makes it one of the best experiences out
there. The front-end tooling especially!

~~~
projectileboy
Can you speak to the front end tooling a bit more? I know Cursive makes for a
nice coding experience in general, but I haven't really done any Clojurescript
work to speak of.

~~~
jrheard2
[posting on an alt because noprocrast just kicked in on my main account]

The second half of this blog post talks a lot about what cljs dev is like:
[http://blog.jrheard.com/quinto-resurrecting-an-abandoned-
boa...](http://blog.jrheard.com/quinto-resurrecting-an-abandoned-board-game)

------
Double_a_92
I always read about those nice functional languages, but when I try to learn
them myself I struggle pretty hard.

Can anybody point me to some small (5k LOC maybe) project on github that
solves some "real world" problem?

I'd like to get some overview. As opposed to the usual tutorials that start
with the very basics and don't seem to get anywhere...

~~~
fiddlerwoaroof
It’s not Clojure, but the practical chapters in the book Practical Common Lisp
might be a good way to get a feel for the way a Lisp works in a practical
application.

~~~
flavio81
>book Practical Common Lisp

It is a wonderful book and Common Lisp is powerful to the max, but note that
CL is a multi-paradigm language and examples won't necessarily be in the
"functional" style. Quite the opposite, Common Lisp makes imperative
programming very comfortable (and OOP as well.)

~~~
fiddlerwoaroof
While Common Lisp definitely allows for imperative constructs, I’d argue that
its flavor of OOP is part of the functional paradigm: i.e. generic functions
aren’t part of the classes, they are protocols that can be implemented in
different ways by different classes. They are closer to typeclasses than to
java-style OOP

------
jxub
This is amazing. More people should get to know clojure as it's a wonderful
language that has almost all concurrency models on this planet. Also now with
core.typed it retains most of the benefits of the statically typed ones while
being as productive as other dynamic ones or more.

~~~
jacquesm
> More people should get to know clojure as it's a wonderful language that has
> almost all concurrency models on this planet.

Clojure is great. But Rust is a Must, so I hear, and you will need some Python
for ML. And then of course JavaScript if your stuff touches the web, and it
all does. And there is Go and Erlang or is that Elixir for systems and
transactions. Ruby or PHP for RAD and Java for the large stuff can not be
ignored.

And before you know it you'll be bad at 25 languages, instead of good in one
or two that allow you to do what needs to be done.

All these languages are great in the sense that they exist and show what is
possible but they make it super hard for a professional programmer with ~8
hours in a productive day to choose which eco system (which is far larger than
just the language by itself) they want to invest their time in leading to some
variation on the paralysis of choice theme.

I'm super happy I don't have to earn my bread by coding today, I sincerely
would not know what to choose to maximize longer term value of my investment
in time. It's like building a house on quicksand.

~~~
emidln
I use Clojure (or Clojurescript) for all of the things you listed. When I need
something other than Clojure, that thing is typically C which is either a
device driver or something I'm going to call into from Clojure. In the past I
used mostly Python/Javascript/C instead of Clojure/C to get where I wanted to
be.

Just to be clear, I use clj/cljs (day to day) for:

* Mobile Applications on Android/iOS

* Analytics and Data Wrangling off queues

* Data Analysis

* Admin Dashboard stuff (CRUD, Charts/Graphs, misc)

* Business Rules

* User Messaging (Push / Email / Webhooks)

* Database ETL

* Web Services

* Background jobs

* Build System and Deployments

The only thing I don't use that is Clojure-based, on a regular basis for my
job, is SaltStack for configuration management (and this is largely because we
have a working SaltStack system that I don't have a need to mess with).

I'm super happy when I can spend most of my day with a monitor dedicated to
Spacemacs while jacked into a clojure repl.

~~~
Scarbutt
But does Clojure/C really makes you more productive than Python/Javascript/C?
which I guess is the point the GP was referring to, although, you mentioned it
makes you happy (which is a good of enough reason as any).

Don't get me wrong, I think learning Clojure is helpful for lots of
developers, even if they won't use it for work/side projects, and I think
that's exactly what happens in the Clojure ecosystem and the reason for so
many libs being half finished and abandoned, devs learn Clojure, grab all the
ideas and concepts, scratch an itch but ultimate terminate going back to their
mainstream langs.

~~~
james-mcelwain
It sounds like you're suggesting that Python/Node have better libraries, which
couldn't be further from the truth. Most "abandoned" Clojure libraries either
(a). aren't abandoned and "just work" due to their limited scope or (b). are
wrappers to Java libraries that are trivial or unnecessary. Most people would
rather to interop directly.

~~~
fro0116
To offer one small piece of anecdote to the contrary: We use Clojure for most
of our server-side code and picked Lacinia from Walmart Labs [0] to implement
our new GraphQL API. It does most of the basics just fine, but its pace of
development lags extremely, painfully far behind GraphQL server
implementations in more popular languages such as the ones in Node and Python.
To this day it still doesn't have support for custom directives [1], not to
mention any of the other more bleeding edge developments in the GraphQL
community such as schema stitching and live queries, all of which we would
really have liked to experiment with along with the rest of the GraphQL
community. We ran into similar issues initially when trying to use gRPC with
Clojure.

We love writing Clojure and still use it everywhere where appropriate, but the
size of its community and ecosystem is definitely holding back its ability to
compete for adoption with other languages on the bleeding edge of new
technological trends.

[0]
[http://lacinia.readthedocs.io/en/latest/](http://lacinia.readthedocs.io/en/latest/)

[1]
[http://lacinia.readthedocs.io/en/latest/directives.html](http://lacinia.readthedocs.io/en/latest/directives.html)

~~~
james-mcelwain
Fair -- GraphQL seems like something that is particularly well suited to
having a Clojure API so that's disappointing to hear it lags behind other
implementations.

------
jgh
I really like Clojure and am using it for a web project now. Datomic is
awesome too, but not appropriate for my current project unfortunately (gis
stuff)

------
agumonkey
Fascinating how large it is.. it's more than a learning.. or at least it's
deep learning (sic).

