Poll

Do you like Python?

Yes, I love it.
22 (24.2%)
Yes, I like it.
24 (26.4%)
No, I don't like it
17 (18.7%)
No, I hate it.
14 (15.4%)
No opinion, indiferent
11 (12.1%)
I refuse to answer
3 (3.3%)

Total Members Voted: 90

Author Topic: Python becomes the most popular language  (Read 118738 times)

0 Members and 6 Guests are viewing this topic.

Offline madires

  • Super Contributor
  • ***
  • Posts: 8177
  • Country: de
  • A qualified hobbyist ;)
Re: Python becomes the most popular language
« Reply #575 on: May 04, 2022, 10:07:41 am »
Cause this isn't the pythonic way.
Code: [Select]
array = ['Hello', 'world']
for x in array:
    print(x)
See how much easier it is? If you really really need the index, you enumearte it.

... as a few unix shells do also support for a long time. We should educate software developers to write good code instead of promoting some programming languages to be more fool-proof.
 

Offline PicuinoTopic starter

  • Super Contributor
  • ***
  • Posts: 1033
  • Country: es
    • Picuino web
Re: Python becomes the most popular language
« Reply #576 on: May 04, 2022, 10:29:33 am »
The Pythonic way is:

Code: [Select]
array = ['Hello', 'world']
print(' '.join(array))

But I wanted to show the problem that occurs with out-of-range indexes.
 

Offline PicuinoTopic starter

  • Super Contributor
  • ***
  • Posts: 1033
  • Country: es
    • Picuino web
Re: Python becomes the most popular language
« Reply #577 on: May 04, 2022, 10:33:17 am »
... as a few unix shells do also support for a long time. We should educate software developers to write good code instead of promoting some programming languages to be more fool-proof.

I agree with the Python philosophy that says "Errors should never pass silently. Unless explicitly silenced."

The Zen of Python: https://peps.python.org/pep-0020/
https://en.wikipedia.org/wiki/Poka-yoke
« Last Edit: May 04, 2022, 10:37:33 am by Picuino »
 

Offline PicuinoTopic starter

  • Super Contributor
  • ***
  • Posts: 1033
  • Country: es
    • Picuino web
Re: Python becomes the most popular language
« Reply #578 on: May 04, 2022, 02:06:26 pm »
« Last Edit: May 04, 2022, 02:08:36 pm by Picuino »
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6952
  • Country: fi
    • My home page and email address
Re: Python becomes the most popular language
« Reply #579 on: May 04, 2022, 02:10:23 pm »
We should educate software developers to write good code instead of promoting some programming languages to be more fool-proof.
Yup, because chasing fool-proof is a fool's errand.

Let me switch to POSIX C for an example.  The way to read unlimited-length lines in POSIX C from input (a FILE pointer) is
Code: [Select]
    size_t  size = 0;
    char   *line = NULL;
    ssize_t len;

    while (1) {
        len = getline(&line, &size, input);
        if (len <= 0)
            break;

        /* The line is in 'line'.  It is a dynamically allocated buffer,
           with 'size' chars currently allocated for it.
           It has 'len' chars in it, followed by a nul char '\n'. */
    }

    free(line);
    line = NULL;
    size = 0;

    if (ferror(input) || !feof(input)) {
        /* Error reading input stream! */
    }
Getting C programmers use this dynamically allocated approach (with getline()) allocating or reallocating the line buffer (like realloc()) whenever necessary, in my experience has been the first step towards sane dynamic memory use patterns.

The second step is to drop examples with opendir()/readdir()/closedir() like the turd they are, and help them use nftw(), scandir(), and glob() for example.

If they've been introduced to function pointers, one can whet their appetite by showing a practical example of how to do run-time plugins using e.g. scandir() or glob(), dlopen(), and dlsym().

Along the basic trail, you can show as tangential nuggets or goals almost (but not quite) in reach right now, in the form of powerful but simple implementations without the common pitfalls.

Getting back to Python, the learning curve, especially the "I must suck before I get nice results" part, is much gentler.
The question "how do I do X" is no longer hard at all; it is getting the general understanding to the level that the real question, "how do I do X so that Y", is even asked.

