views:

299

answers:

9

I like to use Google to quickly locate API documentation. To get better results, I type some keywords that give desired results as top lines. For example:

JavaScript:
   MDC Array slice
   MDC String indexOf

Ruby
   ruby doc Dir glob
   rubyonrails ActionMailer

What are your favourite tricks to pick the desired pages quickly?

P.S.

Google prefixes like site: are good, but I see two limitations:

1) It can be too long to type. Compare
 MDC array slice
  vs.
 site:developer.mozilla.org array slice

2) If typing a search query in the address bar, I can't start with "site:"
+1  A: 

if i know the site i'd put it in the list of keywords e.g: msdn, sgi

dirkgently
+3  A: 

Use the site: keyword in the search if I know where it's located:

Dir glob site:ruby-doc.org

tvanfosson
+3  A: 

Adding site:domain-name to the search to narrow down to the publisher of the documentation I'm searching.

Richard
+3  A: 

Use -keyword to remove irrelevant results from your search. If you want information on core Ruby, for example, you might search for Ruby -rails.

Bill the Lizard
+2  A: 

I'm sick of Googling some Java class and getting results for Java 1.4.

So instead of typing:

java (className)

I use:

java 6 (className)

Next step is to create a firefox keyword search to get me directly to the class API page.

Yuval A
Actually, I find that if you just use Firefox's awesome bar with a string like 'java 5 SimpleDateFormat', it gets you directly to the API page almost every time. The first Google result is almost always the right one, so I just let it choose that one and bypass a Google search altogether.
Rob Hruska
good to know, thanks!
Yuval A
+5  A: 

There are a lot of other nifty little Google shortcuts, such as inurl: and intitle:. Here's a list.

fow
+2  A: 

In addition to the site: operator to narrow the search to the site where the documentation lives, you can set up and bookmark a custom search engine on google that always uses that filter, rather than having to re-type your site again every time you want to search the docs.

Here's an example of a stackoverflow search:

http://www.google.com/coop/cse?cx=018205968162215846785:7n6ajnwyz-i

Or stackoverflow.uservoice.com:

http://www.google.com/coop/cse?cx=018205968162215846785:wrbjitdyfoa

Both of those could use some additional tweaking to do things like exclude user profile pages, but you should still get the idea.

Joel Coehoorn
+1  A: 

I will generally use site:sitename.com in my search to restrict to sites I know are likely to have the answer. For Microsoft, I also use www.google.com/microsoft.html, as it only search MS sites.

Gregory A Beamer
+1  A: 

This question is old. But I have three more tricks not mentioned here, so I hope I can add something of value.

  1. Limit the age of search results. For that you need to go to "Advanced Search". Also see here for another trick for date ranges.

  2. Sometimes I need a special feature and don't know the trick for it. I also go to "Advanced Search" and configure my search then submit. The search box tells me what to enter next time.

  3. Play with the search URL parameters. Especially useful is the parameter as_qdr (an acronym for "advanced search query date range" I suppose). Try as_qdr=y (year), y2 (two years), m (month), m6 (half a year), d (a day), etc.

nalply