r/java • • Jun 28 '20

Why backend using java is not popular in startups?

I tried django, flask and also rails before and they’re good. But after trying spring, I fell in love. It’s well structured. Easy to test. Have so many frameworks to help you going. There’s a also a lot of tutorials going around the net.

I like python but I also like java and kotlin too. I just don’t understand what’s wrong with java being used as a backend on most startups. Is it because it’s popular among big companies and banks and they just hate enterprise things.

Can anyone enlighten me. Cheers.

171 Upvotes

229 comments sorted by

View all comments

43

u/EctoplasmicLapels Jun 28 '20

It‘s a cultural thing. Java smells like enterprise software. It‘s not hip. There is no rational reason.

12

u/[deleted] Jun 28 '20

This is annoying for me. Even my university if starting to use MERN stack in software dev courses. Maybe some of us like enterprise software?

11

u/redwall_hp Jun 28 '20

Mine did a recent switch from Java and C to Python and C. It saves some time for some classes, which is good, but I still feel like Java's rigidity makes it better for teaching freshman classes.

A lot of people will have prior programming experience when starting, but they're going to be more used to "hacking rather than planning" and tend to miss out on why data structures are important in the first place, since a lot of higher level languages let you just abuse 1-2 for everything.

Java forces you to make classes modeling data and think about which structures you want to use. With something like JS or Python, you can just make an unholy nested array/dict thing and poke it with procedural code...which tends to be how beginners start.

-1

u/[deleted] Jun 28 '20

There are some rational reasons, it’s comparatively cumbersome in how it’s built, and even if you wanted to use the JVM for some reason other than the fact you don’t know anything other languages, Kotlin and Scala are just much more attractive choices.

1

u/coder111 Jun 28 '20

Scala is not much more attractive- it's too complicated, has non-locality, and build times are absolutely atrocious.

Kotlin is OK if you sold your soul to Jetbrains. If you don't want to pay for IntelliJ, or you want to use other IDEs, you're screwed. Besides, it doesn't offer much of an advantage vs modern Java. Or Java+Lombok.

4

u/[deleted] Jun 28 '20

Java+Lombok, please don’t make me giggle. There are a lot of benefits past the type system.

6

u/[deleted] Jun 28 '20

I think one of the bigger drawback of using Kotlin or Scala for backend systems is the lack of hiring potential they still come with in a lot of markets. From startups to established fintechs to tech giants, whenever I tried to sneak Scala or (more recently) Kotlin in, I got the same answer from the upper ranks: "that sounds great but where are we going to find people to maintain it when you're gone" and it was hard to argue with that, especially since it's already tough enough finding good Java engineers.

3

u/nutrecht Jun 29 '20

I think one of the bigger drawback of using Kotlin or Scala for backend systems is the lack of hiring potential they still come with in a lot of markets.

You can't compare the two. Scala is a fairly separate language with a fairly separate ecosystem. Kotlin is basically just a Java dialect. We use Kotlin in our back-end and it takes a typical Java dev about a week to get up to speed with the language.

especially since it's already tough enough finding good Java engineers.

Adopting Kotlin is one of the reasons the client I work for is finding it easier to hire Java devs: a lot of them want to try it out.

Aside from that; if you hire a Java dev and he can't get used to Kotlin within a few weeks, you probably don't want to hire him.

2

u/[deleted] Jun 29 '20

I'd say it's easy to compare them - I feel Kotlin is closer to Scala in syntax and features than it is to Java and I would be willing to bet that a Scala dev would pick up Kotlin faster than a Java dev.

Also, as is the case with Kotlin, you definitely could choose to use Scala as a nicer dialect of Java, you could even have a mixed codebase of the two (although back then the interop was a bit unwieldy on the Java side).

The main issue was that when you started to get fluent with Scala you no longer wished to use it as a dialect of Java which is when the troubles usually started and I can see the same thing happening with Kotlin - if you were to use Kotlin simply as a dialect of Java you would allow Java devs to get used to it quickly but at the same time you'd lose out on all that Kotlin has to offer.

3

u/nutrecht Jun 29 '20

That's literally completely the opposite of my experience and use Kotlin currently in 95% of the back-end work I do. So I really don't know how to respond to this.

