tags:

views:

143

answers:

3

Every now and then, I need to lookup some keyword or function in a language that is very small, and/or has special characters..
Examples include
the 'as' keyword in python ('python as', 'python as keyword'.. etc don't work)
things like '$:' in ruby (wanted to know what it represents)
the 'p' command in irb
etc

Google totally fails me on such searches.. it's not worth putting such stupid questions on SO.. language documentation often doesn't explain these properly (or if it does, i don't know where to look without google's help)

What can you do in such situations? How do coax google into finding answers to such problems?

A: 

Well for ruby why wouldn't you search on ruby builtin globals? I'm assuming you have enough knowledge of what you looking for that you can describe it?

ennuikiller
+2  A: 

Using quotes helps a lot. For instance, if you search for:

python "as keyword"

then the first hit is "The as keyword ((An Unofficial) Python Reference Wiki)". Other hits are also about the "as" keyword.

Other than that, I'd look for pages which deal with all Python keywords, and find the relevant entry.

However, for symbols it's a lot harder. Having the right terminology helps a lot - if you know that "?:" is the conditional operator in C#, it's easier to look for. That's where a good book (or again, a list of operators/keywords) helps to put symbols into language.

Jon Skeet
A: 

for symbols I often have to type out the symbol (although google is getting better with symbols.)

e.g.: http://www.google.com/search?q=unix+%22dot+dot%22 or http://www.google.com/search?q=ruby+%22dollar+sign%22

klochner