13 ms·
Python overtakes JavaScript as most questioned language on StackOverflow
- kissgyorgy 8y agoIs it happening because of Python getting more popular or getting more complicated to use?
- thefounder 8y agoMaybe due the usage of Python in AI
- samravshanov 8y agoProbably 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.
- krob 8y agoExpanding? 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.
- imtringued 8y agoUserguides 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.
- sametmax 8y ago15 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 on SO. Python has gotten much, MUCH more popular, and we are currently facing a wave of new beginners. Particularly from schools (it's now the default teaching language in most countries) and from loads of workers that can benefit from manipulating data with programming and are attracted to Python for this. It is precisely because Python is still easy that it's that popular: it doesn't benefit from massive existing code bases like Java or accidental monopoly like JS. We just have a lot of people creating a lot of libs for pretty much everything, because everybody can do it. I also think the aesthetic of the language plays a big role. Python has been designed to allow you to dev with it with just MS notepad if you have to. It means you don't need to learn about a gigantic and complicated ecosystem to be productive with it (although it does exist): it's a huge help for all those people that are just getting started or not a programmer at heart. It's also harder to create very ugly code because you don't know what you are doing, and if you do, the result will not be as bad as with other languages because Guido made sure of it. It's also why you don't get multi-line lambdas. Everything is a compromise.
- skdotdan 8y agoI 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.
- whynotminot 8y agoOoooh that's an interesting idea. That is one thing about Python that has always been interesting. For new programmers, it's such an attractive language because it's very simple to get up to speed and pump out usable code. But to really start leveraging Python for more serious projects it's extremely useful to use Classes. And that's actually an appreciable bump in difficulty for inexperienced devs. I've seen go to great lengths to avoid it. Maybe named structs would be a simpler way for them to level up complexity, especially if they're coming from a C background.
- peteretep 8y agoComing from Perl, Python library documentation makes me want to tear my eyes out. No I don’t want a cutesy fucking module homepage, I want reference documentation with some examples. Authoring PyDoc was the worst experience too. No I don’t want to install and configure a static site generator in order to have rich text documentation.
- kissgyorgy 8y agoIt's strange to see this is your experience, because I had the exact opposite: Python documentations are usually very comprehensive, nicely formatted. Important projects have very good documentations and setting up a new documentation is very easy with Sphinx. Maybe you should try it again, it might have changed a lot since you looked it.
- peteretep 8y agoI looked at it last a month ago. It was terrible. > setting up a new documentation is very easy with Sphinx As per my original comment, the idea that documentation should require some kind of external markdown static site generator is bizarro land.
- jefftk 8y agoHow would you want this to work? The alternatives to Sphinx I've used (Javadoc, Doxygen) more or less work the same way.
- mjw1007 8y agoI think there's a big difference. Sphinx starts from the point of view that you're going to write your documentation as if you were writing a book, then on top of that it has some optional features for pulling in information from source files. Most of the others start from the view that you're autogenerating documentation from source-code comments, and on top of that there are some optional features for pulling in some extra content from documentation-specific files. I think the Sphinx way tends to produce better documentation in the long run, but it takes more effort to get to something just-about-adequate.
- lozenge 8y agoMore popular, especially for homework assignments (i.e. among people who don't know how to search and don't understand Python well enough to read the docs).
- detaro 8y agoI'd say the former: Python is becoming more and more common as an introductory language, and is used as "glue" in many fields that people try to get into (AI, "data science", ...). There's also been a few areas where complexity has been added (asyncio in my mind being the main new source of confusion), but I don't think those are common enough to have a huge impact.
- sacado2 8y agoI 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.
- z3t4 8y agoSeems 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.
- sametmax 8y agoI 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.
- blunte 8y agoBingo. 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.
- AtHeartEngineer 8y agoI'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".
- petre 8y agoThe 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.
- crdoconnor 8y ago
- aasasd 8y agoIt just means that almost all trivial questions about JS have been asked and answered, now it's Python's time. --- Also I bet that if each language's words were compared to the overall vocabulary for SO, or at least to the cumulative one for these languages, the differences would stand out more. And of course, the usefulness of a word cloud visualization is highly dubious to me.
- sametmax 8y agoNo if you see the questions, they are the same over and over, for js or python. Simple things you can google, answered a 100 times.
- inglor 8y agoI think a big part of it is how much canonical documentation and resources has improved in JavaScript vs. how much people are struggling with it in Python (as someone who does more Python than JS but does both). Python libraries tend to have less documentation and their documentation tends to be less live whereas JavaScript has been more stable lately (something I didn't think I'd ever write). Funnily enough the last time I really struggled with a JavaScript library's docs it was Tensorflow.js (a Python port). Also, I'd love to see a comparison that checks "all" JavaScripts (+TypeScript).
- inglor 8y agoAnother thing I've noticed is that the Python community in StackOverflow is very nice and considerate most of the time compared to the JavaScript crowd. (Being a part of both). If anyone is interested in engaging by the way: https://sopython.com/ https://sopython.com/
- scaryclam 8y agoThis 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.
- whynotminot 8y agoFrom the beginning the language has taken great pains to be readable and comprehensible. It makes sense that would breed a community that values empathy.
- inglor 8y agoThat'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.
- jononor 8y agoGah, 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 including the answers. Which could explain why "pip" would show up so often. The summaries are also pretty off. "vector" mostly because C++ is about 3D graphics vectors? No, probably just a whole lot of std::vector...
- kijin 8y agoSome 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 with the most in their lives. Meanwhile, C# and Java seem to be all about strings -- Are people just casting everything to string because they don't want to deal with strict types? -- and PHP is the only language where more people feel like they need to ask about arrays than they do about strings. Which is not surprising since PHP uses arrays for basically everything.
- coherentpony 8y ago> 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.
- bepvte 8y agoNot saying anything about the parent comment, but the method of studying a large population by using a sample size is pretty common and time tested.
- robertAngst 8y agoI'll take a stab at it. Ask a question for (server) Javascript- 99% of people aren't going to try because the code is too unruly to deal with. Its simply faster to google and debug. Ask a question in python- python code is simple enough to copy paste into SO. And given python has hordes of newbies, they don't realize google is probably a better place to look. This synergy of situation is why Javascript is getting less questions. EDIT: I program in both, I don't see why this is invalid.
- acomjean 8y agoI’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).
- cableshaft 8y ago> ...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 languages and not have anywhere near as much difficulty.
- acutesoftware 8y agoInteresting - 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)
- quonn 8y ago> everything compiles to the same assembler code so lets not pretend these languages are doing magical things. They don‘t and many of the dynamic features of Python (and Ruby) cannot be efficiently compiled. That‘s why it relies heavily on C modules.
- _old_dude_ 8y agoA lot of universities are now using Python at the beginning of their curriculum, that may be one of the cause.
- McDutchie 8y agoIn this sort of context, "most questioned" is probably not much more than a synonym for "most popular".
- smt88 8y agoCouldn'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.
- stakhanov 8y agoI do agree with the original contention that it's just a proxy for popularity. All of the things that you just mentioned may be factors. But at the end: these factors are probabilities that are mixed together in a nonmonotonic way somehow, and then multiplied by the total number of people out there doing stuff with the langauge. I would expect that that latter aspect is the dominant one in determining the ranking by language. I would expect advanced people to ask just as many questions as beginners (they just do more advanced stuff, and ask questions relating to more advanced things pertaining to the langauge). Good documentation does not stop people from asking questions, as questions are frequently asked to which "RTFM" is the answer. Schools? Actually pupils asking "do my homework" questions is probably a driver in the opposite direction.
- jcelerier 8y ago> See how none of those things, even mixed together, are a good proxy for popularity? I'd say that having many beginners alone is enough to qualify as "popularity". There are more people learning programming that programmers.
- smt88 8y agoI can't disagree with you because that's an issue of semantics. I would define "popularity" as the number of people using the language, regardless of skill level. By that definition, I'd guess that Python is near the top due to its recent dominance in data science, but Stack Overflow isn't proving or disproving the idea either way. Using my definition (and likely yours), JavaScript is certainly the most popular. But it's hard to discount the many huge organizations using Java and C#. Their beginners might not be using Stack Overflow as heavily because they have in-house mentorship.
- desireco42 8y agoOf course, each noobie is confused about who to properly do things :)
- ravenstine 8y agoPython's documentation is not the worst, but it's certainly nowhere near the best. As for JavaScript, these days I almost entirely rely on the MDN documentation and hardly go to Stack Overflow for that topic.
- lilgreenland 8y agoSame, I find I don't need to go to Stack Overflow because MDN has good documentation.
- MehdiHK 8y agoCame here to write this. MDN is a blessing.
- tinyhouse 8y agoI 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). Type hints and annotations are a step in the right direction. But the adoption is still not high. That's the blessing and curse of Python - it supports many good practices but it doesn't force you to use them so it really depends on the programmer.
- BurningFrog 8y agoI 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".
- arcturus17 8y agoBingo. I’ve made disgusting messes of Java, JS, OCaml, C...
- tinyhouse 8y agoTrue but take my function example. In Java for example you will have the types to click on to figure out quickly what the arguments are. Another example? In Python it's "easier" to make spaghetti code because of the scoping of variables that are less strict. I can give many more examples like this.
- goostavos 8y agoAnecdotally, 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.
- diminoten 8y agoIt's less a problem with the language syntax and more a problem of the low bar for entry. To put it another way, "3 years of experience writing Python code" could mean hacking on scripts or it could mean Enterprise level system design and implementation. Hard to hack around on scripts in Java.
- rossdavidh 8y agoMy first thought on reading this was the guess that, while the questions about Javascript are about fewer topics, the questions about Python are more widespread (because it gets used for more different kinds of things). In other words, if you looked at the volume of questions _read_, you might still see a substantial lead for JS, but it's even more likely that your question has already been asked (and answered) on SO, thus fewer new questions than for python. Just a guess, of course.
- stevemadere 8y agoAs in: "Why on earth did you implement this in Python?" ;)
- bjourne 8y agoSeem 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, not having tco, being to simplistic and so on. In practice it seem to have mattered very little. For the applications where it do matter, like if you are writing your own language vm, compiler (but see PyPy) or garbage collector, you have to ask "Yes, ok, but how often do you do that?"
- devwastaken 8y agoIt has mattered, you're seeing the result of the survivor bias of what can be implimented. No language is a cure-all, python included.
- codr7 8y agoThere 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.
- TelmoMenezes 8y agoThe majority of the people in the world that can benefit from writing computer programs for the most various purposes are not professionals, nor desire to be. Computation is a powerful tool wide incredibly wide applications, and Python makes this tool accessible to humanity in general. That is no small thing. Macros, types, threads, interfaces, lambdas, tail calls, etc. are incredibly niche interests, and perfectly unnecessary for the vast majority of computations that people would like to perform.
- codr7 8y agoSure thing. Until the last paragraph. There comes a point in every amateur programmer's evolution when learning which way is up and picking more powerful tools is the right thing to do.
- wsdfsayy 8y agoDo questions about JavaScript libraries like React/Vue get included as "JavaScript" questions?
- itwy 8y agoAnd yet there isn't a proper Python to JavaScript transpiler, like ClojureScript is to Clojure. I wonder why.
- cutler 8y agoYes, that always puzzled me. Same with Jython which has a much smaller following than JRuby. I think with Clojurescript it's a case of really adding value whereas Python to JS is largely syntactic sugar.
- itwy 8y agoThat actually makes sense (the difference between CLJS and syntactic sugar transpilers).
- agumonkey 8y agoI find the term 'questioned' almost hilarious
- alkonaut 8y agoIs typescript counted into the js category of questions?
- Animats 8y agoThis may reflect the recent addition of features to Python that were not really needed. Another problem is "virtualenv". With more "version pinning" capability, there's an increasing tendency for Python programs to require their own special snowflake environment. I keep seeing install instructions which begin "Install virtualenv". Package authors then worry less about backwards compatibility. That's the sort of thing that generates Stack Overflow questions of the form "Why isn't X working with Y".
- m1117 8y agoThat indicates how fast data science and ML are growing
- rswillif 8y agoThere's hope left for mankind after all.
- politician 8y agoI wonder if this is a combination of JavaScript frameworks becoming more sophisticated and offloading concerns from developers and the sheer exhaustion of trying to get a question answered from SO without the host of problems involved in simply asking the question. It's often easier to ask and answer your own question on the corresponding Github issue tracker and let Google index it, then to run the SO moderation gauntlet.
- punnerud 8y agoThe biggest Universities in Norway switched some years ago from Java to Python as intro language. Think the Universities are a large driving force in the long run.
- seaghost 8y agoI think it's partly because a lot of academia use it and most of those people are without formal CS degree which is completely fine.