April 1st Post Mortem
lucumr.pocoo.org
lucumr.pocoo.org
It's sort of like a vi user creating emacs as a joke, and then people picking up this emacs and going "hey i can actually use this it's not bad". One man's satire can easily be another man's religion.
I sure hope the stuff he deliberately created is not anyone's religion...
http://lucumr.pocoo.org/2009/7/24/singletons-and-their-probl...
and does so very well, but a lot of these criticisms directly stem from python treating modules as objects. that's not going to change.
2. I'm not a python programmer by day, but I found the @route('/') decorator kind of cute. It looks like the kind of syntax Ruby people drool over, with the double meaning of the @ character being cleverly referenced and the potential ability to specify multiple routes by repeating the decorator.
3. Similarly, I imagine that ruby-minded folk would not find the idea of automagic function detection and liberal introspection to be so horrifying. It's just how some people roll...
Agreed. I think his general point was to avoid them as much as possible, though - which is generally good advice.
2. I'm not a python programmer by day, but I found the @route('/') decorator kind of cute.
That was actually not one of the nasty parts but inherited from the underlying Werkzeug framework. This is how it's really done in many python frameworks.
3. Similarly, I imagine that ruby-minded folk would not find the idea of automagic function detection and liberal introspection to be so horrifying.
Yea well, you are right, it gets religious at that point. Goes to show that even proper bad code is hard to write, I guess. ;-)
Introspection is generally heavily used in python, too, he's just carrying it a bit too far by looking at stack frames and such. This may indeed be a philosophical difference to ruby where the shortest code generally beats everything. In python we usually draw the line at the point where it would become hard to follow or debug a certain kind of magic.
Yes, he gave it a pretty package, but it was done in such a way that (1) you could see the source (did you look at it?) and (2) the comment by Armin on the webpage of the joke was itself a very broad hint.
When it was posted here, people caught on immediately, as I recall.
A couple of years ago I made a much less elaborate April Fool's joke in which I announced "Ruby on Crack". People were emailing me like crazy, trying to get a chance to try this new framework. :)
I personally don't see the point in going more micro than those, because for simple stuff they are syntactically mostly identical to this joke-framework, and once your stuff grows out of the "trivial"-stage you'll be glad anyways that Cookies, Auth and all that are right there, without requiring you to reinvent them.
Learning curve.
At some point the next generation of hackers will wander by. They'll want something easy to grasp, simple to read, small enough to start their hacking.
The code presented in this joke-framework is the exact code that you'd use with werkzeug. It is werkzeug after all.
It's also almost identical to what you'd use with web.py, bottle or one of the other "micro" (or rather: modular) frameworks.
The only difference would be that those provide you with the tools (all strictly optional) to plug in authentication, cookies, template rendering etc. when you need them. But as said, they are there when/if you need them. If you don't use them you can just as well pretend they don't exist.