
Ask HN: Switch to Java as Senior JavaScript Dev? - JS2Java
I’m a technical lead working on a large Node.js monolith that helps power a very profitable software platform.<p>I’m starting to feel that I really need to start learning the Java platform to grow my career. For one, Node.js jobs are not really popular in my area. The ratio of backend Node.js to Java jobs is probably 1 to 50. Two, it seems like to get a FAANG type job then Node.js probably won’t cut it. Three, I make 130k+ in Raleigh, NC. Most Node.js roles can’t leverage my experience running highly available services and subsequently can’t or won’t match this salary level. Most teams needing five 9s are not looking at JS first. Even at my company, JS is a 2nd class citizen. Most of the companies reaching out to me on LinkedIn looking for somebody my level are looking for serious Java chops.<p>I have a master’s degree and have coded in a variety of other languages (TypeScript, Go, Python, etc) including some Java servlets in the past. I don&#x27;t know frameworks like Spring or Hibernate, so I think I should be invest some serious time into learning these frameworks and more idiomatic Java since it&#x27;s been almost a decade since I&#x27;ve touched Java.<p>Is this a case of the grass being greener, or does JavaScript just have a lower ceiling professionally than Java?
======
urthen
In my personal experience I'd say there still is a widespread mindset in our
industry that all "real" web development needs to be done in Java. I'd also
say that whenever someone says that they usually mean "I'm most comfortable in
Java so let's use that so I don't have to learn new things."

I've used both Java and Node professionally, and have in the past few years
made recommendations for new projects to be started in both Java and Node
depending on their unique requirements. I've even worked on projects migrating
existing systems both from Java to Node, and Node to Java.

That said, I do strongly believe that Node is better suited as a language for
web-scale projects that deal more with asynchronous requests (such as to DBs
and APIs) than doing heavy data crunching themselves. If you need heavy data
crunching, Java might be better for you, and there are a lot more available
frameworks.

If you're looking for a job specific recommendation, it sounds like that might
be partly regional. If you can't find Node jobs in your area, then maybe
picking up Java is the right answer for you.

~~~
mrath
If you are looking for decent paying jobs then Java is probably one of best
languages to choose. The JVM eco system is huge and tools are less to none.
There are some comments mentioning web development, I would say that is not
Java’s strongest area. There are 10x(just a guess) more backend work API,
integration etc done in Java today. From what I see there still lot of new
Java work being done, while the share has come down recently it is still quite
large.

At least in finance domain Java has a quite a large presence and it is growing

~~~
kyawzazaw
Do you sense the JVM ecosystem slowly adopting Kotlin language as a first
class language, especially finance domain?

Also, which companies do you mean by finance domain

------
theandrewbailey
Brushing up or learning new skills is generally a good idea. There's lots of
money in Java. C#/.Net is in a similar position, and might be worth looking
into, depending on where you want your career to go.

------
muzani
I've been doing Java for almost a decade but JS for the last 3 years. I still
get good work on Java but it went from about 80% of my work to 5%. It does
sound like the grass is greener.

And my salary was never near as high as yours, even after purchasing power
conversion. The only companies that pay that well here are, surprise, hiring
Node.js developers.

~~~
sdwedq
In my experience, a lot of shops with Java in their tech stack usually get
devs from Infosys or other consulting companies. So you are competing with
super cheap labor.

~~~
muzani
Yeah, I live in one of those countries that consulting companies outsource to.
PHP is quite cheap too, about 1/3 to 1/2 a Node.js salary.

------
cpach
'patio11 who is also a member of HN has written a blog post that IMHO is worth
a read: [https://www.kalzumeus.com/2011/10/28/dont-call-yourself-a-
pr...](https://www.kalzumeus.com/2011/10/28/dont-call-yourself-a-programmer/)

It touches on this subject.

~~~
maps7
That doesn't seem to work in the real world when the job description is:

Engineer with 7+ years of exp with Java

------
fatcatdogfat
NC has a lot of enterprises there which would lead me to assume their
infrastructure was built out 10 years ago in Java which is why a lot of stuff
in the enterprise space is still Java, enterprises continue to choose Java
because there are millions of devs who know basic Java and basics about the
Springboot/spring frameworks.

You don't really need to become a Java champion or study to pass the spring
exams to get a great Java dev job at an enterprise, as your previous
experience will translate,

I would recommend checking out springboot's official tutorials as they are
very approachable, or don't, sounds like you'll be okay either way :)

------
throw51319
Are people doing anything complex or performant with Node? Isn't it just good
for non-block ops, like a proxy or something?

Usually the more complex systems that use Java are going to hire more
experienced/better devs. So higher pay.

~~~
urthen
I wrote a quick Node Proof of Concept for a high-throughput data processing
pipeline before the "real" team came in and rewrote it in Java.

