Live data from Hacker News

Python programming is drowning in red tape

stefanoborini.com

171–180 of 183 posts

Re: Python programming is drowning in red tape

#171

Earlier quoted context omitted.

not the OP but I share the sentiment. On a syntax level simply because it adds types, and one of the joys of writing a dynamic language is that you don't have types filling so much of your code. But much more important to me, on a semantic level. Late binding of all things is a feature of dynamic languages, not a bug. I have no idea why we're trying to force a static typing mindset onto a dynamic language. I wish we…

> On a syntax level simply because it adds types, and one of the joys of writing a dynamic language is that you don't have types filling so much of your code. Then good that you don't have to do that. Type hinting in python is optional and it's unlikely that this will ever change. > I have no idea why we're trying to force a static typing mindset onto a dynamic language. Because python ist not a toy-language anymore.…

>Because python ist not a toy-language anymore. It's used for big projects too, and for them features like this are very neccessary.

I've worked on multi-million line dynamic codebases in settings that require robustness and correctness (telecommunications/Erlang) and it's an absolute ridiculous idea that one needs type checking to build industry standard codebases and architecture.

The Java/C++ paradigm is not the only software paradigm to built correct software.

Re: Python programming is drowning in red tape

#172
post #67

Earlier quoted context omitted.

it’s not like I’m gonna use his fork Probably shouldn't no, no use: the article is from february 3, meanwhile the fork https://github.com/stefanoborini/black is 40 commits behind and 0 ahead. Meaning the OP didn't do any public work yet.

Wrong repo: https://github.com/stefanoborini/blacker

Good find, I stand corrected.

Re: Python programming is drowning in red tape

#173
> setuptools_scm, because our versions must change at every new commit.

I don't get many of these points. For example, at the company I'm about to leave, we worked just fine both manually versioning as well as using tools like versioneer/setuptools_scm.

We made it easy to fire up new projects using a dual template/boilerplate repo strategy. Infrastructure like this is in a boilerplate repo and almost entirely setup for new projects from the start. New projects fork a template project and do a small number of basic steps (like naming the project, etc.). Both the template and project repos are update from the boilerplate Git repo as we make updates to the infrastructure--a simple Git remote setup.

Re: Python programming is drowning in red tape

#174
post #104

All the "wait no" alternative tool suggestions are silly. There's a best tool. For packaging a Python project, that tool is Poetry. Pipenv, virtualenv, setup.py, venv, setup.cfg, are all outmoded.

How long will that last for though? If I invest time to learn it and set it up and apply it to all my projects is it going to all be wasted because someone will have a new idea 6 months from now because of clear and obvious problems with poetry? There's only so many iterations you can have through the cycle before "no this is the last one!" isn't plausible any more.

[deleted]

Re: Python programming is drowning in red tape

#175
post #28

Earlier quoted context omitted.

Every two years I've looked at Python again and been told that the horrible mess I saw last time is obsolete, there's a good tool now that fixes all the problems. Every time it's just been an even bigger mess with one more tool on top.

Pretty much, but Poetry is slowly emerging as the winner, I think. There is no good solution, but if you're starting a new project, Poetry is probably your best bet.

[deleted]

Re: Python programming is drowning in red tape

#176
post #113
post #28

Earlier quoted context omitted.

Every two years I've looked at Python again and been told that the horrible mess I saw last time is obsolete, there's a good tool now that fixes all the problems. Every time it's just been an even bigger mess with one more tool on top.

https://xkcd.com/927/ A bit to the topic - what's wrong with good old: python -m venv env env/bin/pip install ?

In order to reproducibly package a project with venv, you need to manage venv, requirements.in, requirements.lock, setup.py, pip-tools, MANIFEST.in, and maybe some other things that I'm forgetting. It's just unmanageable.

Re: Python programming is drowning in red tape

#177
post #25

