Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Linux Python and Java

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
Chrisdb
Posts: 279
Joined: 2018-04-10 07:16

Linux Python and Java

#1 Post by Chrisdb »

I was wondering why Python is more popular on Linux based distros than Java since they're both open source.

To be clear, this is not a topic about which one is better than the other, but more on what made/makes Python more interesting to use.

Thx

arzgi
Posts: 1185
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Linux Python and Java

#2 Post by arzgi »

I think Java still suffers from it's background, when it had severe security flaws.

My brother has worked as a professional coder almost 30 years, and he said Java would have died if Google had not chosen it for Android.

Chrisdb
Posts: 279
Joined: 2018-04-10 07:16

Re: Linux Python and Java

#3 Post by Chrisdb »

arzgi wrote:I think Java still suffers from it's background, when it had severe security flaws.
Which version are you referring to?

neuraleskimo
Posts: 195
Joined: 2019-03-12 23:26

Re: Linux Python and Java

#4 Post by neuraleskimo »

Chrisdb wrote:I was wondering why Python is more popular on Linux based distros than Java since they're both open source.
Good question, but I can only speak from my own perspective.

About 20 years ago, I taught a 300/500-level two-semester course on C++ (so it was fairly deep and rigorous: I'll come back to this in a moment). Some of my students rebelled at the complexity of C++ and the language they gravitated to was Python (recall that 20 years ago, Java was the new and exciting thing). Their argument was that Python was simple to understand and use (C++ and Java not so much so). I think their main objection to Java was the every-thing-is-an-object philosophy. As much as my functional and object-oriented programming friends hate to admit, procedural programming is easy to teach, understand, and use. Python also had (and even more so today) an extensive and easy to understand set of libraries. Now, returning to the deep and rigorous nature of my C++ courses, it is partly my fault and the rest of us who have taught computing. We make some courses too difficult and we present some languages as being for "real" programmers. C/C++ can be simple: consider the Arduino. Java too.

Fast-forwarding to today, I think Python also has an advantage in that it is an interpreted language and in that respect a natural "next" language to learn after shell scripting (e.g., Bash). When one hits the limits of Bash or is working too hard to make Bash do what she/he wants, Python is frequently the next tool in everyone's toolbox. I find myself writing Python scripts instead of Bash script fairly frequently now. Because it has become ubiquitous for those reasons, it is used in many areas where Java (or C/C++) could be used.

My thoughts anyway...

arzgi
Posts: 1185
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Linux Python and Java

#5 Post by arzgi »

Chrisdb wrote:Which version are you referring to?
That must have been years ago, as I saw in prime time tv news the responsible CERT authority in the country being interviewed, and said you should remove Java from your computer. I have not watched tv for many years.

You can google for example 'Java vurnelabilities', the list is long.

There was a lot hype when Java was launched, but soon it came famous for it's security holes.

I already mentioned Google may have some influence, and perhaps the situation is now better, as Java has been used in code examples in many programming theory books I've read recent years.

arzgi
Posts: 1185
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Linux Python and Java

#6 Post by arzgi »

neuraleskimo wrote: Fast-forwarding to today, I think Python also has an advantage in that it is an interpreted language and in that respect a natural "next" language to learn after shell scripting (e.g., Bash). When one hits the limits of Bash or is working too hard to make Bash do what she/he wants, Python is frequently the next tool in everyone's toolbox. I find myself writing Python scripts instead of Bash script fairly frequently now. Because it has become ubiquitous for those reasons, it is used in many areas where Java (or C/C++) could be used.
I can hear you. Last week my wife asked me to do a LibreOffice calc sheet where she could check her working hours and salary. As she explained what should it do, I wrote a python script meanwhile. Asked if I understood right, it was then easier to do in LibreOffice.

For reasons I wrote to Chrsdb in the thread I never really learned Java. But for example C[++] vs python, to print 'hello world', C++ has bigger boilerplate, then you have to compile. Personally I don't wonder at all why python is so popular. I sold my soul to it many years ago :D

Chrisdb
Posts: 279
Joined: 2018-04-10 07:16

Re: Linux Python and Java

#7 Post by Chrisdb »

I come from a Java background so that's the reason I was interested. :D

I've been looking into Python and it is a great language, but sometimes for me it's a bit difficult tot choose a specific kind of implementation as Python offers many possibilities whereas Java only supports the OO principle.

Btw what editor do you guys use? Vim, ..?

neuraleskimo
Posts: 195
Joined: 2019-03-12 23:26

Re: Linux Python and Java

#8 Post by neuraleskimo »

Chrisdb wrote:Btw what editor do you guys use? Vim, ..?
For many years, I used mostly Emacs. Lately, I mostly use Atom, but have been trying CLion (only downside: its proprietary). I have also used Qt Creator, KDevelop, and a few others. I just can't get that excited about a full IDE, but I will admit that CLion is intriguing.

arzgi
Posts: 1185
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Linux Python and Java

#9 Post by arzgi »

Chrisdb wrote:
Btw what editor do you guys use? Vim, ..?
Yes. :wink:

User avatar
PsySc0rpi0n
Posts: 322
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

Re: Linux Python and Java

#10 Post by PsySc0rpi0n »

I also want to share my bit here.

I have no professional experience with programming. I never working on this field. In fact, I'm a recent programming fan. I quit studying back in 1999. Then I graduated in a lower grade course on informatics. We learnt about basics of computers, Windows 98 (iiirc), Word, Excel, Powerpoint, Project, html, Flash and finally a little bit of Visaul Basic 6.0 (others chose networking or web design and graphics, not sure these are the correct words). I chose Visual Basic.

Then this lower grade course also included a intership (translated from Google, not sure if it's the correct term) and we (me and 3 other friends) wrote an user manual for Windows 2000 and we also built an interactive CD-ROM with some sort of a dynamic presentation with a tour about the course.

Then I went to work and after 16 years working out of the field of this course, offspring came. And in the same year I decided to go back to school. I started my graduation at the age of 32 and I found that electronics and programming was something that really excites me.

Unfortunately I don't think I can ever say I have X or Y years of experience in any of these fields. I now deeply regret of not paying attention to my parents words "study, study, study"...
All this to say that I learnt the basics of C programming language during my graduation and I really like it. I think it is still one of the best programming languages to start learning programming. I say this because C is the middle term between lower level languages like Assembly, Cobol and others and languages such as Python, VB.Net, etc. C can teach you how computer memory accesses works without having to learn about Assembly which is way harder, IMO.

I'm now learning Python by my mind is so C formatted that I see myself many times writing for loops in a C style. And many other examples like dealing with strings (arrays of chars) where python has quite few methods that does most of the work for you and in C you need to understand strings to be able to write those same functions that are equivalent to python methods.

My favorite language is C. But I also like Python in a different way and context!

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: Linux Python and Java

#11 Post by pylkko »

As far as I know, Java is the most used programming language still today. But it is not so handy as a scripting language.

User avatar
ohlson4p
Posts: 1
Joined: 2020-02-29 16:04

Re: Linux Python and Java

#12 Post by ohlson4p »

I think Python Is Now More Useful and advance!


User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: Linux Python and Java

#14 Post by pylkko »

..because no one actually cares...different languages are useful for different purposes.

Post Reply