Live data from Hacker News

Building a Startup on Clojure

wobaka.com

211–215 of 215 posts

Re: Building a Startup on Clojure

#211

My company (as in "I work there," not "I own it") is I think unique in that it started as an Elixir/TypeScript shop, things went seriously downhill, they brought in a new engineering team (I'm on it), we switched to Clojure, and we're doing fine. If I were to start a new company I'd absolutely run it on clojure. Even without frontend/backend code reuse, REPL-driven dev--- paredit is the killer app for me. It just mak…

This might actually be the first thing I've seen pop up organically about Elixir that isn't red hot glowing praise. Can you elaborate on what was going wrong and if it was anything specific to Elixir/Typescript?

From what I can gather the old CTO did some things that were...less than ethical.

As far as the code goes, they wrote a custom DB that is O(nm) when counting tables---that is, it must count every record in the DB to count how many tables there are.

(Incidentally, I had forgotten this the other day and tried to do a "quick" table count...oops!)

I don't know Elixir or TS well enough to say if we have Ex/ts problems---from what I can tell:

- Elixir seems alright, I'd love to learn what the BEAM magic I keep hearing about is

- however, syntactically I find it pretty garbage, or at least uninspired. (Note that I am a spoiled Clojure guy and have this reaction to Python, Ruby, etc. I acknowledge people can get productive work done in them.)

- TS I have ha-ha-kinda-seriously trauma about from a previous job. I'm not a good person to ask here b/c I'm pretty firmly pro-dynamic in the Type wars. I will say that it is pretty freaking great to be able to have an emacs buffer open w/a repl to the cljs frontend we have for other apps, and that I really miss it whenever I have to go through the ts code.

Re: Building a Startup on Clojure

#212

Earlier quoted context omitted.

If Clojure was a bad tool then people wouldn't be using it in the first place. There is a big barrier to getting started with Clojure because it's semantically different from mainstream languages. The mere fact that people use it and there are successful companies built on it demonstrates that the language does provide value.

You can say that about every language that's ever been used in a successful business. By that argument PHP is about the best language out there.

Your argument is based on a fallacy. The whole reason PHP became popular was that it was easy to get started with. The barrier for using PHP or JavaScript is very low. The opposite is true for a language like Clojure.

Re: Building a Startup on Clojure

#213
post #89

Ah clojure. It's all fun and games until five years down the line, you've had 100% dev churn, and you have a 100kloc codebase that nobody understands, full of functions that don't give the slightest hint of the shape of the data they're processing (it's all lists!) yet down the bottom of the callstack there's some function that'll explode if the map doesn't have whatever magical key it expects. If you're really lucky…

Knowing how to design and structure maintainable code is a must for any successful code base to remain manageable over many years.

Clojure, in the hands of someone that knows this, works wonders. It gives your team 10x productivity, safer more correct code, that's simple to extend and grow over time, keeping your velocity high and your tech dept low.

But if you don't know how to leverage it's strengths, what best practices to follow, you can end up in a mess like that.

And this is true of all languages honestly. I've seen this for C++, Java, JavaScript, C#, Scala, all kind of code bases that suffered this same fate, with 100% team attrition, and all kind of other issues.

I say this from first hand experience, 6 years on a team that transitioned to Clojure, in that time the team rotated fully twice, during the pandemic it had 100% attrition, even I left (working on another team), but all the new developers, even though they have zero Clojure experience, had no issue understand the code base and start making improvements and building new features, velocity saw no impact whatsoever. You get the usual some of them would rather it be something their more familiar with, others are loving it, some don't care either way. But no complaints about the code base itself, no talks of spaghetti code, or challenges to debug anything, or understand what's going on.

Basically don't expect Clojure to save you from yourself, it's an asset when you know what you're doing, not a safeguard when you don't.

Re: Building a Startup on Clojure

#214

Earlier quoted context omitted.

As the saying goes, a bad workman always blames his tools. You can make a mess in any language, and Clojure is no exception. There are plenty of ways to mitigate the problems the author describes. A few of these things would be having coding standards to ensure that code is written in a way everyone is comfortable with. This also covers things like adding schemas and documentation for maintainability. Doing pairing a…

You can make a mess in any language, yes. But some languages tend to produce more messes than others. If your tool is mis-used more than other tools, at some point, it's not the fault of the users.

> If your tool is mis-used more than other tools, at some point, it's not the fault of the users

And Clojure isn't misused more than anything else. In fact, I've got a feeling it's less so.

The difference is just that you can scapegoat it, and people will believe you.

You can't blame Java for the failure of your project, cause everybody knows Java has worked fine for so many other teams, but nobody knows Clojure, so you can blame it for all your failures and people gives you the benefit of the doubt.

When you have a bad code base, and it's Java, people blame the people who wrote the code. When you have a bad code base and it's Clojure, people blame Clojure. Go figure!

Re: Building a Startup on Clojure

#215

Earlier quoted context omitted.

If you haven't used a lisp or lisp clone, it's hard to describe fully. Still, the fact that you can trivially replace and reload modules in running code or being able to fix a bug in a function and resubmit the input to the function from the stack trace is amazing ergonomically. In the same way that most languages have lambdas, it's very different from being able to trivially compose functions into new functions. (Th…

Do you have any examples of this? Like a video on youtube or similar? I have used Clojure before very lightly but I didn't really use the REPL in this way. I rather used it the same way I use it for javascript, python or any other language.

This seems like a neat one. https://youtu.be/6pMyhrDcMzw
Post reply on HN