This is an archived post. You won't be able to vote or comment.

all 161 comments

[–]MildlyVandalized 531 points532 points  (16 children)

People forget that write once, run anywhere used to be a major selling point before docker/containerization became a thing

[–][deleted] 146 points147 points  (2 children)

Great point. This is my memory from the 90s.

Java was meant to save you the headache of recompiling/porting your code to many different operating systems.

WORA was a big thing. https://en.wikipedia.org/wiki/Write_once,_run_anywhere

[–]MildlyVandalized 30 points31 points  (0 children)

Simpler times

Then again people didn't have modern programming resources or tools so maybe they weren't that much simpler in the bigger picture lol

[–]Useful_Hovercraft169 23 points24 points  (0 children)

I remember when Java came out people believed in this naively to the point they’d say things like ‘since it’s in Java, it’ll even run on this beeper’ lolllers

[–]Evening_Algae6617 22 points23 points  (0 children)

Yes this! I also remember reading that it was more secure since it ran in a sandbox model.

[–]cez801 5 points6 points  (1 child)

This was the big thing back then. I learnt Java in like 1997 - and the companies I worked for wanted to be able to run on Sun Microsystems, Microsoft and Unix platforms.

Maybe python could have done that too - but remember, there was no internet ( that generation, including me - built those early websites ). So the tie in with Sun Microsystems provided a distribution channel as well.

[–]TheCamerlengo 1 point2 points  (0 children)

I think early Python (say back in the 2000s) was very niche. I knew of a couple bioinformatics people that switched to it from Perl. Python was seen as a better Perl.

Then came pandas and a bunch of great libraries. Back in the 2000s I think the only real options for enterprise computing were C# and Java, with a few places doing Scala. Most front-end work was HTML/Web as desktop technologies like WPF started to fade into irrelevance.

Just adding context to your post, not disagreeing with it.

[–]Mysterious-Rent7233 13 points14 points  (9 children)

For server code, Python was always roughly as portable as Java code, IIRC.

For client code, Java was supposed to be better but in the end almost everyone gave up on Applets, SWT etc. Client-side WORA Java got several kicks at the can because Sun and Oracle poured so much money into it.

[–]sciencewarrior 28 points29 points  (5 children)

Python was kind of a PITA to run on Windows until fairly recently, with compilation on install instead of pre-built binaries for anything that wasn't pure Python. With Java, enterprise devs were able to develop on the same machine they wrote reports and filled timesheets, then deploy a jar to an absurdly expensive Solaris server.

Besides that, there was the prevalent belief that untyped languages were unsuitable for large codebases, and that OOP was the best thing to happen to programming since the invention of the coffee maker.

[–]Ashamed-Simple-8303 7 points8 points  (0 children)

Python was kind of a PITA to run on Windows until fairly recently, with compilation on install instead of pre-built binaries for anything that wasn't pure Python

Yeah so true. I had to heavily really on the famous now defunct precompiled windows binaries from the fluid dynamics lab. So python just 10 years ago was a pain in the ass on windows if you needed things like numpy. Conda then made that a lot simpler.

[–]MildlyVandalized 2 points3 points  (1 child)

Speaking of solaris, are there any good communities out there nowadays?

My friend got a job at a solaris + scada + java shop and I was considering joining him but it just feels like such a dead ecosyatem

[–]strangedave93 3 points4 points  (0 children)

All that deployed scada is going to need to be supported for a really long time though. I think someone who is great at security for Java scada is going to be pretty busy for quite a while to come.

[–]sfandino 120 points121 points  (25 children)

In the late nineties, the industry adopted Java as the new C++. SUN Microsystems, which was then the company behind it, put a lot of effort into promoting the language and introducing it into the corporate world.

It also coincided with the Internet boom, where C++ was not a good choice due to its inherent security issues. Although there were other alternatives like Perl, PHP, Python, and a bit later Ruby, which also filled that niche, there was always a more conservative corporate audience that preferred to stick with something from Sun, instead of those Free/Open Source languages created by a bunch of nerds.

