Monday, January 21, 2019

Which is better, Java or Python? And how?


Image result for Which is better, Java or Python? And how?

Currently, Python is doing to Java what Java did to C/C++ when Java was at its peak.

Back in those days many applications which needed performance did still use C/C++ but accompanied by high maintenance costs from the sheer amount of code written to achieve simple tasks and also the difficulty in building OS and machine independent applications.

However, things changed in favor of Java when computers became powerful and hardware costs came down.


People (like me :-) ) who looked down on using Java to build applications started accepting Java's advantages in building applications.

Back then Python was primarily used as a scripting tool and was used in building test automation ( and it still is being used for that purpose too.)

Now comes the glorious age of data science and various tech startups in e-commerce and social space.

What could be done by writing a thousand lines Java code is achieved in a couple of lines of code in Python training. This means that there is less maintenance of code. On top of this Python does not have arcane syntax and the code is pretty much human readable.

For machine learning applications there are very good libraries such as Pandas, sci-kit-learn etc.

The primary advantage with Python is that focus can be put on solving business problems rather than spending the most time on fixing bugs related to faulty code.

Coming to web development frameworks such as Django, Tornado provides a wide range of needs from quick development to high-performance websites.

Edit 1

This is for some people who complained about building enterprise applications using python:

Even though python is not close to catching up in building massive enterprise applications it is imminent. I myself happened to build large scale enterprise applications (which include high-performance web applications, huge pipelines of bioinformatics processing, near real-time applications). And these are for huge enterprises.

If you are interested to learn python please go through python certification

Given Oracle's decision to charge JVM users in the near future the shift from python to java is imminent. It will not happen overnight though. Nor does it mean that all systems will be moved to java

Before java's popularity lot of applications which don't otherwise need critical performance were written in c++. I happened to work on a couple of those. But now people don't write code in c++ unless it is absolutely needed. This means that java did replace a lot of applications which could have been written in Java. I never mentioned all applications will be replaced. Legacy systems will always exist.

One of the reasons for Java's success was RAM getting cheaper and now due to the infinite scalability given by cloud python's speed bottlenecks are not of many issues.

Having said that Java had a wonderful ecosystem built around it in terms of frameworks like spring, struts etc, robust design and architectural patterns which are of great value.

1 comment:

carbon said...
This comment has been removed by a blog administrator.

Python for data analysis

I lean toward Python to R for scientific processing in light of the fact that numerical figuring doesn't exist in a vacuum; there's...