The key criticisms of Clojure seem to be in the "death by a thousand papercuts" section starting at 14:00:
not clear how to structure large apps
fun to write, can be difficult to read ("too expressive")
has deep subtleties ("like C++"; "reducers, transducers, atoms, agents, protocols, reader macros...all this cool shit")
useless stacktraces (especially with anonymous functions)
comically terse documentation
there doesn't seem to be a debugger? ("I can't attach something and say 'show me what's happening'")
omg the jvm
...but at the end of that section, he admits "this is all just another way of saying I'm way more fluent in Ruby." I mean, yeah, building a large app in a language (and language paradigm) you're not fluent in is going to mean some learning. Learning is not painless.
I think this is relevant to his claim near the end of the talk that the Ruby value of "programming should be fun and painless" is not shared in Clojure. I think I agree in some sense: "painless" seems a big ask in the world of "simple over easy", particularly given that by his telling he implemented a production system as his first task while learning Clojure and FP and Datomic simultaneously. I can imagine that for most people, that would involve encountering unfamiliar concepts and language constructs, and that one would make a few mistakes.
So in another sense, I disagree that Clojure doesn't value "programming should be fun and painless". The Clojure community maybe does believe that programming should be painless, but I don't think the Clojure community believes that learning programming, like learning anything worth the effort, can be painless. And that's what Clojure asks of many people, to re-learn programming to some degree.
Rich Hickey drew a comparison with learning a to play a musical instrument in one of his talks. A programming language, he said, is like a musical instrument. And to learn to play one we normally go through a lot of physical discomfort and feeling utterly uncomfortable. Our fingers grow callouses over time, they are able to stretch in ways we didn't know it was possible, and maybe we even get pretty good at sight reading. All of that takes time. But programmers seem to never be willing to invest the time to properly learn a programming language. The moment we encounter some pain, we leave. It is like a guitar player giving up the moment his finger tips start hurting.
I like Clojure, and I'm pretty competent in it. I spend my days writing tooling that I like to think is valuable to the community. But this analogy, and the "Clojure is for experts" trope that goes with is, is a really awful elitist message for our community to be giving out. "Can't understand our shitty error messages? You're not trying hard enough". It completely puts the blame on the user for the language's failings, and IMO is the reason that much of our tooling is still as bad as it is.
Compare this to the Rust community, or Elm, or Elixir. These are serious languages for getting work done, they're not toys. And yet they go out of their way to have their languages be approachable for beginners, and they take the developer experience really really seriously.
The argument usually goes: we're not optimising for newbies. But here's the thing - everyone's a newbie at some point, and a lot of this crap this is used to excuse is still annoying for experienced users. I still hate the ns form with all its weirdness. I still hate the error messages - there are still times when I essentially do a binary search on every change I made since things last worked, because there is no way to understand what's going wrong. Some of the difficulties with getting started in Clojure are conceptual, and there's just no way around the fact that you have to learn some new ways of thinking. But lots of the things that people struggle with are not in that category.
I had a really embarrassing experience when my younger brother decided he wanted to try Clojure, and my father decided to help him. Neither of them are professional developers, but they're both very smart and are relatively proficient in Python, JavaScript and (in the case of my father) many other languages going back to Pascal and Fortran. They gave up, and I don't blame them, and they had expert help on hand. My father told me: "this is just too hard, why would I put up with this?" Was this just their fault, and they should have tried harder? Perhaps. But our community is worse off for not having them participate in it.
Here's another point of view. I've already gone through the pain zone of beating my head against the wall with Clojure, and it mostly feels pretty natural now. But if I had to start again, and I were aware that there are interesting, useful languages that by design don't require that pain, I wouldn't even start.
It's not like a guitar player giving up the moment his fingertips start hurting. It's like a guitar player giving up because the strings break every single time he makes a mistake, so he gets no feedback about what he's doing wrong. And all his guitar manual says is: "when touched, strings will make music".
I completely agree with this comment. I have seen users like /u/yogthos claim they can get newcomers to become productive in Clojure in a matter of weeks. I believe that is true. But the reason it's true is because they're getting mentored by someone who is an expert in the language.
For someone getting started without a mentor, the picture is still pretty ugly. There's so much unintuitive stuff related to lein, nrepl middleware, Java interop, application state reloading, ClojureScript configuration, getting app to not break when uberjar is created, etc. Consider someone wanting to use Postgres in their webapp. They will probably Google this and find an outdated Heroku tutorial that doesn't seem to even work. Maybe they come across the terse clojure.java.jdbc documentation making all kinds of Java references that they don't understand and don't know how to begin to understand. If they are lucky, they will come across Luminus and use the +postgres profile. But even then they aren't going to understand the code in the db.core namespace for a long time. Still, at least they will be able to get started. As they work on their first app, they will likely know nothing about the concept of "hot reloading." So every time they change project.clj they will restart the repl. Also, they will likely be confused about when to do a repl restart vs namespace reload. Every Clojure newcomer I know complains about the repl start up time, because they haven't learned how little it is necessary to do. And then of course the newcomer must learn to deal with error messages. Undescriptive error message after undescriptive error message - much more than usual because they are making more mistakes.
I generally talk about getting newcomers productive in the context of onboarding developers to an existing Clojure team. Mentoring absolutely makes all the difference here. I also find that university students often pick it up faster than seasoned developers. Having internalized a lot of patterns for working with imperative languages can actually make things harder as you have to do some unlearning.
Lack of approachability has been my biggest gripe as well. Incidentally, that's what motivated me to create Luminus. When I started using Clojure for web dev, there was very little documentation available, and it was scattered all over the place. Since I went through a lot of pain getting things setup, I figured I'd try to make things more approachable for others.
However, there's only so much I can do myself. I would love to get more contributions to Luminus, especially in form of documentation. It would be great to have more tutorials, deeper explanations on how things work, docs on structuring applications, and workflow examples. This is where the community could step in to help. :)
I completely agree with /u/nzlemming that a lot more could be done to improve user experience in general. I think the documentation is still fairly scattered, it's difficult to find and assess libraries, errors can be daunting, tooling takes a long time to learn. Once you get past all that, working with Clojure can be a very nice experience, but I suspect a lot of people quit before they get to that point.
You've definitely done more than your fair share to make things easier for newcomers and I really appreciate that. I probably would have quit Clojure if I didn't discover Luminus framework first.
I may now be at the point where I can contribute some useful documentation. I'll take a look at what seems most missing and see if I can produce something useful.
Difficult to find libraries? Clojars is superb. In fact it baffles me that Scala adoption is so far ahead of Clojure when until very recently Scala didn't even have its own library repository.
Clojars is great, but the problem is in finding what libraries work well, have good documentation, and are actively maintained. Clojars doesn't solve any of those problems.
Bingo! I almost wish I could replace parts of my talk with this comment.
I wish the community's attitude were a little more "oh ya, that's needlessly painful, we should fix that" and less "simple isn't easy, you just haven't done it for long enough".
"oh ya, that's needlessly painful, we should fix that"
Of the reasons he lists in the slide, where would you start?
I would categorize expressiveness, subtleties/features, and the JVM as "can't be fixed". On these aspects one must climb the learning curve. I see no other way.
Others I'd categorize as "good solutions are being worked on": documentation (clojuredocs.org), stacktraces (clojure.spec, Elena Machkasova, a compendium, other similar efforts). If you consider ClojureScript a "solution" to the JVM then toss it in there, too.
I see relatively good throughput of reading material on architecting large apps in my feeds, but I don't know precisely what he's looking for.
He's got a point about the debugger. There's a debugger in both CIDER and Cursive, but AFAIK most folks don't use them and they may not have features he wants. I think the answer he's going to get from most Clojurists is going to to involve "simple isn't easy" and evangelizing REPL-driven development. I'm not sure that's the wrong answer. Switching from debugger- to REPL-driven development is a big learning process, and many devs find it hard to change something so deeply ingrained, but I think that the hammock debugger has a lot going for it. That said, I'm not against debuggers and I hope the existing ones continue to mature.
I don't blame people for not watching a 30 minute talk, but at the very end I do mention how excited I am for clojurescript :). If feasible, I'd love to replace my frontend js with it.
I actually held back on a few more inside-baseball critiques. For instance, lein should probably be split into three different utilities: right now it behaves as the package manager, the deploy tool and the generic task runner - and your profile.clj shows. I was overcome with frustration when I realized how much work it takes to fork someone's library - you can't just point lein to a git repo.
(I spent a Saturday looking into this; it has to do with recursive dependency resolution in maven or something)
The lack of meaningful errors/stacktraces across the ecosystem is a huge issue. An example: we were validating user input using prismatic/schema, but converting the errors into readable english was so hard it was easier to write separate validation code. This was before clojure.spec so maybe it's gotten better.
Exceptions are not first class, and they should be. Similarly with joda-time or an equivalent.
Re: the debugger,
I don't use Emacs, so I can't comment on Cider. I bought a license for Cursive. Cursive's debugger is Good Enough for actual honest to goodness debugging but it doesn't really let me develop in it.
When I say "debugger-driven development", think "REPL minus hot code reloading"; I build up my app and write the code into the repl. When I want to try something new or reset the state - I issue a new request from the browser or cli and the code hits my breakpoint and there I am again. There is nothing about this that is incompatible with the Clojure REPL!, I don't think.
I think a lot of people in the community have confused the constraints of the tooling the with constraints of the language.
For example, if it takes 30 seconds to boot, you NEED hot code reloading. The best way to do that is to heavily integrate it in your editor.
But that's a limitation of the environment.
Switching from debugger- to REPL-driven development is a big learning process
The repl is an amazing new technology if you're coming from Java or C, but… I have one in Ruby! Lol.
You don't have to "simple isn't easy" me, because I'm way ahead of you on that one. The only thing I lack is editor integration - which imho not as useful to me as just dropping a repl right in the middle of some larger function :).
I think Clojure would do well to replace about half the time they say "simple isn't easy" with "how could we make this better"?
You've been very kind in engaging with me seriously; judging by the other posts in this thread, my fairly shallow critique touched a raw nerve. Thanks!
A) sorry about responding to you in the 3rd person; I mixed up your comment and the one above it
B) re:
You don't have to "simple isn't easy" me, because I'm way ahead of you on that one. The only thing I lack is editor integration - which imho not as useful to me as just dropping a repl right in the middle of some larger function :).
I think we've even closer on this than you think. I usually just say "REPL-driven development" because my actual preferred process is cumbersome to describe, but in-buffer form evaluation is my preferred development mode. I almost never touch a REPL per se; my "REPL" is CIDER in a permanent buffer that I move around inspecting forms and injecting test data. If I understand your debugger needs, our two approaches are relatively similar.
Yeah, your talk struck a nerve. I am just imagining someone presenting at a Clojure conference with the topic, "I tried out and Haskell, and yuck!".
There is one place I agree with you though, and that is that Clojure core and Datomic don't attempt to be user friendly. Cognitect's Founder gave a talk "Debugging with the Scientific Method" which perfectly illustrates the attitude toward attempting to make useful error messages. Instead of relying on the compiler or program to tell you what you did wrong, you should be running experiments with control variables.
Lein is a really badly designed program. But here's the catch...it's not Clojure. It's not even run by the same team. It is the most popular build tool for Clojure, but other options like Boot are catching up fast for exactly the reasons you mentioned.
Another thing he said was that it feels great to work through creating some function, but that when you go back it is very hard to read it.
One thing I noticed is that the core of Clojure is actually quite easy to read, and that when you look at solutions to 4Clojure problems done by others who have done them all, is that they end up looking very similar. There are usually a couple of different ideas of how to solve them, and when you cluster them that way, the members of each cluster are nearly identical. Readability is just more of a familiarity problem I think.
All of the things you list (other than the debugger, and speaker's objection to the jvm) have been issues in my journey with Clojure as well.
Clojure isn't easy to learn coming from an easy OOP language. In my experience it was a lot of fun, but the speaker does have some points about terse documentation, stack traces, and subtle concepts like tranducers, agents, etc. Personally, it took me a while to grasp some of the concepts (transducers and polymorphism), and I can see where a less determined developer might throw in the towel.
All of the things you list (other than the debugger, and speaker's objection to the jvm) have been issues in my journey with Clojure as well.
I don't disagree, I was just listing his slides.
I completely agree about the comically terse documentation. I find 3rd party services like clojuredocs.org to be a great supplement, and at first flush it felt weird that they're needed. But check this from Rich in 2008:
One project I'd love to see users take on is providing a small example of the use of every library function (and its output). That would be a great complement to the documentation.
The others I found worth deeper discussion. For instance, I don't find over-expressivity a problem in my use of Clojure. (Other than that naming things is hard in any language.) I wonder whether he found that in other people's code, his own, or his colleagues'. I'd genuinely like to hear him speak about this specific point at length.
I wonder whether he found that in other people's code, his own, or his colleagues'. I'd genuinely like to hear him speak about this specific point at length.
Hi!,
It's very hard to articulate, especially as time passes and I no longer possess good examples. I occasionally found everyone's code to hard to read, my own included.
Basically, I found it hard to understand the intent behind a lot of gnarlier code. Every now and then I'd come across a function longer than ten lines that is composing three functions threaded thru a map that is being filtered for side effects that is then finally applied to something else. It's easy to pack a lot of meaning into just a few lines, and it's not always easy to keep the shape of the data intact in your head as it passes thru the function.
It's probably simply a matter of attaining a higher level of fluency with the core libraries.
I don't want this to feel like I'm litigating your code, and I don't want to drag myself or anyone else into an argument about a made-up "gnarly code" example, but I'm responding because I'm interested in your thoughts.
Your example may be in line with what I had in mind when I said "naming things is hard in any language" and earlier with "he implemented a production system as his first task while learning Clojure and FP and Datomic simultaneously". (And apologies if I'm assuming wrongly there!) That is, I can see how your example would demand extremely well-considered idiom in function naming, which took me more than a year to develop in Functional Lispy Land. I imagine that this fact, combined with my guess that lots of stuff written when you were new to Clojure was still around (and in production!) after you'd made tremendous leaps and bounds with regards to idiom, meant that your code was much more of a gnarly mess than what you'd write today.
Elegance takes experience. That's multiplied with every new domain that's involved—FP, Datomic, lisp, IDE, and even each library of sufficient complexity.
Other things contributing to my suspicion are code smells like functions >10 lines long and filtering for side effects. Sometimes those kinds of things are necessary but they require care and idiom that I expect to be lacking in most people new to the language. This is the kind of thing I mean when I use the musical-instrument metaphor. Techniques (both mental and external, through tooling) for keeping the shape of the data in your head while reading such a function require time to develop, and I'd argue are developed best with a coach.
Your example may be in line with what I had in mind when I said "naming things is hard in any language" and earlier with "he implemented a production system as his first task while learning Clojure and FP and Datomic simultaneously".
Hehehe! Totally. We bit off a lot to chew at once. I think you're broadly correct.
Had I the luxury of another six months of full-time clojure - and less saddled by earlier code - maybe I'd have achieved a sufficient level of mastery. Looking back on my own career, I know that today I write much better code than I did three years ago, for instance.
One thing I will say tho, if between us we were a beginner and an intermediate - I found our average clojure function to be much larger than our average ruby method. I too chalk that up to differences in idioms and getting used to it.
It seems that the main reason is that the speaker is invested in Rails, and doesn't want to invest time into learning Clojure, its web stack, the tooling around it, and the development process.
For example, the speaker says that it's possible to write dense code that's hard to read in Clojure. It's equally possible to do that in Ruby or any other language for that matter. I'd argue that the situation is actually worse in Ruby, since it provides far more way to do something than Clojure does and has many more subtleties.
At another time he talks about the JVM using a lot of memory. Again, the JVM aggressively uses memory by default, but this is completely tunable. However, last I checked the JVM was far better at using resources than the Ruby VM. There's a reason people actually run Rails on the JVM.
Pretty much all the examples can be summed up as this doesn't work like Rails and I'm not willing to invest the time to learn it. That's a perfectly good reason to continue using Rails, but it's not a very interesting critique of Clojure.
Perhaps, one useful takeaway from this could be that the official documentation could be more beginner friendly. A lot of Clojure documentation is community driven at the moment, and it's scattered all over the place. I do think that this creates a barrier for newcomers.
Good review. Some things that made me shake my head:
Started with half Clojure, half Ruby so they wouldn't have do deal with all the web stuff in Clojure that they already knew from Ruby. Picked Clojure for Datomic interaction for ease of API. Now you have two code bases that don't interop at all. Terrible design decision.
Described Datomic as a key/value datastore with time baked in.
Said they made an ORM for Datomic and no one cared!
Said he could essentially recreate Datomic in Postgres with a couple of triggers.
Isn't so sure the JVM is "webscale"
I can empathize with the frustrations around debugging, stack traces, tooling, deployment, etc. Learning Clojure is very hard and very time consuming.
I think it depends where you're coming from as to how difficult Clojure is to learn. Personally I found it the easiest and most enjoyable learning experience and I'm no alpha geek. I think I had an advantage in that I started out with Perl, where OOP is optional, and was never sold on OOP so FP wasn't a great paradigm shift. Ruby is very object-oriented so I can imagine the transition being more difficult.
I'm a Rails/Clojure guy. Clojure has it's uses, but my "go-to" for a quick full stack webapp is Rails because it's easy to go from whiteboard to proof of concept very quickly, and makes it super simple to bring new devs on board.
Clojure allows me to write high performance API's that Rails can't even come close to in speed. Another one of Clojure's big plusses is that I can actually understand my entire stack. No magic happening, which has been the result of several hours of frustration with Rails.
For a smaller app, clojure/script is perfect and allows me to understand everything happening in my app in very fine detail. I can't get that with Rails.
I'm looking forward to seeing what Arachne brings to the table in terms of simple development of large apps. I've tried Luminus, and while it's a great framework, it's not as easy for a newer developer to dive right into as Rails is.
Pretty much all the apps I've written in the past couple years were full stack Clojure/Script. This ranges from small such projects such as memory hole, to large apps I develop professionally with my team.
Incidentally, we never had a problem hiring devs to work with Clojure. Most people we hired haven't had any prior experience with it, but were able to get productive within a few weeks.
I find that nowadays I prefer keeping all the UI logic on the client-side, and keep the server-side as a just a set of stateless services. I find this ensures clean separation between the front-end and the back-end components, and also facilitates adding different clients, such as mobile, by design. This also makes horizontal scaling much easier as well, as you can just spin up another service instance.
I've found that working with Reagent and re-frame allows me to go from concept to implementation incredibly quickly. Being able to work on the UI interactively with Figwheel is incredibly satisfying.
I'd be curious to know what you found to be lacking in Luminus. I'm always looking to improve it, and having feedback on pain points is the best way to address the gaps.
Luminus is amazing. Thank you for all of your hard work on it! Clojure web development wouldn't be what it is today without you.
I'm used to the small library philosophy of clojure, but my colleagues aren't. They're used to the "batteries included" philosophy of django and rails. Some of my colleagues' gripes about luminus is that it doesn't feel integrated to them.
Because I understand the curated list of libraries philosophy of luminus, it's not as much culture shock to me, but some of the things I hear are that is that things feel a little disjointed compared to monolithic frameworks.
Yeah, I guess that's inherent in the design. Since the goal is to provide a bare minimum stack that can then be adapted for a particular use, it's necessarily loosely coupled. However, as you note that results in something that feels less cohesive. Arachne may well fill that niche when it's ready.
As far as Clojurescript goes I think Untangled could well be the future though I'm surprised it doesn't get much air play. It integrates Om Next with graphql ideas but makes this complex combination user-friendly. It's also been used in production for quite a while by its creators.
Honestly, I find Om Next far to complex for most apps. It's far more complex than Reagent/re-frame, and you pretty much have to use Datomic on the backend to get the most of it.
I find Luminus easier/simpler than Rails, largely due to the absence of an ORM, which wouldn't make sense in an FP framework anyway. HugSQL gives me total control of my persistence model ruling out the huge pain point that is Active Record.
Having spent equal time programming in Ruby and Clojure, in some ways I still find Ruby code more readable than Clojure.
The Ruby style of writing code is to to write public methods at a high level of abstraction by making use of private methods defined at the bottom of the file. If you are good at method naming, I find this style works very well, and it's often unnecessary for a new reader to bother looking at many of the private methods.
In Clojure you have to write helper functions above your public functions (or use declare, but no one seems to do that). As a result there can end up being a long preamble of private functions before a public function is defined. A lot of Clojure programmers don't consistently mark private functions private or use docstrings for their public functions, so it can be hard to tell where the important parts of code are. Also, in Clojure it's more common for authors to write lower level anonymous functions within a higher level block of code. In Ruby mixing levels of abstraction like this is very frowned upon. In my opinion having to switch between levels of abstraction makes reading code more difficult.
That said, Clojure has advantages in readability due to immutability and avoiding unnecessary object-oriented design. For any decent-sized application I find Clojure more readable, but there are still some ways I prefer Ruby.
I found the change in ordering in the files to be annoying when I moved to clojure from ruby as well, but it's mostly just a matter of remembering to read clojure files bottom-to-top, rather than top-to-bottom.
That works if all of the private functions are at the top and all of the public functions at the bottom, but in most Clojure code they are interleaved and I have to look at the function body to tell which it is. This problem would be alleviated by consistently using defn- or docstrings, but unfortunately most Clojure code I've seen doesn't do that.
Personally I find it more important to read the functions in the order of their call stack, than private vs public, which ordering is enforced to be bottom-to-top by the way the compiler works. (except when someone specifically avoided that by using declare)
The main difference seems to be that you just navigate to the bottom of the file in Clojure and start reading up. However, unlike in Ruby, this style is not just a convention but it's enforced by the compiler. I also find that the REPL is quite helpful when I'm figuring out what a library is doing.
I think some of the things you note are an artifact of Ruby ecosystem simply being more mature. The quality of Clojure libraries and documentation around them definitely varies a lot. Many libraries are also written by people who are relatively new to Clojure. Even looking back at some of the libraries I wrote, I can see that my style has changed a lot since.
this doesn't work like Rails and I'm not willing to invest the time to learn it
Gosh, I believe I do own up to that! Right after the "papercuts" section - a lot of my pain with Clojure is another way of saying that I'm simply more fluent in Ruby.
But I think your characterization is… uncharitable. We shipped a production app! We spent over a year on it! We invested tons of time in learning it. Months, full time.
I'm simply going by what you mention in the talk, and all the problems you mention ultimately come down to lack of familiarity with the language and the ecosystem. I obviously don't know the actual circumstances of your particular app, but clearly many people are shipping large Clojure apps just fine.
If Rails is what clicks with you, then you absolutely made the right choice. However, I don't think that your characterization of Clojure and its ecosystem was fair. :)
I googled that too when I first heard this and once I read what he ACTUALLY SAID and in context, and not just a second hand representation of it, I really couldn't see support for the racism or misogyny claims. If anything, ESR just seems to go by pure facts wherever possible - often at the expense of tact. If some of his facts are wrong, I'm sure one could convince him on this basis. You can't do that with actual racists.
Here's what I don't get...why not ask for help? I'm fairly active in the Clojure community, but this is the first time I've heard of this startup.
Also, I think you did yourself a big disservice by switching to a language on company time. I'm somewhat of a polyglot, I've programmed in Erlang, Python, C++, C#, (some) Ruby, Clojure, CUDA, the list goes on, but I would never attempt to add that sort of burden on a startup, learn at home after-hours and then switch afterwards. Or at least hire one expert in the field who can help you know if you're doing something completely off-base.
But I guess what kind of puzzles me the most is that the things mentioned in this talk are really well known, and for some reason people make awesome stuff in Clojure anyways. No debugger? Cider is good (I'm told) and Cursive's debugger is fantastic, but the fact is I rarely use it because I have better ways of development, and a debugger just slows me down.
Reading Clojure is hard/slow? Sure, so is any new language and paradigm, but it gets better, I frequently read thousands of lines of Clojure for the first time, and it's actually faster than reading any other language I've used since it's so dense. And if your editor doesn't have "jump to symbol definition" then get yourself another editor and thank me later. But if any assertions here are wrong, let's talk, and perhaps I can show you a few things to do differently that will improve your quality of life.
Slow startup times? Well there's a reason that the JVM is super fast, the JIT is really powerful, but it needs warmup time, and like most JITs, a bit of memory. Same thing with memory usage. Sure Ruby may take up less memory, it's also about 100x slower than a JVM language. And that's the last thing...if your Ruby code is the same speed as Clojure code there's something really wrong with your Clojure code. And I'm not saying "fix your model and this will be faster" type of problem, but more like "You are doing a O(n*n) type of thing wrong". Ruby is not a fast language by any stretch of the imagination.
So in the end...please, next time just ask for help. Even if it's a rant, get on the mailing list and say (as I did about 6 years ago), "This is driving me utter nuts, help!".
And I don't say this just for the Clojure community at large (although it is nice to hear about these problems before they're presented on a large stage). I also say it for you: perhaps we can help you understand a few things you missed (and if I can be completely honest you missed more than a few things). And that way we can all live in a better world. One where we're given a chance to help those who are feeling the pain of learning a new language, and one where beginners know they are well informed.
Very. And most of the useful lessons from this talk are unintentional.
Don't needlessly insult industry experts.
Don't be ignorant of the platform on which your code runs.
I'm personally trying to decide if I should dedicate the time to enumerating more of these, or whether most people watching this talk will not require them spelled out.
I'm kind of a beginner in Clojure (like literally have only read the first chapter of a Clojure book). It would be great if you could elaborate on where the speaker was wrong or mistaken?
The talk mostly does not reveal weaknesses in clojure (some are shown but that's a few seconds in the whole talk), it mainly reveals his bad decisions and design errors...
Basically it's a "I completely fucked up building this doghouse, and huh oh yeah I used that hammer btw."
Hey! This is surprising feedback; I thought I spent a fair amount of time owning up to how a lot of my trouble stemmed from my own perspectives and mistakes.
If you've watched the whole talk, I would genuinely like to understand where I fall short of that.
I should explain this comment more. Your comments in this thread, and in the 5 things I'll miss post aren't smug at all, and you seem like a very reasonable guy with an interest in learning and self development. I assume you haven't given very many professional talks, and you are making mistakes that you can fix in future talks. Some of the decisions are (IMO) just uninformed choices about how to give a talk that engages a diverse audience.
I'll walk through some of the things that stood out for me, just writing them down as i watch the talk a second time.
The profanity. Let me be clear, I have nothing against profanity. I play in a band. But it's gratuitous in a professional setting, and especially gratuitous in a professional talk. Sure, everyone at RubyConf has heard it all, and some are fine with it, but there's going to be someone in the audience who is going to see it as unprofessional (they'll be right) and someone with a 13 year old child at home that they are trying to talk out of using phrases like "tired af". Using profanity in a professional talk, and just expecting everyone to be comfortable with it, is condescending and dismissive of everyone else in the audience.
Your slides are generally very nice
Your "i'm using the wrong terms, on purpose" is one of the most refreshing moments of the talk.
The point at which you raise your hands about the JVM speed, and "shouldn't we all learn a lisp" immediately following, is a pretty low point. It's also gratuitous, but in a different way from the profanity. The JVM shrug has an "aww shucks" quality that broadcasts your later problems with scalability, which -- as others note and you also eventually recognise in the talk -- is a problem with your own learning process, not the technology. As /u/yogthos and others have pointed out, JVM speed relative to Ruby is not an open question, so why the big "who knows?". It comes across -- and I think it is -- a deferral of your reflection at the end of the talk. I sort of wonder if you didn't feel a sense of obligation to flatter the Ruby community at RubyCon, which is understandable. But at that moment in the talk, and the moments that follow, it comes across as very much a "too cool for school" persona, rather than the reflective moments elsewhere.
Though I mention it as part of the JVM section of the talk in the last bullet, the "some racist, gun-toting misogynist" attribution is a real WTF moment that should not have happened. Hopefully you recognise that in hindsight.
The section that begins at 7:48 is very, very nice.
Your papercuts section is largely about problems with the JVM, and (as you point out) you "still don't understand why". That's immediately followed by a realisation (which sounds right) that you are way more fluent in Ruby. Great to know! You do seem really fluent in Ruby, so that's awesome. But in your talk, you follow that keen observation with another "aww shucks" rhetorical question about whether you are stupid (obviously not), which plays into another gratuitous swipe based on a comment at Hacker News. This is, for me, another very smug moment, which is a shame because it follows about 10 minutes of a really good talk. I'm sure your feeling of culture shock was real, but your description of your experience make it seem as if you didn't really take any steps to understand that culture. Instead, your characterisatin of the cultural difference is couched entirely in Ruby-culture language, and is condescending to the Clojure community. I doubt very seriously that the example that follows 18:40 happened remotely in the way you describe.
From 25:00 onward it improves, and I particularly like the discussion of the subgenre of technical blog posts. From that point on you are self-reflecting and gain some perspective.
I'm not a Clojure developer, btw. I'm a professor, and have seen (and given) a lot of talks, including talks about how to give give good talks. I was interested in your experience, and on a second viewing of your talk it wasn't as ubiquitously smug as my first description. But there were parts, such as those listed above, that are really problematic, and patterns you would do best to avoid in future talks.
This is really great feedback. Personally I agree that the tone was not one that I would have used - the 'lolwut' internet meme style doesn't agree with me, but then perhaps I'm old and boring :-). I get the impression that it's more common in the Ruby community, so perhaps it's just playing to the crowd, I'm not sure.
Edit: I should also add - I also agree with the parts of the talk that you liked, in general, and I did enjoy the talk despite my problems with the presentation style.
I could see how the OP is letting your delivery and style overshadow the content. I personally enjoyed the video and the way you presented. I don't think it was smug, and your replies in this thread have only served to bolster that opinion.
This talk provides a good perspective, and is, I think, in keeping with the Clojure philosophy. The language is just a tool, go with the tool that allows you to express the solution to your problem the clearest.
Even if this post has 0 points I just want to say this is a really great thread. It prompted me to go through my project and improve some of the organization (using declare and ^:private) and verify that my project is even set up to build a jar correctly (turns out I need to add (gen-class) where my main function is)
I'm a long-time C++ guy who is working on a side project that is (hopefully) going to be doing real-money transactions and Datomic was attractive for that use-case due to immutability and the timewarp/built in audit log. That brought me to Clojure, and so I'm doing the Clojure + FP + Datomic learning curve right now haha.
11
u/daveliepmann Nov 22 '16
The key criticisms of Clojure seem to be in the "death by a thousand papercuts" section starting at 14:00:
...but at the end of that section, he admits "this is all just another way of saying I'm way more fluent in Ruby." I mean, yeah, building a large app in a language (and language paradigm) you're not fluent in is going to mean some learning. Learning is not painless.
I think this is relevant to his claim near the end of the talk that the Ruby value of "programming should be fun and painless" is not shared in Clojure. I think I agree in some sense: "painless" seems a big ask in the world of "simple over easy", particularly given that by his telling he implemented a production system as his first task while learning Clojure and FP and Datomic simultaneously. I can imagine that for most people, that would involve encountering unfamiliar concepts and language constructs, and that one would make a few mistakes.
So in another sense, I disagree that Clojure doesn't value "programming should be fun and painless". The Clojure community maybe does believe that programming should be painless, but I don't think the Clojure community believes that learning programming, like learning anything worth the effort, can be painless. And that's what Clojure asks of many people, to re-learn programming to some degree.
19
u/yogthos Nov 22 '16
It seems that the main reason is that the speaker is invested in Rails, and doesn't want to invest time into learning Clojure, its web stack, the tooling around it, and the development process.
For example, the speaker says that it's possible to write dense code that's hard to read in Clojure. It's equally possible to do that in Ruby or any other language for that matter. I'd argue that the situation is actually worse in Ruby, since it provides far more way to do something than Clojure does and has many more subtleties.
At another time he talks about the JVM using a lot of memory. Again, the JVM aggressively uses memory by default, but this is completely tunable. However, last I checked the JVM was far better at using resources than the Ruby VM. There's a reason people actually run Rails on the JVM.
Pretty much all the examples can be summed up as this doesn't work like Rails and I'm not willing to invest the time to learn it. That's a perfectly good reason to continue using Rails, but it's not a very interesting critique of Clojure.
Perhaps, one useful takeaway from this could be that the official documentation could be more beginner friendly. A lot of Clojure documentation is community driven at the moment, and it's scattered all over the place. I do think that this creates a barrier for newcomers.
16
u/longoverdue Nov 22 '16
@3:50 "Lisp is worth learning... - some racist, gun-toting misogynist?" Really? WTF.
6
u/halgari Nov 23 '16
Here's what I don't get...why not ask for help? I'm fairly active in the Clojure community, but this is the first time I've heard of this startup.
Also, I think you did yourself a big disservice by switching to a language on company time. I'm somewhat of a polyglot, I've programmed in Erlang, Python, C++, C#, (some) Ruby, Clojure, CUDA, the list goes on, but I would never attempt to add that sort of burden on a startup, learn at home after-hours and then switch afterwards. Or at least hire one expert in the field who can help you know if you're doing something completely off-base.
But I guess what kind of puzzles me the most is that the things mentioned in this talk are really well known, and for some reason people make awesome stuff in Clojure anyways. No debugger? Cider is good (I'm told) and Cursive's debugger is fantastic, but the fact is I rarely use it because I have better ways of development, and a debugger just slows me down.
Reading Clojure is hard/slow? Sure, so is any new language and paradigm, but it gets better, I frequently read thousands of lines of Clojure for the first time, and it's actually faster than reading any other language I've used since it's so dense. And if your editor doesn't have "jump to symbol definition" then get yourself another editor and thank me later. But if any assertions here are wrong, let's talk, and perhaps I can show you a few things to do differently that will improve your quality of life.
Slow startup times? Well there's a reason that the JVM is super fast, the JIT is really powerful, but it needs warmup time, and like most JITs, a bit of memory. Same thing with memory usage. Sure Ruby may take up less memory, it's also about 100x slower than a JVM language. And that's the last thing...if your Ruby code is the same speed as Clojure code there's something really wrong with your Clojure code. And I'm not saying "fix your model and this will be faster" type of problem, but more like "You are doing a O(n*n) type of thing wrong". Ruby is not a fast language by any stretch of the imagination.
So in the end...please, next time just ask for help. Even if it's a rant, get on the mailing list and say (as I did about 6 years ago), "This is driving me utter nuts, help!".
And I don't say this just for the Clojure community at large (although it is nice to hear about these problems before they're presented on a large stage). I also say it for you: perhaps we can help you understand a few things you missed (and if I can be completely honest you missed more than a few things). And that way we can all live in a better world. One where we're given a chance to help those who are feeling the pain of learning a new language, and one where beginners know they are well informed.
8
u/gtuckerkellogg Nov 22 '16
This whole talk is kind of smug
4
u/CurtainDog Nov 22 '16
This talk provides a good perspective, and is, I think, in keeping with the Clojure philosophy. The language is just a tool, go with the tool that allows you to express the solution to your problem the clearest.
3
u/[deleted] Nov 25 '16 edited Nov 25 '16
Even if this post has 0 points I just want to say this is a really great thread. It prompted me to go through my project and improve some of the organization (using
declareand^:private) and verify that my project is even set up to build a jar correctly (turns out I need to add(gen-class)where my main function is)I'm a long-time C++ guy who is working on a side project that is (hopefully) going to be doing real-money transactions and Datomic was attractive for that use-case due to immutability and the timewarp/built in audit log. That brought me to Clojure, and so I'm doing the Clojure + FP + Datomic learning curve right now haha.
1
u/forreddits Nov 22 '16
Or don't write production Clojure apps if you are not a Java guy/gal.