Live data from Hacker News

Python Is Eating the World

zdnet.com

601–610 of 993 posts

Re: Python Is Eating the World

#601

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

I'm a somewhat older programmer, and I've worked with a variety of languages (C, OCaml, C++, Scheme, Go, Java...). I think all of them are great in their own way and there's a lot to be learned with all of them.

I started to use Python quite recently and I really like it. It is a well-designed language with high-level abstractions that are really fun to use. I like the pervasive use of iterators, the 'everything is an object' philosophy, the minimalist syntax, the build-in datatypes...

That being said, I feel that the dynamic types show their limits when projects getter big. I use linters and static type annotations but I find refactoring very error-prone and there's a point where I don't really trust my programs.

Re: Python Is Eating the World

#602

Earlier quoted context omitted.

> and that infernal pep-8 linter insisting 80 characters is a sensible standard in 2019 I don't know why 80 characters is a problem. I don't use the linter but I enforce this rule religiously with a couple of exceptions (long strings comes to mind). It forces me to think heavily about the structure of the code I'm writing. If I'm nesting so deeply, something has gone wrong. If I've got a ton of chained methods or rea…

It's also awesome if you have to do code reviews on a laptop or don't have a massive screen available. That said, we usually just go with autoformatting via black, which is 120 by default. No more hassle manually formatting code to be pep8-compliant. Just have black run as a commit hook, which is super easy via pre-commit [0]. And you can run the pre-commit checks during CI to catch situations where somebody forgot t…

I haven't got round to trying Black, but according to the project's README[0], the default is 88. Personally I think 79 is fine, but I can cope with up to about 100. Above that and you risk some really crappy code in my opinion.

EDIT: Sounds like the Black author agrees. "You can also increase it, but remember that people with sight disabilities find it harder to work with line lengths exceeding 100 characters. It also adversely affects side-by-side diff review on typical screen resolutions. Long lines also make it harder to present code neatly in documentation or talk slides."

[0] https://github.com/psf/black

Re: Python Is Eating the World

#603

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

Why would you rationally compare something that exists and lives today, in the form it has today - with something from early 90s? In what world is that an objective comparison?

Re: Python Is Eating the World

#604
post #526

Earlier quoted context omitted.

I think it's pretty disappointing that most of the top comments don't talk about the interview with Guido himself over the history of Python. Tangentially related discussion is one of the appeals of HN but I think it's a bit out of control here.

Well in just glad this is the top comment, as Python really is taking over the world for a reason. And of all the bugs I have written in recent memory, not one came down to a lack of static typing. They were due simply to logic errors, flawed assumptions, misunderstood requirements, and good old race conditions. The static typing zealots like to think if it compiles is must be perfect, however this is a mirage. Unit…

Have you ever worked in a large engineering organization full of engineers with varying degrees of experience all trying to accomplish the same goal?

I can't imagine anyone has ever tried to do engineering at scale (people wise) and did not find the value in static typing.

It's why startups eventually moved off RoR once they started scaling. It's why there is such a large push to type JavaScript (have you seen the rollbar article about the top 10 errors in JavaScript? All but one have to do with types: https://rollbar.com/blog/top-10-javascript-errors/), it's why Facebook created Hack, and outside of parentheses repulsion, it's probably why so few large projects have been written in a LISP or LISP descendant.

Python is great for small: small teams, small organizations, small projects with a few dedicated tasks, small scripting tasks. Most people aren't trying to take anything away from python here in the comments save a few irrational responses.

*again want to stress in my comment when I speak of scale I mean scaling people wise: more organizational structures in your company, more engineers, more collaboration between teams.

Re: Python Is Eating the World

#605

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

I don't agree at all. Your comment basically says: "It used to suck badly. So don't complain it sucks now.". I think dynamic typing is the bane of good software and we as an industry should try to actively discourage new code to be written in dynamically typed languages.

That's not to say that Python doesn't have it's place. But I see it more as a programming language for small utilities no more then 2k loc in length.

Re: Python Is Eating the World

#606

Earlier quoted context omitted.

You can do anything in anything. Everything boils down to trade offs for the problem or company at hand. I can say with Java and .NET shops, it's usually because the company has heavily invested in Java and .NET infrastructure, process, automation, tooling, monitoring, etc. If there are certifications involved, I also know for a fact that Microsoft feeds big discounts on expensive products (SQL Server) depending on h…

It isn't just the company's heavy investment, it is the community's. The availability of good, tested, performant OSS libraries available in Java is unparalelled. People talk about languages like Python being "faster" to develop in because they're easier to write. This is true until you need a solid concurrency friendly loading cache or a DB connection pool that works at scale and in Java that's just adding a depende…

I didn’t expand on it, but that’s what I meant by trade offs for the problem at hand. Agreed.

Re: Python Is Eating the World

#607
Python’s killer feature - and perhaps reason for its popularity- seems to be it’s nice-looking syntax, which is only the most superficial of qualities. Below that surface, the semantics and its standard libraries are all very irregular, and always leave a bad taste in my mouth. I now avoid touching it if i can.

Re: Python Is Eating the World

#608

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

To understand the hate, you have to realise that no one likes being forced into using a particular technology. Especially one that is more of a lowest common denominator and ignores much of the progress in programming language research over the last 40-50 years (e.g. expressive static type systems, and Python still markets itself as "strongly typed").

Re: Python Is Eating the World

#609
post #554
post #530

Earlier quoted context omitted.

This is spot on. In my current workplace we use Clojure, and Clojure has many of the same problems in package management as Python does (no lockfile, no easy way to create reproducible builds, no way to declare range of dependencies unless you use version pin, etc. etc.). However, I never saw any complaints about Clojure package management in any topic about Clojure here.

Maybe because Clojure has a much smaller total number of possible dependencies? That is, "just as bad theoretically, but easier to wrangle by hand" .

That's just a demonstration of the same underlying phenomenon: "nobody uses it".

Re: Python Is Eating the World

#610

Earlier quoted context omitted.

The solution to this is Poetry. https://poetry.eustace.io It's good. Projects should use it.

> curl ... | python Ah goddamnit. 868 lines, including os.rmtree calls and stuff. Also installable via pip, but... "not recommended", and: [RuntimeError] Poetry was not installed with the recommended installer. Cannot update automatically.

Wait, are you seriously complaining about executing code you downloaded from the internet, that installs a package manager - i.e. a piece of software that downloads executable code from the internet?!
Post reply on HN