Hacker News new | past | comments | ask | show | jobs | submit login
Hacker News API is not well designed
16 points by happppy 46 days ago | hide | past | web | favorite | 22 comments
Last night, I thought why not develop a HN clone in react and when I looked at API, Oh my goodness. It is not well designed at all, like passing 400 ids, just ids. And to get posts we have to make requests to get single post detail to show 10 or 20 posts on a page. Well, react helped me a bit like storing ids in array and using splice to get next 10 items and so on.



You're right. We'll eventually make a new API that doesn't have those limitations.

It wasn't carelessness, btw, but technical constraints we were under at the time. We've slowly been removing those.


Will you guys also be updating the arc-lang forum?


Not sure. HN's code has diverged a lot from the Arc forum, so updates can't propagate without a lot of extra work.


Need a helper?


What are you guys thinking "eventually" might end up being like?


Are you asking about timing or what the API will be like? Re the latter: we're thinking just a simple JSON version of any HN url.



I was asking about timing


Like the website, it doesn't have to be "well designed", it's enough that it works.


If Hacker News was submitted to Hacker News it would be ridiculed for many of the reasons it otherwise gets praised for - the archaic layout, poor typography, inconsistent navigation, lack of features, and especially having a badly designed API.

Let's just be honest, bad design is bad design. No slight to PG or anyone working on the site now, and the fact that HN uses flat files rather than a relational database probably limits the API's capabilities in ways that wouldn't be worth the effort of changing. But it's still bad. People just accept it here because they fear anything better might attract the normies.


> People just accept it here because they fear anything better might attract the normies.

I disagree. Even if HN had the best API you've ever seen in your life, what difference would it make?

The product here is all about function, not form.

> If Hacker News was submitted to Hacker News it would be ridiculed for many of the reasons it otherwise gets praised for - the archaic layout, poor typography, inconsistent navigation, lack of features, and especially having a badly designed API.

This says more about the audience then it does the product. At a certain point, criticism stops being useful and just becomes a way to flex a superiority muscle. Again, what would making hacker news "prettier" accomplish?


>The product here is all about function, not form.

Why do you believe a better designed API would not be about function over form?

Was the bug that caused links to "time out" if you didn't click on them fast enough also a preference for function over form?

Is being able to change the color of the top banner function, not form?

Are the colors chosen for the site function, not form?

Are folding threads or reversible votes or vouching form over function?

No, the product here is as much about form as function. The design of Hacker News is as aesthetic expression. It's meant to be appealing and attractive to a certain demographic, what PG considered a "good hacker."

The site would function better with an updated layout. It would load faster without complex, nested tables, and it would work better on mobile. It would be more readable with better typography, and more usable with features like new comment prompts. People don't want that, not because they wouldn't be a functional improvement, but because they believe such things would violate the site's anti-modernist aesthetic, and people don't want Hacker News to look and feel like a modern forum.

Viewing anything but the status quo as mere cosmetics, as if the site in its current state had somehow already achieved perfection, is a preference for form over function.


There is a famous saying : "Design is not just what it looks like and feels like. Design is how it works." https://www.inspiware.com/design-is-how-it-works-steve-jobs/


Fair enough, but tell that to everyone who dismisses design as eye-candy and frivolous nonsense whenever someone complains about it.


I think there are two separate, yet equally interesting arguments lurking in this.

1.) If Hacker News had zero users and someone submitted it to Hacker News, the feedback would be brutal.

2.) If Hacker News had its current user base and someone submitted it to Hacker News, they would be praised to such an extent they would likely get inbound requests from people interested in investing.

Traction trumps design, certain designs help create traction, and certain kinds of traction defy design. It's fascinating how it all fits together.


It doesn't work, it's very slow to fetch information because you have to send multiple requests, often times hundreds, and have to heavily cache everything to even get near the acceptable performance levels.


Like the API most software isn't "well designed", Just good enough.


You may want to gripe on the arc-language forum:

http://arclanguage.org/forum


I heard 10 months ago that HN was developing a new API, no update though.

https://news.ycombinator.com/item?id=16720397


We're inching our way there!


I didn't think it was that bad, free to use and everything has an ID right? If you want details l, query the ID, seems like a super simple base to work on to me.

There's actually a whole [1] list of opensource Hacker news clones that you can look at to see how they do it...

[1] https://hnpwa.com


> I didn't think it was that bad, free to use and everything has an ID right?

My take is that the API forces the N+1 query problem on clients that start with an empty repository.




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: