For example if I forget the name of a function for something in a particular language I don't even go to the docs, I just google something like "python reverse list" and click the first SO link.
For example if I forget the name of a function for something in a particular language I don't even go to the docs, I just google something like "python reverse list" and click the first SO link.
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?
But what you want is probably ls[::-1]
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.
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.
One of the most productive times in my career was programming for the IBM i in the 90s. There were manuals online, but you could also download indexed PDFs versions. IBM did a superb job with their documentation, there was hardly any need to look up anything in the Internet, whatever you needed was in the manuals, examples included.
Of course you still used the Internet at work, but mostly for mingling with your peers and having technical discussions, although too many people still blindly copied/pasted from the forums.
A well structured and correctly indexed PDF is a godsend, because you just open the table of contents, quickly locate what you're looking for, click and there is your answer. As I said, IBM excels at writing documentation. Every language has a Language Reference manual, and a Programmer's Guide manual. The first is for reference, the second is to learn how to use it, including examples.
Don't take my word for it, you can check out, for example, the COBOL manuals here: https://www.ibm.com/docs/en/i/7.1?topic=languages-cobol
I absolutely hated it. My screen was only 640x480, so I could barely see a whole page, much less see my IDE at the same time. These were the days of single 14 or 15 inch monitors, not dual or triple 24" widescreens.
It was also a little on the slow side. Early Pentium, 8MB RAM, 4X CD-ROM...
These days I'm delighted to see a PDF. There's a table of contents and index, they're searchable...copy and paste usually stinks, though.
PDF's are forever. They print nicely. They don't get lost when the project upgrades a major version, you can still use them when there's a DNS issue with your ISP, you can use them when you don't have internet...
I'm probably too set in my ways, but I prefer references that are always available offline. Devdocs.io once in a blue moon would forget about my choices, and I would hate to redownload them.
It taught me to get better at reading the Python docs, but more importantly to cope better without being able to just search every issue I was having online.
https://www.mirc.com/help/html/index.html?mirc_scripts.html
I remember spending the afternoon tinkering with it until late at night when dial-up "logic" meant I could finally go online without it costing an arm and a leg
For eg, with Rust and Go projects I would invariably read the actual docs (which I find are very accessible to read) as compared to when I write Python or C++ where I'm happy to SO my way through my task.
However, what I've found is that reading the actual docs is better for multiple reasons: 1) it reinforces your learning / memory via spaced repitition 2) you tend to glean some extra, related useful info from the docs.
These days I try and put myself in a no SO straitjacket as far as possible, forcing myself to read the actual docs instead.
For example. MDN had terrific docs for JavaScript and web apis. Things are discreetly segmented and this easy to navigate. Terrific, up to date information about how to things, why as well as great information on the caveats of the API (what works where and what fails where).
The SO answers are often a hack on how to implement it in an outdated framework. And ten variations that are "faster".
But you might still end up there because you're not sure how to look it up directly in the docs. Maybe you do an SO layover.
.Net is similar, although the official documentation suffers from marketing speak pollution, where it's hard to find answers because Microsoft names their APIs by randomly permutating ASP, Entity, Core and Framework when making things.
Add to that all the trashy noob doc sites, codeproject, csharpcorner... that pollute search.
Both ecosystems suffer on SO because of SOs inability to stay up to date with a changing API. A great example is all the Python 2 answers.
Then you have ecosystems like Scala, which has terrific documentation in source code. As well as official docs that are reasonably easy to navigate. But it's not a huge ecosystem, so sometimes it's hard to find answers to questions that haven't been asked. Then SO provides a valuable platform to get those answers. Sometimes from the maintainers themselves.
All in all, SO often offers a good complement to official docs, ranging from excellent to subpar. Personally I wished it was better at providing up to date information.
I see it more as an expert system where problems and their solutions are documented in a queriable way.
What stack overflow offers is more than your run of the mill documentation. It leaves a paper trail of weird corner cases and their workarounds.
[0] https://meta.stackoverflow.com/questions/354217/sunsetting-d...
If that's your workflow it might be worthwhile adding a custom search to your browser so you can just do "SO python reverse list" and only get results from SO.
Chrome https://www.google.com/amp/s/www.techrepublic.com/google-amp...
Firefox https://support.mozilla.org/en-US/kb/assign-shortcuts-search...
Rails, Some gens, and some Java projects are the few properly documented projects out there.