Live data from Hacker News

"Unknown or expired link." - Why?

google.com

61–70 of 142 posts

Re: "Unknown or expired link." - Why?

#61
post #24

Earlier quoted context omitted.

It's not crazy at all, it greatly simplifies development to use callbacks for actions rather than manually encoding the necessary state into the URL. Techniques such as this are what enable a single developer to be so productive by automating boring and time consuming stuff.

Except it doesn't appear to work robustly, which makes it poor design. "Automating boring and time consuming stuff," is all well and good if it actually produces a functional system, but that concern is secondary to robustness.

> but that concern is secondary to robustness.

To you, but that's a value judgement, it obviously was the other way around for pg. Had he not taken those shortcuts, there would be no hacker news at all; be thankful he automating that boring stuff and bothered to build the site.

Re: "Unknown or expired link." - Why?

#62

Earlier quoted context omitted.

It's not crazy at all, it greatly simplifies development to use callbacks for actions rather than manually encoding the necessary state into the URL. Techniques such as this are what enable a single developer to be so productive by automating boring and time consuming stuff.

Simplifies development? This is not a complicated piece of software and the techniques to build it are well known. You wouldn't need any more state than the id number you need for the callback anyway. Building broken software is always much easier than building robust correct software so this is hardly a good argument.

> You wouldn't need any more state than the id number you need for the callback anyway.

I don't think you grasp the issue... the link is expired because the callback no longer exists to link to.

Re: "Unknown or expired link." - Why?

#63

Earlier quoted context omitted.

It's not crazy at all, it greatly simplifies development to use callbacks for actions rather than manually encoding the necessary state into the URL. Techniques such as this are what enable a single developer to be so productive by automating boring and time consuming stuff.

It's not productive to have a site that randomly locks out visitors. No matter how clever the code design is, this is a product flaw.

No, it's a design choice, he favors ease of programming more than user experience. You might not agree with that choice, but it's not a flaw, he did it on purpose and knew the consequences.

Re: "Unknown or expired link." - Why?

#64
post #54
post #50

Earlier quoted context omitted.

It's not so much that it's ahead of its time relative to hardware as it is something you do in the early versions of a program. Using closures to store state on the server is a rapid prototyping technique, like using lists as data structures. It's elegant but inefficient. In the initial version of HN I used closures for practically all links. As traffic has increased over the years, I've gradually replaced them with…

Over the last week the home page appears to be cached longer than the arc timeout, no doubt due to the spike in traffic. As I throw away cookies when closing the browser, I need to login daily. It's been impossible to login from the HN home page because of this. Refreshing the page doesn't help; I've had to click through to a story to be able to login. You should hard-code that one too.

The problem there is that we switched to a new deliberately slow hashing function for passwords.

Edit: I investigated further, and actually you're right, the problem was due to caching. It should be better now because we're not caching for as long. But I will work on making login links not use closures.

Re: "Unknown or expired link." - Why?

#65

Earlier quoted context omitted.

Simplifies development? This is not a complicated piece of software and the techniques to build it are well known. You wouldn't need any more state than the id number you need for the callback anyway. Building broken software is always much easier than building robust correct software so this is hardly a good argument.

> You wouldn't need any more state than the id number you need for the callback anyway. I don't think you grasp the issue... the link is expired because the callback no longer exists to link to.

No, I understand the issue. But you're presupposing a specific implementation here. If you were just designing this in, for example, PHP then you'd just need one piece of state: the page # (for more...) or the parent comment id (for the comment) and so on.

The real issue is that there's a whole bunch of saved state on the server for operations that could be (and should be) completely stateless.

Re: "Unknown or expired link." - Why?

#67

Earlier quoted context omitted.

> You wouldn't need any more state than the id number you need for the callback anyway. I don't think you grasp the issue... the link is expired because the callback no longer exists to link to.

No, I understand the issue. But you're presupposing a specific implementation here. If you were just designing this in, for example, PHP then you'd just need one piece of state: the page # (for more...) or the parent comment id (for the comment) and so on. The real issue is that there's a whole bunch of saved state on the server for operations that could be (and should be) completely stateless.

No, the issue is time, specifically, pg's time; using callbacks takes less programmer time than manually building every URL statelessly. Yes, it could be done another way, but it wouldn't exist at all if he'd had to do that for every link because it'd have taken too much of his time.

Re: "Unknown or expired link." - Why?

#69
post #37

Earlier quoted context omitted.

Except the links do expire, so its not robust. I expect that when I visit a web page, I can let it sit for an extended period of time before moving on to the next page and have it work. HN doesn't work. Furthermore, the technique of holding important state authoritatively in memory like this is not a good web-development practice for various reasons. Doubly so if its state data which can be round-tripped. Links shoul…

If he hadn't used that technique, there would be no hacker news for you to use at all. You're entirely missing the point that this is a technique to make hobby programming more fun, it's not about being robust or best practice, it's about making programming simpler so pg finds it worth his time to build this site in the first place.

blahedo's point was that the technique was not fundamentally a problem from a robustness point of view, and I disagree with that point. It is a problem, and I was pointing that out.

Your point seems to be that since Hacker News is a "hobby project," that we may forgive sacrificing a bit of robustness to make the programming exercise more pleasant. That point was not clear to me from your original posting. Rather, the point seemed to be that the technique was good because it was clever and fun, and I disagreed with that sentiment.

PG seems to be saying elsewhere that it was used as a rapid prototyping technique. That seems to be a fair justification of the technique, in my estimation.

Re: "Unknown or expired link." - Why?

#70

Steps to reproduce: 1. Open Hacker News 2. Go to lunch 3. Come back from lunch and click next Every. Time.

I wonder if this is exacerbated by people enabling the aptly named "noprocrast" setting in their profile, not knowing what it does...

http://ycombinator.com/newsfaq.html

Post reply on HN