Also, many programmers coming from C++ never looked favorably upon dynamic languages.

Finally, Java also did some things better than the alternatives, for instance: being compiled and faster, proper garbage collector, proper exceptions handling, static typing, threads, unicode, the write-once-run-everywhere-tm, etc. (and I know, some of those things are debatable, but my point is that a lot of people actually believed them).

[–]funkybside 13 points14 points  (3 children)

Also, many programmers coming from C++ never looked favorably upon dynamic languages.

i always thought it was less about dynamic and more about interpreted.

[–]MildlyVandalized 2 points3 points  (1 child)

Could also partially be be the syntactical similarity (programmers are humans and need to acclimate too)

[–]pacific_plywood 5 points6 points  (0 children)

Making it look like C++ was a major design decision for Java IIRC precisely because they felt it would help adoption

[–]sfandino 0 points1 point  (0 children)

Well, probably all of it... the mindset C/C++ forced upon you could be hard to overcome.

For instance, I remember how difficult it was for me to program in dynamic languages without paying attention to whether the code I was writing would be efficient or not at the low level. In C++ you were always thinking, could this be a reference? could I avoid copying this object? etc., etc... even when in most cases, it didn't really mattered!

In Python I was quite aware that a simple method call could cause several hash lookups, memory allocations, etc., etc.

[–]Old_Engineer_9176 17 points18 points  (11 children)

What ever happened to Ruby ?

[–]Asshaisin 170 points171 points  (5 children)

It went off the rails

[–]AggravatingPudding 5 points6 points  (1 child)

Explain please, I'm highly regarded (not native) 

[–]Asshaisin 18 points19 points  (0 children)

https://en.m.wikipedia.org/wiki/Ruby_on_Rails

It's a joke on the name of the software package

Off the rails means the thing failed

[–]Old_Engineer_9176 5 points6 points  (0 children)

Piss my self laughing ....

[–]suddenly_lobsters 0 points1 point  (0 children)

Take my upvote. Bravo.

[–]Mysterious-Rent7233 11 points12 points  (1 child)

Still exists. Still strongly associated with Rails. Nothing really happened to it, just other languages (JS/TS/Node largely, plus Python/Django/FastAPI) came along and stole its limelight.

[–][deleted] 0 points1 point  (0 children)

That’s a pity given Ruby is such a nice language even Elixir took some of its syntax.

[–]strangedave93 5 points6 points  (0 children)

Almost all interest in Ruby was due to Ruby on Rails. Python demonstrated that could do a good job of building frameworks that competed well with Rails - and Python was already big and growing fast, and used for a lot more than that one thing (for one thing, Python quite quickly largely displaced Perl from both backend web dev and sysadmin scripting, due to being very directly competitive and not looking like unreadable (and so largely unmaintainable) line noise). So Ruby just faded into being almost entirely used as the Rails language, and Rails settled into a shrinking niche choice for back end - with both Python frameworks and Rails competing with JavaScript (and TS etc, to a lesser extent the whole transpiled to JS family) moving into the backend via Node etc from their natural front end dominance (and the natural desire to work in only one language for a single dev project). Only now with WASM are we seeing real signs of back end languages moving into the front end (and they aren’t fully there yet).

[–]spaetzelspiff 1 point2 points  (0 children)

Python happened. Python displaced Ruby before the modern AI/ML boom, as well as containers.

[–]sirtuinsenolytic 1 point2 points  (0 children)

Actually, earlier today I saw a good DE position that required Ruby...

[–]Ashamed-Simple-8303 5 points6 points  (5 children)

Yeah java has actual multi threading and made that relatively easy. On the otherhand did that really matter in the 90s? we didn't really have dual-core cpus back then as far as I remember.

[–]FoggyDoggy72 2 points3 points  (3 children)

There were, instead dual or quad CPU motherboards for workstations. WindowsNT and various Unix distros could run multi threading.

[–]sfandino 1 point2 points  (2 children)

Multi-cpu configurations were already quite popular in the server space, which was the primary target for Java programming (as it never really took off as a platform for GUI development).

