
Hacker News API is not well designed - happppy
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.
======
dang
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.

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

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

~~~
Kinnard
Need a helper?

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

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

~~~
protonimitate
> 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?

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

~~~
ninedays
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/](https://www.inspiware.com/design-is-how-it-works-steve-
jobs/)

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

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

[http://arclanguage.org/forum](http://arclanguage.org/forum)

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

[https://news.ycombinator.com/item?id=16720397](https://news.ycombinator.com/item?id=16720397)

~~~
dang
We're inching our way there!

------
gitgud
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](https://hnpwa.com)

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