I don’t love black’s formatting, but this article is just wrong. 1. Black’s formatting of function arguments does not break PEP8, because the closing parenthesis is one level of indentation back, breaking the continuation. (I don’t even need to check linked threads. Dude is wrong and must have been told so. He doesn’t want to listen, fine. Fork as he wishes, but it’s not like I’m gonna use his fork over Łukasz Langa’…

Personally I like black's style in function argument formatting better than PEP8, assuming the example given is representative of both styles; I find black's to be much more readable.

But that's of course a bikeshed.

At any rate, if black's formatting does break PEP8 (as a downthread commenter rebuts), I would think it's weird that black doesn't have a --pep8-correct flag or something for people who do want PEP-compliant stuff. Certainly black can go its own way, but if people are going to consider it "the blessed python code formatter", it should have a mode that actually conforms to the python standard for formatting.

But hey, ultimately it's the black maintainer's choice.

Re: Python programming is drowning in red tape

#178
post #46

> a CODE_OF_CONDUCT, because we assume preemptively that you are a racist homophobic asshole, and we have to cover our bases. This one is a new personal pet peeve. I'm not a racist homophobe--I'm a good person. And though it doesn't give me any authority to speak on the matter, I'm bi and I've dated all sorts of people. I don't like to be presumed to be an asshole (or presume that others may be), and I'm offended tha…

I put COC because I use boilerplates that comes with it or because github nags me. It's not like I lose anything by pushing it to the repo. On the contrary, I can use the vagueness to shut down some cases.

Hello, I received a complaint from an important member that you were not following the CoC and they have given me sufficient evidence of your inappropriate behaviour. For anonymity reasons, I can't provide information on who it was or what the evidence is but as of now, you have been ...xyz

Sincerely, thrwaway69

(/s)

Re: Python programming is drowning in red tape

#179

Earlier quoted context omitted.

>This is just an observation: there are multiple species of attention-seeking internet troll who want very, very much for you to treat their absurd behavior "on a case by case basis." In my experience the exact opposite is true. Most trolls want to argue the finer language of a CoC, and waste everyone's time in a pseudo-legal battle. "Case-by-case" doesn't mean you have to spend a lot of time. It just means you're as…

I'm talking beyond my expertise here - I've never been involved in a CoC argument, but I have witnessed a lot of trolling - but it seems to me like the same guy who would be happy to argue endlessly about the trouble he's caused and the punishment or censorship that's being meted out on a case by case basis would also be happy to argue endlessly about a code of conduct and its application. Just please pay attention t…

>I'm talking beyond my expertise here - I've never been involved in a CoC argument, but I have witnessed a lot of trolling

If by "argument" you mean "flame-war", then I suppose I'm right there with you. I've seen many, but participated in zero.

Still, I think I've observed some regularities. One such regularity is that flame-wars and CoC-trolling almost always take place in communities that treat their CoCs as some sort of constitution, and believe these conflicts should be resolved in a simili-court-of-law.

This is why I continue to oppose CoCs on the grounds that they're ideological tools, in practice. In my estimation, the whole point of pushing CoCs on open source projects is to get them to think in terms of legal process, at which point they can be harassed into behaving a certain way. This is all done on the false premise that internet communities should be run like first-world democracies.

>Even I have seen the "you handled this one way last month, why are you treating this guy differently today?" arguments.

>I imagine if you're willing to discuss your decisions at all, you're going to be forced to argue technicalities.

That's the brilliant thing - you're not forced to argue technicalities. In fact, you're not forced to give any explanation (though that's rarely the best policy, in practice). This isn't a court of law.

Anyway this is just ... like ... my opinion, man. Others can disagree with me and still be reasonable. As I said in another comment, I don't run any popular OSS communities, but if I do, I don't think I'll use a CoC. And I don't think that will prevent me from enforcing good behavior.

(P.S.: I've just reread this comment and it struck me as a bit abrasive and argumentative. I've made a few changes, but please be assured of my courteous intent!)

Re: Python programming is drowning in red tape

#180

Line length is such a hard problem to solve. I wish there was a way to be like don’t allow more than 95% percent of my lines to be longer than X. I run into this in Django a lot with my chained ORM queries. The usually tend to be like 10-15 chars to long. And in this case you have to line break on the parameters or on a ‘.’ which is ugly as well. While not related to Python, I feel like whenever I write JS code, espe…

How about line wrapping in the text editor?
Post reply on HN