With "harder" languages, the learners understanding of the entire logic of programming grows as they learn their first programming language.  But with fast and easy languages, you can get nice results by copying a thirty-line example off the web.

I can definitely see why so many are interested in developing a programming language that would be best suited to be the first programming language; so that its structures and properties themselves supported building a working intuitive model of what programming itself is.

Unfortunately, that means that that language would really be only useful to learn the cognitive basics of programming, and would have to then learn one or more "proper" languages to acquire a marketable skill.  To me, that's a good tradeoff, because knowing more than one programming language seem to be almost a prerequisite of being any good at it at all (statistically speaking).  Others hate the idea, and instead look for a Single Language to Rule Them All.
 

Offline jfiresto

  • Frequent Contributor
  • **
  • Posts: 876
  • Country: de
Re: Python becomes the most popular language
« Reply #580 on: May 04, 2022, 03:23:42 pm »
...
Getting back to Python, the learning curve, especially the "I must suck before I get nice results" part, is much gentler.... I can definitely see why so many are interested in developing a programming language that would be best suited to be the first programming language; so that its structures and properties themselves supported building a working intuitive model of what programming itself is.

Unfortunately, that means that that language would really be only useful to learn the cognitive basics of programming, and would have to then learn one or more "proper" languages to acquire a marketable skill....

In what ways and why is Python not "proper"? Using Lisp as a benchmark, the big thing it does not encourage (on purpose) is using the language to rewrite itself. Python is full of simple, useful ideas that once learned make it a pleasantly "low friction", high level language. But to understand and exploit those ideas you may have to abandon some features or design patterns that Python does not need or in ways has superseded.
-John
 

Offline PicuinoTopic starter

  • Super Contributor
  • ***
  • Posts: 1033
  • Country: es
    • Picuino web
Re: Python becomes the most popular language
« Reply #581 on: May 04, 2022, 03:47:02 pm »
Actually Python is a good language to start learning programming and it is also a very requested language in the market.
I know of no other real language that is equally well suited to both objectives.
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7950
  • Country: nl
  • Current job: ATEX product design
Re: Python becomes the most popular language
« Reply #582 on: May 04, 2022, 04:35:52 pm »
Cause this isn't the pythonic way.
Code: [Select]
array = ['Hello', 'world']
for x in array:
    print(x)
See how much easier it is? If you really really need the index, you enumearte it.

... as a few unix shells do also support for a long time. We should educate software developers to write good code instead of promoting some programming languages to be more fool-proof.
The point is that "for" in python is a foreach. And forcing it to an enumeration and indexing is using methods that are for a different language.
First thing that you learn in programming is to use a language and it's features, and not misuse it. In C you learn what are the side effects of operators, and why you never program with those in mind.
The same way there is pythonic ways to solve problems, and there are ways that were brought in from C. The issue is that if you take some C code, remove the semicolons and curly brackets, it would more or less run as python code. But that's not how the language is supposed to be used. I have a very simple test, if someone understands the difference. Just ask them to write "hello word" into a file. If their answer doesn't start with "with" they don't get the language, at all,  they just want to write the same code they always do in python.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6952
  • Country: fi
    • My home page and email address
Re: Python becomes the most popular language
« Reply #583 on: May 04, 2022, 07:21:41 pm »
...
Getting back to Python, the learning curve, especially the "I must suck before I get nice results" part, is much gentler.... I can definitely see why so many are interested in developing a programming language that would be best suited to be the first programming language; so that its structures and properties themselves supported building a working intuitive model of what programming itself is.

Unfortunately, that means that that language would really be only useful to learn the cognitive basics of programming, and would have to then learn one or more "proper" languages to acquire a marketable skill....

In what ways and why is Python not "proper"? Using Lisp as a benchmark, the big thing it does not encourage (on purpose) is using the language to rewrite itself. Python is full of simple, useful ideas that once learned make it a pleasantly "low friction", high level language. But to understand and exploit those ideas you may have to abandon some features or design patterns that Python does not need or in ways has superseded.
By that language, I was referring to the educational languages that are designed to build up the understanding of programming in general as the learner learns the language, not Python.

I do fear that Python is "too easy", in the sense that typical programming exercises I've seen are too easy (just a couple of lines, easily memorized instead of understood and integrated).  I haven't evaluated any courses that teach Python as the first programming language, so I could easily be wrong.

