Hacker News new | ask | show | jobs
by karmajunkie 861 days ago
i have to be honest: as a lover of the language, and with due respect to the author, i’m really tired of these “why i picked elixir” takes extolling the same virtues (or some subset thereof) we’ve seen written up in darn near every introductory article on elixir for the last five or six years.

it’s not that i think they’re wrong, at all. it’s just that they add nothing new to the conversation, they’re superficial, and frequently don’t go on to give a reader any idea of how the decision worked out.

here, i’ll start: i rewrote my startups platform in elixir about six years ago and it was a terrible business decision. not because elixir was bad —to the contrary, it was fantastic —but because the year and a half i spent reproducing functionality could have been spent adding new features that would have translated to new customers, and that would have translated to an additional million dollars when we eventually sold our bootstrapped business (obviously if i’m quibbling about a million bucks im not talking about a venture backed business here.)

in terms of scratching my intellectual itch it was great, but i can’t defend it from a business perspective and whenever somebody brings up the notion of rewriting a core platform i tell this story.

now can someone please write some elixir articles about cool stuff they did with it and get those on the front page?

17 comments

Maybe it was true 6 years ago, but I'm currently playing with Elixir/Phoenix and I feel very productive, Phoenix is well design and adding new functionalities is not that hard and the code is easy to debug. On the other side, Elixir and Erlang are not that popular and every time I talk about it to other developers, they may have heard of it but can't talk about it, so it's probably not that easy to find devs for a startup. But the barrier to entry is probably what keeps the libraries well designed. For anyone interested in Elixir I would start with those books in this order "Elixir in Action", "Programming Ecto" and "Programming Phoenix Liveview".
(EDIT: To clarify, my comment is only a response to "not that easy to find Elixir devs for a startup")

---

I don't speak for anyone except myself and a few acquaintances but I wouldn't accept an offer to work on a startup with Elixir unless we're talking at least $15,000 a month or more. And even then it depends a lot on team and company culture. I am tired of sprinting without that ever being connected to me getting extra cash or even recognition.

Elixir and Phoenix are productive as hell but they also need deliberate approach and not everything should be done quickly. Requiring me to churn out 3-5 features a week in the first 6 months is the best way for me to hand my resignation a mere two weeks after starting.

Sorry, you might not have had this in mind, I am just reacting to your text.

But rest assured, ElixirForum has quite a few people who would grab an Elixir job if given the opportunity, some for as low as $2500 a month even. And most people frequenting the forum mostly check its own Jobs section. So if you really want to widen your options, definitely make a job ad post there.

Isn't this concern independent of the language?

> Requiring me to churn out 3-5 features a week in the first 6 months is the best way for me to hand my resignation a mere two weeks after starting.

Actually no it isn't, I was indeed mixing Elixir and non-Elixir concerns in one comment.
Did the parent comment get updated? It doesn't track to what you've put here.
No it hasn't. As I stated, I was only reacting to his "not that easy to find Elixir devs for a startup" is all.
It sounds like you just dont want to work at a startup? What does that have to do with elixir?
Yes I don't want to work for a startup and I stated as much didn't I? ;)

What it has to do with Elixir is that Elixir does not scale well with a number of programmers, and many startups go through periods of explosive growth of personnel. With Elixir that very rarely works well, 99% of the time IMO it does not. Adding more people does not increase productivity, it hurts it even.

What is the best freely accessible Phoenix tutorial? I recently searched a bit, tried a bit, but then ran into a problem, that should not have happened according to the tutorial. I guess the tutorial was outdated (got the RoR vibes from years ago). I could not fix it, due to the lack of understanding of how Phoenix works and what it wants me to do. Gave up again (for the second time) on learning Phoenix. Is there an always kept up-to-date tutorial around somewhere? I might consider it again, since I want to learn what liveview and all that is really about and how well it can make web apps etc.
I would get it from the phoenix's beak honestly - https://hexdocs.pm/phoenix/overview.html
agreed, the phoenix dubs and guides are excellent.

