Live data from Hacker News

Python overtakes Java to become the second-most popular programming language

techrepublic.com

191–200 of 357 posts

Re: Python overtakes Java to become the second-most popular programming language

#191

I was a total raving Python evangelist for the first 12 years of my coding career, and then got a job as the CTO for a Python based startup that had been running absent a technical leader for 5 years, with relatively junior coders making all the decisions. I still love Python, but I now have a completely different attitude to hyper-dynamic languages (like Python, Ruby, Clojure, Elixir, etc). In my new opinion, they a…

To be specific, it's the lack of typing that makes large code bases in Python, Ruby, and especially JavaScript a huge pain compared to Java. It makes debugging much more difficult. Thankfully this is being fixed with stuff like Typescript and similar projects for both Python and Ruby. Some people may argue, "but documentation would make this an non-issue". Guarantees built-in to the platform itself are more reliable…

I actually found it was untraceable side effects from imports and ability to monkey patch that was worse. Related to the typing, but not totally the same. I would pick something like Clojure or F# now to control that. Side effects and coupling.

Re: Python overtakes Java to become the second-most popular programming language

#192
post #12
post #6

Earlier quoted context omitted.

That C is supposed to be the most popular language makes the whole ranking questionable. The stackoverflow ranking[1] corresponds much more to my own experience in real life. [1] https://insights.stackoverflow.com/survey/2020#most-popular-...

On the other hand the stackoverflow survey might show that C is so simple that programmers using it don't need stackoverflow :)

I was a big stackoverflow user and then completely stopped using it when I switched to full time embedded C. Any APIs I was using or problems I hit were too niche.

Re: Python overtakes Java to become the second-most popular programming language

#193
post #91
post #53

Earlier quoted context omitted.

C is the most popular language for embedded systems development by a huge margin. StackOverflow is also a place for asking questions. C is a relatively simple language and one which has been around for longer than most developers have been alive. There may just not be much left to ask about it.

Just about every larger company has an IT department where people write business or web applications. But not every larger company has people programming embedded systems. The TIOBE index simply does not reflect reality.

Every car, every industrial machine, every rocket, plane and tractor as well as the entire stack that your web applications run on in the cloud, the operating system, the infrastructure have significant parts written in C or C++. I think you need to take into account that the world of software extends beyond web applications and white collar services.

Re: Python overtakes Java to become the second-most popular programming language

#194
post #188

Earlier quoted context omitted.

I love dataclasses, incredibly simple to use but so useful. My only gripe is no first-class support for "__slots__".

FYI if you haven't heard of it, attrs ( https://www.attrs.org/en/stable/ ) is a package very similar to dataclasses that does support aromatically adding __slots__. I believe dataclasses was bases on it.

Yes, attrs is the spiritual parent of dataclasses, including the decision to not use metaclasses. Thanks for mentioning this: I try to always give credit to Hynek and attrs.

Re: Python overtakes Java to become the second-most popular programming language

#195
When I worked at Yelp circa 2013, we were an entirely Python shop (for backend). At that time, we had millions of LOC in Python. I love Python to death, but it became very clear that Python was simply a very bad fit for a project as large as Yelp.

I remember trying to write a program to simply understand our dependency graph so we could decouple some of our services (we were just starting our SOA efforts at that time). This is something other languages give you for free.

Our build times were exceptionally slow, as a direct result of Python's dynamic nature. For example, test discovery took over 2 minutes on each test run. This also made it painful to have distributed test runs, as splitting up tests across multiple processes would require the test discovery step to be run in each process, incurring a 2 minute penalty per process.

We also had deployment issues, because of Python's dynamic nature. Some code paths were only exercised during a production deployment, and were not sufficiently tested before deployment. This is despite the fact that we had tens of thousands of tests and sunk many hundreds of person-hours into testing as much as was possible. Despite a very professional engineering culture, and a constantly expanding test suite covering these corner cases, we had deployments fail about once a week for this reason.

I adore Python and still use it extensively most days (mostly its data science/ML libraries). But I now think that large projects would really benefit from static typing and strict compiler checks, as well as just being able to actually compile a binary (which would have solved many of our testing woes). In contrast to some other smart people on this thread, I don't think that even disciplined developer teams should use Python for large projects, at least not in the long-run.