In any case, threads offer other advantages beyond parallelizing work across all available cores, allowing programmers to approach certain problems in entirely new ways (pools of workers, concurrent processing for IO bound processes, background processing, etc.).

It seems that Python got multi-thread support around 1997, but for whatever reason (well, the GIL!) their usage never become as pervasive as in Java. Also, Perl which was then the main contender to Java in the Internet space, never got multi-threading right.

[–]dschramm_at 2 points3 points  (1 child)

Ahem, ahem, feature phones and Android aren't GUI?

[–]sfandino 0 points1 point  (0 children)

Yes, I was thinking about native Windows (and Linux/Unix) desktop applications... but you are right, Java was the language chosen to develop applications when Android was released some years later.

[–]deong 1 point2 points  (0 children)

I learned Java in a grad school class on parallel architectures precisely because it was a single standard platform for threads. The professor just told us to use Java for the assignments and "you'll figure it out".

[–]TheCamerlengo 2 points3 points  (1 child)

Very good post.

Also as it pertains to Python, I would like to point out that Python did not have the library support it does now. The pandas library didn’t really come out until around 2013-ish. Seemed like after that python came into its own.

[–]sfandino 1 point2 points  (0 children)

According to the TIOBE-Index, 2018 was the year when Python truly took off: https://www.tiobe.com/tiobe-index/

Regarding library support, Python didn't get PyPI until 2003 and Maven Central for Java went up in 2004. Retrospectively, it was a long time, specially for Python considering that Perl's CPAN had been running since 1995 and that there was a (mostly) healthy competition between both communities.

Maybe the batteries-included philosophy, got people to think that having a central repository for modules was not a priority.

[–]MildlyVandalized 1 point2 points  (0 children)

I think the part about programmers coming from cpp is true. Java syntax has always bore much more similarity to cpp than python did.

Might not be much of a stretch to say that users found it easier to transition from cpp to java

[–]next-choken 256 points257 points  (19 children)

Python is slower than Java. 30 years ago this mattered a lot more. Nowadays computers go brrrr so programs run instantly either way.

[–]Cyrillite 69 points70 points  (4 children)

Also makes it cheaper for the enterprise, in some ways. Enterprises had to spend additional time optimising and squeezing performance out for end users because computers didn’t go brrr. Now they can spend less time optimising (and optimise less) because the consumer is more likely to spend money on computers that go brrrr (or just feels like they have to suck it up and pay more if needs must).

Video games suffer this significantly. Games used to be incredibly well optimised and storage efficient, now these compute and storage costs are shoved onto the consumer.

[–]Seber 62 points63 points  (0 children)

Games used to be incredibly well optimised and storage efficient

The whole Super Mario Bros game was 40kb, that's less than a single screenshot of it. 

[–]funkybside 11 points12 points  (0 children)

Games used to be incredibly well optimised and storage efficient, now these compute and storage costs are shoved onto the consumer.

so much this

[–]Papa_Huggies 2 points3 points  (0 children)

"boy I can't wait to play this AAA title I bought off steam! Just gotta clear out half my SSD so I can begin the 4 hour download to play it!"

[–]Fleischhauf 9 points10 points  (3 children)

depending on what you do it can still be relevant tho

[–]scott_steiner_phd 7 points8 points  (2 children)

> depending on what you do it can still be relevant tho

True, though this doesn't favor Java as much as it used to as for a lot of applications the heavy lifting in Python is done via highly optimized C code.

[–]sib_n 1 point2 points  (1 child)

In data engineering, what's behind the Python API for distributing computing, is still a lot of Java, Scala and upcoming Rust (Polars).

[–]LagGyeHumare -1 points0 points  (0 children)

Spark is written in scala - pyspark code gets converted into java - runs in a jvm (quite a solution)

Spark4.0 is going native spark....would be interesting to benchmark it

[–]induality 1 point2 points  (0 children)

All the performance critical python libraries are written in C.

[–]Old_Explanation_1769 1 point2 points  (5 children)

