Earlier quoted context omitted.
> So what do you do to avoid this in the future? It's HN... there's no SLA, there's no postmortems, there's no doing things better in the future. pg just runs this site out of the good of his heart, we should be lucky the volunteers run it for us at all.
> pg just runs this site out of the good of his heart Hilarious. I would have believed you if you appended "and his wallet"
Why HN was down
131–140 of 303 posts
Re: Why HN was down
#132Amazing that such a large percentage of debugging involves determining exactly what you are debugging. The definition of the problem, many times, is the solution. Might be a good time to mention Rubber Duck Debuggging. http://en.wikipedia.org/wiki/Rubber_duck_debugging
There is a line from Futurama that perfectly applies ton a lot of debugging. Farnsworth: My God, is it really possible? Fry: It must be possible, it's happening. Fry: By the way, what's happening?
Re: Why HN was down
#133"But then I decided to just fix it for him by doing some surgery in the repl." I've always found it's a good idea to not deviate. Whether it be running, parking or anything else once you deviate from some regular behavior you run into potential problems that you hadn't anticipated. "For some reason I didn't check the comments after the surgery to see if they were in the right place. " More or less my point. If this w…
> you run into potential problems that you hadn't anticipated.
The second statement is no reason to live by the first. In fact, I think you'd be doing yourself a disservice by staying so comfortable. Being comfortable with the unanticipated, however, is a powerful quality to have.
Re: Why HN was down
#134Related question: what is the timing for the 'Reply' link to show up? I might be fantasizing but sometimes it takes 5, sometimes 10 minutes to appear, leading people to reply as a sibling instead.
Just like too many nested if(x) { if (y) { if (z) ... }} constructs, too deep a discussion nesting is also unreadable.
Re: Why HN was down
#135I have two assumptions: 1. HN has a low priority in the overall scheme of things, 2. Self-confidence overflow :)
Re: Why HN was down
#136Awesome explanation.
Re: Why HN was down
#137So far, it has been working great.
Re: Why HN was down
#138I use assertions to protect against things like this. I liberally sprinkle my code with assertions (CS theory calls them pre-conditions and post-conditions, iirc) to crash early if the system is an invalid state. One my pet peeves is that few programmers seem to love assertions like I do. Would love to see to comments on this.
What assertion would you have used in this case? For every comment you'd have to iterate through all it's parents to check if there is a cycle, which seems pretty inefficient to do for something that should never happen (there are other ways that you could check for this problem as you go, but the only other ways that I can think of require holding extra state just in order to perform the assertion). I'm for assertio…
The number of parents is almost always under 3 or 4 and never over 100. Writes occur a few times a second at peak. You are prematurely optimizing.
Re: Why HN was down
#139Earlier quoted context omitted.
What assertion would you have used in this case? For every comment you'd have to iterate through all it's parents to check if there is a cycle, which seems pretty inefficient to do for something that should never happen (there are other ways that you could check for this problem as you go, but the only other ways that I can think of require holding extra state just in order to perform the assertion). I'm for assertio…
You could assert a limit on depth, perhaps. Then the cycle would still exist but after X number of comments, the rendering ends.
Re: Why HN was down
#140Earlier quoted context omitted.
> pg just runs this site out of the good of his heart Hilarious. I would have believed you if you appended "and his wallet"
One core. One HD. Bandwidth is trivial with no images. How much do you think this site costs to run?