Effective Googling for short names

时光怂恿深爱的人放手 提交于 2019-12-01 10:47:58

问题


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?


回答1:


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.




回答2:


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?




回答3:


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



来源:https://stackoverflow.com/questions/930488/effective-googling-for-short-names

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!