News for hackers. Stuff that matters.

gleitz

Re:Hacker Yoga – Part 0: Arms on Tuesday November 04, 2014 @03:27PM (#8558857)
<3 hackers <3 yoga
Re:Howdoi – Instant Coding Answers via the Command Line on Wednesday January 09, 2013 @10:13AM (#5031858)
My worry is that not everyone will have python2.7 so I'd rather stick to "#!/usr/bin/env python". It would be great if this works but it doesn't

#!/usr/bin/env python2

Re:Howdoi – Instant Coding Answers via the Command Line on Wednesday January 09, 2013 @10:09AM (#5031836)
Nice suggestions! We've got a whole list going on at https://github.com/gleitz/howdoi/issues
Re:Howdoi – Instant Coding Answers via the Command Line 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.
Re:Howdoi – Instant Coding Answers via the Command Line on Tuesday January 08, 2013 @04:47PM (#5028714)
Thanks!
Re:Howdoi – Instant Coding Answers via the Command Line on Tuesday January 08, 2013 @02:14PM (#5027838)
Excellent. Fork away!
Re:Howdoi – Instant Coding Answers via the Command Line on Tuesday January 08, 2013 @01:16PM (#5027494)
Does SO provide data dumps like Wikipedia?
Re:Howdoi – Instant Coding Answers via the Command Line on Tuesday January 08, 2013 @01:16PM (#5027490)
I'm not familiar with the proper way to annotate that. How would I change the hashbang?

#!/usr/bin/env python

Re:Howdoi – Instant Coding Answers via the Command Line on Tuesday January 08, 2013 @01:09PM (#5027447)
No way to currently contribute answers. Another commenter mentioned cheat.errtheblog.com that uses a wiki system. The downside is that when the wiki fails (like right now) the application breaks.

You may want to just submit a good answer to StackOverflow and make sure it is well written and gets lots of votes.

Re:Howdoi – Instant Coding Answers via the Command Line on Tuesday January 08, 2013 @01:01PM (#5027392)
"howdoi wittgenstein" is the search of the day. Well done!
Re:Howdoi – Instant Coding Answers via the Command Line on Tuesday January 08, 2013 @12:51PM (#5027328)
Indeed! If only my L1 cache were as large as my disk...
Re:Howdoi – Instant Coding Answers via the Command Line on Tuesday January 08, 2013 @12:48PM (#5027310)
Ah yes I should clarify. -p2 picks the second search result from Google, not the second answer to the question.

$ howdoi format dates django templates -l

http://stackoverflow.com/questions/7737146/django-template-d...

$ howdoi format dates django templates -p2 -l

http://stackoverflow.com/questions/1180372/how-to-format-dat...

$ howdoi format dates django templates -p3 -l

http://stackoverflow.com/questions/4087717/django-template-d...

Another improvement might be to list the second and third answers to the currently selected question.

Re:Howdoi – Instant Coding Answers via the Command Line on Tuesday January 08, 2013 @12:46PM (#5027300)
Thanks for playing with it. Sometimes the first answer isn't the greatest but -p2 or -p3 will get it. In this case the following command gets you closer:

howdoi format dates django templates -p3

Excellent idea for colorization! I've already got that suggestion on the github page -> https://github.com/gleitz/howdoi/issues/4

Re:Howdoi – Instant Coding Answers via the Command Line on Tuesday January 08, 2013 @12:36PM (#5027251)
An enhancement I've been considering is noticing when users ask for a second or third answer with "-p2" or "-p3". If it happens often and the user never queries again after reading the second answer you can assume it is probably correct and display it to all users as the default response.
Re:Howdoi – Instant Coding Answers via the Command Line 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 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 on Tuesday January 08, 2013 @12:18PM (#5027149)
Why keep them in your brain when StackOverflow memorizes it for you?
Re:Show HN: WikiMaze on Tuesday November 01, 2011 @02:55PM (#3183541)
I'll be writing a series of blog posts about the architecture of the game as well as more info about the API at http://blog.wikimaze.me/

At a high level you are mostly right. The incorrect answers are generated using http://www.freebase.com/ (now a Google product)

Lots of pages have to be thrown out, but after analyzing thousands of articles it was relatively straightforward to know when you had a good page versus a bad one.

Re:Show HN: WikiMaze on Tuesday November 01, 2011 @01:48PM (#3183225)
Sure! You can go to the iframe directly at http://www.wikimaze.me/app
Re:Show HN: WikiMaze on Tuesday November 01, 2011 @01:28PM (#3183120)
I'll be writing a blog post on the API soon. Stay tuned to http://blog.wikimaze.me
Re:Show HN: WikiMaze on Tuesday November 01, 2011 @01:26PM (#3183097)
I would have thought that too, but I know there are some superfast edge servers that reroute to their datacenters.
Re:Show HN: WikiMaze on Tuesday November 01, 2011 @12:58PM (#3182969)
If you want to keep your account "secure", login with Facebook, Twitter, or Google. I know that might turn some people off so I included the username login as well.

Future versions will let you set an optional password to "save" the username.

Re:Show HN: WikiMaze on Tuesday November 01, 2011 @12:57PM (#3182964)
AppEngine all the way!
Re:Show HN: WikiMaze on Tuesday November 01, 2011 @12:50PM (#3182931)
I hope it makes everyone filthy smart! It is running on App Engine so the server costs aren't too terrible.

Half of all the proceeds go to Wikipedia for providing such great questions.

https://venmo.com/gleitz?txn=pay&note=for+awesome+trivia...

Re:Show HN: WikiMaze on Tuesday November 01, 2011 @12:13PM (#3182743)
I hope this will be a fun way for you to discover new and interesting articles.
Re:Show HN: WikiMaze on Tuesday November 01, 2011 @12:11PM (#3182720)
If you guess incorrectly twice, it will show you the right answer. If you click a third time, it will take you to the Wikipedia article for that answer. Sounds like you got sent to the Wikipedia article but it didn't load?
Re:Show HN: WikiMaze on Tuesday November 01, 2011 @11:58AM (#3182652)
It saves between 10-20 questions, but it could easily go much higher. The cache.manifest says "even if I am offline, still load the page". The localStorage is a database that holds the questions.

I'll be writing a series of blog posts about the architecture of the game, as well as more info about the API

http://blog.wikimaze.me/

Re:Show HN: WikiMaze on Tuesday November 01, 2011 @11:48AM (#3182601)
It is also available as an app in the iTunes Store

http://itunes.apple.com/us/app/wikimaze-free/id475157639?ls=...

<3 HTML5 apps!

Re:Show HN: WikiMaze on Tuesday November 01, 2011 @11:31AM (#3182514)
Great suggestion! Will add that in the next version

Older »