for elixir books, i strongly recommend sasa juric’s elixir in action—it’s the best explanation of processes and genservers i’ve found.

Pragmatic studios has great Elixir and Phoenix courses, they upgrade the courses regularly and you get access to the new versions without extra costs.
> On the other side, Elixir and Erlang are not that popular and every time I talk about it to other developers, they may have heard of it but can't talk about it, so it's probably not that easy to find devs for a startup.

This was the exact issue we encountered after I had switched a startup's backend from Node to Elixir. I was able to churn out features pretty quickly (and the switch itself turned the core batch job underlying the product from a multi-hour runtime to less than a minute), but the bus factor was pretty much 1 and we were never able to really increase that before the company ended up running out of runway and folding.

This was almost a decade ago, though, so things have hopefully improved somewhat.

Ya, I’ve given up trying to seriously introduce Erlang anywhere.

Lovely language whose community and vm taught me an absolute ton that still resonates with me today.

But for a bunch of “cats” that need to be herded, engineers tend to be fairly packish in some regards so looks like it’s Go, Java, Typescript, and TypeScript/HTML/CSS(in JS)/React for the foreseeable future

Hey! I gave a talk at Code BEAM Europe this past year about our experience with a year of machine learning on the BEAM [1]. That is, the impact on our business of going 'all in' on Elixir from a more fragmented stack (Python for ML and ETL). We actually did this twice, once in 2020 from a JS front end/Elixir back end to LiveView, then again in 2022 for the ML/ETL stuff. We benefitted massively on both occasions. I recently sat down with Brian Cardarella at DockYard to talk about this and they wrote up some posts about it [2].

[1] https://www.youtube.com/watch?v=HP86Svk4hzI

[2] https://dockyard.com/blog/2024/02/06/5-benefts-amplified-saw...

now this is what i’m talking about…
I overall agree with your sentiment (and this is not some bashing on Tyler's blog post by the way) - Elixir is good enough that we could focus on "Showing" instead of "Telling", at least that's what I'm trying to do more and more.

And the OP presentation about ML is spot on in that regard :-)

OP did say building a startup, not doing a rewrite of a relatively mature project which is always a danger zone with blaring red sirens regardless of language.

But it's good to be reminded I guess when new shiny things come across your sceen

Thanks for posting this, I’ve been having similar thoughts lately.

Elixir is extremely overhyped, not because it’s not great but because most of the discourse is about how much better it is than other languages.

With Python, Rust, Go, and JavaScript I can find a ton of interesting projects and tools; tons and tons of examples of people doing interesting things, easily outweighing the language hype.

Elixir has a handful of core tools, tons of hype posting, and a smattering of introductory blog posts to those tools.

The community really has the appearance of lacking depth. (Granted I think partly that’s because the depth exists inside companies that don’t really talk about it)

Remember when they rewrote their app and blogged about it? I do!

https://www.joelonsoftware.com/2002/04/11/our-net-strategy/

It was a (slow) migration, though, not a rewrite from scratch. They kept shipping software.
Exactly my point. The way the vast majority of rewrites happen.
yep, that’s the right way to do it.
I shouldn’t, but all these posts read like distant history to me with Fog Creek gone.
As if source code rusted except in this case, Netscape's descendant did rust -- in a different way.
Long story short from a business perspective - good luck logistically scaling a dev team from 2 founders to 100 devs as quickly as your app does. Elixir devs are hard to find and are expensive.
I have hired elixir devs recently, even worse: onsite only, and couldn't help myself with all the applications. And it wasn't like when hiring JS devs that I had to weed out the majority of super-junior candidates first. All around the statement of "hard to find devs" doesn't hold anymore as it used to. Just as a data point. And from the community often a saying is that there aren't enough Elixir jobs to begin with, so thats another story.

