Live data from Hacker News

Python programming is drowning in red tape

stefanoborini.com

81–90 of 183 posts

Re: Python programming is drowning in red tape

#81

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…

Perhaps this is just an “old man yells at cloud” moment...

Fellow "old man" reporting for duty.

I see a similar set of problems with both Python and JavaScript today (and with various other languages as well, but IME Python and JS are the worst offenders). Both have proven to be useful for various applications. Each started with quite a distinctive style. There were plenty of warts in each case, but overall the "feel" of each language was well understood, and there was a certain simplicity about them that made them accessible to new programmers or to programmers who primarily used other languages. However, over time, people have applied the kitchen sink approach to both language and tooling.

Functional programming is all the rage, and these languages have lambdas (albeit very clumsy ones), so let's all write lots of FP-style code in them! Except you can't, because they are horrible for writing FP-style code, because they lack FP features, they lack efficient and clear syntax for FP idioms, and they do not provide some of the guarantees that benefit FP.

Similarly, a lot of programmers are realising that static typing has its merits when you're trying to build serious software at scale, so let's all add type annotations and start marking up our code! Except that both the existing type systems and idiomatic use of these languages are built around dynamic behaviour, so they lack powerful tools for constructing new types, and they lack efficient and clear syntax for specifying static types, and they lack comprehensive type inference, and the continued presence of dynamic typing means you can't prove a lot of otherwise useful properties of your code anyway.

The amount of tooling expected to do even basic development with these languages today is absurd. Professional-quality programming ought to need no more than a compiler/interpreter, a decent editor and a decent source control system to be productive. On the next level, we might find a tool to automate running tests and reporting the results, a debugger and a profiler; I count these as secondary because it should really be possible to work reasonably well without them but they can make common tasks significantly more efficient and/or accurate. The lack of a package manager tool in both of these lists is not an accident.

I think just as much of today's programming industry has forgotten about the benefits of stability, backward and forward compatibility, and standardisation in the software we make, we have also forgotten about them in our own tools. Do we really need 27 new frameworks for building web apps this year? Is having 41 libraries to do basic unit testing that each use slightly different syntax and vary in Maybe it's time to slow down, and make carefully considered choices about the tools and libraries we use in our work, instead of instinctively reaching for that package manager and installing... well, let's be honest, most of the time we don't really know exactly what we're installing, do we?

Re: Python programming is drowning in red tape

#82
post #38

OP behaves like a giant tool and a baby both in this blog post and more importantly in the Github issue report ( https://github.com/psf/black/issues/1178 ). Therefore... > My problem with the above formatting is that the list of arguments and the body of the function are now at the same indentation level. OP weirdly complains here that equal scopes shouldn't be equally indented, and, let's be clear, declared function…

I wouldn't necessarily say if something is popular, it is also good.

Notable examples include mini packages from npm, lint and styling configs for eslint and prettier.

Some of those[0] enforce no semicolon rule which can introduce edge cases and errors because [1]js parser will automatically insert semicolons.

0] https://standardjs.com/

1] http://www.bradoncode.com/blog/2015/08/26/javascript-semi-co...

Re: Python programming is drowning in red tape

#84
"So after arguing about this topic on the black issue reporting, seeing that people kept not reading what was the core of the issue"

...and shortly after ...

"It hurts my eyes to see it. They might have a justification but I don’t care. "

That's where I stopped reading.

Re: Python programming is drowning in red tape

#85
You know what I lack most in this entire discussion and github conversation/bug ? Basic boundaries.

If someone says "no thank you". You can maybe try to ask if there is any wiggle room, or good will possible. But if there isn't, then that's the end of it. Leave the other person in peace.

If you don't like it, then fork it (if allowed). Or get your needs met another way. But trying to enforce them on someone else is not very respectable.

And if someone continues to try and bother you into doing what you want. You say no one last time, and stop communicating.

Re: Python programming is drowning in red tape

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

Interestingly, the question whether this particular choice of code formatting in black adheres to pep8 is still an ongoing discussion[1][2][3][4]. Guido, for example, thinks that black's choice is not compatible with pep8 and I think he described the situation quite well on Python's Discourse[5]: > So the root of this argument is that Black produces code that isn’t always in compliance with PEP 8. I say this is fine…

Thanks for the pointers, I stand corrected. OP could continue this debate if that’s his passion. I bow out.

Meanwhile, I’ll happily enforce black where I can so that I don’t need to have these pointless arguments, although I personally strongly disagree with many of its decisions. I also have no problem contributing to whatever non-blackened projects, including CPython itself (contributed quite a few patches over the years), which is probably the final word on PEP8.

Re: Python programming is drowning in red tape

#87

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…

> hardly resembles the easy-to-understand language I fell in love with back in 2006.

I used to love Python back in those days. Even did a big project with multiple developers in it.

Then I didn't use it for a while and came back for some easy scripting. I was absolutely horrified how complex things are right now. Ditched it and doing my scripting with node.js.

Re: Python programming is drowning in red tape

#88
post #12

> It was bikeshedding at its worst It's ironic that discussions about formatting are taking up so much mindshare in the python community. For years all you'd hear was that whitespace significance was a sign of the lowliness of python. Meanwhile, tons of people were ignoring the bikeshedding and getting things done. Now it's one of the most widely used languages in existence. The kinds of people that are focused on is…

Python has always cared about formatting. If you feel like you never needed to worry about things like that, it's because someone else already thought long and hard about it, and encoded it in pep8. No need for debates. Frankly, after having been out of the Python ecosystem for a long time, I'm surprised that something like black ever gained traction, if it really has strayed in any significant sense from pep8. The e…

Contra the complaints in the article it is not about black ignoring pep8, it is that pep8 has always had some grey areas and some parts that are simply wrong for modern python code. Black has become the defacto gofmt in the python world by just getting the job done. It is strongly opinionated, but most of the areas of contention were either open-ended before or not worth arguing about; at this point most people are willing to relent on the annoyances or minor non-standard bits for the sake of the benefits black brings to a project.

Re: Python programming is drowning in red tape

#89

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…

> Type-annotated, asyncio-enabled Python hardly resembles the easy-to-understand language I fell in love with back in 2006.

I'm all with this, but you can pretty much use python without touching these at all. They have a niche business use cases. E.g., when you work on large projects and you want to catch some errors to not be in the runtime.

async was very needed to be able to write performant web servers such as nodejs.

I'm not using python as i used to, and i think the language is getting more complex, and i'd definitely vow for more fundamental changes to the runtime. But if you ignored all of that, python is still remain python. And when your business logic gets more complex, it is imperative your code becomes more complex and you get to discover and use more "language advanced features". The good thing they are available, they are not perfect, but they can be of a good help.

Re: Python programming is drowning in red tape

#90

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.

Post reply on HN