9 ms·
A Clojure learning journey
- jxub 9y agoThis 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 9y ago> 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.
- gkya 9y agoThe best value a language can provide is the community around it. That is, the amount of high quality libraries out there. And the choices, when coming from this stance, are a handful: .Net and JVM ecosystems, Python, C/C++, then Perl and Ruby to some extent. With these, you know most of the generic things you'll need to have in order to do the specific thing you want to do are available to you. Equally important the amount of documentation and literature out there. The actual language features, syntax, etc., all come after this. First of all, a language has to have some giants with nice stable shoulders.
- 20171026 9y agoWould you share info about how you transitioned out of coding? I'm looking to do the same.
- jacquesm 9y agoIt was mostly co-incidence and some luck. After a few thousand sweaters the next one is probably similar to one that you already made so I got bored and ended up burning out. That left me without desire to work on anything computer related, I bought a farm in Canada, moved there and ended up working on a windmill. The websites I was running still contributed some income so I wasn't particularly worried about running dry. Making the windmill required some tools, one of which was a computer controlled plasma cutter that I could not afford ready made and so I ended up cobbling it together. There was a little bit of software involved in that but nothing that occupied me for more than a few days. The windmill design process involved rather more software but still it was peripheral to the rest of the work. Then, in 2007 after returning back to NL I invested in a bunch of start-ups and at one of those a co-investor asked me if I wanted to do technical due diligence for a colleague, which turned out to be Endeit Capital, a well respected Dutch VC. One thing leading to another we are now working together for a decade+ and they've sent me lots of other customers as well so I'm nearly full time busy with this. In the intermediate I also ran ww.com/camarades.com until enough money came in through the DD's that I no longer needed that income, I sold of all the assets in 2015.
- dkersten 9y ago> so I got bored and ended up burning out. That left me without desire to work on anything computer related, I've been finding myself like this lately :( Sadly, I can't afford to buy a farm but working on a windmill sounds awesome! I've lately spent a lot of my time learning sleight of hand and magic illusions, but I don't expect I'll ever make any real money out of it, I'm just not a natural showman. I'll stick to software since its the only real marketable skill I have, but it is rather frustrating. I do love Clojure, though, but there's not much Clojure work where I am. Thanks for sharing your story, its inspiring.
- 9y ago
- emidln 9y agoI 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 9y agoBut 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 9y agoIt 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 9y agoTo 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
- socksy 9y ago"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." I'm not sure that follows. Even if you choose to specialise in one stack, it is healthy to see a diversity of solutions and opinions/trade-offs in solving similar problems across different stacks. Even if you don't end up mastering any of those, exposure to those can help inform how you approach problems in other languages. A lot of great ideas in modern ecosystems were stolen/inspired from lateral solutions (e.g. using immutable datastructures with React from the ClojureScript world, Netflix's Falcor influencing om.next in the other direction).
- whalesalad 9y agoNot 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.
- deleted 9y ago[deleted]
- robstu 9y agoIt wasn't so much about ditching Lein as it was taking a clean-slate opportunity to learn and understand the new CLI tooling. Nothing wrong with Lein at all! Knobs and dials: this is true of every eco-system, wouldn't you say? Is 2018 the year of the linux desktop, finally? :-) I agree that Clojure has a lot. Right assumes a known context. Do what is right for you. Sometimes, that's Knob A, and sometimes that's Dial B. The fun is in figuring it out.
- spiralganglion 9y agoAs a newcomer, I want sensible defaults. I want a Rails. Let me wait to learn the knobs and dials when I’ve got enough base knowledge to evaluate them fairly.
- akmiller 9y agoLuminusWeb is a great option for that. The generated code is simple to grasp and change as your knowledge grows. http://www.luminusweb.net/ http://www.luminusweb.net/
- agumonkey 9y agoFascinating how large it is.. it's more than a learning.. or at least it's deep learning (sic).
- scardine 9y agoI 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 9y agoHaving 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 9y agoCoding tests aren't always the problem, but coding tests that evaluate skills the company doesn't even use? That's just disrespectful.
- jcadam 9y agoYea, a proper technical interview needs have more breadth to mean anything. This question is pretty dang close to esoteric language features trivia. Which would have flustered me when I was young, but now just makes me angry and I'd probably (want to) launch a dry-erase marker at your head.
- piercebot 9y agoZippers! This is definitely a knowledge gap for me; thank you for putting a name to a thing that I've encountered in the wild. Here's a good article I've found with information about them: http://josf.info/blog/2014/03/21/getting-acquainted-with-clojure-zippers/ http://josf.info/blog/2014/03/21/getting-acquainted-with-clo...
- jgh 9y agoI 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)
- Double_a_92 9y agoI 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...
- robstu 9y agoThis is exactly the reason I'm doing this :-) From my past efforts, I can offer you https://github.com/cognician/datomic-doc https://github.com/cognician/datomic-doc, which is a riff on the idea of marrying a Markdown editor to doc strings on entities in a Datomic database. It exposes a handful of Ring handlers as a library, so you can plug it into any Ring web app that uses Datomic and get a turn-key tech doc system. It's a complete Clojure/ClojureScript/Datomic application, and it's only 800 lines. I hope it helps you, and feedback is totally welcome! As for 'book learning'; Living Clojure by Carin Meier is currently in the USD 1 Humble Bundle at https://www.humblebundle.com/books/functional-programming-books https://www.humblebundle.com/books/functional-programming-bo.... It has a 13 week FP course in it. Highly recommended.
- fiddlerwoaroof 9y agoIt’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 9y ago>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 9y agoWhile 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
- pvinis 9y agoEverytime 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 9y agoI 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 9y agoCan 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.
- tensor 9y agoFigwheel gives you a fantastic live coding type environment experience on the frontend. I'd suggest checking out the 6 minute demo linked here to really get what it does: https://github.com/bhauman/lein-figwheel https://github.com/bhauman/lein-figwheel
- jrheard2 9y ago[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-board-game http://blog.jrheard.com/quinto-resurrecting-an-abandoned-boa...
- lilactown 9y agoI think everyone goes through this when they're newish to clojure - it's a recognized deficiency in the ecosystem, and one that needs to be solved sooner than later. However, I will say that once you "pick your poison" and get used to a specific workflow, it becomes vastly easier. The same set of tools work for pretty much any kind of project. Stuart Halloway gives a great talk[0] where he drunkenly expounds on the importance of REPL driven development and explains his workflow. Honestly, this changed the way I work day-to-day for the better and helped me realize the power that tools like Emacs and Cursive give you; specifically, in-editor evaluation of forms. For me, I use leiningen for building/dependencies and Emacs/CIDER for my editor. Another good choice is Cursive. Then split it up by what runtime I'm targetting: Clojure/JVM: - mount for state - ring for HTTP services - clj-http for HTTP requests ClojureScript/JS: - shadow-cljs for building (with lein integration) - mount for state - macchiato for HTTP services - cljs-http for HTTP requests - reagent for UI These tools & libraries cover about 80-90% of what I need in a new project, and everything after that is specific to the use case. Wading through one or two self-contained projects goes a long way into helping you figure out your workflow, and afterwards it's just applying it. My hope is that in the near future, a lot of the initial friction will be wicked away from the tooling and people will be able to get spun up much faster. Advanced Clojure workflow is a very different way of developing software than most people are used to, though. [0]: https://vimeo.com/223309989 https://vimeo.com/223309989