Python - no arguments, please
-
PIEBALDconsult wrote:
You don't have to build it before deploying -- just copy the code to the destination. Edit: Oh, I had read that as advantages, not disadvantages.
That still works as a disadvantage - with no compilation step, you've lost a basic sanity check on the code you're deploying. :)
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
True, but let's assume the code has been tested. Similarly, it's too easy to change code in production. This is a disadvantage of SQL procedures and such as well.
-
Maybe this article will shed some light on the subject: what-can-you-do-with-python-in-2021-python-real-life-applications-e5b5ee8c95e9[^]
Thanks. That article gives a good overview on how Python is used effectively today. C# can, and is, used for all of those. What I am looking for are comparisons in those areas, or generally, where Python would be an advantage. For example, design and coding time in VS 2022 (which supports both languages), performance, etc.
-
MSBassSinger wrote:
What disadvantages are there, if any, to using Python over C#?
You don't have to build it before deploying -- just copy the code to the destination. Edit: Oh, I had read that as advantages, not disadvantages.
MSBassSinger wrote:
Is Python a better general purpose language,
Python is not a general-purpose language. It is a scripting language, a glue language. Any heavy lifting has to be done in a general-purpose language -- then import it as a package.
MSBassSinger wrote:
or in place of, C#
Definitely not.
Excellent reply. Thank you.
-
The only reason I use it is the fantastic library named 'NumPy' :) NumPy - Wikipedia[^]
Wikipedia wrote:
Written in Python, C
C for the win!
-
I am NOT criticizing Python and I implore the reader please do not start nor engage in any “flame war” on Python. I have programmed in a number of different languages over my 40 years as a developer. My current languages that I use the most are C# and T-SQL. I see that Python is popular, or at least appears so. What value-add(s) does Python bring that I cannot get now in C#? What disadvantages are there, if any, to using Python over C#? Is Python a better general purpose language, or is it better at some specific niche(s) in development? I would really like to get a clearer picture of why using Python along with, or in place of, C# would be of value. Thanks in advance for the non-flame responses.
We use it as a scripting language for our software. (integration into a C++ application). It's relatively lightweight, lot of engineering folks not in programming domain use it as a simple tool to do lot of math stuff. Our clients (and internal folks) do lot of data analysis with it.
CI/CD = Continuous Impediment/Continuous Despair
-
We use it as a scripting language for our software. (integration into a C++ application). It's relatively lightweight, lot of engineering folks not in programming domain use it as a simple tool to do lot of math stuff. Our clients (and internal folks) do lot of data analysis with it.
CI/CD = Continuous Impediment/Continuous Despair
Maximilien wrote:
do lot of data analysis with it
But what language is the data analysis code written in?
-
I am NOT criticizing Python and I implore the reader please do not start nor engage in any “flame war” on Python. I have programmed in a number of different languages over my 40 years as a developer. My current languages that I use the most are C# and T-SQL. I see that Python is popular, or at least appears so. What value-add(s) does Python bring that I cannot get now in C#? What disadvantages are there, if any, to using Python over C#? Is Python a better general purpose language, or is it better at some specific niche(s) in development? I would really like to get a clearer picture of why using Python along with, or in place of, C# would be of value. Thanks in advance for the non-flame responses.
I would add: - it's free - it works everywhere. And I mean browsers, iPhones, computing cards, workstations, PCs, macs, [watches](https://www.zerynth.com/blog/programming-hexiwear-wearable-iot-in-python-using-zerynth/) - there's a huge number of libraries and code examples available. - it's a very approachable language for teaching. As much as Python makes me swear some days, I'd recommend it as a teaching language over C or C++ for power and simplicity, and also over C# and Java for how ubiquitous it is and how it's not tied down to any platform or vendor. I love C#, very much, but it's a very Microsoft-centric experience (and mindset) still and that's not healthy for someone starting out who needs every option open to them. - It's the language that anyone dealing with data analysis will use. Engineers, environmental scientists, Data analysis, AI (Obviously). The introduction of Jupyter notebooks was such a boon (and obviously this is no longer Python-only) I will say, though, that the library system will do your head in. It's wonderful until it's not. BUT: you generally get the code, so last ditch efforts of debugging and manual patching can work in emergencies. It also has some awkward syntax. Very awkward. And the whole culture is a little weird, and dare I say fanatical at times. And can Guido please stop pasting Monty Python quotes in the Python docs. Dude. Seriously.
cheers Chris Maunder
-
I would add: - it's free - it works everywhere. And I mean browsers, iPhones, computing cards, workstations, PCs, macs, [watches](https://www.zerynth.com/blog/programming-hexiwear-wearable-iot-in-python-using-zerynth/) - there's a huge number of libraries and code examples available. - it's a very approachable language for teaching. As much as Python makes me swear some days, I'd recommend it as a teaching language over C or C++ for power and simplicity, and also over C# and Java for how ubiquitous it is and how it's not tied down to any platform or vendor. I love C#, very much, but it's a very Microsoft-centric experience (and mindset) still and that's not healthy for someone starting out who needs every option open to them. - It's the language that anyone dealing with data analysis will use. Engineers, environmental scientists, Data analysis, AI (Obviously). The introduction of Jupyter notebooks was such a boon (and obviously this is no longer Python-only) I will say, though, that the library system will do your head in. It's wonderful until it's not. BUT: you generally get the code, so last ditch efforts of debugging and manual patching can work in emergencies. It also has some awkward syntax. Very awkward. And the whole culture is a little weird, and dare I say fanatical at times. And can Guido please stop pasting Monty Python quotes in the Python docs. Dude. Seriously.
cheers Chris Maunder
For writing small server programs it is fine. I would not use it for anything with a GUI (and admittedly have not ever tried). For large programs it becomes harder to maintain. By large I mean > 1 man-year of code. And for small programs, starting from scratch, it is actually fun, because with zero you make something that does something, quickly!
"If we don't change direction, we'll end up where we're going"
-
For writing small server programs it is fine. I would not use it for anything with a GUI (and admittedly have not ever tried). For large programs it becomes harder to maintain. By large I mean > 1 man-year of code. And for small programs, starting from scratch, it is actually fun, because with zero you make something that does something, quickly!
"If we don't change direction, we'll end up where we're going"
I've backed myself into far tighter corners than Python on 2+ year projects :-D It's all about architecting the solution. And some tech stacks are really well suited to this. And some just aren't...
cheers Chris Maunder
-
I am NOT criticizing Python and I implore the reader please do not start nor engage in any “flame war” on Python. I have programmed in a number of different languages over my 40 years as a developer. My current languages that I use the most are C# and T-SQL. I see that Python is popular, or at least appears so. What value-add(s) does Python bring that I cannot get now in C#? What disadvantages are there, if any, to using Python over C#? Is Python a better general purpose language, or is it better at some specific niche(s) in development? I would really like to get a clearer picture of why using Python along with, or in place of, C# would be of value. Thanks in advance for the non-flame responses.
Python is interpreted; easier to get started with (IMO). Popular in schools; universities. Unless one has a specific problem to solve, it's another solution looking for one.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
-
Maximilien wrote:
do lot of data analysis with it
But what language is the data analysis code written in?
Python with NumPy. We deal with large dataset of 3d points and 3d measurements. (see bio for company) We do a lot in the software itself, but sometimes the clients have domain (proprietary) specific things they want to do.
CI/CD = Continuous Impediment/Continuous Despair
-
I've backed myself into far tighter corners than Python on 2+ year projects :-D It's all about architecting the solution. And some tech stacks are really well suited to this. And some just aren't...
cheers Chris Maunder
I am not saying that it is useless for large projects. And "architecting" is ofc important, but let's say 2+ years PLUS volatile requirements PLUS a situation where developers come and go. Then I would not recommend Python as the first choice.
"If we don't change direction, we'll end up where we're going"
-
I am not saying that it is useless for large projects. And "architecting" is ofc important, but let's say 2+ years PLUS volatile requirements PLUS a situation where developers come and go. Then I would not recommend Python as the first choice.
"If we don't change direction, we'll end up where we're going"
I've not had experience with large (and long) python projects yet, but two things really stick out for me when I think about your statement: 1. Comments seem to be very much a second (or third or fourth) consideration. Not even having formal syntax support for multi-line comments just strikes me as being of the mindset that support for comments is a necessary evil, not an integral part of documenting the niggly things that a dev, 3 years later, will need to refer to 2. The absolutely terrible variable names you see in so many samples. Having started my career being forced to maintain a massive legacy FORTRAN codebase in a research institution many, many years ago, I'm still scarred by the variables named
A
,AA
,AAA
,A2
,B2
and so on. And no, this isn't hyperbole: this was the common naming method. I don't see stuff as bad in Python, but naming isn't exactly deeply rooted in the Pythonic culture. It really does not help the cause of maintainability.cheers Chris Maunder
-
I've not had experience with large (and long) python projects yet, but two things really stick out for me when I think about your statement: 1. Comments seem to be very much a second (or third or fourth) consideration. Not even having formal syntax support for multi-line comments just strikes me as being of the mindset that support for comments is a necessary evil, not an integral part of documenting the niggly things that a dev, 3 years later, will need to refer to 2. The absolutely terrible variable names you see in so many samples. Having started my career being forced to maintain a massive legacy FORTRAN codebase in a research institution many, many years ago, I'm still scarred by the variables named
A
,AA
,AAA
,A2
,B2
and so on. And no, this isn't hyperbole: this was the common naming method. I don't see stuff as bad in Python, but naming isn't exactly deeply rooted in the Pythonic culture. It really does not help the cause of maintainability.cheers Chris Maunder
Now I am quite confused and almost wonder if you are commenting on my comment. #1 I said nothing about comments. #2 I said nothing about variable names. But... Maybe I just triggered you think about these things. Funny thing is that neither of these two are what I was thinking of. As for comments I dunno. You surely remember the hype around the Ada programming language. They only (AFAIK) had
--
on each line for comments. And one of the key language design criteria was: "WORMS i.e Write Once Read Many timeS" And actually Python has docstrings that lazy people could use for multi-line comments. But that would be considered extremely bad style, certainly any formal code review would reject such stuff. As for naming, there are at least strong linting/formatting tools (Pep8/Black), that my organisation has in our CI, you cannot check in without it. And what I've seen of naming culture the Python community is quite strong. In web snippets? Maybe less so. Yeah, I have done my fair share of FORTRAN too, where naming was darkness... Despite such draconic measures Python code rots rapidly, but IMO the key reason is the lack of typing combined with optional arguments. In long call chains, in the end, you have no idea what the elephant is being passed or returned. Cheerz :java:"If we don't change direction, we'll end up where we're going"
-
Python is interpreted; easier to get started with (IMO). Popular in schools; universities. Unless one has a specific problem to solve, it's another solution looking for one.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
Gerry Schmitz wrote:
Python is interpreted; easier to get started with (IMO).
That certainly was an essential argument in favor of interpreted languages ... Long time ago. In my student days as a junior, around 1980, our group project - no more than a couple thousand lines - required more than half an hour compilation time, on a VAX. So we made sure to make all known changes/fixes in the source code before starting a recompilation. I haven't timed compilers for a few years. Last time I did timing, on a complete recompilation of a system with a few hundred modules, on the average the compiler produced eight object code modules per second. If you use an IDE such as VS, which takes the responsibility for recompiling modified modules only, compilation is practically unnoticeable. No compilation delay once was an argument in favor of interpretation. It no longer is.
-
Now I am quite confused and almost wonder if you are commenting on my comment. #1 I said nothing about comments. #2 I said nothing about variable names. But... Maybe I just triggered you think about these things. Funny thing is that neither of these two are what I was thinking of. As for comments I dunno. You surely remember the hype around the Ada programming language. They only (AFAIK) had
--
on each line for comments. And one of the key language design criteria was: "WORMS i.e Write Once Read Many timeS" And actually Python has docstrings that lazy people could use for multi-line comments. But that would be considered extremely bad style, certainly any formal code review would reject such stuff. As for naming, there are at least strong linting/formatting tools (Pep8/Black), that my organisation has in our CI, you cannot check in without it. And what I've seen of naming culture the Python community is quite strong. In web snippets? Maybe less so. Yeah, I have done my fair share of FORTRAN too, where naming was darkness... Despite such draconic measures Python code rots rapidly, but IMO the key reason is the lack of typing combined with optional arguments. In long call chains, in the end, you have no idea what the elephant is being passed or returned. Cheerz :java:"If we don't change direction, we'll end up where we're going"
megaadam wrote:
#1 I said nothing about comments. #2 I said nothing about variable names. But...
My mind is merely meandering and thinking about what Python in a big project would be like. I started thinking about the things that I struggle with now when I look at new code, and the rush of comment and varname angst came out. Sorry if that seemed a little random. Pent up venting... And typing. I completely forgot about typing! They have the type hints, but they on;y get you so far. Yeah, there's tools, and conventions, and reviews, and everything that's available to disciplined teams. And then there's the slippery slope of getting away with whatever you can. Naming was darkness. What a great turn of phrase.
cheers Chris Maunder
-
Gerry Schmitz wrote:
Python is interpreted; easier to get started with (IMO).
That certainly was an essential argument in favor of interpreted languages ... Long time ago. In my student days as a junior, around 1980, our group project - no more than a couple thousand lines - required more than half an hour compilation time, on a VAX. So we made sure to make all known changes/fixes in the source code before starting a recompilation. I haven't timed compilers for a few years. Last time I did timing, on a complete recompilation of a system with a few hundred modules, on the average the compiler produced eight object code modules per second. If you use an IDE such as VS, which takes the responsibility for recompiling modified modules only, compilation is practically unnoticeable. No compilation delay once was an argument in favor of interpretation. It no longer is.
I decided to do a couple of compiles, partly to show how much faster CMake/Ninja is than MSBuild. 240KLOCs of C++, MSVC compiler, VS2022: - MSBuild, x86 Release: 2m 52s - CMake/Ninja, x64 Release: 0m 32s I was forced to switch to CMake/Ninja when targeting for Linux instead of just Windows. I wish I'd gotten around to it sooner.
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing. -
I am NOT criticizing Python and I implore the reader please do not start nor engage in any “flame war” on Python. I have programmed in a number of different languages over my 40 years as a developer. My current languages that I use the most are C# and T-SQL. I see that Python is popular, or at least appears so. What value-add(s) does Python bring that I cannot get now in C#? What disadvantages are there, if any, to using Python over C#? Is Python a better general purpose language, or is it better at some specific niche(s) in development? I would really like to get a clearer picture of why using Python along with, or in place of, C# would be of value. Thanks in advance for the non-flame responses.
For us it is the huge range of third-party packages and how easily Python interfaces with other systems.
-
Gerry Schmitz wrote:
Python is interpreted; easier to get started with (IMO).
That certainly was an essential argument in favor of interpreted languages ... Long time ago. In my student days as a junior, around 1980, our group project - no more than a couple thousand lines - required more than half an hour compilation time, on a VAX. So we made sure to make all known changes/fixes in the source code before starting a recompilation. I haven't timed compilers for a few years. Last time I did timing, on a complete recompilation of a system with a few hundred modules, on the average the compiler produced eight object code modules per second. If you use an IDE such as VS, which takes the responsibility for recompiling modified modules only, compilation is practically unnoticeable. No compilation delay once was an argument in favor of interpretation. It no longer is.
-
I am NOT criticizing Python and I implore the reader please do not start nor engage in any “flame war” on Python. I have programmed in a number of different languages over my 40 years as a developer. My current languages that I use the most are C# and T-SQL. I see that Python is popular, or at least appears so. What value-add(s) does Python bring that I cannot get now in C#? What disadvantages are there, if any, to using Python over C#? Is Python a better general purpose language, or is it better at some specific niche(s) in development? I would really like to get a clearer picture of why using Python along with, or in place of, C# would be of value. Thanks in advance for the non-flame responses.
import framework import that-cool-library-someone-made to be that nitty gritty announce, C# or c#.net, which includes so much everyday functions. And net 6/c#10 have global usings that hides a bunch even more, yay. So I would lean that python has a huge early years, "free" publicity growth, which then just lingers and continues to grow because its popular, which makes it more popular, and repeat. think 10 years ago, .net 4 is great, but still windows, and visual studio a heavy weight install. python, with scratch and other simple editors, and interpretation language, comparably more easy errors again comparing 2012 python world to c#.net. add 10 years people putting time and effort into python, they create packages, they share, improve them, write guides, and how tos. look at just c# changes in last 5 years, yearly major version numbering changes compared to 2008-2012 of slow if anything. So what you start with has big influence, I can switch between javascript and c#.net fairly easily because I dont have to worry if a space or tab, or if not align. VS with errors improved somewhat in last 10 years. but if someone starts with a python syntax of writing, then semi-colons and braces will be a pain. cross platform, run on raspberry pi, or linux, again most of that c#.net core has had to rewrite (or however that had to do to get methods which were copywrite to make code open source) has been done in last 5 ish years. Performance gains from core 3 to 5, significant and leaps things like json parsing for asp.net comparable if not faster then node.js. not sure if any makes sense, simply attempting to compare the legacy with what have today, and why python might appear more popular