Interestingly, I don't remember when the last time I did so was. I seem to be relying on SO less and less. I do sometimes use it as a quick reference, usually because its one of the first results on search engines, but its typically just a quick "ah, that's the function for that" or "ah, that's how you do X" rather than actually copying code.
I'm trying to think what's changed, I guess I've just been writing stuff that either I'm super comfortable with or is niche enough that there's not that much on SO that's helpful. Looking in my browser history, the last thing I looked for that I got an answer on SO is what's the differences between C++'s std::scoped_lock and std::unique_lock, which was a few days ago. I still use SO, just not as frequently as a few years ago.
I do: Yesterday when I was looking up how to declare and use arrays in bash for the 1000th time. Bash is probably the #1 reason I end up there through a search.
After 25 years professional experience (plus 12 years before that), there are a number of reasons why I search for "how to do X in Y" online at least once a week:
- The language is poorly designed and has a lot of unintuitive, unorthogonal, difficult-to-remember parts or nasty footguns, but people continue using this beast-that-cannot-be-slain out of industry inertia (like Bash or CMake).
- The language is in a constant state of flux, adding new features and best practices / idiomatic things, and the cruft-that-must-not-be-used buildup is so insane that even a few years out of the loop makes you feel like a complete beginner (like C++ or Python or JS).
- The language is complicated enough that unless it's your day job you won't remember how to do basic things after a few months away (like Rust or Haskell or Gradle).
- It's been 10 years since you touched it and how the hell do you concatenate a string again???
I think the only languages I can just slide right back into are Java, C#, LUA, and Go (and C, but probably only because I used it daily for decades).
man.. I literally just did a job interview where I was asked if I had bash scripting experience, which I do, and my number one thought was "please for the love of god don't ask me how to do anything with it other than pseudocode / general sys adm work'.
SO suffers from hostile moderation and a generally unwelcoming culture, perhaps even worse than Wikipedia. This has a profound chilling effect on positive, substantial contributions, particularly from new contributors.
SO had a great strategy initially with relying on search engines to index everything, but it never seems to have solved the recency/relevance problem. In that respect, it has become its own worst enemy, with old answers about obsolete versions and practices often ranking highly in search results.
The first of those problems then exacerbates the second, because the same cultural issues get in the way of both updating answers to old questions and asking new questions that might be superficially similar to ones that already exist but actually need a different answer.
Meanwhile, in many areas of programming, documentation from other sources has become both better in quality and more readily located thanks to other well-known sites and high search engine rankings. Relatively speaking, SO simply isn't as useful if there is already primary documentation that answers questions correctly and comprehensively.
And finally, you personally may have grown as a developer over time, becoming both more capable of solving problems for yourself and more familiar with whatever tools you use regularly, so you might not need external help so often.
FWIW, I'm also in the "rarely visit SO any more" camp. I think I have a kind of banner blindness for SO hits on search results pages now, perhaps because I'm assuming that following a SO link is unlikely to provide a useful answer so I almost always check other plausible sources first. On those occasions when I do get as far as visiting SO, I'm usually reminded of why I tend to work this way now.
> SO suffers from hostile moderation and a generally unwelcoming culture, perhaps even worse than Wikipedia. This has a profound chilling effect on positive, substantial contributions, particularly from new contributors.
This rings very true to me. The GP's comment made me consider that I very rarely go to Stackoverflow anymore, no longer contribute and what stuff I do find there useful is from well before the cultural shift in moderation, back when questions could be a little more open and answers a little more freewheeling.
There are weird people on SO who are both trolls and knowledgeable. There is one person who edits EVERY SINGLE question regarding a certain programming language. Then attempts to close every question as "already asked", even where it is somewhat questionable whether it had been asked already or not. He knows his stuff really well though so he ends up not getting banned.
> SO had a great strategy initially with relying on search engines to index everything, but it never seems to have solved the recency/relevance problem. In that respect, it has become its own worst enemy, with old answers about obsolete versions and practices often ranking highly in search results.
Also the moderation is often hidden. Last week I ran into one of my answers for a language I haven't used in a while. When I read the answer I thought it was odd because the english was very poor. Then I checked and found that a moderator had made a really poor edit of the original answer. Maybe this is reasonable on a site like SO but I really felt that somebody had essentially impersonated me and entirely changed the tone of some writing which was attributed to my name.
> SO had a great strategy initially with relying on search engines to index everything, but it never seems to have solved the recency/relevance problem.
I think the SO leadership is currently searching for a solution with this issue. Whether they deploy it and it works is another matter.
Regarding the moderation and unwelcoming culture, I don't really see it, but maybe it's because I follow different tags?
I stopped relying SO and started relying heavily on https://grep.app and Github search. Most of the time the code actually works and there's good references on how to structure things.
If you like grep, you'll probably really like Sourcegraph, which I believe has most of GitHub indexed and supports some useful operators: https://sourcegraph.com/search
StackOverflow is great when you don’t know where to start looking for a solution. Whenever I’m in a new domain I’ll spend a lot of time on SO, spending less time there as I get more comfortable.
Put another way, I spend 100% less time in high school than I used to, but HS is still a valuable resource.
I also use stack overflow very little but I think it’s much more easily explained by my personal habits than changes on the site.
When I used stack overflow more, I was doing stuff with web technologies and Unix command line tools. These days I’m much more experienced with Unix tools; I use more specialised tools that aren’t mentioned on SO, use a programming language which isn’t often mentioned on SO, and a large array of libraries which are even less frequently mentioned there. I’m also generally better at finding my own way around—digging through code, jumping to definitions, looking up errors. I think the reason I don’t use it so much is that it is less useful because it doesn’t have the answers I care about and because I have fewer questions for it to answer.
That does sound a bit like me too. I use tools that I’m e it her familiar with enough not to need SO, or that are too specialised or niche for SO to be useful. I have no problem reading documentation or just diving into the code if all else fails.
SO used to have really god content for really some fundamental questions which gave it some credibility. As it accumulates more content the quality is really going down - I actively avoid SO unless I can't find any other source.
GitHub - literally every problem I have nowdays I spend searching through GH issues, reading through the code upstream and reporting back. For example I was working with .NET framework for a while (~5-6 years back now) and when dealing with closed source frameworks SO was a replacement for support channels. Now even as I'm coming back to a .NET core project - everything is OSS and on GitHub.
Docs also got better, MDN is now defunded by mozilla but where I had to do a SO search for random JS behavior I can now look up decent references on MDN. I think Google got better at indexing documentation as well.
> SO used to have really god content for really some fundamental questions which gave it some credibility.
The moderators' refusal to allow "opinion-based" questions has been very harmful to the usefulness of the site. Now you can only find best practices if someone happens to add them as a tangent. Or if you happen on an old one that got 1000+ upvotes before the mods decided theory was off topic.
> I think Google got better at indexing documentation as well
I think this is it. I also thing documentation in general has gotten a lot better at answering questions rather than being just an autogen api doc site.
I don’t rely on autocomplete quite as much as some people, although it for sure helps.
I do think that a big part is that the two things I spend most of my programming time on, one Clojure project and one C++ project, I’m just pretty familiar with at this stage. I’ve been using Clojure for ten years and the language hasn’t changed all that much, so I don’t need to look things up often (besides the occasional reference material on clojuredocs). For libraries, I check their readme’s and just read the code. I’ve actually never really used SO for clojure, now that I think about it. The Clojure project I’m working on is also a little bit niche, so I don’t tend to find anything useful on SO for it.
For C++, I keep cppreference at hand and only really use SO when I’m trying to figure out weird things, or newer features I’ve not yet used much. Again, for the libraries I use, it’s a mixture of documentation and reading headers and it’s rare that SO helps there.
In my previous job, I was mainly working with AWS services, terraform and some python (using boto) and, again, I had everything I needed from their documentation. Before that, it was Java with some Clojure, but again, the challenging part was the domain, which was nothing that SO could have helped with. Everything else, we had under control.
Same. Sometimes I forget a function name or method call (especially when using a language I use rarely) and just use stack overflow for the example and as soon as I see it I'm like "ahhh". No need for copy/paste.
Most frequently I do it for PHP. I help a friend with a Wordpress site, PHP is easy to read but I'm hardly fluent in the ins-and-outs, and a simple Wordpress hook added to functions.php can fix so many issues. I always leave a comment with the full link for context.
IMO its not even that we're copying people's logic, its just that stack overflow acts as a weird sort of crowd-sourced centralized documentation for programming languages.
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.
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?
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.
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.
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.
> 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".
It's a shame that most manuals have evolved to web pages that you can't download as PDFs or eBooks. Now you usually have to go online to find that keyword, and as you're online already, might as well google for the whole answer.
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.
I once downloaded Python docs as an iPad app and a small Python IDE - I was working on a cruise ship and so offline documentation really helped.
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.
My first programming experience was with mIRC scripting and it was ridiculously convenient to have everything in a nicely written a local, offline .hlp file
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
That's interesting that you say that because I actually have the opposite reaction. When I go to look for documentation and find that it's a PDF, I want to die.
I have a hunch that this tendency to look up SO rather than actual language/API docs is prevalent more in some ecosystems than in others.
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.
I would definitely agree that it depends on the strength/weakness of the docs/SO for that ecosystem.
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.
Just in case this idea needed any more validation, a few years ago Stackoverflow themselves launched a 'Stackoverflow for Documentation' product [0], and eventually shut it down because, as was probably obvious to many going in and certainly in retrospect, this product was of course.. just Stackoverflow.
I just google something like "python reverse list" and click the first SO link.
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.
Or use duckduckgo: it basically has this builtin, so it works the same way without configuration across browsers. Enter !so <query>. No configuration is always nice, plus this really helps when working on other machines than your own.
“Back in the good old days”, you’d get detailed documentation with for example DirectX. The whole visual c++ experience was so good. I never needed to look up anything. Browsing for documentation is such a zone-exiter...
Rails, Some gens, and some Java projects are the few properly documented projects out there.
I once had a brief contract helping out a two-person Rails consultancy where pretty much all they did was follow RailsCasts.
They got very angry at me several times for not doing things "the Rails way". We were on Rails 4, which I already had loads of experience with. The RailsCasts they were following were written for Rails 2. They literally had no idea all of the ways Rails had moved on between those versions.
Their codebase was an absolute mess as well. This was an application that was supposed to contain medical records and it had broken routes that were leaking data everywhere unauthenticated. And they were mad that I spent two weeks cleaning all of that up and bulletproofing their application.
I was happy to move on from that one, but it taught me a lesson about just how valuable sales skills are. These two people were living a comfortable lifestyle off a single paying client (essentially getting money indirectly through DARPA) and were punching way above their weight technically.
The field itself is a poorly understood area of medicine. By that I mean, it's only about 50 years old and no two doctors practice alike.
It's science, but nobody has consistent repeatable steps that seem to be conclusive beyond their own individual labs. The treatments are extraordinarily expensive.
I'll leave it at that because I'd prefer not to give identifying details (even though I basically have), but really the whole thing was eye-opening for me.
With the right connections you can have a very comfortable life with receiving grants from DARPA. I used to work for a startup founded by ex DARPA guys and it quickly showed that there was an insider club of current and former DARPA people that lived off grants.
I was told long time ago that without being "insider" I will never get direct access to NYSE and will be able to make money by doing so, proved them wrong, while there is "insider club" in NYSE, to degree there same "insider club" for DARPA or any other enterprise/organizations.
I think interesting questions is; to what degree insider club introduces friction for new comers with justified novel proposals.
I was working at a company that was acquired a few years ago, and part of the deal was them doing a source-level audit of code, mainly looking at licenses and open-source. They used some software which could detect copy-pasted source code, and had Stack Overflow indexed.
The Stack Overflow stuff was a massive, massive pain, for several reasons.
For one, it's not clear how CC-BY-SA applies to code[1]. This involved many long meetings with copyright lawyers. They ended up asking for all this to be removed, which our C-level people eventuality agreed to.
We had to then go through several hundred "flagged" things (in a hundreds of thousands of lines codebase) and fix or justify everything.
Only a few cases were outright copy+paste of a big function or class, and those were at least straightforward: rewrite. Usually it was old code anyway, and replaced with newer style, much more concise code.
Tons were one- or two-line things, which involved lots of arguments along the lines of "that is the way to open a file in append mode in this language, and logFile is the appropriate variable name in this case!" This is really a failing of the tool they were using, but it still required answering.
The funniest was a handful that were our answers: they were copy+paste our team had done from our code to SO! (Nothing proprietary, just a few lines of an algorithm or solving whatever random problem).
Anyway, this experience left me extremely cautious about introducing any external code (as opposed to libraries) into a codebase. OSS libraries with permissive licenses (MIT, BSD, etc) are easy to deal with: it's straightforward to comply and being a library means the code is nicely compartmentalized if you need to replace/remove it.
Yeah, they definitely should have bailed on the acquisition when the acquiring company asked for proof they weren't using code they didn't have a license to....
It gives the impression that they don't trust their other more standard testing and analysis tools, and also that they don't trust their developers to use discretion when selecting online resources.
And it seems the software itself reflects a misunderstanding about how programming code is actually manifested. It's very possible to read the official docs or use an IDE and end up writing the same lines of code in some Stack Overflow answer, as many here have said already.
This. The CC-BY-SA default license on Stack Overflow makes whatever is posted there unsuitable to be copy-pasted in a proprietary-licensed software. It takes a lot of effort to train people not to do that.
Using SO data for purposes like that is allowed under the CC licence used. You don't even need to do any scraping, since you can download an offical data dump of all SO answers at https://archive.org/details/stackexchange
I do this with documents and help articles I've published. "Here, let me show you how to do this." 6 mos later: "How the heck did I do that?... oh yeah. That makes sense, neat."
I had a similar thing happen after watching a YouTube video a couple weeks ago. I was going to leave a comment and looked through the comments first to see if anyone felt the same as I did. I read a comment that was nearly word for word what I was thinking only to realize it was mine.
Happens to me with my own code. "What the hell was I thinking?" Isn't uncommon when I find I got a bit too clever on something. Over the years I've learned to be less clever and more literate in my coding style.
Because "knew" is past tense. There are a lot of things that I once "knew" but no longer "know", and it's nice when that past knowledge is documented somewhere.
Solving a problem once doesn't guarantee it's added to your knowledge. Learning needs repetition, if you solve that problem once a year, you'll learn it very slowly.
I've found that the amount I use stackoverflow is inversely proportional to the quality of the documentation and the strength of the type-system of the language I'm using.
That's me with Python... For some reason I find the documentation extremely cumbersome to navigate and parse. It's just so wordy and dense. And there are barely any examples - which is what I'm usually looking for instead of having to read a whole paragraph.
The Elixir documentation on the other hand is succinct and always features basic examples for every function. It's a joy to work with.
As a slightly opposing take, Django has the highest-quality and most comprehensive documentation I've ever seen for a web framework... Or open source project, for that matter.
Not very related to the parent comment, but just an interesting note.
+1 for Elixir’s documentation. José Valim knew what he was doing when he made docs so easy and pleasant to create and view.
I always love it when a programming language has their docs available off-line and easily accessible. I grew up on Perl without an internet connection (or a GUI for that matter) so I got very used to the perldoc command. That is now the standard I expect. Elixir is one of the few languages that exceeds this bar imo.
I've been playing with the ast module in Python lately, and the documentation actually says to go look at someone else's documentation because it's better, which is a refreshing take.
Definitely. Looking at my browser history for stackoverflow + PHP, it seems to be things to do with PHP, such as how to prevent a referrer from being sent when users click a link on my website. That's of course not actually part of the PHP language, so it would seem like I'm rarely looking up how to use PHP APIs on stackoverflow. I've always found PHP docs to be the best of any language that I've used.
It's curious, despite not a example of a great language, PHP has great documentation.
I tried Pharo, and a great functionality there I miss in other languages, is the search by example ability. Saves a lot of visits to stackoverflow. See for example:
On a side note, use caution when doing a copy/paste from a website into a terminal. There are several things you can do to reduce the risk. Here [1] is a demo of one risk vector. The article links back to a discussion here on HN from 2013 on some things you can do to mitigate the risk.
In recent Bash versions this seems to have been fixed (available in Debian Bullseye, currently the 'testing' branch): when you paste something, it'll never auto-execute, even if it contains newlines.
It's actually quite annoying as I'll often copy from my terminal itself, purposefully with the trailing newline, and it now refuses to execute. I need to move my hand from mouse to keyboard to hit enter and then (often) back to mouse.
I'm trying to think what's changed, I guess I've just been writing stuff that either I'm super comfortable with or is niche enough that there's not that much on SO that's helpful. Looking in my browser history, the last thing I looked for that I got an answer on SO is what's the differences between C++'s std::scoped_lock and std::unique_lock, which was a few days ago. I still use SO, just not as frequently as a few years ago.
After 25 years professional experience (plus 12 years before that), there are a number of reasons why I search for "how to do X in Y" online at least once a week:
- The language is poorly designed and has a lot of unintuitive, unorthogonal, difficult-to-remember parts or nasty footguns, but people continue using this beast-that-cannot-be-slain out of industry inertia (like Bash or CMake).
- The language is in a constant state of flux, adding new features and best practices / idiomatic things, and the cruft-that-must-not-be-used buildup is so insane that even a few years out of the loop makes you feel like a complete beginner (like C++ or Python or JS).
- The language is complicated enough that unless it's your day job you won't remember how to do basic things after a few months away (like Rust or Haskell or Gradle).
- It's been 10 years since you touched it and how the hell do you concatenate a string again???
I think the only languages I can just slide right back into are Java, C#, LUA, and Go (and C, but probably only because I used it daily for decades).
woefully underused, but has everything and is extremely well written with no fluff.
Among other possibilities:
SO suffers from hostile moderation and a generally unwelcoming culture, perhaps even worse than Wikipedia. This has a profound chilling effect on positive, substantial contributions, particularly from new contributors.
SO had a great strategy initially with relying on search engines to index everything, but it never seems to have solved the recency/relevance problem. In that respect, it has become its own worst enemy, with old answers about obsolete versions and practices often ranking highly in search results.
The first of those problems then exacerbates the second, because the same cultural issues get in the way of both updating answers to old questions and asking new questions that might be superficially similar to ones that already exist but actually need a different answer.
Meanwhile, in many areas of programming, documentation from other sources has become both better in quality and more readily located thanks to other well-known sites and high search engine rankings. Relatively speaking, SO simply isn't as useful if there is already primary documentation that answers questions correctly and comprehensively.
And finally, you personally may have grown as a developer over time, becoming both more capable of solving problems for yourself and more familiar with whatever tools you use regularly, so you might not need external help so often.
FWIW, I'm also in the "rarely visit SO any more" camp. I think I have a kind of banner blindness for SO hits on search results pages now, perhaps because I'm assuming that following a SO link is unlikely to provide a useful answer so I almost always check other plausible sources first. On those occasions when I do get as far as visiting SO, I'm usually reminded of why I tend to work this way now.
This rings very true to me. The GP's comment made me consider that I very rarely go to Stackoverflow anymore, no longer contribute and what stuff I do find there useful is from well before the cultural shift in moderation, back when questions could be a little more open and answers a little more freewheeling.
I do not get it.
Oh god yes, this is a nightmare.
I think the SO leadership is currently searching for a solution with this issue. Whether they deploy it and it works is another matter.
Regarding the moderation and unwelcoming culture, I don't really see it, but maybe it's because I follow different tags?
Put another way, I spend 100% less time in high school than I used to, but HS is still a valuable resource.
When I used stack overflow more, I was doing stuff with web technologies and Unix command line tools. These days I’m much more experienced with Unix tools; I use more specialised tools that aren’t mentioned on SO, use a programming language which isn’t often mentioned on SO, and a large array of libraries which are even less frequently mentioned there. I’m also generally better at finding my own way around—digging through code, jumping to definitions, looking up errors. I think the reason I don’t use it so much is that it is less useful because it doesn’t have the answers I care about and because I have fewer questions for it to answer.
SO used to have really god content for really some fundamental questions which gave it some credibility. As it accumulates more content the quality is really going down - I actively avoid SO unless I can't find any other source.
GitHub - literally every problem I have nowdays I spend searching through GH issues, reading through the code upstream and reporting back. For example I was working with .NET framework for a while (~5-6 years back now) and when dealing with closed source frameworks SO was a replacement for support channels. Now even as I'm coming back to a .NET core project - everything is OSS and on GitHub.
Docs also got better, MDN is now defunded by mozilla but where I had to do a SO search for random JS behavior I can now look up decent references on MDN. I think Google got better at indexing documentation as well.
The moderators' refusal to allow "opinion-based" questions has been very harmful to the usefulness of the site. Now you can only find best practices if someone happens to add them as a tangent. Or if you happen on an old one that got 1000+ upvotes before the mods decided theory was off topic.
I think this is it. I also thing documentation in general has gotten a lot better at answering questions rather than being just an autogen api doc site.
Previously you had to know the function you wanted to call. Now you can just scroll through the functions from typing the dot.
I do think that a big part is that the two things I spend most of my programming time on, one Clojure project and one C++ project, I’m just pretty familiar with at this stage. I’ve been using Clojure for ten years and the language hasn’t changed all that much, so I don’t need to look things up often (besides the occasional reference material on clojuredocs). For libraries, I check their readme’s and just read the code. I’ve actually never really used SO for clojure, now that I think about it. The Clojure project I’m working on is also a little bit niche, so I don’t tend to find anything useful on SO for it.
For C++, I keep cppreference at hand and only really use SO when I’m trying to figure out weird things, or newer features I’ve not yet used much. Again, for the libraries I use, it’s a mixture of documentation and reading headers and it’s rare that SO helps there.
In my previous job, I was mainly working with AWS services, terraform and some python (using boto) and, again, I had everything I needed from their documentation. Before that, it was Java with some Clojure, but again, the challenging part was the domain, which was nothing that SO could have helped with. Everything else, we had under control.
Maybe I got better at reading documentation?
I always leave a comment trying to explain to my future self where I learned to do stuff that was not intuitive.
Bash, Make, non-standard Python libraries, E-Lisp, and Fortran.
Also, it's been quite a while since I've touched JavaScript, so the newer features have been harder to grok.
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?
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.
Deleted Comment
But what you want is probably ls[::-1]
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.
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.
Deleted Comment
Deleted Comment
They got very angry at me several times for not doing things "the Rails way". We were on Rails 4, which I already had loads of experience with. The RailsCasts they were following were written for Rails 2. They literally had no idea all of the ways Rails had moved on between those versions.
Their codebase was an absolute mess as well. This was an application that was supposed to contain medical records and it had broken routes that were leaking data everywhere unauthenticated. And they were mad that I spent two weeks cleaning all of that up and bulletproofing their application.
I was happy to move on from that one, but it taught me a lesson about just how valuable sales skills are. These two people were living a comfortable lifestyle off a single paying client (essentially getting money indirectly through DARPA) and were punching way above their weight technically.
The field itself is a poorly understood area of medicine. By that I mean, it's only about 50 years old and no two doctors practice alike.
It's science, but nobody has consistent repeatable steps that seem to be conclusive beyond their own individual labs. The treatments are extraordinarily expensive.
I'll leave it at that because I'd prefer not to give identifying details (even though I basically have), but really the whole thing was eye-opening for me.
I think interesting questions is; to what degree insider club introduces friction for new comers with justified novel proposals.
The Stack Overflow stuff was a massive, massive pain, for several reasons.
For one, it's not clear how CC-BY-SA applies to code[1]. This involved many long meetings with copyright lawyers. They ended up asking for all this to be removed, which our C-level people eventuality agreed to.
We had to then go through several hundred "flagged" things (in a hundreds of thousands of lines codebase) and fix or justify everything.
Only a few cases were outright copy+paste of a big function or class, and those were at least straightforward: rewrite. Usually it was old code anyway, and replaced with newer style, much more concise code.
Tons were one- or two-line things, which involved lots of arguments along the lines of "that is the way to open a file in append mode in this language, and logFile is the appropriate variable name in this case!" This is really a failing of the tool they were using, but it still required answering.
The funniest was a handful that were our answers: they were copy+paste our team had done from our code to SO! (Nothing proprietary, just a few lines of an algorithm or solving whatever random problem).
Anyway, this experience left me extremely cautious about introducing any external code (as opposed to libraries) into a codebase. OSS libraries with permissive licenses (MIT, BSD, etc) are easy to deal with: it's straightforward to comply and being a library means the code is nicely compartmentalized if you need to replace/remove it.
[1] https://opensource.stackexchange.com/q/1717
And it seems the software itself reflects a misunderstanding about how programming code is actually manifested. It's very possible to read the official docs or use an IDE and end up writing the same lines of code in some Stack Overflow answer, as many here have said already.
The Elixir documentation on the other hand is succinct and always features basic examples for every function. It's a joy to work with.
Not very related to the parent comment, but just an interesting note.
I always love it when a programming language has their docs available off-line and easily accessible. I grew up on Perl without an internet connection (or a GUI for that matter) so I got very used to the perldoc command. That is now the standard I expect. Elixir is one of the few languages that exceeds this bar imo.
Official Documentation: https://docs.python.org/3/library/ast.html
Green Tree Snakes: https://greentreesnakes.readthedocs.io/
https://www.google.com/search?q=string+contains+word+php
It's curious, despite not a example of a great language, PHP has great documentation.
I tried Pharo, and a great functionality there I miss in other languages, is the search by example ability. Saves a lot of visits to stackoverflow. See for example:
https://avdi.codes/in-which-i-make-you-hate-ruby-in-7-minute...
(Kind of like one of the Grinch.)
Deleted Comment
[1] - https://thejh.net/misc/website-terminal-copy-paste
It's actually quite annoying as I'll often copy from my terminal itself, purposefully with the trailing newline, and it now refuses to execute. I need to move my hand from mouse to keyboard to hit enter and then (often) back to mouse.