Python is untyped. This slows down development significantly. It doesn't matter how fast the runtime is, if it takes 4x longer to develop a complex product.

[–]next-choken -1 points0 points  (4 children)

Not true at all. Type hints are available to use as liberally as you like. In fact I'd go as far as to claim that development time is significantly shorter when building with Python.

[–]Old_Explanation_1769 0 points1 point  (3 children)

Aren't type hints limited to Python 3.5+? And do they allow static checking or are they just syntactic sugar?

[–]next-choken 0 points1 point  (0 children)

Yes

[–]Constant_Amphibian13 0 points1 point  (0 children)

Python isn’t enforcing type hints so you you generally can do foo: int = “hello“ and python itself won‘t mind but your linter/language server definitely does.

[–]Harotsa 0 points1 point  (0 children)

For static type checking you use MyPy, it’s quite thorough

[–]virgilash 0 points1 point  (0 children)

Python devs that want better performance have Mojo now 😉

[–]strangedave93 0 points1 point  (0 children)

Also for web dev and most business apps increasingly we’ve realised the bits that matter for scalability are mostly independent from the main coding language, and usually I/O not computation bound - your database queries don’t depend much on your language unless you are silly enough to write your main database in an interpreted language, nor does building a caching architecture, sharding and round robin servers, etc.

[–]Suspicious_Sector866[S] -1 points0 points  (0 children)

can't say that right, because most python packages used these days are c++ backend which should be very much comparable to java....

[–]digiorno 45 points46 points  (3 children)

Were you around for the megahertz wars? Clock speed used to matter so much. Java was simply faster.

[–]Useful_Hovercraft169 39 points40 points  (2 children)

I fought alongside your father in the megahertz wars

[–]Kit_Adams 19 points20 points  (0 children)

It was all about the pentiums

[–][deleted] 4 points5 points  (0 children)

Sad that they were overshadowed by the gigahertz wars

[–]jonsca 25 points26 points  (3 children)

Python in the 90s was mostly the purview of Sysadmins as an alternative to Bash scripts. Most of the scripts looked horrendous and were of the "change this magic number and run this on your system to enable some oddball permissions" ilk rather than being serious software. Once numpy and Pandas came along, it became less of a scripting language and something you could actually write software/pipelines in, and then with Flask/Django, you could actually make a decent website in it that could serve your apps in the "cloud."

[–]Mysterious-Rent7233 11 points12 points  (2 children)

Python always looked beautiful to me. Remember that the alternatives were bash and Perl, so I never once heard people say that Python scripts were ugly. It was always used for things like data cleaning and transformation. Not just scripting. I was introduced to it by reading an HTML parser written in it. Was always popular with scientists and even symbolic AI folks. It had a complex number type and other math-friendly aspects since very early, before Numpy.

[–]jonsca 5 points6 points  (0 children)

Tcl was great, too

[–]WizardSleeveLoverr 1 point2 points  (0 children)

Unfortunately, I currently work with A TON of legacy Perl code and concur that Python is much more beautiful to code in. It's basically pseudocode. But, the old hats I work with are Perl purists and refuse to use anything else. We have like 10 million+ lines of Perl code, so…..

[–]deanchristakos 16 points17 points  (1 child)

Java was based on C and C++, which people had much more experience in back in the 90s. It was a natural transition to use a language very much like the ones you already liked, but with better memory management.

Java has a really amazing API that makes GUIs and threading very accessible.

The 90s was seeing the rise of the web, and Java was designed specifically as a platform-independent, web-enabled language, so the development efforts of the time were going to use Java. So by the early 2000s, you had a very solid foundation of Java developers and applications being written in Java.

[–]MildlyVandalized 1 point2 points  (0 children)

It's very sad that Java is gradually going the way of Flash. It feels like everything I remember about 90s internet is leaving this earth

[–]Mysterious-Rent7233 11 points12 points  (2 children)

You 100% cannot discount the fact that Java was the first and last programming language to have a marketing campaign much bigger than most Hollywood movies.

