
Ask HN: Why No Ajax in HN? - kp25
I Upvote a post,the vote count will not be updated. I should reload the page everytime to check the top post and also the number of votes. Why Ajax like techniques aren&#x27;t employed in HN? Any Downsides of using it?
======
tptacek
I think one reason might be the "framework level" news.arc code, which does a
continuation-passing-like thing for forms to create a sort of synchronous
straight-line flow in the code without lots of callbacks. A side effect of
that is that some of the code is very tightly coiled around the render-form
post-form flow of a standard, 2001-era web application.

Another reason is that Graham simply seems a little allergic to Javascript.
When you look at HN, think Rails 1 (they come from similar eras). Today, if
you had an application like HN, you'd probably have a serverside that
primarily provided a JSON HTTP API for a Javascript project that managed
almost all the actual UX. But that wasn't at all a normal way to design
applications back when HN was first written.

------
chewxy
Conversely, ask yourself the opposite question: what will happen if AJAX
voting were enabled in HN?

\- votes will be counted immediately, the number increase. Then what?

While this is good UX, would this be helpful in the entire context of HN? What
if your vote were a ghost vote - i.e. your user account is a ghosted account?
Should it show just for you? If so, you are adding a lot of complexity to the
system. Why is such complexity needed?

Now, I can't speak for dang and kogir, but I think it's a rather good thing
that the vote counts don't increase immediately - prevents gaming

~~~
jaredsohn
I think it would also be visually distracting and place too much emphasis in
how high stories are ranked. Note also that Reddit doesn't work this way.

------
valarauca1
The honest to god answer is very simple. The website was made, and
administered by pg (Paul Graham) directly. He was (until very recently), the
only eyes on the code base, and the only maintainer. The code was sloppy, and
generally un-reviewed. A lot of features didn't exist because they didn't
exist when the site was started, or were just deemed unnecessary.

As of recently a new team has taken over, who before adding new features is
porting the entire website over to a more maintainable code standard. New
features are coming, just eventually.

~~~
ajarmst
It's fairly impressive that HN lasted this long without creeping featurism and
an iteration of "I'll refactor this in my favourite language"(tm) by a new
maintainer who (as is normal for humans) confuses "my personal preference"
with "objectively better". It couldn't last forever.

~~~
duncan_bayne
I think you mean rewrite, not refactor.

* or perhaps not, but cynicism and beer lead me to a pessimistic outlook as the clock nears midnight

