News for hackers. Stuff that matters.
Re:Ask HN: Who regrets choosing Elixir? by craigsmansion on Saturday May 23, 2020 @05:46PM (#23286791)
> there was no one left who could support an Erlang system.

If you have $200k "python engineers" on the payroll who wouldn't jump at the opportunity to do some additional Erlang, maybe it's time to reconsider your hiring practices and that is the real cautionary tale.

Re:Ask HN: Who regrets choosing Elixir? by carapace on Saturday May 23, 2020 @06:38PM (#23287206)
This, twice.

Back in the day people would balk at hiring Python programmers saying, "there are so many more Java programmers", and I used to say, "Why would you hire a Java programmer who was unwilling or unable to learn Python?"

Same logic applies here: Why would you hire a Python programmer who was unwilling or unable to learn Erlang? (Especially if you're going to pay them to do it!)

If you can't switch languages you're a kind of technician not a programmer.

FWIW, having done it professionally for ~15 years I'll never write another large project in Python again. Erlang's runtime is so much better than Python's it's just ridiculous. I feel stupid for not realizing this sooner.

Re:Ask HN: Who regrets choosing Elixir? by icedchai on Saturday May 23, 2020 @08:31PM (#23287982)
If I had a Python job (a language I enjoy) and I was forced to work in a language I don't (say, Perl), I'd start complaining about it and looking for something else to do. I personally wouldn't mind working with Erlang, but that isn't the point. Many developers "can" do these things but it doesn't mean they want to.
Re:Ask HN: Who regrets choosing Elixir? by kenhwang on Saturday May 23, 2020 @10:37PM (#23288632)
It's pretty much how we treat our Python projects. All of us hate it, but data science is done in Python so we still need some percentage of the engineering team fluent enough in it to sustain operations with it (on-call, maintenance, bugs, eventual decommissioning).

The moment we can get rid of it, you bet we will. But it's much easier tearing it down when you understand it enough to discern designs driven by the limitations of the tech vs requirements for the product. Black box ground up replacements are hard and expensive compared to ports. Also, thankfully it's Python and nothing something more difficult/complex.

At the end of the day, it's a job, and there's an expectation of professionalism to do what's necessary. A lot of people on HN like treating tech jobs like a paid hobby which I think is detrimental to career development.

Re:Ask HN: Who regrets choosing Elixir? by craigsmansion on Saturday May 23, 2020 @06:57PM (#23287353)
Regrettably, also back in the day and probably around the same time, companies who wanted to hire "outside of the box" asked for Python. Not because they were python shops, but because they figured that people who had an interest in a new but not-quite-commercially viable language must have some sort of intrinsic interest in programming, and would likely make for better programmers.
Re:Ask HN: Who regrets choosing Elixir? by sitkack on Saturday May 23, 2020 @07:35PM (#23287617)
This is because those shops read the PG essays, and think that the the shibboleth is Python, it is not. The marker is that that someone is at the fringe and not in the middle of the flock.

I have met lots of engineers who are smack dab in the middle of the flock when it comes to tech stacks, or even _behind_, but they were more than capable. Hire for what you need. But what you think you need and what you actually need is probably not know to you.

Re:Ask HN: Who regrets choosing Elixir? by kovac on Sunday May 24, 2020 @12:48AM (#23289176)
Depends on the reason for switching. If I'm asked to switch because the new stack is going to have measurable improvements plus the language is going to stay and grow (just as examples may be Go or Rust right now), then sure. On the other hand, if the reason is because the company fucked up by relying on one idiot with an elitist mindset about programming languages, then that request going to have to come wrapped with very good incentives. If I'm a great java developer with tons of jobs to choose from, you are going to have to give me a very good reason to narrow my opportunities down for you. Otherwise, I'd say no and move on and you can go hunting for devs for a niche language and pray to Gods that the hiring situation will improve for you.

Your example of Java to Python doesn't represent the gravity of switching from Java to say Erlang or Haskell. You assume someone says no because they are unwilling or unable. We are unwilling, sometimes, because of the opportunity cost we have to pay for your fuck up.

Re:Ask HN: Who regrets choosing Elixir? by piaste on Sunday May 24, 2020 @01:03AM (#23289251)
> If I'm a great java developer with tons of jobs to choose from, you are going to have to give me a very good reason to narrow my opportunities down for you.

Why would learning a new tool narrow rather than widen your opportunities?

It's not like you forgot all you know about Java.

Re:Ask HN: Who regrets choosing Elixir? by kovac on Sunday May 24, 2020 @02:14AM (#23289550)
Learning an obscure tool that eventually dies is a waste of time. Think learning a language only you and a few of your friends speak. This in itself is good enough reason to be cautious about what you invest your time in learning.

Languages and specially the tool chain and the way of doing things around them evolve. If you spend like 5 years doing something else and come back to it, you'll find things have changed a lot. You may argue that it's easy to relearn this. But from a job perspective, the guy who has been using the exact same tech stack in the recent years will often be a better bet than a guy who wrote Java in version 1. This is very true for C#. Syntax, design principles, tools, method of deployments all have changed rapidly. Professionally, you want to be as up to date as possible in the area you worked in or you get rusty. You can learn new things on your time for their own utility. Flushing down 40-60 hours a week on a useless piece of knowledge is bad all round to me.

Re:Ask HN: Who regrets choosing Elixir? by labawi on Sunday May 24, 2020 @10:19AM (#23291687)
> Flushing down 40-60 hours a week on a useless piece of knowledge

That is only if it's actually useless. I haven't programmed in haskell for many years, yet I am very glad I did. It was hard at first, but it made me think about code, data and transformation from a different perspective, expanding the repertoire of paradigms, regardless of which language I code in.

YMMV, but personally, I'd much rather hire or work with someone with 3y java + 1y erlang experience, than just 5y java experience. In general a polyglot rather than monoglot, especially if it's a different coding paradigm. Nevertheless, I may not actually want them coding random bits of work in erlang or whatever random language.

Re:Ask HN: Who regrets choosing Elixir? by winrid on Saturday May 23, 2020 @11:00PM (#23288738)
Well, a Java developer isn't going to want to give up the JVM, their type safety, and great tooling, for a start.

I get being interested in Erlang if you're doing Python. But interested in doing Python as a Java dev? Probably not.

Re:Ask HN: Who regrets choosing Elixir? by 411111111111111 on Sunday May 24, 2020 @02:38AM (#23289648)
Seriously, why doesn't python have a maven equivalent yet?

And no fat-binaries. Nor self executing binaries. It's just as old and having em basically just boils down to enforcing conventions. But nope, nothing. There have been attempts by some such as shiv, but really... None are even remotely as usable as maven is.

Re:Ask HN: Who regrets choosing Elixir? by jonnytran on Sunday May 24, 2020 @04:41PM (#23294509)
Have you tried Nuitka? https://github.com/Nuitka/Nuitka
Re:Ask HN: Who regrets choosing Elixir? by RMPR on Tuesday May 26, 2020 @04:37AM (#23308691)
In the same vein there's also PyInstaller and PyOxidizer, not to mention platform-specific binaries generators (Py2app, ...)
Re:Ask HN: Who regrets choosing Elixir? by dnautics on Sunday May 24, 2020 @03:26AM (#23289820)
You could containerize your python. That's like having a fat binary.
Re:Ask HN: Who regrets choosing Elixir? by 411111111111111 on Sunday May 24, 2020 @06:21AM (#23290538)
yes, you can do that. I've been doing that for around 8 years now.

And no, it's not the same. Not even remotely. The only thing that helps with are quick and easy deployments.

The thing which makes maven special is the ease of producing artefacts for deployments, not the final step of starting it up on the server.

Re:Ask HN: Who regrets choosing Elixir? by roguas on Monday May 25, 2020 @10:49AM (#23301645)
Python doesn't require creating artifacts. It requires dependency resolvement which Docker is perfect for.
Re:Ask HN: Who regrets choosing Elixir? by RMPR on Tuesday May 26, 2020 @04:35AM (#23308683)
PyInstaller Nuitka PyOxidizer To name a few.
Re:Ask HN: Who regrets choosing Elixir? by kbyatnal on Saturday May 23, 2020 @07:23PM (#23287544)
Can you expand what you mean re: large projects in Python?
Re:Ask HN: Who regrets choosing Elixir? by carapace on Saturday May 23, 2020 @08:36PM (#23288014)
Yeah, thanks for asking.

I've been a happy Python programmer for over fifteen years, so this comes from a place of love and respect.

Beyond roughly 150k LoC you start to run into difficulties keeping everything straight over time, especially if you use a lot of indirection or other magic. The aspects of the language that help you go fast when you're prototyping (is "RAD" still a thing? Rapid Application Development) start to trip you up when the codebase matures. There are a lot of fancy footguns in Python that catch you if you stop dancing.

Tooling is getting a little better (MyPy, et. al.) but at the same time the overhead of adding explicit type information erodes the advantages Python has over, say, Java or Haskell.

Re:Ask HN: Who regrets choosing Elixir? by cageface on Saturday May 23, 2020 @10:54PM (#23288704)
This is true of all dynamic languages. Rails codebases become a nightmare beyond a certain LOC. It’s taken a long time but now that we have languages with strong static typing but good type inference like Kotlin, Swift, Typescript etc the old fully dynamic languages are obsolete technology and will eventually be replaced.
Re:Ask HN: Who regrets choosing Elixir? by ledauphin on Saturday May 23, 2020 @09:47PM (#23288387)
from personal experience with mypy, the great thing about gradual typing in a dynamic language is that, well, it's gradual! when I want to do something extremely dynamic, there's no horrible reflection API in my way. but most of the time I can live happily inside the walled garden mypy provides.
Re:Ask HN: Who regrets choosing Elixir? by gazzini on Saturday May 23, 2020 @10:41PM (#23288649)
I have adopted this attitude for personal projects & small companies, and it was mostly great.

There was at least 1 really large error that slipped into production because we were mocking an untyped service incorrectly (a mistyped property name), and the test passed, but prod exploded. It was embarrassing, and I certainly would have caught it with more mypy discipline, but overall the pros outweighed the cons.

At big companies that use mypy, however, this is problematic. If teams only define types for the straightforward parts of the system, then the types become less useful, especially as the company scales. From what I’ve seen, individual teams use an all-or-nothing approach with MyPy, so it’s unusual for an individual dev to sparsely type anything.

Re:Ask HN: Who regrets choosing Elixir? by ledauphin on Sunday May 24, 2020 @09:31AM (#23291369)
agreed - I am thinking more in terms of the common distinction between infrastructure/libraries and application code - I can write dynamic, well-tested libraries that are used by heavily annotated, checked application code. The types are generally more meaningful at that layer, and it tends to evolve more quickly anyway.
Re:Ask HN: Who regrets choosing Elixir? by mratsim on Wednesday May 27, 2020 @01:21PM (#23326611)
I'm not touching COBOL anymore for $200K
Re:Ask HN: Who regrets choosing Elixir? by dreamcompiler on Saturday May 23, 2020 @06:42PM (#23287241)
Completely agree. I worked at a company on a Common Lisp project where the Python crew refused to learn Common Lisp because they thought it would look bad on their resumes. This should be a litmus test for programmer quality: If they don't want to learn something because it's not "fashionable", they're probably lousy programmers who lack confidence in their own abilities. Do you really want these people working for you?
Re:Ask HN: Who regrets choosing Elixir? by enz on Sunday May 24, 2020 @02:40AM (#23289654)
> Completely agree. I worked at a company on a Common Lisp project where the Python crew refused to learn Common Lisp because they thought it would look bad on their resumes.

They can put only "Python" on their résumés, right?

Re:Ask HN: Who regrets choosing Elixir? by dreamcompiler on Sunday May 24, 2020 @09:25AM (#23291334)
One would think they could just avoid mentioning Lisp. I still don't understand their reasoning.
Re:Ask HN: Who regrets choosing Elixir? by kazinator on Sunday May 24, 2020 @12:59PM (#23292826)
The reasoning is simple: if someone thinks something would look bad on their resume, they probably don't want to spend time on it, either.

For example, I wouldn't want PHP or Fortran on my resume, and, consistently with that, I avoid them. I don't have an opportunity to actively avoid them, but that defense mechanism would leap into action, if called upon.

However, I know a thing or two about these; I'm not simply applying "meme-based reasoning".

Re:Ask HN: Who regrets choosing Elixir? by ksec on Sunday May 24, 2020 @04:43PM (#23294522)
This really is resume driven development into a whole new level. No wonder why some sane Programming languages Never made it. And it is the reason why I am worry about Ruby's future.
Re:Ask HN: Who regrets choosing Elixir? by zihotki on Monday May 25, 2020 @07:54AM (#23300136)
It's not a resume driven development but a proper allocation of personal time and skills planning for the future. What's the point of learning something you won't use in the future? If for the sake of learning then there are a lot of better choices.
Re:Ask HN: Who regrets choosing Elixir? by kazinator on Monday May 25, 2020 @09:49AM (#23301074)
Just don't base your choices on the spreading of ignorant memes.

Would you want to pass on Lisp because of the ramblings of a rookie web developer with no Lisp experience? That's what you might do if you believe the "Lisp Curse".

Re:Ask HN: Who regrets choosing Elixir? by rraghur on Saturday May 23, 2020 @10:10PM (#23288498)
I'll be the first to admit... I'm a little conflicted by this..

I've almost exclusively worked on the usual procedural /OO languages professionally (java /c#)..I like to experiment and I've picked up a bunch of languages along the way (perl, python, coffeescript, f#, nim etc).. And its usually because I want to see what's different and spend enough time to do something useful (but not large) with it. Also, it helps you become a better programmer IMO. otoh, if I'm hired for my skills but then have to work on js( don't actually like the js eco system) or haskell (I gave up after trying and I doubt I'd become very good at it anytime soon if I were forced into it) I'd be not happy either (and IMO, with valid cause that doesn't reflect on me or my abilities)

Re:Ask HN: Who regrets choosing Elixir? by krn on Saturday May 23, 2020 @06:51PM (#23287306)
I completely agree. Software engineering is about being a master of problem solving, not just being a master of some tool or technique.
Re:Ask HN: Who regrets choosing Elixir? by as-j on Sunday May 24, 2020 @03:36PM (#23294038)
> If you have $200k "python engineers" on the payroll who wouldn't jump at the opportunity to do some additional Erlang

Ah, sure they might be willing, but as a lead I'm not willing to invest in it.

1. I'm not sure I want someone who's got 4 weeks of experience in a language working on system critical infrastructure. Pick your time, does it take 6mo?

2. They have existing work, learning and working on an entire new language _AND_ new project is a huge task. Especially for non-trivial projects.

We could, but in our case it was a better engineering decision was to retire the old system and move on.

Re:Ask HN: Who regrets choosing Elixir? by quickthrower2 on Sunday May 24, 2020 @05:11AM (#23290265)
$200k !
Re:Ask HN: Who regrets choosing Elixir? by maxwindiff on Saturday May 23, 2020 @05:56PM (#23286888)
I want to downvote this comment so much.
Re:Ask HN: Who regrets choosing Elixir? by cosmotic on Saturday May 23, 2020 @06:25PM (#23287113)
Why?
Re:Ask HN: Who regrets choosing Elixir? by maxwindiff on Saturday May 23, 2020 @06:52PM (#23287316)
This kind of sentiment come up every so often on HN and I'm just sick of it. Sure, programmers should strive to improve their craft, just like professionals in every industry. But there are plenty of ways to improve yourself and learning a new language is hardly the most effective choice (and in fact could be counterproductive).
Re:Ask HN: Who regrets choosing Elixir? by scull7 on Saturday May 23, 2020 @09:05PM (#23288162)
How does learning a new way to think about a problem become counterproductive? Each language you learn gives you a new angle from which you can approach a problem. Is it counter productive to learn a second spoken language? I haven’t come across an argument against that, even learning a dead language like Latin or Ancient Greek has benefits.
Re:Ask HN: Who regrets choosing Elixir? by maxwindiff on Saturday May 23, 2020 @10:46PM (#23288675)
Perhaps counterproductive is too strong a word, but there could definitely be problems in the short term. Programmers love to apply things they learned in their work, and taking a concept or pattern from language A and applying them to language B is a natural reaction. The most common culprits are monads and actors. Ergonomics (readability, cognitive cost, debugging, IDE support, etc) became afterthoughts in the midst of excitement, and the long term health of the codebase (and teammates) suffers.

I have made mistakes like that (introducing monads/future and making the team learn guava) and I still regret it. Its not to say futures are useless - there were a lot of async logic in the codebase and futures solve a real problem, but its not clear if the benefits outweigh the cost.