The risk in being too easy is in that the learners may never build the understanding necessary to apply the language in problem solving.  In the best case, I believe problem solving itself should be taught in parallel (or maybe even prior) to programming languages.

Perhaps a course that concentrates on using Python to solve actual problems, ignoring the typical examples and exercises one usually sees, would avoid the pitfalls.

I mean, one of my favourite C examples is a simplified sort command, starting from the choice of whether you read all input lines and sort them, or whether you read each input line into a self-sorting data structure like a binary heap (min-heap if sorting ascending, max-heap if descending).  In Python, sorting lines from instream ascending unless reversed is true and outputting them to outstream is just
    outstream.write(''.join(sorted([line for line in instream], reverse=reversed)))

The other side of the coin in ease of use is that choices are made for you, and that hides the fact that there ever was a choice to be made.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15423
  • Country: fr
Re: Python becomes the most popular language
« Reply #584 on: May 04, 2022, 07:57:00 pm »
To paraphrase Bob Widlar, every idiot can program. ;D

Elegant, robust, readable and maintainable code is another thing entirely.
 
The following users thanked this post: Nominal Animal

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28063
  • Country: nl
    • NCT Developments
Re: Python becomes the most popular language
« Reply #585 on: May 04, 2022, 08:11:29 pm »
Actually Python is a good language to start learning programming and it is also a very requested language in the market.
I know of no other real language that is equally well suited to both objectives.
Back in the old days Pascal was the language used to teach programming. But people also got stuck with that and started using Pascal for real applications.  >:D

To paraphrase Bob Widlar, every idiot can program. ;D

Elegant, robust, readable and maintainable code is another thing entirely.
Very true! I always say it takes 10 years to learn how to program properly after finishing school/university.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 9537
  • Country: gb
Re: Python becomes the most popular language
« Reply #586 on: May 04, 2022, 09:34:36 pm »
Very true! I always say it takes 10 years to learn how to program properly after finishing school/university.
Not really. It takes 3 or 4 years for the talented to get good, and the rest never will.
 
The following users thanked this post: eugene

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6952
  • Country: fi
    • My home page and email address
Re: Python becomes the most popular language
« Reply #587 on: May 05, 2022, 07:22:47 am »
To paraphrase Bob Widlar, every idiot can program. ;D

Elegant, robust, readable and maintainable code is another thing entirely.
Quite!  When the language is so high level that traditional exercises become single-liners, how do you teach new programmers about elegant, robust, readable and maintainable code at all?
(I mean this as a true question that I do not know the answer to, and occasionally ponder about.)

