Ask HN: How do you search for relevant code examples?

3 points by orange-apricot ↗ HN
Hi everyone! We’re a group of undergrad CS students running a user study on software development habits for our capstone project (platform for retrieving similar GitHub repos). We’d really appreciate you taking a few minutes to fill this out!

$10 Amazon gift cards will be given to the top three most useful/best answers.

https://forms.gle/74EupDXR1kZA4Cj89

4 comments

[ 3.4 ms ] story [ 21.1 ms ] thread
It's almost always Stackoverflow that ends up giving me the answer!
Done, sounds like an interesting project! Would be interested in the survey results
Stackoverflow, Github and plain old Google search. One thing I like about Stackoverflow, Github gists and issues is the discussion around the code/problem/topic. With Github, I also get a chance to see how others solved the same problem in real-world projects, in possibly different ways, and in interesting projects I would not have come across otherwise.
I added a custom search engine to each of my browsers, with the keyword "se". I can type the following to search across all Stack Exchange sites:

  se console.print
This is the URL for the custom search engine:

  https://www.google.com/search?q=%22stack+exchange%22+%s
While Stack Exchange hosts non-programming-related sites, my programming-related search queries almost never show non-relevant results - or at least, no non-relevant results that rank well. This way I don't have to search across Stack Exchange, Super User, Ask Different, etc.