Live data from Hacker News

Python overtakes JavaScript as most questioned language on StackOverflow

globalapptesting.com

51–60 of 166 posts

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#51
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.

Any Q&A board is going to run into this problem. It takes a lot more work to become an intermediate or advanced user. Given enough time and popularity a topic will be overwhelmed with beginner q&a.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#52

I’ve used python for a while but mainly for small scripts. I’m often googling answers. (Is it myvar.len() or len(myvar) or myvar.__len__.?) do I use conda or pip or... 2.7 or 3.?. Oddly I’ll use books for other languages (Perl/JavaScript). It’s a fine language and easy to get running but it seems harder to memorize things in it vs others (if I was 100% of my time using it, it probably would easier).

For perl, a lot of my searches end up at perlmonks. A lot of great answers for more arcane :) perl.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#53

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

I started with python 1.7, two decades ago, and I don't find it any harder to use than back then. The language is pretty much the same as in the late 90s, complexity wise.

But back then, it was an insider's language, my teachers didn't know it existed. Then, year after year, I saw it become more and more popular.

But it is still so easy to use. Nowadays, I use it to teach programming to teenagers, and in less than a week I can teach them pretty cool and complex stuff (UCB algorithm, markov chains, simulated annealing, traveling salesman problem) because the language is so easy it does not get in their way.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#54

I’ve used python for a while but mainly for small scripts. I’m often googling answers. (Is it myvar.len() or len(myvar) or myvar.__len__.?) do I use conda or pip or... 2.7 or 3.?. Oddly I’ll use books for other languages (Perl/JavaScript). It’s a fine language and easy to get running but it seems harder to memorize things in it vs others (if I was 100% of my time using it, it probably would easier).

It's not actually. You never call dunder methods directly, you use them through the built-in function or operator. So it can be neither myvar.len() nor myvar.__len__

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#56

I’ve used python for a while but mainly for small scripts. I’m often googling answers. (Is it myvar.len() or len(myvar) or myvar.__len__.?) do I use conda or pip or... 2.7 or 3.?. Oddly I’ll use books for other languages (Perl/JavaScript). It’s a fine language and easy to get running but it seems harder to memorize things in it vs others (if I was 100% of my time using it, it probably would easier).

> ...it seems harder to memorize things in it vs others This x10. I love Python, and use it for small scripts when I get the chance (just used it to test some probabilities last night even), but it seems like I constantly have to look things up all the time in it and can't seem to remember even common, basic syntax in it, despite having used it quite a bit. I really don't know why. I can leave and come back to other…

Interesting - I had the complete opposite experience: Python was the first language I'd tried in a long time that just worked as I'd expected it to. After understanding the initial indenting rules, most of the code I tried could be written as pseudocode, which surprisingly worked the first time.

I was really impressed, most languages have so many stupid syntax requirements, which really shouldn't be be needed these days - everything compiles to the same assembler code so lets not pretend these languages are doing magical things.

The goal should be for programmers to get the logic across to the computer in the simplest form - and Python is pretty good for that (apart from zfil - seriously, can you get any more unintuitive)

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#58
post #17

Earlier quoted context omitted.

There is a bit more insight to be found by reversing that - Python is simpler than other programming languages and achieves that by sacrificing a little power. Compare it to C, which it has displaced as an introductory language. Python and C are superficially interchangeable to a beginner, but to learn C you have to invest time into pointers and memory management. Python sacrifices the efficiency of direct memory man…

> can't even use a dict as a dict key Curious, is this actually something you want to do often? While there is no hashable+immutable frozendict ala frozenset, you could throw one together or even define a hash function on a subclass and "swim at your own risk" not to mutate it later. I've encountered this enough with lists and the obvious solution is to cast them to tuples. Can't say I've found the same with dicts th…

Python probably has a set type, but a common general use case for use an associative array as a key is when making a set.

dict = { "foo" : "bar" }

set = { dict : true }

set.has_key?(dict) # true

I'm sure there are other use cases where dict keys can be convenient.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#59
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.

Do people really use StackOverflow for answering job-related programming questions? The only time I found the questions on there useful was when I was a first year student learning programming. Maybe I am just bad at searching / asking.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#60

In this sort of context, "most questioned" is probably not much more than a synonym for "most popular".

Couldn't disagree with you more.

"most questioned" is some combination of:

- many beginners

- incomplete or outdated documentation

- not taught (or taught well) in schools

- SO users who don't search for old answers before posting again

See how none of those things, even mixed together, are a good proxy for popularity?

We don't know the mix of the above factors for Python, but without better analysis, the headline here is meaningless outside of its specific claim.

Post reply on HN