Earlier 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
I live by very suspiciously similar rules of thumb although my tolerance in the past for dynamic scripting languages was probably closer to several hundred lines of code. However, I have to acknowledge that modern IDEs (and even advanced code editors like VSCode) have pretty good support for dynamic scripting languages these days that make working with them in larger code bases not entirely painful.
Python overtakes Java to become the second-most popular programming language
141–150 of 357 posts
Re: Python overtakes Java to become the second-most popular programming language
#142I 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 agree with you, asking everyone to be discipline with their code in a dynamic language is a bit too much to ask (unfortunately).
Re: Python overtakes Java to become the second-most popular programming language
#143I was a Python dev for 14 years or so (now doing mostly personal projects in C/C++, Scheme, Clojure), and 10 years ago met my partner who is a biologist. I think one thing programmers underestimate is how many scientists and academics are using Python. It's not just ML, it's pretty much every kind of scientist and tons of non-science academics too. The fact that it's a great "casual" or part-time language is huge for…
From what I've seen, jupyter notebooks reach convoluted excel formulas-level of accessibility and efficacy for lay people. Most of us really underestimate what "non" programmers can achieve with if/else, loops, equality tests, a repl and autocompletion.
Re: Python overtakes Java to become the second-most popular programming language
#144Earlier 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
#145Darn it, yet another hint that I'm not getting any younger. 20 years of Java experience and no intention of learning a new language... When prompted, I usually snark that you don't ask a professional violin player to "just" switch to viola either.
Re: Python overtakes Java to become the second-most popular programming language
#146I 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…
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).
Re: Python overtakes Java to become the second-most popular programming language
#147Earlier quoted context omitted.
I've used 'import gc' in python programs. gc.get_referers and gc.get_referents is very helpful.
I'm guessing you've been doing this for a while though... when you see that in a code base that you know has major issues and was made by fairly new programmers, it's like "oh god please tell me that doesn't mean garbage collector, I'm going to need a stiff drink"... :-)
Re: Python overtakes Java to become the second-most popular programming language
#148Earlier quoted context omitted.
> I'm writing some Java at the moment for an Android app, and it's just killing me after doing Scheme and Python, but I have to admit, if that start-up had used Java or C#, they might have been better off in the long run. that’s a logical fallacy. chances are that if they used Java or C# they might be dead by now (ie it sucks but usually it’s a good problem to have)
I know what you're getting at, and I agree with the sentiment very often, most of the time even. But in this particular case, I don't think so, and believe me, I spent a lot a of time thinking about that....
Re: Python overtakes Java to become the second-most popular programming language
#149Earlier quoted context omitted.
What does typescript have to do with speed?
Static typing can be a bitch to get right. There are quite a few weird cases where it would be natural to write without types, but tricky once you introduce static typing and want to keep pleasing the TypeScript type checker, usually involving generics.
Types are like living documentation - a contract between devs that describes and enforces specific behavior. Just because you know what properties an object contains now doesn't mean you'll remember it in a month, or that the dev who inherits your work will have an easy time figuring it out. I feel way faster when I code using types, because the type system tells me exactly what I'm working with at a given time. This ends up preventing lots of bugs and makes debugging errors that do happen way easier, in my experience.
So TL;DR types seem slower at first but the dividends are paid in full, and then some, when you have to maintain a project among many devs or teams of devs.
EDIT: not to mention that IDE autocomplete features often seem like a superpower when working with static types. I'd recommend Typescript for that reason alone, honestly.
Re: Python overtakes Java to become the second-most popular programming language
#150Earlier 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.