Having said that, a single team of seasoned Elixir devs can achieve more/better things than 100 average devs using the usual SPA/API/microservices-JS hell with all that modern unneccessary complexity. Saying this as a former DevOps guy babysitting the mess of multiple of these teams before.

Unrelated to elixir, but a company I worked at used a legacy and niche programming language in a few of their older projects. Their hiring strategy was similar: have a few seasoned programmers and hire juniors that are willing to learn (and there wasnt' a shortage of these). Never had a problem.
Elixir devs are quite easy to find if you post a job ad on ElixirForum.

Another good thing about Elixir is that the odds of you actually needing 100 devs coding in it are close to zero. I've been in financial EU startups that moved tens of millions a month (they were not huge) with the grand total of 4 devs. The only problem was clearing up customer requirements (i.e. our product people dropped the ball and left us doing most of their work).

And expensive? Yeah but I wouldn't be against that if I was an informed business owner. Most Elixir devs are refugees from other tech stacks and are quite senior. Good talent should be compensated well.

The reply's asking if you need 100 devs, might not realize this article was about building SaaS apps.

Having worked at multiple unicorn+ SaaS products, the product feature demands are significant.

Yes if you have one sole feature that you can pour all your engineering resources into like whatsapp delivering messages then it makes sense you might get away with 2 Elixir devs.

If you are working at a unicorn who just raised $250m in founding and now has to deliver 100 new features this year... well the elegance of the language won't help as much as you think.

Good point. There seems to be a strong correlation between fast growth, lots of money and technically unpleasant environment/stacks.

I'll take quality of life over money any day, but I realize I'm in an extremely small minority.

> good luck logistically scaling a dev team from 2 founders to 100 devs

You'll never need 100 devs to work on a single elixir project. I as a solo dev built out the backend for my startup to profitable. We keep discussing bringing on a new developer during the occasional crunch but its been 5 years of operation and we haven't really needed it aside from increasing the bus factor. features go out fast enough as is. elixir is very productive.

based on my experience, if you need more than 5 developers, you should separate out features to independent systems and have them communicate with each other over established interfaces. Then you can use the language specialized to the task at hand. Either way, 100 engineers on a single codebase is not going to be efficient no matter what language you are working in.

That said, this article is about startup. the name of the game is to crank out features and aquire users. elixir is performant enough that you're not blowing your budget on cloud infrastructure and high level enough that you can build out and maintain your mvp with a skeleton crew.

If you run into a situation where you suddenly need to scale to 100 engineers, thats a great problem. it means you have revenue.

I would be interested, if I could maybe learn from a more experienced Elixir dev on the job for a month or so (even for temporarily reduced pay while I am catching up). I am quite quick at picking up languages and have broad experience in many languages and their concepts. I imagine there are more people like me out there, who would be happy to learn something new on the job and a nice language like Elixir at that.

I don't think devs and talents are too hard to find, if you are willing to look and be flexible.

this doesn’t track with my experience. every time i’ve posted an elixir job we had at least a couple dozen qualified, experienced candidates and a fairly diverse applicant pool.

you just have to post where they are. i strongly recommend the newsletters, the jobs channel on the elixir slack, and elixirforums. all great resources.

Do you need 100 elixir devs? Or do you need 2 elixir devs and 98 developers?
We went through a round of recruiting (Elixir app here) and found that as reflected on the StackOverflow survey from last year, a lot of people are willing to learn Elixir at the moment.

We've had non senior people onboarded a few months and they are doing well with Elixir at the moment, fwiw!

That's micro-shortsightedness. Lots of tools even OS utilities are being rewritten in a "better" language. It could be quite beneficial from a business perspective too if you're spending more time fixing issues than addressing new requirements.
That really depends though. Part of the time you are right but there are legitimate businesses settings where not shipping by the end of next week can mean missing out on much-needed $50K or so revenue.
Often a feature pressure of "ship next week" is due to bad management and planning though. Often engineers already foresaw similar needs and were told no before. Then suddenly it is urgent.
> Often a feature pressure of "ship next week" is due to bad management and planning though

while thats usually true, it can also be a result of rapid customer feedback. what customers want might not be apparent till you put it in front of them. bad managers are one thing but if you're a startup, its more about responding to customer needs faster than the incumbent can.

I agree and that's why I no longer want to work for startups or any company with "urgency" culture.
my market was exactly this; tied to the start of the semester, if i missed shipping a feature my next shot at getting it used in production was months away. and basically if we missed the fall season it might as well have not even happened.
Ultimately it is yet another optimization problem. You have fixed dev time, a budget and some deadlines. If possible, try rewriting a component and measure the effort and benefits. We had PoC with deep rooted data issues. We knew throwing it away would set us back by a year but it just kept getting uglier by the day. We added a thin data validation API around it which started catching a good chunk of the data issues and let us deploy the PoC. We're now rewriting a new core with built in data validation and tons of performance and reliability improvements.
Well that is a good way to go about it. Direct frontal assault against legacy problem indeed very rarely works.
it’s kind of a matter of scope. you’ve got a team, at least a couple developers, rewriting a microservice that really needs an overhaul for performance? go for it.

you’re a solo developer rewriting the fundamental application your company sells and depends on for revenue? yeah, maybe not so much. (actually there’s no maybe about it. don’t do this.)

Rebuilding an existing codebase in any other language would fit that argument as well.
yep, you’re absolutely correct on this point. there were technical reasons why i undertook the effort and why i chose elixir, but the truth is that the correct business decision would have been to keep going on our original stack.
It's like why I cleaned my butt with this less than popular toilet paper. Like, we get it. It actually was great maybe even better than the name brand one. But at the end of the day, you still gotta wipe.
> but because the year and a half i spent reproducing functionality could have been spent adding new features

What would you have used instead?

Doesn't matter much, really, as long as it's something with a big ecosystem.
I assume the original language of the codebase
Thanks I was distracted and didn't get that
yeah in this case it was a ruby/rails/react/angular frankenapp that was very much guided by a big ball of mud pattern.
It has nothing to do with elixir and everything to do with you spending time on a rewrite instead of adding new stuff.
I don't know if your post was a humble brag, but on Elixir + rewriting core code well, if I'm buying a software company and I know that the engineering team took their time to write good, maintainable code, that company is worth a lot more than if it the codebase is spaghetti quicksand.
lol no, it was not intended to be a humblebrag.

i’d love to say you were correct, and if it was a tech acquisition you might be right. in our case they were acquiring our customers and goodwill primarily. the app was sunset a year later.

They are doing this to recruit talent. That's the angle.

It is the Netflix playbook.

Casually dropping the "6 years ago" like it's irrelevant
> it’s not that i think they’re wrong, at all. it’s just that they add nothing new to the conversation, they’re superficial, and frequently don’t go on to give a reader any idea of how the decision worked out.

I dont know… we cant expect each article to expand on the previous article you read. i dont think article writers should scrap their article if it doesnt contribute some novel benefit. I think one additional article without new points simply emphasizes those existing points.

I mean, I get your fatigue. I just dont think there is any fault here.

honestly these sorts of sentiments (in the link) remind me of the "lisp gives you enlightenment, lisp is the language of gods" etc. that we've heard for decades. I love lisp, but come on, gods?
Have you seen lisp? To understand even a bit if that you’d have to be god level.

Not that gods don’t make mistakes. But I kind of see where they’re coming from.

> Have you seen lisp? To understand even a bit if that you’d have to be god level.

Are we talking about parenthesis here again?

It's easy to understand a well written Lisp codebase once you are familiar with its concepts. What you can't do is try to read it when all your prior programing exposure is from, say, the Algol language tree.

> i rewrote my startups

Yeah, rewrites are bad, especially as a startup.