Live data from Hacker News

Python overtakes JavaScript as most questioned language on StackOverflow

globalapptesting.com

81–90 of 166 posts

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#81

Earlier quoted context omitted.

This seems true of the Python community in general. I've yet to meet anyone that's not nice and really supportive (there are bound to be some, but I've not knowingly interacted with them). I think it's a great measure of a programming language's ecosystem when taking part in the community is such a pleasure.

From the beginning the language has taken great pains to be readable and comprehensible. It makes sense that would breed a community that values empathy.

That's a good point! Though I think a big part of it is that the web stack changes a lot more often which breeds a lot of fear that kills empathy.

I've met some of the nicest people I know in the JavaScript open source community and some of the most empathic though.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#82
post #46

Earlier quoted context omitted.

Hmm, this has not been my experience with Python libraries (I can't speak for JS ones). The vast majority are well-enough documented that I've never had a problem, and I strive to document my important libs at least this well: https://yeelight.readthedocs.io/

It always amazes me that the Python community is okay just missing indices for their API documentation. I’m so used to Rust [1], MDN [2], Apple [3], Qt [4] starting their docs off with great indices. Obviously, those are all “commercial” docs, but just indices alone is a huge help. To be clear, I think you’ve done an absolutely great job writing the prose — I just don’t get the cultural conventions around Readthedocs…

MDN is a wiki though, run by a nonprofit and written by the community.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#83

I like Python and it's my main language currently after years of C++ and Java. My main problem with Python is that it's really easy to create really messy code that no one can follow. And I see it often because everyone is using Python these days. For example, you have an undocumented function with 6 arguments and have no idea what these are (having bad names also doesn't help, but that's not a Python specific issue)…

I have my problems with Python, but I'm not aware of any language where it's not "really easy to create really messy code that no one can follow".

Anecdotally, it does feel like a slightly worse problem in Python. It's got an 'easy to learn, hard to master' thing working against it. It's a little TOO accessible (if that makes sense).Hiring Python devs has always been the hardest in my experience. It's tough to separate the wheat from the chaff.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#84
post #9
post #7

Earlier quoted context omitted.

I often say that Python is the best at nothing, but pretty good at most things. And hence it became huge by the sheer appeal of being versatile. Life is short and most people needing to program are not programmers. Also many programmers didn't start as such, and were simply looking for an easy way to solve a task.

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".

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#86
post #6

Is it happening because of Python getting more popular or getting more complicated to use?

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.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#87
post #46

Earlier quoted context omitted.

It always amazes me that the Python community is okay just missing indices for their API documentation. I’m so used to Rust [1], MDN [2], Apple [3], Qt [4] starting their docs off with great indices. Obviously, those are all “commercial” docs, but just indices alone is a huge help. To be clear, I think you’ve done an absolutely great job writing the prose — I just don’t get the cultural conventions around Readthedocs…

What do you mean by index? This is what I think of when I hear "index": https://yeelight.readthedocs.io/en/latest/yeelight.html Rust does the same, as far as I've seen (although the docs are a bit too index-heavy). Do you mean something different?

Maybe they mean something more like this page https://yeelight.readthedocs.io/en/latest/genindex.html which your Sphinx setup appears to be generating but the theme doesn't seem to be linking to.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#88

Earlier quoted context omitted.

https://en.wikipedia.org/wiki/Bidirectional_map Any hashmap will have problems with storing mutable objects, where the hash value itself can change after the object has been stored, causing some very unwanted paradoxes. And that is the problem with Python dicts as keys.

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.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#89
post #78
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…

Some of the simple words and their prominence can be amusingly informative, though. Take data structures for example. "string", "array", and "object" are about as equally prominent in both JavaScript and Ruby (where the dictionary is called "hash"). In Python, however, "string" and "list" far outweigh "dictionary" and "object", which probably says something about what kind of data structures Python developers deal wi…

> In Python, however, "string" and "list" far outweigh "dictionary" and "object", which probably says something about what kind of data structures Python developers deal with the most in their lives.

This statement is not true at all. There are plenty of developers that don't post questions to or answer questions on StackOverlow.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#90
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…

And worse, the dict's values may themselves be mutable. So even tuple(point.items()) is not a sensible dict key in the general case.
Post reply on HN