top | item 32030093

Ask HN: Which has more jobs: Python or Java+Kotlin? For a Go dev

2 points| profwalkstr | 3 years ago | reply

I have the impression that only a small fraction of Python jobs are for general programming and backend (my area)... Data science (not my area) seems to be the majority of Python positions. Am I correct in my analysis? Java+Kotlin, on the other hand, rules the backend.

What I love about Python:

- Programmers culture of simplicity, simple solutions are always preferred (contrast that to Java, below)

- Fast development and iteration

- Easy debugging

- No need to deal with Maven or Gradle

What I hate about Python:

- The language is huge, a lot larger than Java, takes a lot more time and effort to master it. It's easy to get started programming in it, but I'm talking about mastering it, not intermediate-level knowledge of Python. And it keeps growing. It's going the way of C++.

- The GIL and lack of multithreading. There are several workarounds but they are still workarounds.

- Deployment (pip, venv, etc)

What I love about Java:

- The JVM

- The performance

- Easy deployments with JARs

- Language small enough to master, unlike Python which is huge (although it seems that Kotlin is also huge)

What I hate about Java:

- Cold start time

- Maven (which is its own beast)

- Gradle (which is its own beast)

- XML obsession

- forced OOP where it doesn't fit well

- Programmers culture of complexity, love for "design patterns", overengineering, "enterprise" stuff, getters and setters (public fields frowned upon), etc

(I know modern Java has gotten better and less enterprise-y but some points above still stand)

I have a feeling I'd be happier writing backends in Python instead of Java (or Kotlin), but the availability of jobs is a huge factor for me.

Background: software developer with >10 year experience, haven't touched Java since 2012 (so I'd need a big refresh and relearn it), have worked on simple Python scripts for automation (so I'd need to dive deeper and learn it more) and most of my work has been with Golang. Plus if I decide to go with Java I feel compelled to also learn Kotlin since it seems the future in the JVM world.

15 comments

order
[+] tgflynn|3 years ago|reply
> The language is huge, a lot larger than Java, takes a lot more time and effort to master it.

Could you elaborate on why you believe that ?

I'm not especially up to date on either Python or Java but I've certainly never had the impression that Python was particularly "huge" or difficult to master. It does come with a comprehensive standard library but I'm not sure why that would count against the language itself.

[+] abraxas|3 years ago|reply
Having used both languages at work my opinion is that Java has a better developer experience due to the strong type system allowing you to use third party libraries much more easily even when their documentation is not quite up to par.

In Python on the other hand it's all resting on good documentation and in the absence of it your work becomes a long journey of sleuthing the input parameters and the return values every step of the way, sometimes forcing you to read the original sources.

When it's already written I like Python code more but when it comes to writing it Java type system coupled with its tooling has no equal.

[+] testbjjl|3 years ago|reply
> The language is huge, a lot larger than Java, takes a lot more time and effort to master it. It's easy to get started programming in it, but I'm talking about mastering it, not intermediate-level knowledge of Python.

If you talk about mastery in Java but exclude build tools like maven and gradle you are far from mastery in the Java ecosystem.

[+] wizofaus|3 years ago|reply
I do wonder what world people come from when they praise the performance of Java. But the "cold start" is definitely my biggest issue, compared to the C#/.NET world where source can be clean compiled and the server accepting requests within seconds - I'm guessing Python may be similar (esp. with no compile phase).
[+] shoo|3 years ago|reply
> what world people come from when they praise the performance of Java

i say this with fondness: python

[+] mr90210|3 years ago|reply
I’d go with Java if you are used to and want to keep building enterprise-like systems.

What’s making you leave Go lang?

[+] profwalkstr|3 years ago|reply
I’m not leaving Golang. I want to expand my toolbox.
[+] pacarvalho|3 years ago|reply
Out of curiosity: Why are you considering only these two? Why not Ruby, Elixir, Rust, etc?
[+] profwalkstr|3 years ago|reply
Between Ruby and Python I’d choose Python. Rust is too low level and picky wrt memory book keeping. I miss the GC. Elixir would make me have to deep in the Erlang and BEAM world, I find it interesting but don’t want to go that way at the moment.
[+] mr90210|3 years ago|reply
Decision paralysis maybe?
[+] umen|3 years ago|reply
How does java equal performance ?
[+] badpun|3 years ago|reply
A lot of core products in FAANGs (e.g. Search at Google) are written largely in Java. They're quite performant, esp. for the scale they operate at. Also, FAANGS are very mindful of performance, because at their scale, it translates into gigantic infrastructure costs. They wouldn't be choosing Java if it had poor performance. On the other hand, Python is/was banned at Google for anything performance-sensitive.

Specifically for serving requests, lack of firbers/green threads is a killer for Java (you will be outcompeted by languages which have fibers, such as Scala), but it's still miles ahead of languages which don't even have full-blown multithreading (i.e. without interpretet lock), such as Python.