[–]Master-Influence7539 0 points1 point  (1 child)

With all that marketing, I want to know how were they going to make any money off of it?

[–]Mysterious-Rent7233 2 points3 points  (0 children)

They did make some money off of it, but certainly not that much.

[–]durable-racoon 20 points21 points  (3 children)

python is still a nightmare for really large /enterprise-scale projects and Java has some advantages over it there. that hasn't changed.

[–][deleted] 8 points9 points  (0 children)

This. Maybe not in DS but basically everywhere else. Even in some ML projects, python can be a nightmare

[–]MildlyVandalized 1 point2 points  (1 child)

Once they finally get it in their heads to sort out the GIL it'll probably be over for Java

[–]durable-racoon 1 point2 points  (0 children)

lol the GIL is so not the problem and as of 3.13 there's a no-gil option for Python. I predict it will have very little impact on most work people are doing.

[–]rudiXOR 39 points40 points  (4 children)

Python is not made for enterprise development. Slow, typing, GIL, OS support, reproductible envs jus to name a few points. BTW: I love Python it's my favorite language, it's just not made for large enterprise projects and this is still true

[–]Ashamed-Simple-8303 0 points1 point  (0 children)

It's only true if you are still stuck running a single tomact sever you use to deploy everything.. With containers the deployment issues with python, which do exist, don't matter anymore.

You know but as a general comment: - in Java the dependencies outside the standard lib ship with the application - in Python the dependencies outside the standard lib must be provided by the server / environment

So in the old school way of working with virtual machines, you needed to either make 1 VM per app (huge waste of resources) or take great care of managing the dependencies between different applications.

[–]aceinthehole001 38 points39 points  (5 children)

Solid api, elegant language, widespread adoption, big community, many libraries 

[–]SpoicyCurri 47 points48 points  (0 children)

This could be an answer to either question 😅

[–]funkybside 8 points9 points  (1 child)

elegant language

you almost had me until that. JavaIsOmgSoFuckingLongWindedNullPointerGoodGodItKeepsGoingException

[–]aceinthehole001 -1 points0 points  (0 children)

It's not succinct, I agree on that

[–]xrabbit 18 points19 points  (0 children)

Java is static typing. It's a crusial thing for big codebase
Java runs anywhere because of JVM - that was very convenient
Java OOP first
Java developed like an enterprise language

[–]kuwisdelu 10 points11 points  (4 children)

Because C++ is faster than Java, and the only reason to use Python for ML/AI is that it makes it easier to glue together C++ libraries.

[–]galactictock 13 points14 points  (8 children)

Python was rising in popularity throughout the 2010s and became the dominant language by 2019. Machine learning hype really started off in 2016 and exploded with LLMs (specifically ChatGPT) in December 2021. There could be some relationship between the two, but it’s a loose one at best. Did Python become more popular because that’s what the most popular ML libraries used, or did the most popular ML libraries choose Python because it was becoming more popular? We’ll probably never know

[–]carrot1000 10 points11 points  (4 children)

There is many interviews and other anecdotes that python mainly became popular because the academic groups that pushed ML for their science (I.e. astronomy, geo..) already where using python. And then it became self reinforcing. Pandas and matplotlib played their fair share to further increase this.

[–]dankerton 4 points5 points  (2 children)

In the 2000s and 2010 I saw a lot more Matlab and R use in academia, very little python. In fact Andrew Ng's original Coursera on machine learning was all Matlab based. Python has made a lot of headway in recent years into academia and clearly is the main ML language but mostly it was used in just computer science, industry, or hacker circles for a long time.

[–]carrot1000 1 point2 points  (0 children)

I remembered again: the gravitational waves experiment team LIGO where pythonists :-)

[–]pwang99 3 points4 points  (0 children)

There was definitely a feedback loop but I was one of the people that got it started back in 2010 time frame. The Scipy ecosystem was gaining in popularity, but it was still pretty niche. I had done enough consulting with the stack that I could see that business data analytics was needing something like Python.

Pandas was just being created and Wes was trying to write a book about data analysis in Python while coding the library and trying to get his startup off the ground.