Re: Python overtakes Java to become the second-most popular programming language

#196
post #142

Earlier quoted context omitted.

This precise struggle is why Go is created, and also why Rob Pike said what he said. The industry needs a statically typed language with good ergonomics (not typing too much) and performant. I agree with you, asking everyone to be discipline with their code in a dynamic language is a bit too much to ask (unfortunately).

If there is something similar with Django on golang ecosystem, I would use golang more. Battery-included web framework seem to be out of style these days and no one invest in developing one for newer language like golang. As a single developer working mostly alone, microservice-based development is quite painful.

Second this. There's no rails/express for golang. Personally I'd love to see a next-gen Rails-like framework arise in Swift. That would be amazing in my opinion.

Re: Python overtakes Java to become the second-most popular programming language

#197

I was a total raving Python evangelist for the first 12 years of my coding career, and then got a job as the CTO for a Python based startup that had been running absent a technical leader for 5 years, with relatively junior coders making all the decisions. I still love Python, but I now have a completely different attitude to hyper-dynamic languages (like Python, Ruby, Clojure, Elixir, etc). In my new opinion, they a…

I don't disagree, but I will add that most long-lived Spring applications I have worked with were disasters. Figuring out how a Spring application actually works (or why it doesn't) can be difficult. Upgrading the framework, or switching to a different one without breakage is often a non-trivial task.

The best codebases I have touched, in any language ecosystem, either didn't use a framework, or kept the framework firmly isolated from the other code. If you build your code "inside" a framework, it will eventually become an obstacle to change.

Furthermore, the best Java codebases I have seen avoided annotation-driven-development, reflection, classpath scanning, DI frameworks, AOP, etc. Anything that feels at all magical should be handled with great suspicion.

Re: Python overtakes Java to become the second-most popular programming language

#198

Earlier quoted context omitted.

To be specific, it's the lack of typing that makes large code bases in Python, Ruby, and especially JavaScript a huge pain compared to Java. It makes debugging much more difficult. Thankfully this is being fixed with stuff like Typescript and similar projects for both Python and Ruby. Some people may argue, "but documentation would make this an non-issue". Guarantees built-in to the platform itself are more reliable…

I actually found it was untraceable side effects from imports and ability to monkey patch that was worse. Related to the typing, but not totally the same. I would pick something like Clojure or F# now to control that. Side effects and coupling.

Didn't realize that monkey patching wasn't only limited to Ruby.

Re: Python overtakes Java to become the second-most popular programming language

#199

I was a total raving Python evangelist for the first 12 years of my coding career, and then got a job as the CTO for a Python based startup that had been running absent a technical leader for 5 years, with relatively junior coders making all the decisions. I still love Python, but I now have a completely different attitude to hyper-dynamic languages (like Python, Ruby, Clojure, Elixir, etc). In my new opinion, they a…

> But if you let a team of juniors do whatever seems like a good idea, with nobody calling the shots who understands tech debt and the large-scale architecture problems, the mess that can be made is staggering.

In the several years I spent doing .NET consulting, I believe that this is the crux of the problem, and not Python per se.

In .NET land (probably Enterprise Java too), this often manifests as an apparent goal to get every single pattern from PoEAA [1] into every file rather than extensive metaprogramming - but the root cause is the same - juniors not having appropriate guidance.

[1]: https://martinfowler.com/books/eaa.html

Re: Python overtakes Java to become the second-most popular programming language

#200

Earlier quoted context omitted.

To be specific, it's the lack of typing that makes large code bases in Python, Ruby, and especially JavaScript a huge pain compared to Java. It makes debugging much more difficult. Thankfully this is being fixed with stuff like Typescript and similar projects for both Python and Ruby. Some people may argue, "but documentation would make this an non-issue". Guarantees built-in to the platform itself are more reliable…

I actually found it was untraceable side effects from imports and ability to monkey patch that was worse. Related to the typing, but not totally the same. I would pick something like Clojure or F# now to control that. Side effects and coupling.

You can patch by linking a different library in C. What's the difference? I suppose it's easier in Python to patch. Seems like a good thing to me.
Post reply on HN