Simple is better than complex. There should be one-- and preferably only one --obvious way to do it. https://xkcd.com/1987/
Drawbacks of Python
101–110 of 117 posts
Re: Drawbacks of Python
#102I agree with the response that there are a few "gotchas" with python, like with any language! I have gotten caught up with a few type problems when dealing with sending raw binary data over serial and things like that - but luckily python has great unit testing frameworks to help with this. My main beef with python is that it is harder to deploy projects to other people, without them setting up a virtual environment…
I wish it had a better async story. We've had production outages that were difficult to debug because some third party library made a sync call deep in the call stack and starved the event loop. APM showed performance degradation in unrelated endpoints. Eventually health checks began failing and containers were killed, putting the load on other containers which inevitably fell over and so on. We've seen similar issue…
Re: Drawbacks of Python
#103Earlier quoted context omitted.
I've lost approximately zero hours to indenting or formatting issues in Python or other languages. Unit tests usually do a good job of catching unexpected behavior quickly.
For some of those issues, you could type brackets instead of unit tests. Brackets are a lot less work.
every time this discussion comes up, it's clear that people simply aren't willing to accept that this is a solvable problem, despite the many people who always come out of the woodwork to insist that we've solved it. Is it really that hard to accept that someone out there may have solved something you haven't?
Re: Drawbacks of Python
#104However, yesterday I was playing with python’s async/await and I came to the conclusion that it is a bit... useless.
Not a big deal, because i can use other stuff to accomplish the same I was trying to do.
Or maybe I was doing it wrong.
Re: Drawbacks of Python
#105I agree with the response that there are a few "gotchas" with python, like with any language! I have gotten caught up with a few type problems when dealing with sending raw binary data over serial and things like that - but luckily python has great unit testing frameworks to help with this. My main beef with python is that it is harder to deploy projects to other people, without them setting up a virtual environment…
While this is a problem, for many projects, I have overcome this by including a local web-server, that accepts requests from 127.0.0.1 and serves a web app as a GUI.
It's not a perfect solution, but It worked for me in many projects.
Re: Drawbacks of Python
#106I agree with the response that there are a few "gotchas" with python, like with any language! I have gotten caught up with a few type problems when dealing with sending raw binary data over serial and things like that - but luckily python has great unit testing frameworks to help with this. My main beef with python is that it is harder to deploy projects to other people, without them setting up a virtual environment…
I have the same two complaints. I’ve automated some large tasks at my job with Python, and avoided external dependencies because while I’m sure I could deal with it, nobody else here is a programmer and it don’t think it would go well if someone had to try and figure that out later. “Install python (3.6 or later), point script at the csv file” avoids that complexity. It’d be better if it were a self contained executa…
Re: Drawbacks of Python
#107Earlier quoted context omitted.
For some of those issues, you could type brackets instead of unit tests. Brackets are a lot less work.
for all of these same issues, using a decent editor and a linter saves approximately the same amount of work. every time this discussion comes up, it's clear that people simply aren't willing to accept that this is a solvable problem, despite the many people who always come out of the woodwork to insist that we've solved it. Is it really that hard to accept that someone out there may have solved something you haven't…
That said, everything is a trade-off. Semantic whitespace has downsides, but if the upsides outweigh, then it's a great idea.
At this point, I have no idea what the upsides are, other than saving a few keystrokes (which truly is solvable with a good editor).
It's like removing the ending semicolon in JavaScript. Sure, it almost never causes a problem, but sometimes it does, so why do it?
Re: Drawbacks of Python
#108In which case the decision between the two seems to be between a thing and a slightly better version of itself. I totally respect that many people see this differently and probably exactly opposite but to me it always feels really hard to justify using python for this reason.
Just for fairness sake I'm not trying to trash python. I think it's a great language.
Re: Drawbacks of Python
#109Because of this mechanism that ensures concurrency safety Python does not support parallel execution of threads. I am wondering if the rest of the HN community finds it as a major disadvantage.
Re: Drawbacks of Python
#110The main drawback of python for me, compared to NodeJS is the whole sharing projects onto different machines with virtualenv or whatever. package.json and node_modules just works by default in so much cleaner a way. You can use npm or yarn or just a zip of the node_modules to share the environment with a colleague or to deploy.
conda solves that for python at least as well as npm/yarn does. I don't understand while it is not in wider use (except for lack of PR).
Maintaining a conda forge package has been, for us, a complete nightmare. If you depend on another conda-forge package you can have the issue that the library is configured to suit whoever first wrote the conda-forge package - i.e. by disabling parallelism or providing only shared/static libraries, and have that maintainer be completely unresponsive or unwilling to change it.