Hacker News new | ask | show | jobs
by bengalister 1891 days ago
I have done 10+ years of Java development and 1 year of Python. And I disagree, Java packaging is better. You can package all your dependencies in a fat jar like Spring boot does and you only need to run it with java -jar lib.jar and you are good to go.

Dependency management is a mess in the Python world and my number 1 complaint. You have pip, pipenv, poetry, anaconda, to manage your 3rd parties. And if you want to avoid conflicts and have consistent runtime you need to create a virtual environment to install these libraries and redownload everything.

Otherwise libraries are installed user or system wide, in a directory that depends on the Python version that you use but they are not versioned there.

With Maven you don´t have the issue. Your 3rd parties are downloaded in a global cache directory (the Maven repo) and are all versioned. For the delivery you can either provide them all and have the runner set the CLASSPATH or have them packaged into a single jar.

1 comments

Great, but you will actually want to write some code, so you have to do this insane IDE setup clickfest.

I am not saying Python's packaging is any good, it sucks. But you can't realistically ignore Java's IDE shitshow.

It’s pretty much an import project and done. If not, then someone really fcked up that build file.
But this happened to me every time I had to use any java project over the years. Maybe I'm just unlucky.
Please try OSS java projects and educate your build guy. Java the language may have lots of complaints but from the build/packaging point of view its actually one of the best languages out there. And very, very consistent.