Live data from Hacker News

Python overtakes JavaScript as most questioned language on StackOverflow

globalapptesting.com

101–110 of 166 posts

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#101
post #9

Earlier quoted context omitted.

Bingo. When you just need to get something done, Python is great. Some quick googling to find the right libraries for the task, and then some caveperson programming, and the deal is done. Outside of lisps, I find Python to be one of the simplest syntaxes, so the only effort is the logic to solve the problem.

I've been programming since I was a teenager, and for a long time I found myself struggling with my syntax and edge cases. Once I started using python, about 10 years ago, programming quickly turned into "what's the best way to solve this problem", instead of "wtf do you mean null pointer".

The feeling is quite the same when switching from C to D. You don't have to use the advanced features of the language, but they're there if you want them.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#102
post #99

Seem to me that Python has won. What I mean by that is that it is used almost everywhere and there is almost no compelling reason to use anything else. You want web? Django, plus a million other frameworks, all well tested and documented. Machine learning? Tensorflow, Keras or PyTorch. Scientific computing? Numpy. For the last two decades people have complained about (C)Python not being multi-threaded, not jitted, no…

It has mattered, you're seeing the result of the survivor bias of what can be implimented. No language is a cure-all, python included.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#103
post #15

Earlier quoted context omitted.

Probably both. Python ecosystem is expanding super fast. Look what is happening in data-science. Newborn Python libraries getting outdated too soon just like in JS ecosystem.

Expanding? Hope they expand & knock down most of the garbage documentation I've seen in python. I don't need any more library ref static sites like they do with java but with a python feel to them. Give me a functional example of how to use your code, not that you have lots of special methods that do things. Show me how those things are done.

Userguides and references are both important parts of software documentation. A guide that covers problems and their solutions is a good way to start learning how to use a library but when you want to do something that isn't covered by the Userguide you absolutely need a reference that just lists what functions are available on which time in a bare bones manner.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#104
post #99

Seem to me that Python has won. What I mean by that is that it is used almost everywhere and there is almost no compelling reason to use anything else. You want web? Django, plus a million other frameworks, all well tested and documented. Machine learning? Tensorflow, Keras or PyTorch. Scientific computing? Numpy. For the last two decades people have complained about (C)Python not being multi-threaded, not jitted, no…

There are plenty of compelling reasons to use other languages. Macros, types, threads, interfaces, lambdas, tail calls etc.

But what matters in this world is short term profit. Python is easy to get started with, has a ton of frameworks than can be duct taped into semi-working software by mostly anyone and is taught in many schools.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#105
post #86
post #6

Earlier quoted context omitted.

15 years of Python here, started in 2.4. Day to day Python is not more complicated to use. It's actually easier due to many bugs fixes, quality of life features and better error messages. However, Python does provide more tools to do more complicated things (async, type hints, etc), but that's not what most people use. They actually don't even know about it, and don't have to care. So it's not the questions you see o…

>It's also why you don't get multi-line lambdas. Everything is a compromise. Arguably too much of a compromise. This is just Guido doing a "because I say so" and imposing his bias against functional programming. Give me a properly-designed language like Ruby any day over Python's bag of compromises.

On the other hand, as someone who reads other peoples code just as my as I write my own, maybe by the time your lambda is many lines it should have its own name. And maybe the name should be really informative about what the function does.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#106
post #40

Earlier quoted context omitted.

Absolutely. For me it is a 50-50 chance whether I have data in a dict that needs to be mapped to something or have data in a list/tuple that needs mapping. Many major programming languages undersell how natural key-value data structures are; usually by providing unwieldy mapping data types. Clojure has spoiled me. > you could throw one together Yeah, I do. Most Python programmers wouldn't see a need for that, but tha…

> Most Python programmers wouldn't see a need for that, but that can be attributed to Python not having the capability by default and so they've just internalised not to use dict for anything that needs to be a key. You're being extremely uncharitable here. To a Python programmer "using a dict as a key" is a nonsensical idea for the same reason "using a list as a key" is — both dicts and lists are mutable. Python pro…

id(dictionary) is the key you want: immutable, reliable, cheap.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#107
post #62

Earlier quoted context omitted.

I mostly agree with you, but still think that Python could be way simpler and equally powerful. I'd love to see a language similar to Python, but with named structs instead of classes, for instance.

@dataclasses?

People have not caught up with 3.5+ yet. I see plenty of code not using f-strings, chainmaps, pools and the likes.

We can't expect them to known about dataclasses yet.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#108
post #35
post #3

Seems like the most difficult programming is no longer cache invalidation and naming things. Its now about strings, and to duplicate arrays ... The stats are skewed because hordes of beginners. Mainly driven by what schools teaches and what languages has the most hype. That said Python is huge . Damn you significant white space.

protip: you can also increase your StackOverflow clout by merely asking or answering the most generic basic questions. You'll look like a community expert and thought leader in no time. Helps the resume inhalers that weigh these arbitrary things. More complex questions about specific frameworks or how that might work with your ORM and memory cache just don't get the attention.

[deleted]

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#109
post #22

Gah, those wordclouds are horrible attempts of analyzing "what the questions are about". There is no attempt at normalizing term frequency, or removing non-informational words. So words like "get" and "using" get a high score. It may also seem that the text analyzed is the entire post including metadata. For instance "closed" and "duplicate" both show, maybe just be because of "closed as duplicate"... Maybe even incl…

It's much better to just use a table of phrases/keywords, even if it takes a little more effort. Phrases are specific and have clear intent - using only the most common words leaves out critical context!

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#110

Earlier quoted context omitted.

I don't think mutability is a concern if your goal is to get a bidi map between strings and (mutable) _instances_; i.e. if you just want to use the reference to the dict itself as the hash rather than the contents of the dict itself.

Yeah, I don't actually know if Python computes hashes for dicts by content or "identity". I just assumed it was the former, based on the fact that dicts are disallowed as keys.

It’s been a while, but I’m pretty sure the reason why a dictionary can’t have a dictionary as it’s key is because the dictionary class doesn’t implement the __hash__ method that would compute the hashcode.
Post reply on HN