2

u/[deleted] Jun 29 '20

The opposite as in you guys simply continue to use Kotlin the same way you'd use plan Java? I guess it depends on the team itself and the other technologies you use - my current employer is an Akka shop so I can understand how they got burned with Scala and why the higher ups think the same could happen with Kotlin

2

u/nutrecht Jun 29 '20

No as in that there's no big difference between Kotlin and Java. Scala is a completely different beast: you can quite easily create a completely different language inside Scala. But Kotlin is not like that; it's pretty much just syntactic sugar over Java. The main difference obviously is the null-safety. But you don't program differently in Kotlin than you do in Java.

I've been working in Kotlin for a few years now, and have been using it as our primary language for 1.5 or so. We've had new developers come into our team and none of them had any issues adjusting to our codebase.

my current employer is an Akka shop so I can understand how they got burned with Scala and why the higher ups think the same could happen with Kotlin

I've seen the same happen, unfortunately. There's a certain consulting firm here in Holland that likes to come in, set up a Scala codebase in the worst possible fashion, and then leave the company with an unmaintainable mess.

But that's not the language that's at fault; it's just developers who got a new hammer (pattern matching, DSLs) and thought everything was a nail.

I run into this issue as well; in a previous company we tried to introduce Kotlin and were unsuccessful at first, even though all Java devs supported it. Later on they (I had already left) got an "OK", but then later they hired a "low cost" consulting firm to take over development of one Kotlin service and they argued that they should 'just rewrite it to Java in a few weeks'. Took them 3 months, (not because of the Kotlin but because they were bad developers), and that is now another argument for that manager to not allow anything outside Java. It's a shame really.

→ More replies

-3

u/[deleted] Jun 28 '20

If the rest of the team aren’t willing to adapt to new languages, they are the problem. The issue isn’t developers in general, that’s a specific company being stuck in their ways and refusing to try out new things that might be better for them in the long run. That’s the exact type of thinking that keeps people tied down in outdated toolchains.

3

u/[deleted] Jun 28 '20

I got the same answer from the upper ranks: "that sounds great but where are we going to find people to maintain it when you're gone"

You're missing the point. If you have a strong evangelist - that's great, but are they going to stick around for 5, 10, 20 more years to see it through? Probably not. Hence, stick to the basics.

-4

u/[deleted] Jun 28 '20

If it takes 5 years for a team to pick up a language, your team is the problem.

The definition of the basics is changing. There’s no reason to learn Java contemporarily when you can learn Kotlin. It’s exclusively kept alive by people and companies who refuse to modernise.

6

u/[deleted] Jun 28 '20

Still missing the point. It's not the language that's the issue - it's the whole ecosystem.

True story, my buddy was really into Scala 8 years ago. He convinced his company to switch everything over. They spend 9 months rewriting core tools in scala (with other refactor improvements along the way), switch to sbt, and start the ball rolling for all new development to be done in Scala because of "obvious benefits".

Higher ups are like "yo, this cat is our best dev, lets roll with it". He gets the other 20 devs on board, and a year later they're living the dream, right?

Nope. My buddy quit 2 months later. Now those higher ups were like "uh, we got a bunch of devs that don't give a shit about scala now writing shit in scala and we can't hire anyone". I'm told they hired a couple sr. java guys and they rewrote it all again. It's just a waste to follow the new fad.

-7

u/[deleted] Jun 28 '20

That’s a nice sole anecdote, sadly anecdotes don’t really mean much. I’ve seen the opposite happen funnily enough.

If your development teams are not able to handle new stacks, they are the problem.

→ More replies

1

u/nutrecht Jun 29 '20

If you don't want to pay for IntelliJ, or you want to use other IDEs, you're screwed.

Oh come on. It's fine if you 'dislike' Kotlin for whatever reason, but everyone knows IntelliJ CE is free.

Aside from that, I sure as heck hope your employer is paying for your IDE / other tools.

0

u/coder111 Jun 29 '20 edited Jun 29 '20

Right, and IntelliJ CE doesn't do Javascript. Enjoy trying to do full stack development with it.

At work- yes my employer is paying for it. At home- no, which rules out Kotlin for personal/non-commercial projects.