Search code examples
google-search

Effective Googling for short names


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?


Solution

  • 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.