News for hackers. Stuff that matters.
Re:Howdoi – Instant Coding Answers via the Command Line by roryokane on Tuesday January 08, 2013 @12:23PM (#5027180)
According to the source code (https://github.com/gleitz/howdoi/blob/master/howdoi/howdoi.p...), the answers come from Stack Overflow, searched using Google site search. Howdoi scrapes and prints the first code block in the top answer, or the full text of the top answer if it contains no code block.
Re:Howdoi – Instant Coding Answers via the Command Line by gleitz on Tuesday January 08, 2013 @12:27PM (#5027203)
Precisely! You can pass the "-a" flag to print the entire answer or "-l" to get the link itself. "-p2" will give the second answer.

I find myself using the following command quite a bit:

open `howdoi print stack trace python -l`

Re:Howdoi – Instant Coding Answers via the Command Line by pests on Wednesday January 09, 2013 @01:10AM (#5030446)
-p2 gives the second search result's answer, not the second answer from the first result. Or so it seems from other replies.
Re:Howdoi – Instant Coding Answers via the Command Line by gleitz on Tuesday January 08, 2013 @12:31PM (#5027230)
Although not user facing, there is also a DuckDuckGo search endpoint if you don't want to use Google for one reason or another.
Re:Howdoi – Instant Coding Answers via the Command Line by lambda on Tuesday January 08, 2013 @11:43PM (#5030201)
That is exactly what I would have guessed. It's basically "I'm feeling lucky" for coding questions.
Re:Howdoi – Instant Coding Answers via the Command Line by kanzure on Tuesday January 08, 2013 @09:45PM (#5029833)
It should probably use symbolhound.com instead, which does exact symbol queries on stackoverflow content. Google, alas, thinks we are all terrible people for wanting our precious bytes.
Re:Howdoi – Instant Coding Answers via the Command Line by gleitz on Wednesday January 09, 2013 @10:06AM (#5031822)
That's a nice search tool. I found that the relevance is not quite as good as Google (for example "howdoi get referrer url php") but this could be used when you enter a query that contains symbols.