Better HN
topnewbestaskshowjobs
Log inSign up

gleitz

358 karma · joined Jan 14, 2011 (15y ago) · 35 submissions

Software engineer and senior fortune teller for Hunch. http://gleitzman.com
Submissions

comment 12y ago · link · parent

<3 hackers <3 yoga

comment 13y ago · link · parent

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

comment 13y ago · link · parent

Nice suggestions! We've got a whole list going on at https://github.com/gleitz/howdoi/issues

comment 13y ago · link · parent

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.

comment 13y ago · link · parent

Thanks!

comment 13y ago · link · parent

Excellent. Fork away!

comment 13y ago · link · parent

Does SO provide data dumps like Wikipedia?

comment 13y ago · link · parent

I'm not familiar with the proper way to annotate that. How would I change the hashbang?

#!/usr/bin/env python

comment 13y ago · link · parent

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.

comment 13y ago · link · parent

"howdoi wittgenstein" is the search of the day. Well done!

comment 13y ago · link · parent

Indeed! If only my L1 cache were as large as my disk...

comment 13y ago · link · parent

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.

comment 13y ago · link · parent

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

comment 13y ago · link · parent

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.

comment 13y ago · link · parent

Although not user facing, there is also a DuckDuckGo search endpoint if you don't want to use Google for one reason or another.

comment 13y ago · link · parent

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`

comment 13y ago · link · parent

Why keep them in your brain when StackOverflow memorizes it for you?

18.

Howdoi – Instant Coding Answers via the Command Line(github.com ↗)

245 points · by gleitz · 13y ago · 85 comments

comment 15y ago · link · parent

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.

comment 15y ago · link · parent

Sure! You can go to the iframe directly at http://www.wikimaze.me/app

comment 15y ago · link · parent

I'll be writing a blog post on the API soon. Stay tuned to http://blog.wikimaze.me

comment 15y ago · link · parent

I would have thought that too, but I know there are some superfast edge servers that reroute to their datacenters.

comment 15y ago · link · parent

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.

comment 15y ago · link · parent

AppEngine all the way!

comment 15y ago · link · parent

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

comment 15y ago · link · parent

I hope this will be a fun way for you to discover new and interesting articles.

comment 15y ago · link · parent

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?

comment 15y ago · link · parent

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/

comment 15y ago · link · parent

It is also available as an app in the iTunes Store

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

<3 HTML5 apps!

comment 15y ago · link · parent

Great suggestion! Will add that in the next version
12