Live data from Hacker News

Python programming is drowning in red tape

stefanoborini.com

91–100 of 183 posts

Re: Python programming is drowning in red tape

#91
post #14

Earlier quoted context omitted.

> Type-annotated, asyncio-enabled Python hardly resembles the easy-to-understand language I fell in love with back in 2006. true. i am all for types in general and for types annotations in python. but i have seen some heavily type-annotated python code lately and i don't think that's where we want to be. we are starting to look like a heavily templatized cpp code.

Type annotations help catch common errors, and they help humans. Maybe it's not as pretty but as someone who often have to read Python, it really helps me understand what the contract is of a function I'm looking at.

As a big fan of statically typed languages, I agree with you on the utility. Especially after having worked on a large Python projects a few years ago and having to spend a lot of time figuring out what, exactly I could do with a argument named “session”. But when you start turning your dynamically types languages into an ugly statically typed one, maybe we should just admit that we’re using the wrong tool for the job.

Re: Python programming is drowning in red tape

#92
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’…

To be fair, it's a giant 4100 line file. That's ridiculous and should be broken up in some way. Let's not try to defend ridiculous behavior just because we don't like the tone of this article, as he's spot on in this regard regarding the organization of this library. I've encountered similar "libraries" that are next to impossible to alter in behavior without forking precisely because they're giant single-file messes.

Re: Python programming is drowning in red tape

#95

> a CODE_OF_CONDUCT, because we assume preemptively that you are a racist homophobic asshole, and we have to cover our bases. Really? What about laws? Do you think they exist because it is assumed that everybody is a rapist and a burglar?

Laws are enforced and mostly provide an institutional system to deal with redress (for victims) and safety (for society). ie., the judiciary, legislature and police force are the mechanism of the law and why it exists. It's not an activity in parliaments declaring their moral beliefs.

"Codes of Conduct" in this vein are just virtue signalling. They appease the martyr-type looking to publicly shame a community for fringe members.

Publicly stating your morality, I'd say, is a pretty good guide to identifying hypocrites who value praise for seeming moral above being moral.

This is evident to most people and to most people in history (see, eg., jesus about people praying in the street). Often being one of the first lessons in psychology taught to children.

The problem for social media is that the vast majority of people who realise this do not like/comment/subscribe. So you end up with toxic echo chambers of praise-seekers, while everyone else rolls their eyes.

Re: Python programming is drowning in red tape

#96

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…

Yes My personal preference regarding line lengths: 80 chars are not enough. And even pep8 says that "foolish consistency is the hobgoblin of little minds" So try being under 80 chars but sometimes you can't. Also don't break a line that's like 85 chars if it will just make it more ugly I'm glad Prospector by default doesn't enforce "the cult of 80 chars" dogma

God made the VT52 with 80 columns for a reason. ;-)

Now, seriously, that's a matter of taste. I like 80 because it allows me to have two files open side by side on my laptop with a readable font size. As we grow older, what's "readable" changes.

Re: Python programming is drowning in red tape

#97
post #68

Hard forking a project to make use of the hard work the maintainers put in to it, then writing a post doing nothing but insulting those maintainer's decisions / preferences, is not a good look. Neither is throwing temper tantrums in issue threads: https://github.com/psf/black/issues/1178#issuecomment-565383... Also if this developer wasn't so obsessed with bikeshedding, they could just edit the one bit of formatting…

> Reopen the issue right now or I am forking. This is comic gold.

[deleted]

Re: Python programming is drowning in red tape

#98

Hard forking a project to make use of the hard work the maintainers put in to it, then writing a post doing nothing but insulting those maintainer's decisions / preferences, is not a good look. Neither is throwing temper tantrums in issue threads: https://github.com/psf/black/issues/1178#issuecomment-565383... Also if this developer wasn't so obsessed with bikeshedding, they could just edit the one bit of formatting…

The dude writes "Black violates pep8 recommendation" in his title (notice recommendation ), yet, feels strong enough to say "This is a bug. Period." after threatening with a fork (lol?). Not to bring back that whole maintainer vs contributors discussion, but this is a solid example of entitlement some contributes feel.

It’s also an example of disastrous negotiation. You can’t threaten to do something that doesn’t negatively effect people; they won’t care.

Re: Python programming is drowning in red tape

#99

As a long time Python fan, I find the current state of the language frustrating. Tools like black and poetry are nice, but are not part of the standard library. Yet they seem to be required by every popular project out there. (Also, black’s formatting is quite ugly, as noted in this blog post) Meanwhile, the language itself is increasingly baroque and complicated. Type-annotated, asyncio-enabled Python hardly resembl…

Why do you believe that providing hints to which is the type of a variable is something that makes the language barroque and complicated?

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 could all remember that the original idea of OO is that objects interpret the messages they receive, not external typecheckers.

Re: Python programming is drowning in red tape

#100
post #6

Piles and piles of red tape specific to python, but the same theme seems to manifest itself in other mainstream programming ecosystems: .net and java, node and so on. This unfriendly affliction isn't tied to a specific programming language, any programming language could be abused in different ways and the same goes with the ecosystem. I think young ecosystems tend to be attractive just because there isn't too much n…

[deleted]
Post reply on HN