News for hackers. Stuff that matters.
Re:Ask HN: A place like HN but with more nerdy stuff and les... by VMG on Saturday December 08, 2012 @06:39AM (#4891419)
And if you build the next HN, please add an API
Re:Ask HN: A place like HN but with more nerdy stuff and les... by randomdata on Saturday December 08, 2012 @12:17PM (#4892055)
Technically, HN already exposes an API over HTTP. It just uses HTML as the exchange format instead of XML or JSON.
Re:Ask HN: A place like HN but with more nerdy stuff and les... by VMG on Saturday December 08, 2012 @05:36PM (#4892939)
I try to remember that line the next time my boss wants me to code an API.
Re:Ask HN: A place like HN but with more nerdy stuff and les... by mahmud on Sunday December 09, 2012 @01:08AM (#4893992)
that's a shitty excuse. HTML as a "protocol" mixes presentation with content. An API should not only be presentation agnostic, but presentation free.
Re:Ask HN: A place like HN but with more nerdy stuff and les... by randomdata on Sunday December 09, 2012 @01:55AM (#4894090)
Where then do microformats fit, in your opinion? A defined standard for API-like transmissions, but mixed into presentable content.
Re:Ask HN: A place like HN but with more nerdy stuff and les... by duck on Saturday December 08, 2012 @03:52PM (#4892664)
Hmmm, not sure if I agree with that or not... but if so, it has a very limited usage quota before you get banned. :)
Re:Ask HN: A place like HN but with more nerdy stuff and les... by sillysaurus on Saturday December 08, 2012 @04:46PM (#4892796)
What API do you want? Automated submissions of posts is not a good idea, so that leaves data scraping.

If you're looking to extract data from HN, use HNSearch. http://www.hnsearch.com/

There's no reason to scrape data from HN itself.

Re:Ask HN: A place like HN but with more nerdy stuff and les... by duck on Saturday December 08, 2012 @08:33PM (#4893417)
HNSearch is great and I use it for my Wayback Letter project, but it hasn't been around that long so I couldn't use it before. When I started Hacker Newsletter about 2.5 years ago there was nothing, so scraping was the only solution. One of these days I will convert the application I built to build out each issue, but there also is a risk of HNSearch going away just like the last search engine did.
Re:Ask HN: A place like HN but with more nerdy stuff and les... by randomdata on Saturday December 08, 2012 @08:02PM (#4893339)
I'm curious why you disagree, aside from the quota thing? I have written many API consumers over the years and there is basically no difference between parsing HTML or any other format; XML especially, for obvious reasons.

HTML APIs to come with the added benefit of being less prone to change, which I realize goes against conventional wisdom, but seems to hold in practice.

Re:Ask HN: A place like HN but with more nerdy stuff and les... by duck on Saturday December 08, 2012 @08:29PM (#4893404)
I agree that parsing can be easily done, although I don't think it is necessarily equal... but I guess that would depend on a case by case basis since a lot of API's are terrible. What makes it not an API IMHO is that you can't consume it when needed, but rather you have to consume it all the time. I guess you will call that a streaming API though. :)

HTML APIs to come with the added benefit of being less prone to change

Really? I don't think that does hold in a lot of cases. Using HN as an example, it broke a year or so ago when PG changed how the job postings were listed. Again, the quality of an API can vary, but at least you would know what changed in that case.

Re:Ask HN: A place like HN but with more nerdy stuff and les... by jiggy2011 on Saturday December 08, 2012 @12:48PM (#4892169)
Also, make sure that every time someone performs an action on the site, you generate a random number. Add that random number to the number of seconds since their last performed action. If that number exceeds a threshold (that is assigned randomly and valid for a randomly assigned amount of time) delete a random part of the session.
Re:Ask HN: A place like HN but with more nerdy stuff and les... by polshaw on Saturday December 08, 2012 @07:37AM (#4891488)
What are the main reasons you want an API?
Re:Ask HN: A place like HN but with more nerdy stuff and les... by VMG on Saturday December 08, 2012 @09:44AM (#4891679)
Building more powerful clients for desktop and mobile. Think user tagging, comment filtering, custom sort order, interface improvements.
Re:Ask HN: A place like HN but with more nerdy stuff and les... by artursapek on Saturday December 08, 2012 @11:08AM (#4891860)
I really like that HN still has such an old, simple interface. It's one of the reasons I haven't left yet.
Re:Ask HN: A place like HN but with more nerdy stuff and les... by btilly on Saturday December 08, 2012 @11:44AM (#4891957)
About a decade ago I noticed this phenomena.

Worthwhile communities need to be maintained by barriers. The kind of barrier that I personally enjoy most is, "Crappy enough interface that only people who really like the content will be motivated to show up."

Re:Ask HN: A place like HN but with more nerdy stuff and les... by VMG on Saturday December 08, 2012 @12:29PM (#4892103)
I think it just correlates with the presence if images. Also StackExchanges have excellent UIs, APIs and still very good content. StackOverflow itself could also be worse.
Re:Ask HN: A place like HN but with more nerdy stuff and les... by btilly on Saturday December 08, 2012 @12:55PM (#4892186)
That is a good comparison. StackOverflow has a good API, but maintains itself with carefully thought through and zealously enforced moderation rules.

I grant the existence of useful content there and a good API. However after one too many brushes with how differently moderators think about stuff than the people who I liked talking to did, I have demonstrated the truth of my comment by choosing to leave.

StackOverflow works for a lot of people. But for me, personally, a stripped down interface and less moderation is a better experience.

Re:Ask HN: A place like HN but with more nerdy stuff and les... by artursapek on Saturday December 08, 2012 @12:25PM (#4892095)
Yep. No magic tricks. Just substance.
Re:Ask HN: A place like HN but with more nerdy stuff and les... by xk_id on Saturday December 08, 2012 @08:17PM (#4893380)
Amen to that.
Re:Ask HN: A place like HN but with more nerdy stuff and les... by harpb on Saturday December 08, 2012 @01:46PM (#4892334)
Or just create one themselves: http://harpb.com/static/news/news.html#/featured/p1/100

Presentation, along with content, is a better experience than just having good content.

Re:Ask HN: A place like HN but with more nerdy stuff and les... by muratmutlu on Saturday December 08, 2012 @04:01PM (#4892676)
Never really thought of it like that, a statement worth exploring for sure
Re:Ask HN: A place like HN but with more nerdy stuff and les... by derleth on Saturday December 08, 2012 @04:25PM (#4892743)
> I really like that HN still has such an old, simple interface.

You having the interface you want shouldn't impact my having the interface I want.

An API allows everyone to have the interface they want.

Re:Ask HN: A place like HN but with more nerdy stuff and les... by p4bl0 on Saturday December 08, 2012 @08:11AM (#4891535)
I guess something like the possibility to have a mobile application (either web based or native app) which would be usable (the tiny up- and down-vote arrows of HN are not easy to use using a finger on a touchscreen) and which would actually work by not relying on html-parsing or search kludge.
Re:Ask HN: A place like HN but with more nerdy stuff and les... by adroitec on Saturday December 08, 2012 @12:22PM (#4892080)
The best reading experience I've seen (by far in my opinion) for iPhone/iPad is http://cheeaun.github.com/hnmobile/
Re:Ask HN: A place like HN but with more nerdy stuff and les... by guiambros on Saturday December 08, 2012 @12:06PM (#4892020)
If you have an iPhone, there's news:yc. Great reader. Not perfect, but the best I found so far.
Re:Ask HN: A place like HN but with more nerdy stuff and les... by blissland on Saturday December 08, 2012 @08:19AM (#4891545)
>> I guess something like the possibility to have a mobile application

See http://ihackernews.com/

Re:Ask HN: A place like HN but with more nerdy stuff and les... by buster on Saturday December 08, 2012 @09:36AM (#4891662)
That's a website not a mobile application.
Re:Ask HN: A place like HN but with more nerdy stuff and les... by enoch_r on Saturday December 08, 2012 @11:22AM (#4891894)
>> mobile application (either web based or native app)