Python overtakes Java to become the second-most popular programming language
221–230 of 357 posts
Re: Python overtakes Java to become the second-most popular programming language
#222This and the fact that C is number one suggest something very wrong. While C really has a place in my heart, you should have very good reasons to use it when "starting to build a new software system".
Re: Python overtakes Java to become the second-most popular programming language
#223> Python has long been a top-loved programming language, as has Java Um... nobody _loves_ Java. We use it, but we don't love it.
I used to be turned off by the boilerplate and verbose nature of the language. Over time, having all of this information out in the open removes a lot of guesswork based on tacit knowledge. I also really appreciate its static typing even though that can be limiting.
Re: Python overtakes Java to become the second-most popular programming language
#224Earlier quoted context omitted.
I've often found that starting some quick-and-dirty thing in shell scripts is great, but once I get to around 100 lines of shell script code, I'm better off switching to python (or similar). Similarly, once I get to around 1000 lines of python code, I'm better off switching to compiled, statically typed language (e.g., Java, C, C++, etc.). So my own heuristic has become: shell script when
This was my heuristic years ago before Python got type annotation support. Now there are linters that take type annotations into account, and LSP servers that can catch type errors as you write Python code. I've found that using Python for large projects is both fine and productive as long as you utilize type annotations and modules. Ambiguity goes out the window when you do that.
Re: Python overtakes Java to become the second-most popular programming language
#225Earlier quoted context omitted.
dataclasses are the best recent addition to Python, IMO, maybe tied with ordered dicts. Python definitely doesn't have conceptual simplicity, because there are many competing concepts in the language, and lack of focus on uniformity. (Example - enums are implemented with a metaclass and dataclasses with a class decorator - arguably the latter is the wrong choice, because it is already evident it limits what kind of f…
No, (optional) static typing is the best recent addition to Python. It allows IDEs to catch a large variety of errors. The static type system is part of the language and has multiple implementations. It's Hindley-Milner, making it two-way, like Haskell's type system.
What's it called? Google didn't turn up anything.
Re: Python overtakes Java to become the second-most popular programming language
#226I 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…
The real culprits, thinking about it since my post, were side effects and mutability. Python lets you create incredibly difficult to trace chains of side effects and mutations, and has basically no decent ways to prevent this. In Scheme, my code is still super small and I can dynamically create all kinds of object like things, but if I want private, I can make it god-damned private. In Python, anything can be changed by anything ("we're all consenting adults") and using side effects in weird ways is actually part of the idiom. I don't know how many times in Python literature I've seen some variant of "you don't need those baroque patterns because we can use 'import' as a singleton, running class initialization as the constructor". And so all the frameworks have crazy thread-local magic happening from bloody import statements!!! Do that too much and you have no idea what's happening where and why, and something as trivial as changing the order of imports can kill your app. Where I was, this had gotten so bad that the app couldn't even be turned on and tested in the normal way, and none of my predecessors had been willing to go through the pain of figuring out what the chain of imports were doing to bugger it up. (Because that didn't look like doing anything productive, I'm sure you all know the drill...)
If I were doing it again, personally, I'd use Clojure and Spec, and worry more about mutability and side-effects than anything else. Just my two cents Canadian.
Re: Python overtakes Java to become the second-most popular programming language
#227Earlier quoted context omitted.
I actually do due diligence on tech firms now for a job, and you're 100% right that the tradeoffs change dramatically when the company grows. Which doesn't mean that using the best thing possible for your expert coders at the beginning is wrong. At the beginning, you need every advantage you can get, and if you have expert programmers, give them the sharpest knife you can find! But yeah, once your company is hiring h…
> I'm writing some Java at the moment for an Android app, and it's just killing me after doing Scheme and Python Android isn't Java though. It's some frankenstein contraption made from a mutated version of Java from a decade ago. > I were starting my own business now, I'd use Clojure or Scala. I personally wouldn't ever choose Scala for anything. It's tooling is horrible (Sbt is a special hell, and scalac is as slow…
Re: Python overtakes Java to become the second-most popular programming language
#228Earlier quoted context omitted.
Absolutely agree with you. But with advent of microservices architecture patterns, it is possible to keep service code within bounds of maintainable size.
I'm by no means an expert architect yet, but has the argument for microservices in smaller orgs basically become: "Since y'all can't seem to use classes and interfaces correctly, let's physically separate the software so changing the service contracts becomes a bigger pain in the ass"? I'm not even trying to be sarcastic. I'm genuinely curious. I feel like 90% of the benefits of microservices would be accomplished wi…
1. More decoupling means you can use an entirely different langauge
2. Services can be deployed, restarted, etc. independently.
But that comes with disadvantages. The contract then becomes message passing and serialization/deserialization, which is fairly primitive. You can't pass functions/callbacks, and simple static checks become a whole validation problem. It also limits your ability to use interesting types across services.
The XML craze 20 years ago tried to tackle all of these problems (remember XML schemas?), but it became unweildly and didn't really succeed despite a huge enterprise push.
Re: Python overtakes Java to become the second-most popular programming language
#229When 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…
Your description here is often the same argument for microservices over a justification for any specific language.
But the language problem remains. I think there are a lot more good language options today for backend services than there were in 2010, and if I were writing new backend code for a big website/service today, I might pick one of those.
Re: Python overtakes Java to become the second-most popular programming language
#230Earlier quoted context omitted.
totally agree about sbt being gratuitously complex. i wonder if Java is judiciously choosing the non crazily digressive parts of Scala, as they both evolve.
That is what Goetz said is the plan for Java. Move slow, let other languages experiment with language features, and then take the best features and implement them better.