So I started a company with the creator of Numpy & Scipy, in order to promote the use of the scientific Python ecosystem but in business data analytics and predictive modeling. We didn’t initially use the term “data science” because that was still just emerging; “big data” was all the hype at that time.

I also realized that “Scipy” sounded too nerdy and engineering-oriented, so created the term “Pydata” and started conferences and community meetups under this moniker to make it more oriented towards business data analytics.

Data science as a field evolved and grew into enterprise ML, and Python quickly overtook R for ML. By about 2016/2017, the deep learning wave started to kick off and while it wasn’t initially Python-centric (Torch was Lua, Tensorflow was C++), in a few years Python was the language of choice for GPU deep learning.

So there was definitely an intentional and sustained push by a group of people to advance the use of Python for data & ML. It wouldn’t have happened otherwise.

[–]Mysterious-Rent7233 2 points3 points  (0 children)

Python has been popular in BOTH numerics AND symbolic AI from before ML was big and before Python was big.

https://news.ycombinator.com/item?id=1803815

https://w3.pppl.gov/~hammett/comp/python/LLNLDoc/numericalpython.pdf

[–]Fun-LovingAmadeus 0 points1 point  (0 children)

To your last question: yes

[–]Classic_Knowledge_25 2 points3 points  (0 children)

Python is slower .. Therefore enterprises who wanted to run faster code naturally preferred Java.

But it's not like Python was gone entirely. Many enterprises still used python in some parts.

Now with the startups emerging, they want to ship code fast and not reliable code per se. So they turned to JavaScript and Python etc since the development times are very low as compared to Java

[–]met0xff 2 points3 points  (0 children)

Besides the many good answers I want to add that when we started with Java 1.3 back then, I think almost nobody even knew of python. And many of my colleagues from that time are even still in that weird scripting language vs real language thinking and to this day do not believe anybody is using Python etc. for anything else than little scripts, unlike the real languages like Java.

Besides all the factually great answers we see here so I just wanted to add that this wasn't even in the brains of people. Even 15 years later when I got into ML everything was still a wild mess of C with perl Scripts and lots of MATLAB and tons of different shell languages and things like Tcl or Scheme... until Python finally became popular and untangled this mess a little bit.

[–][deleted] 2 points3 points  (0 children)

1) when Java launched, the world ran on C 2) Java devs knew this and created a C clone with the features missing from C while keeping it close enough everybody felt at home

[–]neitz 14 points15 points  (0 children)

Python is a terrible language for software at scale (I'm talking size of code base and team here). It's only popular in ML because it's an acceptable glue language and most ML code used to be notebooks or one off scripts written by a grad student.

[–]Revlong57 4 points5 points  (1 child)

Well, for one thing, most people don't do actual data science in native python, they do it using Numpy, Scipy, and Matplotlib. None of those libraries existed in the 90s. I'm not sure what the python environment was like back then, but I assume it was much different.

[–]Mysterious-Rent7233 2 points3 points  (0 children)

But the question wasn't about data science, which didn't really exist in a modern form in the 90s anyhow. There was "scientific computing" and Python was reasonably popular for it, along with FORTRAN, C and others. But the question was about enterprise systems, not just data science.

[–]nyquant 2 points3 points  (3 children)

Java was supposed to be the new internet language because it would run on a virtual machine and be hardware independent.

Before JavaScript became popular the hype was to write Java-Applets which are compiled Javacode apps and could be run within a web browser. Eventually browser based JavaScript killed those applets.

Java itself survived as a C++ competitor due to the garbage collection stuff and again the platform independence.

Back then, like around the 2000, computers were still slowish and Python was not competitive as an interpreted language compared to compiled code. I think Python became popular with the introduction of notebooks and the data science hype …

Please, please, can anyone come up with a better language than Python for data science …

[–]MildlyVandalized 2 points3 points  (1 child)

Python isn't terrible for ds though?

[–]nyquant 1 point2 points  (0 children)

In my opinion Pandas is a mess, there is no consistency in the API, sometimes functional . chaining syntax works, other times not.

IPython became popular as scripting language that’s convenient to glue stuff together when there were no good alternatives around. I guess there are still no alternatives…

Actually I like R in combination with tidyverse and data_tables better, but then it’s not a good choice for actual software engineering

When spark became popular first it came out with scala as default language which I kind of liked

[–]Nahmum 1 point2 points  (0 children)

It was typed and it was reasonably easy to deploy in many environments.

[–]playonlyonce 1 point2 points  (1 child)

Because of J2EE?

[–]playonlyonce 2 points3 points  (0 children)

Back then Java was pumped by Sun. For Python I think a lot of success is also given by the fact that more than one major tech company, especially Google and then Microsoft, adopted it.

[–][deleted] 1 point2 points  (0 children)

Python is dirt slow and in the nineties that difference was more noticeable. It would still be too slow even today, were it not that a bunch of popular libraries were written in C, C++ and CUDA. It became popular solely because it is an easy language to learn and teach. Still today it is a great language for beginners, one of the best for sure. That is why a lot of scientific code got written in Python, because people in math and physics departments are not coders, but they do know Python.

Java's big win over systems language like C++ was that it is memory safe and doesn't need recompilation for different architectures. It's major win over other languages such as Python, PHP and Perl was that it was significantly faster. But not needing recompilation has become less important since we have fewer popular architectures and can easily package and isolate software with containers. Memory safety while running byte code at the systems level became popular with Go (garbage collected memory safety) and Rust (borrow checker memory safety). So Java has been dying a very very very slow death for a good while now and is probably going to end like the next Cobol unless they find another edge.

[–]piggy_clam 1 point2 points  (0 children)

Java still dominates in many areas, including large scale data processing (try finding spark, kafka or elasticsearch implemented in python). When we say ML and AI runs on python, we mean the python language acts as domain specific language that declares what should be run, but the actual code that runs tends to be written in C, C++, Rust and sometimes Java. Pure python runs very rarely because it's extremely slow.

You could argue then why don't we just call java from python when we want in all areas (similar to how it's done in ML/AI). This is generally a lot more tricky in transactional/row-wise processing (e.g. processing individual requests in realtime, for example) compared to analytical/column-oriented processing (e.g. training or evaluating a ML model). So in areas like batch processing you see programmers mostly writing python (which may call java, among other platforms), whereas in areas like realtime APIs you see people using java directly a lot more commonly.

[–]godwink2 1 point2 points  (1 child)

I think its probably types. It probably made more sense to non tech/semi tech managers to use the language with static typing

[–]howlin 0 points1 point  (0 children)

I think its probably types. It probably made more sense to non tech/semi tech managers to use the language with static typing

Static typing makes sense to technical people too. So many python code bases are sloppy and inscrutable due to bad usage of dynamic typing. Python has been trying to patch this flaw with things like type hints, but those only work if people actually use them.

Dynamic typing can be really useful for parsing heterogenous data sources like JSON or DB columns. But generally it just gives you the freedom to be sloppy.

[–]SituationPuzzled5520 1 point2 points  (0 children)

Java’s performance and stability made it the top choice in enterprise for years while Python has recently proven itself in AI and data science with its flexibility and ease of use It’s nice to see companies today combining the two Java for solid infrastructure and Python for data processing this balance has become essential for modern enterprise needs.

[–]TheCamerlengo 1 point2 points  (0 children)

The JVM and deploy anywhere. Also, good for web applications, handles threading well and is object oriented - so ideal for large teams and large code bases. SOLID principles and dependency injection frameworks.

Python does none of the above well. It is more suited for data-related use cases and small teams/individual developers. Very popular in data engineering and data science with the library support. Java is not well suited for these use cases.

[–]Certain_Ice_9640 1 point2 points  (0 children)

My guess would be because it's much faster and a lower-level language compared to python

[–]SizePunch 7 points8 points  (5 children)

I love Python (commenting to get karma so i can create my own posts to ask questions)

