Live data from Hacker News

Why HN was down

news.ycombinator.com

11–20 of 303 posts

Re: Why HN was down

#12
I 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.

Re: Why HN was down

#13
I'm not sure whether it's terrifying or relieving to realize that if all I dream of comes to pass and I achieve something akin to the legendary status of pg in the hacker community that I will still be susceptible to the inevitable facepalm moments that come with direct database access.

In any case I am thankful for the detailed explanation.

Re: Why HN was down

#14
it's a good job it's your site, this type of thing is often what gets someone fired in a company. Modifying (meddling!) the production system directly.

Re: Why HN was down

#15
post #8

Are you saying you manually modify the database? Like, shifting around things by id instead of just making admin buttons next to posts?

Sometimes that's easier (albeit more dangerous, as we just saw).

Re: Why HN was down

#18

I 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.

The kind of assertion he needed though, could only be ensured by the database, not application code (my impression).
Post reply on HN