My own use cases of Python are such that all the interesting and important choices and algorithms are done elsewhere, in somewhat "hidden" code (that I often describe simply as "the engine" (or "the engine underneath"), with the express intent that the exposed, user-modifiable Python code is simple "business logic" that does not require any programming skill.  The use of interpreted language with human-readable, human-modifiable code without any toolchain or explicit tooling, is a careful design choice.

(Well, for the server side web stuff I do, the choice of Python is basically made between what web hosting providers support and provide, not what is theoretically possible or what programming language is best suited for the task.  Dictated by exigencies, if you will.)
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6952
  • Country: fi
    • My home page and email address
Re: Python becomes the most popular language
« Reply #588 on: May 05, 2022, 08:03:04 am »
A Python-related practical issue right now: CVE-2022-29799 directory traversal issue in networkd-dispatcher, which is written in Python.  A rather simple TOCTOU (time-of-check to time-of-use) bug with security implications.

In Linux, in security sensitive applications where each component (directory or symlink) along the path to the target file needs to be checked for access rights, this is straightforward to solve using openat() and an extra file descriptor per directory along the path, up to the point when the target file or directory is opened, when the previous temporary descriptors are closed.  This is rock solid, and cannot be confused or tricked by renaming or replacing any component during the traversal; there is no race window, no timing holes at all.  The only downside is the temporary use of a limited resource (file descriptors); a common limit currently is at most 1024 open descriptors per process, and can be trivially raised for privileged processes.

How the hell do you teach someone to do this properly in Python?  I am not sure myself.  To me, it seems like something that a Python module (perhaps os.path or pathlib) should provide, as a "security-sensitive open() variant" with maybe a callback to check each path component after it has been opened, not something one should open-code in Python.

(For my own web service back ends, I use a different security model, where only the access mode to the target directory and target file are relevant; the intermediate path components are not examined.  This does enforce a more tree-like security model, where access can become only more restricted, not less, when going deeper into the filesystem hierarchy.  It does shift a lot of the responsibility to the system administrator, though, so it has to be setup correctly from the get go, to be truly secure.)
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1770
  • Country: se
Re: Python becomes the most popular language
« Reply #589 on: May 05, 2022, 09:18:26 am »
I'll just leave a single data point here point about Python.

My son is not a programmer by vocation or choice, but recently graduated* in Economics with a master thesis about GANs and asset pricing.
He did his work with the help of the usual tools: jupyter notebooks, tensorflow, google colab.

He was able to quickly put together the needed application, generate graphs and animations, experiment with data and algorithms etc. etc.

Could have done the same work in C/C++/C# or other languages?
Undoubtedly, I trust he could have pulled it off.

Would the extra amount of effort be warranted?
I don't believe it in the least.

As many have said, the heavy lifting is done by non-python code someone else wrote, but the availability of powerful libraries and the ease of stringing them together and experimenting is absolutely a strong point of Python and of course, a case of positive feedback: the more it's used, the more libraries you can find, a bit like that other thing, Arduino (where 90% of the libs are crap, though).

*Magna cum laude, from a very famous Italian Uni, in time, while working full time and with tuition fees waived due to academic results. Bear with me for playing proud parent. ;D
Nandemo wa shiranai wa yo, shitteru koto dake.
 
The following users thanked this post: gmb42, Siwastaja, Nominal Animal

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: Python becomes the most popular language
« Reply #590 on: May 05, 2022, 11:00:35 am »
.
« Last Edit: August 19, 2022, 05:27:46 pm by emece67 »
 
The following users thanked this post: newbrain, Picuino

Offline PicuinoTopic starter

  • Super Contributor
  • ***
  • Posts: 1033
  • Country: es
    • Picuino web
Re: Python becomes the most popular language
« Reply #591 on: May 05, 2022, 01:35:15 pm »
For decades C and Java have been the most popular languages, with no rival. Suddenly that position is taken over by the almost newcomer Python.
An important aspect of this change in the popularity list is the grief that this means for some programmers, who must go through the five classic stages to accept the new situation.
Denial, Anger, Bargaining, Depression and Acceptance
I think it is important to recognize and respect the feelings of others. Besides being a tolerant behavior, it is very practical to understand other people with other opinions.

Some opinions I've read I think are trying to deny the popularity of Python.
Others respond with a phrase that is not really an answer "Python is popular because people are dumb". I wonder if that same answer would be given by them in the case of having to explain the popularity of C during all these previous years.
In other cases I sincerely believe that they don't know/use Python and simply give opinions based on prejudice.

Anyway, regardless, I agree with Nominal Animal that by reading the whole thread it is possible to extract a much broader point of view than just one person can provide, about the possible reasons for Python's popularity.

 

Offline jfiresto

  • Frequent Contributor
  • **
  • Posts: 876
  • Country: de
Re: Python becomes the most popular language
« Reply #592 on: May 05, 2022, 01:49:54 pm »
Quote from: Nominal Animal link=topic=293290.msg4156591#msg4156591
... When the language is so high level that traditional exercises become single-liners, how do you teach new programmers about elegant, robust, readable and maintainable code at all?...

By doing original programming at an equally high level. Elegant, robust, readable and maintainable code does not vanish above a certain level of abstraction.
-John
 
The following users thanked this post: bpiphany, Picuino

Offline Cerebus

  • Super Contributor
  • ***
  • Posts: 10576
  • Country: gb
Re: Python becomes the most popular language
« Reply #593 on: May 05, 2022, 02:47:17 pm »
For decades C and Java have been the most popular languages, with no rival. Suddenly that position is taken over by the almost newcomer Python.
An important aspect of this change in the popularity list is the grief that this means for some programmers, who must go through the five classic stages to accept the new situation.
Denial, Anger, Bargaining, Depression and Acceptance
I think it is important to recognize and respect the feelings of others. Besides being a tolerant behavior, it is very practical to understand other people with other opinions.

Some opinions I've read I think are trying to deny the popularity of Python.
Others respond with a phrase that is not really an answer "Python is popular because people are dumb". I wonder if that same answer would be given by them in the case of having to explain the popularity of C during all these previous years.
In other cases I sincerely believe that they don't know/use Python and simply give opinions based on prejudice.

Anyway, regardless, I agree with Nominal Animal that by reading the whole thread it is possible to extract a much broader point of view than just one person can provide, about the possible reasons for Python's popularity.

I'm afraid that your own prejudices show here. You're seemingly reacting to criticism of your personal favourite and then projecting your feelings of hurt onto people who, in your mind, have had their personal favourites knocked off the top spots. The truth is that professional programmers of any experience don't give a damn for the popularity of their personal favourite programming languages. I've been a professional programmer since the 1970s, my personal favourites, Smalltalk 80 and Algol 68, have never even been in the top 10 of any popularity contest and it bothers me not one jot. A professional only cares that the language they use for any given project is appropriate to it. Learning to use a new language for a specific project is trivial if you're seasoned and is not the insurmountable barrier that it seems to the novice who only has reasonable facility with one or a very few tools.

I suspect that much of Python's popularity can be explained by fashion (to which the computing world is far from immune) and the rest by "If all you have is a hammer then everything looks like a nail". In the 80s and 90s many real world projects were produced in Pascal largely because that was what people had learned. That did not, and still doesn't, make Pascal a good automatic first choice of language for a project. Proof, if it is needed, that Pascal was a popularity related fad is its near total disappearance from the modern landscape. Notable also is that its grown up cousin, Modula 2, which was much more suitable for production programming and very easily learned by Pascal programmers  didn't even get a "look in". Fashions change, the contents of the heads of fresh graduates change, and now Pascal is nowhere to be seen. Look back at the 1987 version of the 'most popular' programming languages and Lisp and Prolog take second and third place, driven by the first wave of AI as the current fashion; try and tell me that wasn't "fashion over good sense".

Like it or not, popularity has nothing to do with any notion of 'goodness', either in being "good at its job" or "a good fit for a job". If popularity contests found the best solutions then elections would find the best politicians, and we know that they don't; heck they don't even manage to find the least worst politicians in most cases. Pinning the overall effectiveness of a programming language to popularity is foolish, constantly returning to that popularity as an argument in its favour compounds the foolishness.

And on that note, I have to go and vote in the local elections here in the UK and futilely register my disapproval of the current incumbents by claiming to support someone else.

Anybody got a syringe I can use to squeeze the magic smoke back into this?
 

Offline PicuinoTopic starter

  • Super Contributor
  • ***
  • Posts: 1033
  • Country: es
    • Picuino web
Re: Python becomes the most popular language
« Reply #594 on: May 05, 2022, 05:00:12 pm »
I'm afraid that your own prejudices show here. You're seemingly reacting to criticism of your personal favourite and then projecting your feelings of hurt onto people who, in your mind, have had their personal favourites knocked off the top spots. The truth is that professional programmers of any experience don't give a damn for the popularity of their personal favourite programming languages. I've been a professional programmer since the 1970s, my personal favourites, Smalltalk 80 and Algol 68, have never even been in the top 10 of any popularity contest and it bothers me not one jot. A professional only cares that the language they use for any given project is appropriate to it. Learning to use a new language for a specific project is trivial if you're seasoned and is not the insurmountable barrier that it seems to the novice who only has reasonable facility with one or a very few tools.
What bothers me is not the criticism of my favorite language (which is not Python, if I had to choose I would prefer C). What I don't like is this tendency to only criticize what is bad about the language, sometimes with very biased or unrealistic arguments. That doesn't help me to learn anything.

On the other hand it is not true that professional programmers don't care about popularity. They do care about it in many ways. Some positive (more support for their preferred language) and some negative (for example that there are many neophytes doing bad code and discrediting the professionals).


Proof, if it is needed, that Pascal was a popularity related fad is its near total disappearance from the modern landscape. Notable also is that its grown up cousin, Modula 2, which was much more suitable for production programming and very easily learned by Pascal programmers  didn't even get a "look in". Fashions change, the contents of the heads of fresh graduates change, and now Pascal is nowhere to be seen. Look back at the 1987 version of the 'most popular' programming languages and Lisp and Prolog take second and third place, driven by the first wave of AI as the current fashion; try and tell me that wasn't "fashion over good sense".

Pascal is another of my favorite languages. In fact it was the first structured language I learned (before C) because it was taught at the university at the time to start learning to program.. For me it was a great discovery and a great teaching with which I learned to structure data and code.
Still today Delphi/Object Pascal is ranked 12th in popularity in the Tiobe index, and ADA (another similar language I learned in those years) is ranked 29th.
They are still alive and I am not surprised since they have many virtues.

In the PLC world Pascal (a similar language) is the standard (IEC 61131-3) for structured programming.
https://en.wikipedia.org/wiki/Structured_text
« Last Edit: May 05, 2022, 06:01:34 pm by Picuino »
 

Offline PicuinoTopic starter

  • Super Contributor
  • ***
  • Posts: 1033
  • Country: es
    • Picuino web
Re: Python becomes the most popular language
« Reply #595 on: May 05, 2022, 05:26:20 pm »
Like it or not, popularity has nothing to do with any notion of 'goodness', either in being "good at its job" or "a good fit for a job". If popularity contests found the best solutions then elections would find the best politicians, and we know that they don't; heck they don't even manage to find the least worst politicians in most cases. Pinning the overall effectiveness of a programming language to popularity is foolish, constantly returning to that popularity as an argument in its favour compounds the foolishness.

I wouldn't mind starting a thread about the advantages and disadvantages of Python, but unfortunately the news I started this thread with is the rise for the first time in 20 years to the top spot in popularity of a language that wasn't C or Java, it was Python.

You may give little importance to popularity, but it is an important metric of how much a language is used and how much support it receives.
The big companies behind this surge in popularity are no fools. They have supported this language for compelling reasons. That's my view.
« Last Edit: May 05, 2022, 05:30:50 pm by Picuino »
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15423
  • Country: fr
Re: Python becomes the most popular language
« Reply #596 on: May 05, 2022, 05:47:59 pm »
I'll just leave a single data point here point about Python.

My son is not a programmer by vocation or choice, but recently graduated* in Economics with a master thesis about GANs and asset pricing.
He did his work with the help of the usual tools: jupyter notebooks, tensorflow, google colab.

Of course. That's one of the reasons why Python has gotten so popular.
I've heard they even introduced programming courses in Python in art schools.

While the times and the language itself are very different, the comparison with BASIC that some have made is relevant. Python has helped bring programming back to the masses, just like BASIC did a few decades ago. While I personally think some other languages might have been better for this purpose, we can't deny that it's working. As "home computers" disappeared and the personal computer appeared, BASIC also mostly disappeared - somewhere in the early 90's. For two good decades, nothing replaced it and the "masses" lost interest in programming. And even non-programmers in professional, scientific settings didn't know how to program anymore and had to hire software engineers. So, Python has brought this back.

So, it covers needs that were just not met. It doesn't "replace" other languages, and I don't think it should. That's probably where "popular" is misleading. It's not that C or whatever is being replaced by Python, it's mostly that a lot more people are now programming than ever before, using Python.
« Last Edit: May 05, 2022, 05:49:34 pm by SiliconWizard »
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28063
  • Country: nl
    • NCT Developments
Re: Python becomes the most popular language
« Reply #597 on: May 05, 2022, 07:52:34 pm »
I'll just leave a single data point here point about Python.

My son is not a programmer by vocation or choice, but recently graduated* in Economics with a master thesis about GANs and asset pricing.
He did his work with the help of the usual tools: jupyter notebooks, tensorflow, google colab.

Of course. That's one of the reasons why Python has gotten so popular.
I've heard they even introduced programming courses in Python in art schools.

While the times and the language itself are very different, the comparison with BASIC that some have made is relevant. Python has helped bring programming back to the masses, just like BASIC did a few decades ago.

So, it covers needs that were just not met. It doesn't "replace" other languages, and I don't think it should. That's probably where "popular" is misleading. It's not that C or whatever is being replaced by Python, it's mostly that a lot more people are now programming than ever before, using Python.
I think popular is somewhat misleading indeed. To me it seems Python is used to partly replace Excel and add automation to making calculations. After all, Python allows to interface to outside things far more easely compared to Excel and it has a much lower threshold compared to Matlab / Labview / statistics packages. A researcher can easely create a Python script that collects data from a bunch of test equipment and do analysis on the data. At one of my previous jobs one of my tasks was to process data that was collected during experiments into data that could be read into a statistics package by a researcher. Nowadays a researcher can do without the statistics package AND do the data pre-processing as well using Python.

From my point of view Python is great for one-off programs that need to run in a very controlled environment (OS version, Python version, library verions). However I'm holding on to my opinion that Python is not the ideal choice for software that needs to be distributed and maintained long term. The core of Python is too much a moving target.
« Last Edit: May 05, 2022, 07:56:34 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1195
  • Country: ca
    • VE7XEN Blog
Re: Python becomes the most popular language
« Reply #598 on: May 06, 2022, 01:07:43 am »
Learning to use a new language for a specific project is trivial if you're seasoned and is not the insurmountable barrier that it seems to the novice who only has reasonable facility with one or a very few tools.
Learning enough to solve a problem in the way you would have in some other language you have experience with is trivial, sure. Learn the syntax for basic flow control a few I/O functions and you can do a lot. Learning to use the language in idiomatic fashion, understand the full elegance - or inelegance - of the tools it provides, and be able to write concise, good code? I don't think so. That takes many hours in front of the terminal, and there's not much of a substitute for it.

I actually think this is responsible for a lot of the hate Python is getting here. Complaints about significant whitespace and such are so :palm:. Use the language for a few hours and let yourself put aside your hate, and you will forget about this entirely. Likewise, Python isn't getting any credit here at all for its elegant sugar, and I would hazard that many of those bleating about whitespace have no idea what a dict comprehension is. It's a bit of a catch-22 that you can't really fairly evaluate a language until you've actually used it in anger for a while.

Quote
I suspect that much of Python's popularity can be explained by fashion (to which the computing world is far from immune) and the rest by "If all you have is a hammer then everything looks like a nail". In the 80s and 90s many real world projects were produced in Pascal largely because that was what people had learned. That did not, and still doesn't, make Pascal a good automatic first choice of language for a project. Proof, if it is needed, that Pascal was a popularity related fad is its near total disappearance from the modern landscape. Notable also is that its grown up cousin, Modula 2, which was much more suitable for production programming and very easily learned by Pascal programmers  didn't even get a "look in". Fashions change, the contents of the heads of fresh graduates change, and now Pascal is nowhere to be seen. Look back at the 1987 version of the 'most popular' programming languages and Lisp and Prolog take second and third place, driven by the first wave of AI as the current fashion; try and tell me that wasn't "fashion over good sense".

Other than C, it's hard to think of a language whose popularity you wouldn't explain away as 'fashion', and C has a long list of its own shortcomings. Technology moves pretty quickly, and programming languages aren't really an exception. Good or bad, something staying at the top of the popularity list for decades is going to be the exception, not the rule, and the sort of pejorative tone you seem to be taking here that this is a bad thing is a bit absurd to me. Why should programmers not be taking advantage of the state of the art?

If we compare like-for-like, Python has mostly displaced languages like Perl (which I would say was the closest competitor, with the CPAN libraries and ubiquity), PHP and bash. It is a vast improvement on any of those, and I will fight anyone that tries to argue otherwise. The concept of scripting languages isn't going anywhere.
73 de VE7XEN
He/Him
 
The following users thanked this post: newbrain

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4533
  • Country: nz
Re: Python becomes the most popular language
« Reply #599 on: May 06, 2022, 04:27:16 am »
If we compare like-for-like, Python has mostly displaced languages like Perl (which I would say was the closest competitor, with the CPAN libraries and ubiquity), PHP and bash. It is a vast improvement on any of those, and I will fight anyone that tries to argue otherwise. The concept of scripting languages isn't going anywhere.

I like Ruby much more than Python. Unfortunately it hasn't gotten the same mindshare outside of a couple of web frameworks.

Modern Javascript is also better than Python, especially TypeScript. With v8 it also runs far far more quickly. It's for general scripting, not only in the browser. There are a huge number of libraries available in npm.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf