Dr Darren's thoughts on some problems with "Python culture" (and it isn't the fault of the language, per se, nor of the best Python language developers or commercial Python library developers)

Webel IT Australia promotes the amazing Mathematica tool and the powerful Wolfram Language and offers professional Mathematica services for computational computing and data analysis. Our Mathematica tips, issue tracking, and wishlist is offered here most constructively to help improve the tool and language and support the Mathematica user community.
DISCLAIMER: Wolfram Research does not officially endorse analysis by Webel IT Australia.
Icon class
icon_class
far fa-sticky-note
icon_class_computed
far fa-sticky-note
Note kind
Policy level
Keywords
Excitedly:
Ooh, ooh, I can do that in Python! I can do that in Python! Python can do that!
Dr Darren says:
I am not anti-Python. I use Python (but not only), and Webel IT Australia offers professional Python services (but would always advise first where another technology solution, such as Wolfram Mathematica, might be a better technology fit). What I am "anti" is some of the indiscriminate claims made about Python's superiority for task X, Y, or Z that some over-zealous Python users seem compelled to make on behalf of Python – typically by Python coders who have never used another language.

Most of the problem (and there is definitely a problem) with "Python obsession" is not the Python language per se. It's a powerful language, with many compelling capabilities, the IDE support is excellent (IntelliJ IDEA and PyCharm rock), and yes, in a sense, it's "free" (although it may cost you more if it's not the best technology fit).

And many of the inconveniences such as that ... ahem .. Python syntax and all that indenting stuff is now largely made much easier by good IDEs.

The problem (which does exist) is prevailing Python culture, for which I certainly don't blame the Python developers and the best of the Python professionals (the best of whom have used many other languages and know about software architectural principles that apply to all coding languages and higher level systems engineering principles):

  • Python seems to attract a relatively high percentage of users who have never used another language or are not professional software engineers.
  • The relative standard in terms of true awareness of software engineering principles on most Python forums is, simply put, rather poor compared with many forums for most other language and frameworks supporting those languages. (The forums for specific commercial Python packages operated by the best software development companies are often far better.)

  • There is far too much "Monkey see, Monkey do" propagating poor practices (again, not the fault of Python as a language per se).
  • Too many less experienced Python users seem to be overly encouraged to offer up their "this runs" solutions on forums without actually knowing enough to warrant offering such advice up (and even if it runs).
  • Many Python users seem to have gotten in their heads that it does not matter how one does something in Python and that as long as it runs one is a genuine software engineer.
  • Many Python users have no awareness of OO Design Patterns and principles of best functional use that have little to do with the specific language (and require experience beyond one language).
  • All too often, less experienced Python users see something on a Python forum posting and conclude "that's how you do it in Python" or even declare that it's the "Pythonic" way to do it. Indeed the notion "Pythonic" has become an excuse for not thinking, a form of argument by delegated authority.
  • Just because low level data structures like dict exist does not mean you are someone "supposed" to only use those in Python or that "that's the Pythonic way". And the same goes for Pandas DataFrame, powerful though it is alone. Python has classes and learning how to use them in combination with lower level data structures is crucial; well designed classes help organise code and well designed methods and interfaces (yes, in Python), specify what is done without specifying exactly how it is done (the business of lower level data structures as used for particular implementations).
  • Are you are true Python newbie? Please do read that previous item again and let it sink in. Just because you see someone doing something with a dict alone on a forum posting does NOT mean it's the best way to do it.
  • Many Python users seem to "project" assertions onto Python technology about its superiority for use for specific domains without any awareness of other alternatives, and even simply pull statistic out of the air to defend their claims.
  • "Python is more readable!" Maybe you've only be reading Python! Like all that indent-or-crash stuff? Those bracket thingies used in many other languages instead of relying indenting are not a bad idea (and you can of course indent too).
  • Some Python-only coders have a tendency to zealously "gang up" on more experienced coders who offer other technology solutions, presumably because they like to cling to what they know, and since they only know Python, it's the hammer that sees everything as a nail (the same can also be levelled at JavaScript coders who only know JavaScript).

And above all: Too many less experience Python users who have never used other languages are confusing the existential pleasure of coding (which applies to any language) – and getting something working on a computer – with the specific pros and cons of Python relative to other technology solutions.

"Oooh, oooh, I can do that in Python! I can do that in Python!
Python is useful. Python is powerful. But Python is not always the only or best choice. And Python sure ain't Mathematica! You may wish to read this next:
Relates to
Related notes
Related notes (backlinks)
Related snippets (extracts)
Visit also
Visit also (backlinks)