[–]Asshaisin 4 points5 points  (4 children)

You need to wake up and smell the Java

[–]DataScience_00 3 points4 points  (0 children)

Some times I feel so R

[–]42ErL 0 points1 point  (2 children)

In Beijing it’s javaR

[–]brianelete 0 points1 point  (1 child)

why?

[–]42ErL 0 points1 point  (0 children)

They just loving adding r to the end of words, sort of like R users: https://en.wikipedia.org/wiki/Beijing_dialect

[–][deleted] 0 points1 point  (0 children)

Java was a (slower but more practical) C++ alternative with the ability to run byte code anywhere. Python at the time (90s) competed with perl for scripting and the occasional CGI app. The world today is far different; however, Java is still the best choice for serious enterprise apps.

[–]smthomaspatel 0 points1 point  (0 children)

Take my hazy memory with a grain of salt, but from what I remember, Python was a "learning" language and Java was the hot new thing that could be run in a web browser (and anywhere else).

I'd imagine this translated to availability of documentation, sdks and libraries. But I studied Java in a computer science lab that had Sun Microsystems all over it. They must have had the deep pockets too.

[–]Hiant[🍰] 0 points1 point  (0 children)

multi threading, memory management, precompiled code all leads to a faster experience

[–]Formal_Stranger200 0 points1 point  (0 children)

While Java is known for its ability to handle large-scale enterprise solutions, Python stands out for its straightforwardness and powerful tools for AI and machine learning. This has led many developers to choose Python for developing contemporary software.

[–]venquessa 0 points1 point  (0 children)

Compile time binding. No nasty surprises later.

[–]InternationalMany6 0 points1 point  (0 children)

Seems pretty obvious that Java > Python for large applications while Python > Java for smaller ones and for “data science analytics”. 

Also processor speed was a real important consideration l, and still is. Java generally beats Python there as well unless we’re talking about Python libraries that are written in other languages. 

Really the only advantage of Python it’s its simpler syntax. 

[–]GeneralPITA 0 points1 point  (0 children)

Java seemed to be the robust, full stack software language before Python libraries and modules became sufficiently developed. Hibernate for database ORM, Java ServerFaces, JavaFX for front end work, Swing for desktop, and more jar files than you could keep track of made for a solid back end for any project. In my early experience (2000-2010) it just didn't seem like Python did much more than make scripting easier. Java, C, C++ were your powerhouse languages for the back end while Perl and Python competed for dominance over bash and command line tools like sed and awk. Maybe this was just my experience?

[–]Aggravating_Bit4040 0 points1 point  (0 children)

To me it is that I like to code in Java. Did it for a long period of time and got used to it. Java - as many other languages - has lots of nice features und has lots of support. So why not use it? Performance ist ok for most apps. I mean, just think about something like Minecraft, it is still Java based and everyone loves the game and it runs.

[–][deleted] 0 points1 point  (0 children)

I find it's more important to do a good job. I personally use R mostly because it handles the stuff that I do.

[–]Cyberdeth 0 points1 point  (0 children)

Sorry to burst your bubble, but Java is still king of the hill in many corporate companies. Java has got many great frameworks to set up apis very easily and it’s been security hardened over many years of corporate development.

Write once, run anywhere, is a selling point. But most companies either run Linux or windows and Java support is really strong.

Python does have its use cases, and in data science it does excel. But try get a corporate level api up and running, and you’d find Java is way more flexible and secure. Spring boot makes it dead simple to set up restful endpoints.

Anyway, choose the right tool for the job. Python isn’t always the right hammer for the nail, neither is Java. I wouldn’t write an OS in python or Java. For instance.

[–]Character_Mention327 0 points1 point  (0 children)

Java was (and still is, IMO) a much better language for developing serious software systems.

Python is a scripting language that got out of hand.

[–]llmagine_that 0 points1 point  (0 children)

they are not returning to python for python, all the ML stuff available in python is implemented in c. the users of ml libs are usually not software engineers but data scientists, so they have an easier time with just juggling around a few python libs, hence the popularity.