

Reddit infrastructure revealed - tzury
http://img46.imageshack.us/img46/6994/72691639kt1.png
(Pylons, Paste, Beaker, flup and more)
======
ghiotion
Ok, I'll be the first person to admit I'm an idiot, but this stack trace
doesn't make any sense. First, how am I to know this is actually from
reddit.com? It's an image, so I can't grep through the trace. Additionally, it
looks to me like the initial error refers to accout.py at line 68... maybe I'm
blind, but I don't see that anywhere in the trace. I'm no python expert but
I've looked at a lot of java stack traces and this makes no sense. Seriously.
Why deliver this as an image? What sequence of events did you go through to
get this result? Is it repeatable? If so, how?

I know reddit bashing is super-fashionable right now, but really. Am I being
dumb? It's well within the realm of possibilities. But this doesn't pass the
sniff test.

~~~
breily
As for its authenticity, it was on reddit/programming a few days ago -
<http://reddit.com/r/programming/info/69ftg/comments/> \- and apparently one
of the reddit guys caused it.

~~~
ghiotion
Ok, I stand corrected. If spez did it, it's legit. Kudos.

------
ketralnis
Of course, that's mostly pylons code. The only information I glean from here
is:

1\. FreeBSD 6.2

2\. Pylons

3\. /home/ri/hgreddit

~~~
aston
Missed one: hgreddit => Mercurial.

~~~
bootload
_"... missed one: hgreddit = > Mecurial ..."_

And Paste. The most interesting thing I saw was the bug that caused it found
right at the bottom:

    
    
      "... unindent does not match any outer indentation level (account.py, line 68) ..."
    

This is such a pain with Python (having to line the indentation up) and is so
trivial. Wonder how it got through testing? They do testing on reddit don't
they?

~~~
a-priori
If you find indentation to be a pain in Python, you haven't configured your
editor properly.

~~~
bootload
_"... If you find indentation to be a pain in Python, you haven't configured
your editor properly. ..."_

While it's easy to config your own editor [0]. There are other factors

* uncommonly used editors [1]

* other users/developers

Of the two, other developers is the biggest pain. You have to make sure each
developers editor conforms to your coding standards. [1] But making _"quick
changes"_ on the server, can short-cut such safeguards.

[0] <http://wiki.python.org/moin/HowToEditPythonCode>

[1] <http://wiki.python.org/moin/PythonEditors>

------
ivankirigin
I thought this was going to be a joke about imageshack, how [pics] power
reddit.

------
agotterer
What are they using for such pretty error messages in py?

~~~
inklesspen
That's actually a pretty ugly error by Pylons' standards. Normally a _very_
useful debugging console gets presented to the devs, and the public gets a
standard (but customizable/replaceable) error screen. What happened here is
that the exception happened again while trying to process the error (syntax
errors in your base-level code will do that), and the Pylons exception
handling gave up and rendered this error.

I don't know offhand exactly what produced that error message, as I've never
seen it in my Pylons apps, but I'd suggest it's probably from paste.exceptions
somewhere.

<http://pythonpaste.org/module-paste.exceptions.html>

EDIT: I realized that the reason I never see this is because Reddit uses
flup's SCGI server, while I use a mod_proxy-based approach. So that exception-
formatting code is probably in flup somewhere.

<http://trac.saddi.com/flup>

