
Source of the recent outagelet - pg
We have a list of phrases that get replaced in titles and their replacements (which can be the empty string if we simply want to remove something).  A moderator accidentally added an identical pair to it.
======
_pmf_
> We have a list of phrases that get replaced in titles and their replacements
> (which can be the empty string if we simply want to remove something). A
> moderator accidentally added an identical pair to it.

This should prove once and forever that tail recursion is dangerous and does
not help with real world problems. Clearly, blowing up the stack would have
been the appropriate and safer response here.

~~~
rtpg
I think you mean that TCO is dangerous. Besides, this is probably more of an
implementation problem. Do you really want to be applying a filter like this
multiple times?

If I had to implement this, I would just imagine that just taking your
mapping, and for each key,value , do a title.replace(key,value). I would be a
"good enough" solution , and in the worst case you still have human editors on
HN.

~~~
michaelt
If you have one wordfilter to map "!"->"" and another to replace
"cunt"->"asdf" and you got the input "cu!nt" what should the output be?

~~~
cousin_it
Interestingly, distinguishing between "non-loopy" and "potentially loopy" sets
of rewrite rules seems to be equivalent to the halting problem :-( The key
phrase would be "tag systems".

------
jemka
I spent entirely too much time trying to parse 'outagelet'.

~~~
tokenadult
Maybe this term "outagelet" should be added to list of terms to automatically
replace in article titles.

~~~
ZoF
I propose we replace it with "outagelet".

------
elwell
For a hardcoded list that is manually edited frequently, maybe a duplicate-
safe data structure would be preferably. It might require an extra line to
parse out duplicates, but at least a page won't fail if something like this
happens again.

~~~
spicyj
I'd assume that they've added a check for that now, but it's hard to predict
beforehand what things will break.

------
minimaxir
So a tautology broke Hacker News?

~~~
cypherpunks01
Infinite loop?

~~~
aaronem
Presumably a hit on any of the "before" keys triggers not just a replacement
with the corresponding "after", but another pass through either a subset of
the replacement list starting from the key that matched, or the entire
replacement list from the top down; otherwise an identical pair wouldn't have
a chance to be pathological.

~~~
mikhael
i wonder whether other cycles would cause the same problem.

------
keville
I guess "outagelet" is a replacement for "downtime".

~~~
pg
It wasn't straight downtime. For a while we were up but you couldn't submit
stories or comments.

~~~
kevinmchugh
I've seen this called badtime. Outagelet seems too cute, when I think of
downtime as serious business.

(TBF, that is when I am a paying consumer or a paid developer. I'm upset about
neither the HN badtime nor the phrase outagelet.)

~~~
logn
What about 'browntime'?

~~~
pg
That is hilarious. That one will be hard to resist.

------
lutusp
"Outagelet"? That's too cute by half.

------
United857
Out of curiosity, what are some of those phrases?

~~~
lutusp
Don't know about phrases, but exclamation points are automatically removed, so
"!" -> "" in this case. The problem arose because someone replaced an
unidentified X with X, resulting in an infinite recursion.

------
aruggirello
issue: code 403 (Forbidden).

I think you should do your best to always return an appropriate HTTP status
header, and in this case it is status 503 (Service Temporarily Unavailable).
You really want to reserve 403's for those pesky w00t w00ts :) , ' aNd 1=1 and
the likes.

Getting 403's with my personal account, but gaining (slow) access through
another browser, I was convinced that the issue had to do with my account
being blocked.

~~~
kogir
In this case using nginx allow and deny statements was much easier than doing
bit fiddling in Lua and returning 503s. Any time spent researching other
options would have been time not spent determining the problem.

Often getting to the root of the problem as quickly as possible while
simultaneously keeping the site up (practical) wins over always using correct
HTTP response codes (pedantic).

------
aalpbalkan
That's why, have tests and a staging environment.

~~~
adamb0mb1
This is HackerNews. It's not called
PerfectSoftwareDevelopmentPracticesInActionNews.

Just saying.

~~~
faddotio
Based on the nitpicking, I thought it was!

------
mjcohen
You just need enough cores so the infinite loop completes in a finite amount
of time.

------
ChristianMarks
A cute wordlet.

~~~
gargarplex
A cousin of the Googlewhack.

------
angersock
These things happen. :)

------
greatsuccess
Why none of us should quit our day jobs...

~~~
sokoloff
But that's exactly what pg/YC wants you to do!

