September 2009 Archives

Twisted vs. Tornado: You're Both Idiots

plucking-you-unibrow-is-the-most-undignified-type-of-grooming.jpg
First, a message to bloggers. If you've got the bright idea to try some new kind of benchmark that pits Twisted against Tornado, take pause. Turn off your computer, step into a public area, and reconsider your life's goals. The internet does not need another pointless network performance graph.

With that out of the way, it's become clear that the Pissing Contest of the Day, Twisted.web vs. Friendfeed's Tornado web framework, reveals that neither side of the argument is particularly right, but both sides are particularly stupid.

First, Twisted. Now, my company uses Twisted for a small piece of functionality because it was the easiest way that we found to send traffic over different network interfaces on a Linux machine. We never have any problems with it. The only reason I ever need to touch it is to see how something works. 

However, Twisted is probably the douchiest programming library out there. Every time I open up that code, I feel like I've wandered into a late-night bar on the Jersey Shore where everybody's drinking Jager-bombs, and nobody is wearing a shirt.  Twisted is a cool network library, but not cool enough to be named "Twisted".  It's the Python programmer's version of Ed Hardy clothing and a baseball cap with the tag still hanging off the side.  When I'm digging around in this code and my co-workers ask me what's up, the only appropriate response is "NOT NOW CHIEF. I'M STARTIN' THE FUCKIN' REACTOR."

Now you can see why there's so buttsore over Tornado.

Even though I advised against things like Tornado, Friendfeed still built it. From the graphs I've seen, Tornado is just marginally faster than Twisted at serving concurrent requests. Marginally. Evidently Friendfeed figured that tiny margin was enough justification to waste their time writing something that's been re-written by every developer that gets bored on the job.  A Python web framework? My mercy how original. I think that's one of the ending exercises of "Learn Python in 24 Hours".

Friendfeed spent a lot of time trying to optimize the queries per second graph, but maybe they should have spent more time optimizing this graph instead:

intuit-didnt-buy-mint-they-bought-a-license-to-stagnate.pngAnyway, when it comes to Twisted vs. Tornado for a Python web framework, I use Django. Why? Because it works, and my time is valuable.

30 Helens Agree: You Can't Win Without Failing

an-infant-is-a-function-whose-inputs-are-sight-sound-smell-touch-and-taste-and-whose-outputs-are-bodily-fluids.jpgI read Fred Wilson's blog post on failure today, and after I was finished being impressed by his three letter domain name, it really made me think about what I learned from my last failed startup.

 There's the usual Reddit material: don't write your own database, concentrate on the UI, put your users first, other such horse-beaten realities that green engineers understand after being in the field for a few years.  A true failure is one that changes your life's philosophy, not one that changes your unit testing strategy.

What I really learned from the fall of Pressflip is that arrogance is more dangerous than incompetence.  I believed that raw engineering prowess could make up for the complete lack of business experience, a product that really only appealed to the people who build the technology behind it, and an addressable market that could easily be mistaken for roundoff error. Couple that with the youthfully cute thought that Silicon Valley is a meritocracy, and it was only a matter of time. We had build some neat technology behind the scenes, and I was very proud of a few key parts of the system, but in the end, the users just did not come.

The trouble with this lesson is that it can only be learned the hard way. Arrogant people don't listen to criticism, they just run themselves into the wall.  Incompetent people can usually be led in the right direction, even though they may execute their way into the dirt.  Arrogance doesn't listen to reason, it only listens to itself.

For example, an arrogant motorcyclist will ride on the highway at twice the speed of traffic, and no matter how many times he gets pulled over, and he'll keep doing it until he crashes.  An incompetent motorcyclist will drop his bike in a U-turn in front of his house, cracking a mirror.

This failure made me saltier. I now understand why old men have no patience for the modern world.  However, it did not let me keep thinking that superior code is the solution to any conceivable problem. I've hunkered down a bit, concentrating on a new project that I really believe will be a winner, and started learning the business realities of a cruel Valley.

So now, if an investor asks me what I learned from past failures, I won't put him to sleep talking about schema-less versus SQL databases. Instead, I've got a good answer.