Not only did the "real" team try and gaslight me into thinking my
implementation didn't work (It did, they copied it wrong), but it took 3
engineers twice the time it took to copy my work into Java as it did for me to
do the original development. The kicker: The Java process was so bloated it
took nearly 2x the compute resources to get the same throughput.

TL;DR I challenge every time someone says "This is complex/high throughput, so
let's use Java instead of Node"

~~~
mrath
Yes, like you said for PoC node is perfectly capable. When people say complex
and high throughput then things like say Kafka or ERPs, banking software come
into my mind. What are some of the biggest systems running on node? Sorry not
challenging but curious to know. I have not heard of any popular big systems
written in node.

~~~
throw51319
Yeah I work on a complex and scalable system for a bank using Java with Akka.

Could Node be as scalable in this regard?

------
user_agent
JavaScript -> Startups that hire young, "dynamic" people doing what usually no
one cares about (most of them must bankrupt by definition).

Java / C# -> The whole enterprise sector. Which is much, much bigger and
people tend to know very little about it.

A lot of devs are funny I think. I come entirely from the enterprise sector
where I have been working my whole life. Looking at a "startup lifestyle" it's
hard for me to think about it seriously. Yes, there's FANG, but who'd like to
work there knowing that there are more healthy options. Oh, yes - the people
who think that kind of work is a paramount of what's possible ;) I'd prefer to
work with people who think clearly, know their options, can assess risks for
instance related with an inherent exotic approach of the JavaScript world.
There's no place in enterprise for unproven methods like that. Corporations
are like military. They must rely on what they use to support themselves.
Therefore, what you prefer to do also depends on which people you like better
- yuppies or older engineers, thinking a little bit more seriously about
themselves. I'm a junior dev, I'm 34 though, and from the very start I had a
feeling that there's something very, very wrong with those JavaScript young
crowds out there. I went to a couple of meetups in my city, and it occurs that
majority of them are the JavaScript ones... There's one serious C# group (I'm
into that stack) and probably 100 JavaScript-ish ones. The quality of the
people in the first one, their maturity plus how they think about technology,
I consider fairly more reasonable for my personal taste. Hence, I won't get
into the JS camp until there's no other choice. Years passed since my first
epiphany of "There's something wrong with those JS people" and the feeling is
only getting stronger. I can't argue about it logically, so I'm not going to
claim that kind of approach is universal in any way, bu I must also say that
after countless hours of discussions with the C# (and Java too) people, a lot
of them shares that feelings. It's about philosophy, about how one think
things should be done on the most fundamental level. I've seen in my life
maybe a handful of really reasonable JS devs, which isn't the case in the C#
or Java world at all...

I didn't refer to most of your questions, @Op. I just want you to consider
which kind of people are your people. I also wonder how do you deal in your
workplace with your specific mindset, which honestly seems like the one often
found among Java devs, not the JS ones.

Myself, I prefer to work on big scale, important, enterprise projects.
Startups are just not for me. But I also like to do my own stuff after work,
and both Java and C# are very comfortable for doing that too. I just feel very
hesitant with using technologies that seem to be better suited for building
let's say prototypes. I'd rather prefer to start with a real thing.

For the rest of the people reading this post - try not to hate me. I'm not
claiming who's a better individual because which language is being used. I'm
purely referring to my own experiences as someone who's having I think a
rather different background than most people in web development. I'd really
like to better understand why I'm having the impressions I've been writing
about.

On the other hand there's a ton of people swearing that JS is the one for
them. And they usually too can't help me understand why it's so obvious for
them, like I don't know how to make them understand that the existence of JS
in an abomination... And that I can't wait when WebAssembly is going to be a
standard ;)

So, the question remains - are we really that different in how we understand
what technology is and how it should be done, or maybe we all have a big
lesson to learn here that's going to come later in our professional endeavors?
Maybe someone with A LOT of real world experience could help with answering
it.

~~~
Chyzwar
I know quite a few banks that heavily invest in node.js. Velocity of full-
stack JavaScript team is something that is hard to replicate. With node.js and
Typescript you can get reasonable performance and decent safety/maintenance.

JavaScript's community is just bigger, there are people with different level
of skill but as a whole it is more welcoming and progressive.

~~~
throw51319
Yeah but what are the banks doing with Node JS? Also, is the single language
that beneficial? There are all sorts of differences between typescript and
node no?

~~~
Chyzwar
Building services for user facing applications. Banks have multi tiered
architecture. They have back-end services (transactions, batch jobs, risk,
calculations, analytics etc) these would be written in mostly in
Java/Python/Scala/C#/C++. You might have situation where there is multiple
systems processing same transactions overnight. Banks also have quite a lot of
user facing applications, most of these now use React/Angular but data fed to
it will not be coming from same services that process transactions(security
and ease of maintenance). You will but another service just for frontend
application that access back-end services via limited API or event queue.

Keep in mind that there is also plenty of systems that are older than me and
have massive teams. Banks are mixed bag. You can work in amazing cutting edge
project or maintain project in dead language.

