20 ms·
How much can a Clojure developer do alone?
- sharms 6y agoI really enjoy reading anecdotes like the above. Programming languages are how we express intent to systems, and a complex enough domain where quantifying the tradeoffs is sufficiently difficult. Teams can succeed or fail using any language, but there is a tangible factor somewhere between the language, available libraries and practitioners.
- datahead 6y agoGreat article. Even in a large enterprise, where the prevailing organizational ideology centers around building the largest headcount you can for political sway... I've kept my team small on purpose, and we were able to be very effective by adopting clojure. We have sway because we deliver- and that's a different type of leverage than headcount. We don't get thrown every hot potato, instead we're consistently aligned with the critical portfolios. A small dedicated team with tools such as clojure will outdeliver, and outcompete a larger team who cannot remain agile and require significant overhead to manage. I'm basically rehashing PG's 'Beating the Averages', but it's been my experience as a dev mgr. http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html
- dasil003 6y agoThis totally makes sense in a startup context, but how does this work in a large enterprise? For instance, who signs off on "critical portfolios" being migrated to clojure, and who maintains these pieces when your team moves onto the next project?
- datahead 6y agoFirst, if you haven't worked in a large "non-tech" enterprise, you might be surprised to find out it's just 100 startups with a common name and financing. The bigger the company, the less technical cohesion across teams. It's a blessing and a curse. I'm technically in a "business unit" as opposed to IT, so we're more focused on tangible KPIs. When you turn around innovative results in the biz domain consistently, no one really questions your tooling. We started a new space Data Eng/ Data Sci and then it became critical. We've been able to maintain products by building long term platforms/systems that meet current and (anticipated) future needs in clojure. Initially, product and platform/system was all the same team. We've grown a little and now individuals tend to focus more on one or the other, but we're still <15 eng and shipping daily. We maintain everything we've built to date, and we planned for that going in. Clojure's other superpower is that it is stable AF over long periods of time, handles refactors and testing well. As for signoff in adopting clojure... our VP is old hat in clojure/lisp. We got lucky.
- klibertp 6y ago> There is no other language that places such an emphasis on programming directly with plain and naked data literals. Counterexamples: Erlang and Elixir. Arguably also Prolog. Also Lua. Many Schemes, and Racket. Of course, REBOL and Red. TCL probably, too. I can't help but think that people making claims of "no other language has X" are in most cases wrong, and should study a bit more before making them. There's a lot of hype in the article, I don't want to diminish the value of REPL-based workflows or conciseness[1] of the language, but the overall message that any fresh graduate can become a 10x programmer in under a month... Well, there's at least nothing humble about it, despite the article touting "humility" as a virtue of prospective Clojurists. [1] Why aren't we all writing in APL/K/J if it matters that much?
- bobthechef 6y agoI also thought the bit about fresh graduates having no pride rather blanket. There are plenty of prideful fresh graduates with the kind of pride that experience hasn't yet tempered to produce a humble respect for the fact that you will die knowing next to nothing. Sadly, even some old timers never catch on to that.
- FPGAhacker 6y agoI haven’t written any Clojure for a few years now. So my knowledge and technique is out of date, but I have a contrary opinion on “repl driven” development vs many Clojure advocates. In short: your repl compiled code is state that you now have to track in your head. Yeah, great, you can compile a single function and it hot loads. It’s pretty awesome for experimenting and debug, but the longer your repl session is open and the more you change and compile, the more likely you are going to end up with a mixed state in memory that does not reflect how your program would behave if run from scratch. You are going to forget to save a change or your manual tinkering with a data structure will leave it inconsistent. These errors accumulate, like navigation error with an IMU. It’s got use cases for sure, and I miss hot reloading when I’m debugging in other languages, but it is far from being the ultimate feature a language can have.
- huahaiy 6y ago
- jwr 6y agoI'm running my own fairly successful self-funded business, largely thanks to Clojure and ClojureScript, which let me reduce incidental complexity and focus on what matters. So yes, a Clojure developer can do quite a bit alone :-)
- csbartus 6y agoI envy you :) I can't get my head out from the Javascript ecosystem ... and previously I've done PHP ... Those two made me think to quit programming, but lately I've found new ways like ClojureScript and ReScript. After 15 years I came to a conclusion: choose a smaller and better language vs a popular one with a huge ecosystem.
- sli 6y agoNearly every compile-to-JS language is a better choice than JS unless you really, truly need something legacy. The exception might be Coffeescript, but even that's not bad, it just add a whole lot. Even then I'm certain you can find a modern language that can target, say, ES3. I've never needed that, so I won't claim to know any off the top of my head. But it doesn't matter, because you could simply pass the output through Babel as a last resort. Yeah, yeah another build step, but I consider almost anything as preferable to use Javascript or Typescript. These days all my would-be Javascript projects are done with CLJS, Elm, or maybe PureScript if I want to do something fancy with types (or don't want to deal with particular Elm quirks).
- csbartus 6y agoInteresting mix :) I wonder why CLJS / Reagent is not enough, and where the others step in... I mean in my fantasy CLJS / Lisp is so powerful one never looks back to languages relying on commas and colons
- cyberbanjo 6y agoClojure uses colons for :keywords, and commas for unquote.
- prennert 6y ago> I am not using the REPL much, am I doing something wrong? Applies to python, too. I am always surprised if developers and data scientists working with python don't know that ipython, and by extension the python Jupiter kernels, come with a repl that hotloads code changes from local installs: %load_ext autoreload %autoreload 2 Is usually my first cell in a notebook. Repls are so powerful. The repl like behavior of flutter is also why our mobile dev likes it so much.
- devoutsalsa 6y agoI like Python, but the using the REPL w/ Python's indentation is not fun for me.
- kristjansson 6y agoI'd venture a guess that anyone advocating REPL-based development in Python is pitching IPython/Jupyter. IPython's REPL supports multi-line editing, trims common leading whitespace from pasted input, among a whole host of other features. The standard REPL is definitely painful for all but the most basic tasks.
- alex_smart 6y agoThat's why you write code in your editor, and just ask your editor to send code to the REPL.
- devoutsalsa 6y agoWhy not just run the file? To be more specific, I get a lot of value out of Ruby, Elixir, and JavaScript REPLs because I can type right into them to try stuff out in one long, ridiculous command. If I have to type in a file, I'm just gonna run the file & print the result.
- alex_smart 6y ago>Why not just run the file? It's faster. That's the point of using a REPL. >To be more specific, I get a lot of value out of Ruby, Elixir, and JavaScript REPLs because I can type right into them to try stuff out in one long, ridiculous command. You can type long, ridiculous commands in a file too. Just clean it up as you go along. I like to use my editor to send inputs to the REPL instead of typing directly into the REPL because different REPLs provide different editing experiences. Using my editor means all the editing features I like to use are always available.
- jdminhbg 6y agoThe description here of using the Clojure REPL for development is one of the best I've seen. I think part of the issue is nomenclature -- Read Eval Print Loop applies to lots of systems in lots of languages that many devs are familiar with that are not really what Clojure devs mean when they say "REPL." The actual experience is closer to something like Smalltalk where you alter a running system and experiment with it incrementally.
- quasarj 6y agoI guess I need to watch some of the videos he links, because this sounds horrible to me. I mostly work in Python, which has a repl (though I'm sure not as complete) and sometimes I poke around in it. But if I am working on a real project, or even just a small script, I always want to run it from the beginning on every invocation, because anything short of that is not proof that it works. "Editing a running system" sounds like a nightmare! How could you ever know things would actually work?!
- dimovich 6y agoI see REPL driven development more akin to writing music. I pick up the guitar and start playing. I can work on a small fragment and improve it until it sounds good to me. Or I can play the whole song. At all times I have instant feedback and I can hear what I'm working on. In the case of the REPL you are playing your program. You can play a file, a function, or half of a function. Until it sounds right. I lack the skill to use music notation for composition, so I rely on my instrument to give me feedback. And I lack the skill to execute the program in my head before I press compile, that's why I rely on the REPL.
- jdminhbg 6y ago> "Editing a running system" sounds like a nightmare! How could you ever know things would actually work?! This is why Clojure developers love immutable data and pure functions so much. Say I am writing a web frontend for managing a list of users, and I want to implement some kind of filter and grouping flow on them for some business reason. Since I know the users are immutable, I know that when I am evaluating code in the browser to test out exactly what filter logic is correct I am not actually changing anything about the system.
- dmortin 6y ago> Most people need some trainings to be able to get into something new. If they have not been taught REPL driven programming, I don't think they can discover it by themselves, despite maybe hearing others talking about it constantly. Does Emacs count? I don't know Clojure, but I learned elisp for programming emacs and I discovered myself the power of evaluating any part of the code I write on the fly, experimenting with it. It's really useful in practice.
- dimitar 6y agoEmacs definitely counts given Clojure is largely influenced by Common Lisp and the fact that Emacs is the most popular editor for editing Clojure.
- mattgreenrocks 6y agoBecause Clojure is not terribly fashionable, I imagine the developer pool is much smaller but the candidates are higher quality, mostly due to self-selecting. I really like the sentiment of empowering individual developers to the max. It's funny, a lot of organizations want to beat the averages whilst engineering in an identical fashion to their competitors. You're not going to consistently get outstanding results if you do the same thing as everyone else.
- marktangotango 6y ago> a lot of organizations want to beat the averages Bold assertion! I think a lot of orgs would love to be as good as average, joking aside.
- luckylion 6y ago> You're not going to consistently get outstanding results if you do the same thing as everyone else. I believe that they understand the premises the same way you do. So they can have 100 average developers or 10 great developers that are three times as effective. If your problem is one that no more than 10 people can work on, you'll take the 10 super experts. If it's not, you'll lose if you choose them because they'll be much slower.
- jolux 6y ago>You're not going to consistently get outstanding results if you do the same thing as everyone else. I think the tools matter a lot less than the people using them, and that programmers who perform above replacement level are rarer than is often discussed. I would take a great programmer writing the app in Java to a bad programmer writing the app in Clojure every day of the week.
- sdfsfsf3kjdf 6y ago> I imagine the developer pool is much smaller but the candidates are higher quality People always say this about their favorite niche language and it always feels a little too self serving with little evidence to back it up. Learning languages is relatively simple and enjoyable, especially when the overwhelming majority of those people never end up working on difficult problems in said language. I think it often gives a false sense of superiority as well.
- lukashrb 6y ago> Clojure is also ideal for a startup, where a couple of competent Clojure programmers can write a complex application that would took a huge team of developers in other languages years of work. There is a saying "if something sounds too good to be true, it probably is". I wonder how many other languages did the author try to know that clojure is the reason for his success? That being said, I really enjoy writing clojure and I absolutely love the interactive style of development. I hope more devs would try it so that it would get more traction in mainstream development.
- huahaiy 6y agoAuthor here. I started programming in 80s (yes I am old), so I probably know more languages than people who are younger than me. I also taught programming in universities in my previous life as a professor. Like I said in my article, I won't gave up my corporate research scientist job in my 40s to start a company if I had not known Clojure, knowing that I would be the only one writing code at the beginning.
- bionhoward 6y agoSerious question: is Clojure worth getting sucked into the complicated/verbose/nested Java ecosystem? I've avoided Clojure to avoid Java. Lately digging Rust...
- huahaiy 6y agoIt depends on what you mean by "worthing" it. To become a better programmer? Definitely worth it to know Clojure, as it does provide a new programming style that has inspired some other ecosystems. To find a job? Probably not. Clojure is not a popular language. On the other hand, nowadays you probably can get away with not knowing Java when doing Clojure. There are also Clojures that are not on the JVM. For example, if you do Clojurescript, then you probably need to know some Javascript. There are also natively compiled Clojures for shell scripting, e.g. babashka, etc.
- blacktriangle 6y agoIMHO.....no. If you're already a Java programmer or Android dev. the overlap with Java is a huge win. However I remember watching a talk that I believe Stuart Halloway gave where he tossed out the statement "if you're not using java.util.Queue to help with concurrency you're doing it wrong." My initial reaction was to think that is brilliant and would solve some of my issues with Clojure, but after that came this feeling of annoyance thinking how the hell was I supposed to know that?! Java rears its ugly head more than Clojure programmers are willing to admit. And even then you don't get the full reach of Java, for example try getting JavaFX and Clojure to play nice together, good luck with that. Faced with deep diving into the Java world to really get proficient at Clojure or looking elsewhere, personally I looked elsewhere and ended up over at Common Lisp.
- deleted 6y ago[deleted]
- roninhacker 6y agoDepends what you're into. I basically only use Clojure and can't remember the last time I had to know anything about Java. Admittedly I mostly use Clojurescript... But seriously, I wouldn't worry. You'll have to install Java, and then you won't have to think about Java ever again if you don't want to.
- SatvikBeri 6y agoI don't use Clojure, but I've applied some of its lessons to my work in Julia. The biggest one is the benefit of using simple, literal datatypes over classes/structs. If a function takes literals, you can just pick it up and run it, and if most of your code uses simple data types, it's more composable by default. The mini-project I'm working on now has just one custom type, if I had written it 2 years ago it would probably have ten. This has made a big difference in the testability and reusability of my functions.
- darioush 6y agoFunny how a lot of "work" on large scale code bases boils down to de-coupling code from the datatypes they never needed to be dependent on (eg, function takes obj but only needs obj.foo)
- SatvikBeri 6y agoIt's a problem without an easy solution. There are some cases where you genuinely want to couple fields together basically all the time (e.g. a database driver, address, etc. into a "DB" object) but there are many more cases where you want to couple fields together 80% of the time. Those are the hard ones to deal with - separate your fields, and you need to do a lot of redundant work, but if you combine them that can be a pain to unravel and slow down your loops. Julia's multiple dispatch is really helpful here, because you can e.g. write one connect_to_db that takes a DB object, and another that takes a string. I've found this flexibility to be surprisingly helpful, it completely takes away the tradeoff in many (not all) cases.
- A-Train 6y agoPretty interesting topic. I am all for composability. However, I don't necessarily agree with particular benefits of pure data literals. I feel more secure when I wrap even simple types like Strings so that ItemId, UserId is a String but I cannot interchange them. Similar level of composability with objects and structs can be achieved with generics and traits. I have a code that operates on arrays and matrices however particular implementations depend on the context - it is a DSL embedded into the application. For example I have `lazy matrices` that don't own the matrix or I can have matrices with owned data.
- MrPatan 6y agoHow much can 2 Clojure developers do together? Is it more or less than what one can do alone?
- niceairport 6y agoMy guess would be it largely depends on the devs in question. I also feel like this is true regardless of language.
- rjakobsson 6y agoJavascript became easier after learning Clojure
- niels_bom 6y agoI’d really like to see a video of someone doing this REPL driven development. I’ve never come across one though. Has anyone?
- mustermannBB 6y agoI like this video. IMHO it is a good example of REPL driven development. Nothing to do with typing things into the REPL. https://youtu.be/C-kF25fWTO8?t=1039 https://youtu.be/C-kF25fWTO8?t=1039