• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Python

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Python is a trending programming language nowadays. I started to surf about it and gained a lot of info but still I am not clear with few things.

1) Why we go for python when all the works done by python can also be done by other programming languages as well ?
2) When we actually go for Python as our choice of programming ??
3) What is the Real Time scenarios where Python scores over the other languages ???

Thanks in advance
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sharadraj Caliamourthy wrote:
1) Why we go for python when all the works done by python can also be done by other programming languages as well ?



Why choose those languages over Python? There are several things to consider when choosing a programming language. This article has a good summary for their particular domain (integrating Amazon Web Services). Here is a personal recommendation from one of the Elders of the Internet. Much of it comes down to personal preference. If you feel you are more effective with one particular tool, you will probably do a better job with it.

Sharadraj Caliamourthy wrote:
2) When we actually go for Python as our choice of programming ??



I'm not clear on what your question is here.

Sharadraj Caliamourthy wrote:
3) What is the Real Time scenarios where Python scores over the other languages ???



Real Time has a particular meaning in the hardware and software world. I don't think Python is a big player in that arena. I think you are actually asking for a comparison of"real world" performance. Since Python is a interpreted scripting language, it is unlikely that speed is a favourable benchmark when compared to compiled C or the intensively optimized Java. This site makes a game of language comparison, allowing one to choose languages, tests, architectures, etc. and compare them (These caveats apply). See here that for this set of benchmarks on this architecture that Java is almost always faster, but usually requires more code and memory (to a lesser degree) to accomplish the same task. Whether these advantages would carry over to a non-trivial application is up for debate, but they give you an idea that there are many benchmarks to measure a language by, so there won't be a clear winner.
 
Sharadraj Caliamourthy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Joe. I got the answer for my second question through your links (y)
 
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sharadraj Caliamourthy wrote:1) Why we go for python when all the works done by python can also be done by other programming languages as well ?...


Like any programming language, Python is a good fit for some requirements and users, not for others. For example, right now I'm working in a team that is looking at Big Data technologies and tools for data science.

As a developer, my focus is on scalable tools/languages that will meet our needs, such as Scala and Apache Spark, which are starting to look like a pretty powerful foundation for large-scale data-centric applications. Meanwhile, my data scientist colleagues are looking mainly at tools for data analysis and visualisation, and Python is proving really useful here. They are not experienced programmers, but Python is easy for them to get started with, and provides excellent tools for scientific computing, data analysis, charts, interactive coding via IPython Notebook etc. They can achieve their goals far more easily with Python than with Java (or Scala) for example. In these days of multi-tier distributed computing, there is no need to insist on "one language to rule them all", so you can choose the right tool to meet your needs.

Python is also proving really useful to our team as an ad hoc coding tool - we can write a quick script to solve a problem far more quickly than in Java, and we can share these tools around the team more easily. Because our work-flow involves a lot of ad hoc data cleansing, repeating and refining those processes as we learn more about the data etc, we need to be able to keep those iterations as short as possible, and Python helps us to do this.

As a mature and widely used language, Python also has tons of powerful libraries available for pretty much any application requirement. We have built some prototype applications really quickly with Python, that I have been able to hand over to the data scientists to adapt and play with as they see fit. If we'd used Java, it would have taken 4 times as long to implement these applications, and I would probably have had to maintain them myself. Python empowers my data scientist colleagues to solve their own problems instead of having to ask a developer to do it for them.

One of the really interesting trends in our field right now is that Python is becoming even more useful to my data scientist colleagues, as we start to explore Apache Spark, because Spark offers APIs in Python and Scala (as well as Java). So I can explore coding Spark applications in Scala, while they can look at using Spark's Python API and apply the same underlying tools/techniques in a more user-friendly language e.g. via IPython Notebook.

Another area where Python is helpful is looking at NoSQL databases. For example, the free online course M101P MongoDB for Python Developers teaches you how to write simple web apps using Python and MongoDB. Python works well with MongoDB (JSON maps really easily to Python dictionaries) and there is far less boilerplate than in Java, so you can experiment and explore more easily. Yesterday I spent a couple of hours playing with Neo4J, which I haven't used before, and almost immediately I found a Python library that allowed me to write some simple data creation scripts to get started with. You can of course do all this with e.g. Java, but maybe you wouldn't always have time to do so. Python is becoming a kind of lingua franca which allows you to implement almost anything really quickly and easily, even if you eventually decide you need to use a different language/platform for a production application. Python is just a great tool to have in your toolbox.

Of course, Python has its disadvantages and you need to decide for yourself if it will meet your needs, but it is an excellent tool for our purposes, so I'm glad that we have been able to break free of our organisation's in-house regime of "Java for everything" and discover languages like Python and Scala that make programming fun again!

Finally, I would always encourage any serious programmer to try a new language from time to time: it's fun and you will always learn something interesting and valuable along the way.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic