News for hackers. Stuff that matters.
Re:How often do people copy and paste from Stack Overflow? by henrikeh on Monday April 19, 2021 @01:43PM (#26865760)
Is it just me or is this also a symptom of Python's documentation being really strange to navigate and generally having a massive impedance mismatch with Google?

When I search on Google for "python reverse list", not a single link is to the official Python documentation. Not even if I search for "python reverse" does the documentation page show up. Searching for "python reverse documentation" leads to the second link to the Build-in Functions page (https://docs.python.org/3/library/functions.html), which is what I "need".

Excuse the comparison, but "matlab reverse list" has the top three to the official documentation (all of them relevant, but slightly different semantics). Why can't Python be better than that?

Re:How often do people copy and paste from Stack Overflow? by jollybean on Monday April 19, 2021 @08:32PM (#26869415)
It's not you - Python docs are very comprehensive but organized in a very odd way and miss a lot of marks. If you have time to 'read everything' you're fine but it's somewhat less suited as a raw reference.

Although I don't mind the informal voice of the docs - there's clearly not much in the way of editorial oversight and pro technical writing. It makes one reconsider how much actual effort goes into putting together docs from corporate backed efforts.

That said, I don't think anyone does it perfectly well, and that we could do a lot better in terms of providing information - to the point wherein I would consider it a little bit of a failure that SE has to be consulted for smaller problems. One would hope that 'good docs' would provide clear and concise answers to such things, rather than have the crowd cobble it together and vote on it.

Re:How often do people copy and paste from Stack Overflow? by dkersten on Tuesday April 20, 2021 @12:33AM (#26870702)
I actually don’t mind the python docs, but then, I learned python from them back in 2001 when I had infrequent internet access, so I had to rely on my offline copy!
Re:How often do people copy and paste from Stack Overflow? by nurpax on Monday April 19, 2021 @06:44PM (#26868712)
It’s not just you. Python seems to suffer from Python-specific ”tutorial sites” being SEO’d above Python’s official docs. I don’t know what it is about the Python documentation that lowers its rank on Google search results. In general, not a big fan of Python docs.
Re:How often do people copy and paste from Stack Overflow? by spion on Monday April 19, 2021 @08:05PM (#26869254)
JS has / had the same problem, which is why a common tip is to add "MDN" to the keywords to get a higher quality reference style result from MDN: https://developer.mozilla.org/
Re:How often do people copy and paste from Stack Overflow? by HDMI_Cable on Monday April 19, 2021 @09:07PM (#26869672)
I wish there was an MDN for Python/Julia.
Re:How often do people copy and paste from Stack Overflow? by kevin_thibedeau on Monday April 19, 2021 @08:08PM (#26869276)
Python documentation is a static Sphinx site with no need for JS to render content. That's the easiest possible design for search engines to index. It's Google's fault that their algorithm can be gamed by low quality seo sites.
Re:How often do people copy and paste from Stack Overflow? by ziml77 on Monday April 19, 2021 @08:51PM (#26869554)
The only way it wouldn't be able to be gamed is if they kept making large changes to it for no other reason than to be a moving target. Like you can say "oh it's stupid that they prioritize X and not Y when Y is a much better indicator of meaningful content" but as soon as they switch Y to be a priority, sites will shift to maximizing the amount of Y.
Re:How often do people copy and paste from Stack Overflow? by kevin_thibedeau on Monday April 19, 2021 @09:48PM (#26869873)
Google can fix the problem. They just don't want to. They were able to kill the Wikipedia clones by demoting their rankings. They don't want to surface non-profit ad-free sites on the first page results because that cuts into revenue.
Re:How often do people copy and paste from Stack Overflow? by HDMI_Cable on Monday April 19, 2021 @09:07PM (#26869666)
With how much money Google spends on ML it's really a wonder that they haven't been able to out-compete a bunch of consultants on SEO. This really seems like a blunder on Google IMO.
Re:How often do people copy and paste from Stack Overflow? by m463 on Monday April 19, 2021 @10:49PM (#26870195)
> Is it just me

no. I stored the entire python document set locally, yet I still search online for functions.

stuff like: is it str.beginswith() or str.startswith()?

Blast, how do I convert to/from unicode again???

I think what we need is some sort of mashup of rosetta code and the docs and an index.

Re:How often do people copy and paste from Stack Overflow? by klmadfejno on Monday April 19, 2021 @05:57PM (#26868370)
> When I search on Google for "python reverse list", not a single link is to the official Python documentation. Not even if I search for "python reverse" does the documentation page show up. Searching for "python reverse documentation" leads to the second link to the Build-in Functions page (https://docs.python.org/3/library/functions.html), which is what I "need".

But what you want is probably ls[::-1]