
Developers love trendy new languages, but earn more with functional programming - rbanffy
https://arstechnica.com/gadgets/2018/03/developers-love-trendy-new-languages-but-earn-more-with-functional-programming/
======
smoyer
This article is based on the StackOverflow survey available at:
[https://insights.stackoverflow.com/survey/2018/](https://insights.stackoverflow.com/survey/2018/).

~~~
dang
Discussed at
[https://news.ycombinator.com/item?id=16574316](https://news.ycombinator.com/item?id=16574316).

Normally we'd merge the comments into the main thread but nearly all of them
here are about the title of this one.

~~~
smoyer
Oops ... sorry about that (I missed the other discussion). Want me to delete
this instead?

~~~
dang
No worries! No, it's usually better to let existing discussions continue.

------
sundvor
Wait, I thought functional programming _is_ trendy!

(Currently reading [https://www.manning.com/books/functional-programming-in-c-
sh...](https://www.manning.com/books/functional-programming-in-c-sharp) and
greatly enjoying it)

~~~
globuous
It is. And I get this is a joke, but the title says 'trendy new languages'. So
it's talking about new languages which are trendy, not just trendy languages
(or just new languages) :D

But I guess 'developers love trendy [programming] languages' is like saying
'teenagers love trendy teenager apps'. aka, if developers love the language,
then it pretty much is by definition trendy.

------
koblas
IMHO this is a misleading outcome.

What isn't represented to remove a bias from the numbers is the number of
years of experience and education. It's highly unlikely that bootcamp
graduates will be working in OCaml/Erlang since these will bias to people with
CS degrees who understand the why behind functional.

~~~
aje403
Misleading is the right word.

Wrong conclusion: E[Earnings|Language=OCaml] > E[Earnings|Language=Javascript]

More accurate conclusion:
E[Earnings|Language=OCaml,School=Top10,Major=DualCS/Math] >>
E[Earnings|Language=Javascript],

E[Earnings|Language=Javascript] >>
E[Earnings|Language=OCaml,School=Who?,Major=Not DualCS/Math]

~~~
b4lancesh33t
This can be stated more generally:

If you didn't explicitly control for it, your results probably only reflect
selection bias.

~~~
chris11
I'd say that it is definitely possible for selection bias to indicate a causal
relationship though. Because hiring and compensation isn't just controlled by
technical ability or productivity. So there is chance a supposedly non-causal
indicator will have a direct impact.

For instance, let's a dev with a really unremarkable resume gets paid
significantly less than his coworkers in a really hot subfield because all his
coworkers have a top-10 stem degree, research with top professors, and work
experience at really hot startups. It's likely if he is a decent negotiator
the underpaid dev's compensation will eventually revert to the mean. That will
be the compensation of an extremely marketable dev if he can sell himself as a
dev with really valuable experience.

------
snarfy
There is a disproportionate usage of Erlang in the finance industry. That
might be part of its high salary.

~~~
dhruvmittal
OCaml as well-- the first place that comes to mind is Jane Street.

~~~
TurboHaskal
The first and the only.

~~~
spyrosg
What about Ahrefs? Also, some people must be using Ocaml's cousin F#, or Jon
Harrop would not have a job.

Edit: oh, _finance_. Right.

~~~
TurboHaskal
Last time I've checked, Harrop was everything but happy with the current F#
situation (tooling, ecosystem, etc.)

------
dkarl
_Even if AI is evil, most developers don 't think it's the fault of the
programmers. Fifty-eight percent say that ethics are the responsibility of
upper management, 23 percent the inventor of the unethical idea, and just 20
percent think that they're the responsibility of the developer who actually
wrote the code._

It's shocking to me that people would blame the invention of the idea. I think
talking about unethical ways of doing business before they're adopted is
useful, because it gives society a chance to frame the debate and possibly
even criminalize the behavior before entire companies depend on it for their
business model. Most unethical business behaviors are semi-obvious anyway, in
the sense that they're going to occur to many people right away rather than
waiting on a genius stroke of inspiration that might come this year or five
years from now. If you think of an unethical idea at work, odds are that five
other people are already thinking of it too, and one of them is planning how
to implement it. Seize the initiative. Talk about the idea and frame it as
evil. Make it a joke among the engineers. "Of course if we were really evil,
we could do X." "Nice, what a way to fuck our customers over and make money
from it." "Not that I could actually bring myself to do it." "Where's Martin
Shkreli when you need him?" (Reference a company that went down in flames, a
person who went crying to prison. It doesn't matter if Facebook or Mark
Zuckerberg is a better comparison; don't mention a company with a thriving
business or a person making bank with impunity. Success gives everything a
halo.)

If you do this effectively, then the company has to consider the cost of
embracing an idea that has already been framed as evil. They'll have to
consider that they won't have the most enthusiastic cooperation from some of
the engineers, that it will decrease people's pride and job satisfaction, that
some engineers who have other opportunities might decide to leave so they can
still be proud of their work. They will have to consider morale outside of
engineering as well, because people in other departments will be saying, "What
is the deal here? The engineers seem to think that what we're doing is really
slimy. Am I going to be embarrassed to tell my friends about this?" Management
might still go ahead with it, but on the other hand they might decide to do
something else instead. And if they do it, they'll at least profit a little
bit less because of the friction you created.

~~~
pc86
It's shocking to me that a large portion of people would blame their bosses
but not the developer. If your boss tells you to do something illegal, and you
do it, you're just as much a criminal as they are.

~~~
spyrosg
And yet, the programmer may have a responsibility to bring a salary back to
his family. People will call him a criminal for obeying his boss, but they
usually will not come and help him if he does the right thing and takes flak
for it.

~~~
nine_k
Programmers enjoy a rare market where employers compete for hiring a good dev,
not the other way around. Unless _lots_ o employers do things so unethical you
can't stand working on them, you can just walk away from an unethical boss and
spend time digging through numerous invitations from other companies.

~~~
spyrosg
You may simply not be a good dev. What then?

I live in a market where finding a job quickly makes it another shitty job,
and only after amply signaling your submissiveness (ah, Europe). You get no
unemployment money, because it's you who quit, of course.

There's also the fact that you're the good guy and yet you're the one getting
shafted, while the arses above keep doing what they do. Anyone with a brain
will sense something's wrong, and will rethink their ethics.

------
Lasher
There are many devs making plenty maintaining old legacy systems in languages
long since considered dead on sites like Stack Overflow. The biggest missing
qualifier on that survey is the obvious "developers who are likely to answer a
stack overflow survey....", or even use SO at all.

------
tabtab
An org usually only hires functional programmers for specialized tasks, and
specialization generally pays more. It's not about pay here, but about the
nature of niches. The downside career-wise is that is that you have fewer
alternatives, domain and geography, if your specialty slumps.

~~~
greaseball
This sounds like the most likely explanation to me. The only programmers I've
personally worked with that wrote code in a functional language for their day
jobs were data engineers using Scala for an Apache Spark data pipeline. They
weren't paid well because they wrote functionally, they just filled more of a
niche role with a higher barrier of entry than a typical web developer.

~~~
kod
I've been doing Scala professionally for a decade (so definitely not limited
to Spark). There was a clear correlation between Scala jobs being higher
paying and more interesting than what I was doing previously.

------
GreaterFool
> Globally, F# and OCaml are the top average earners

Don't know about F# but the job market for OCaml consists of about 2
companies. What good is high average when you can count job openings on one
hand?

I like OCaml, I wish it was more popular.

~~~
lallysingh
As long as the number is >0? That means that demand > supply. And the
granularity is right, as we only tend to need over programming job per hacker.

------
saintPirelli
This is hardly surprising. Everything new is exciting at first. Yet when it
comes to making a decision what tools to use in production, I suppose most
developers have the presence of mind to choose something robust and battle-
tested.

~~~
gameswithgo
But most of the functional languages in their list, are also new....

and some of the ones on the trendy list are functional (Rust)

~~~
weavie
I would question your assertion that Rust is functional.

Rust does have a lot of features that a lot of other functional languages
have, Algebraic Data Types, closures. But one thing Rust misses is purity.
Although you do have to be explicit about when you are mutating state, I think
it would be very hard to actually write a program that doesn't, and it
certainly wouldn't make for idiomatic Rust code.

I guess we are going into the definition of what makes a language functional.
Rust is a great language and it does attempt to solve the same sort of
problems that functional languages solve - multi threading, no surprising
mutations.. It just uses a different paradigm to functional in order to solve
them.

~~~
joeberon
Rust doesn't have higher kinded types so I'm pretty sure it's not functional

~~~
seanmcdirmid
Rust isn’t solely functional because it focuses on safe manipulation of
mutable state (or to say, it transforms a functional solution to the state
problem into a non functional one); it is multi paradigm, though. However,
that has nothing to do with higher kinded types.

------
haskellandchill
I've consistently seen functional programming used as leverage to offer lower
salaries outside of a few companies known for paying well like Jet and Jane
Street.

------
bunderbunder
Breaking: People who work at Jane Street make a lot of money.

------
hashmal
"functional" is so ambiguous in that context…

~~~
commandlinefan
That's kind of what I was thinking - "trendy" new languages include Scala
which is very functional.

~~~
macintux
But not particularly new.

------
hamilyon2
Could it be true, erlang and clojure are assuciated with higher income both
worldwide and in US? A little back, I remember, functional programming was
thought as academic and not fit for production. Has that changed? This is
interesting and almost too good to be true.

~~~
dep_b
If WhatsApp manages to use Erlang at quite a scale I guess it's not that
academic?

~~~
rbanffy
I suppose a lot of our phone calls and data traffic are handled by Erlang
code. I don't think it was ever "academic" except in, perhaps, the sense it
was exhaustively thought out.

------
dep_b
What do people that use Ocaml all day actually do?

~~~
machiaweliczny
I know its used for compilers, trading(jane street), soon webdev(reason)

~~~
RubenSandwich
More then soon for webdev, 50% of facebook messenger's web client is written
in Reason[0].

[0]
[https://reasonml.github.io/blog/2017/09/08/messenger-50-reas...](https://reasonml.github.io/blog/2017/09/08/messenger-50-reason.html)

------
xiphias
,,Fifty-eight percent say that ethics are the responsibility of upper
management''

With the same reasoning management could say that ethics is the responsibility
of investors who decide about how ethical a company should be and customers
who may pay for the non-ethical product.

~~~
yorwba
If you look at the actual survey results, you get a much more nuanced
picture.[1]

58.5% would not write code for an unethical purpose, and only 4.8% would
unconditionally say yes. 79.6% think that they have to consider the ethical
implications of code they write.

The 57.5% who said that management is _most_ responsible for ethical decisions
would probably agree that developers are responsible as well, just maybe not
as much as management (who have far more agency to just assign the task to
someone more willing if anyone refuses). Since the options were limited to be
mutually exclusive, those considerations were not captured by the survey.

[1]
[https://insights.stackoverflow.com/survey/2018/#ethics](https://insights.stackoverflow.com/survey/2018/#ethics)

------
juskrey
FP people are generally older and more experienced, like Hickey have said
"Clojure is for old tired programmers" (Love thinking, tired of pressing
keyboard - description I fit pretty much too).

Young FP adepts, especially converts in their early 20s, especially those who
are "in trend", are a pure disaster.. don't pay them too much..

~~~
criddell
Cobol developers are also generally older, more experienced and can also make
a lot of money.

Developers love trendy new languages (like C and Basic), but earn more with
Cobol.

~~~
jackhack
>> trendy new languages (like C and Basic)

C and Basic... trendy? One doesn't often see those words in the same sentence.
Or is this like bellbottom trousers, where I've waited long enough and they've
come back around to fashion???

~~~
criddell
Keep in mind I'm speaking about languages relative to Cobol.

