Live data from Hacker News

Python overtakes JavaScript as most questioned language on StackOverflow

globalapptesting.com

111–120 of 166 posts

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#111
post #98
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.

I'm sure there's lots of beginners to programming but most of the time when I find myself asking basic questions like "how to duplicate array Python" isn't because I couldn't spend 2 minutes writing a function to do it but because there already exists a generally accepted best way to perform this operation that leverages the standard library and there is seemingly no other way to discover what that is. Like for this…

> and there is seemingly no other way to discover what that is

Yes there is, it's called reading a goddamn book.

> Knowing the right thing to do requires you be informed about the history of Python language design

Bullshit, it requires you knowing the language. Perhaps by reading a book. Knowing the history is of little value.

> sifting through the massive corpous of documentation and historical knowledge required to write good Python is nigh impossible unless you're willing to dedicate yourself Python

Total crap, just read a decent book. About 3 years ago I learnt python from 'Learning Python' by Mark lutz (5th ed) for a new job. I spent 3 weeks going through ~1000 pages and reading stuff on the web. I amazed a guy there when he found out I'd just learnt python, ie. wasn't a veteran at it. He'd used it for years.

Difficult, right, putting in all that work? Well that's called doing your job as a programmer. Happens I'm about to return there so I'm brushing up on it by going through it again.

I would have some sympathy with your position if you hadn't made it out to be such a terrible task. It's not. It's called doing your due diligence as a programmer.

And I have real sympathy with the guy who posed the question you gave from StackOverflow, but the key is once you've learnt about object references, say in delphi, you carry across that understanding to scala/java/python/everything else.

90% of stuff will carry between programming languages. Once you learn OO, functional, procedural, logical langs you recognise and underlying commonality. And most of all, programming is not about a specific language but problem solving and general principles, so getting hung up on a particular lang is missing the point.

My first year out at university I worked at an engineering company and got the best advice ever: first thing to do is pick up the docs and start reading. It's stood me well ever since.

If there are too many options (ie. your comment on slicing vs other stuff), yes, I see but the answer's simple: pick one way and stick to it; either slicing syntax or list methods. You're there to deliver results correctly to the business, not deliver idiomatically perfect code. There's NO shame in not crawling into the furthest, darkest corners of a language.

Excuse the rant. It'll come with experience, just trust yourself and ask questions to any experts you can find.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#112
post #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.

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

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#114

Python'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.

Came here to write this. MDN is a blessing.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#115
post #104

Earlier quoted context omitted.

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.

The 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 u…

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

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#116

Earlier quoted context omitted.

> ...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 d…

> everything compiles to the same assembler code so lets not pretend these languages are doing magical things.

Nope. Some languages get compiled into binaries that are more performant with a smaller footprint. Some have a runtime that provides features like garbage collection and runtime evaluation. Others let you define macros that run at compile time, extending the syntax of the language. Some are graphical live environments. Others offer full high-level concurrency.

Languages have different syntaxes to support the features that their interpreters or compilers can convert into the code that can run on the target environment. This is not going to be the same across all languages, and there are tradeoffs.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#117
post #7
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.

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.

Jack of all trades, master of none

but often better than master of one

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#118
post #21
post #20

I 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…

Another 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/

That's because programming in python is fun so we aren't as stressed! I'm only kidding but there might be some truth in this worth exploring.

Re: Python overtakes JavaScript as most questioned language on StackOverflow

#119
post #98

Earlier quoted context omitted.

I'm sure there's lots of beginners to programming but most of the time when I find myself asking basic questions like "how to duplicate array Python" isn't because I couldn't spend 2 minutes writing a function to do it but because there already exists a generally accepted best way to perform this operation that leverages the standard library and there is seemingly no other way to discover what that is. Like for this…

> and there is seemingly no other way to discover what that is Yes there is, it's called reading a goddamn book. > Knowing the right thing to do requires you be informed about the history of Python language design Bullshit, it requires you knowing the language. Perhaps by reading a book. Knowing the history is of little value. > sifting through the massive corpous of documentation and historical knowledge required to…

1990 is calling and wants you back... But seriously, many of us simply don't remember that sort of book learning.

If it comes to you naturally, fine, just realise that people are different and have different skills, memorization techniques and care about different things.

Some programmers are like you (a tiny minority afaik) and can read a dry spec or a book and remember all the intricacies and gotchas. It takes a certain type of mind to do that. And I would note that none of the people I knew who could do that were particularly good programmers.

Others, most as far as I've seen in my more than a decade career, learn by making, experimenting and adapting examples.

This is made worse now in some ways because back in the day many editors used to have fantastically well written and edited help, and that has generally disappeared.

Press F1 on a type or function and you'd get reams of well written examples and explanations.

Now most programming languages don't, the documentation is sparse and they simply rely on Stack Overflow and Google to provide all the examples for them.

However, that means that old ways of writing things can stick around as often no-one edits a SO answer to correct it.

Post reply on HN