@AstonJ , I wanted to add a small note about highest paid language
. It is better to see the whole statistics (with percentiles at least) in comparison, which are rarely published. The median or average might be high, but the reason for it might be in shortage of junior jobs and junior developers.
Let give me an constructed fake example (salary digits are just some fake numbers) to showcase this fact:
defmodule BasicStats do
def basic_data() do
%{
some_other_lang: [
%{grade: "junior", salary: 35},
%{grade: "junior", salary: 45},
%{grade: "junior", salary: 40},
%{grade: "junior", salary: 35},
%{grade: "middle", salary: 50},
%{grade: "middle", salary: 60},
%{grade: "middle", salary: 70},
%{grade: "middle", salary: 65},
%{grade: "middle", salary: 65},
%{grade: "senior", salary: 80},
%{grade: "senior", salary: 95},
%{grade: "senior", salary: 95},
%{grade: "senior", salary: 120},
%{grade: "senior", salary: 150},
%{grade: "senior", salary: 160}
],
elixir: [
%{grade: "junior", salary: 35},
%{grade: "middle", salary: 65},
%{grade: "middle", salary: 60},
%{grade: "middle", salary: 60},
%{grade: "middle", salary: 60},
%{grade: "senior", salary: 70},
%{grade: "senior", salary: 70},
%{grade: "senior", salary: 85},
%{grade: "senior", salary: 90},
%{grade: "senior", salary: 95},
%{grade: "senior", salary: 95},
%{grade: "senior", salary: 95},
%{grade: "senior", salary: 95},
%{grade: "senior", salary: 100},
%{grade: "senior", salary: 110}
]
}
end
def average(values) do
salaries = for %{salary: salary} <- values, do: salary
Enum.sum(salaries) / length(values)
end
def run() do
basic_data = basic_data()
IO.puts("Elixir average paying: #{basic_data[:elixir] |> average()}")
IO.puts("some_other_lang average paying: #{basic_data[:some_other_lang] |> average()}")
IO.puts(
"Elixir junior average paying: #{basic_data[:elixir] |> filter("junior") |> average()}"
)
IO.puts(
"some_other_lang junior average paying: #{basic_data[:some_other_lang] |> filter("junior") |> average()}"
)
IO.puts(
"Elixir middle average paying: #{basic_data[:elixir] |> filter("middle") |> average()}"
)
IO.puts(
"some_other_lang middle average paying: #{basic_data[:some_other_lang] |> filter("middle") |> average()}"
)
IO.puts(
"Elixir senior average paying: #{basic_data[:elixir] |> filter("senior") |> average()}"
)
IO.puts(
"some_other_lang senior average paying: #{basic_data[:some_other_lang] |> filter("senior") |> average()}"
)
end
defp filter(data, grade) do
for %{grade: ^grade} = e <- data, do: e
end
end
BasicStats.run()
As result, what you will get:
Elixir average paying: 79.0
some_other_lang average paying: 77.66666666666667
Elixir junior average paying: 35.0
some_other_lang junior average paying: 38.75
Elixir middle average paying: 61.25
some_other_lang middle average paying: 62.0
Elixir senior average paying: 90.5
some_other_lang senior average paying: 116.66666666666667
The average might be higher by Elixir developers, but this can came just from a fact, that the proportions of junior/middle/senior engineers are different between comparing languages. And it might be to the extreme, that for some language on average junior, middle, senior will be more high-paying in another language and the only reason for higher averages/medians might be the shortage of junior jobs for a language as you see in my constructed example. This is just extreme, constructed example to showcase the fact, that it is possible.
Sadly, statistics rarely going into the details for better understanding of underlying reasons, but I’m personally believe, that Elixir high paying language status is at least partially affected by shortage of junior jobs and-or developers.