
April 1st Post Mortem - mnemonik
http://lucumr.pocoo.org/2010/4/3/april-1st-post-mortem
======
pak
Most of the "bad design decisions" that were lampooned in the project were
more religious preferences than obvious missteps.

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.

~~~
moe
Not really, or rather, which one?

I sure hope the stuff he deliberately created is not anyone's religion...

~~~
pak
1\. storing state in the module, or the singleton pattern in general, is not
going anywhere for a long time. He describes his problems with it at

[http://lucumr.pocoo.org/2009/7/24/singletons-and-their-
probl...](http://lucumr.pocoo.org/2009/7/24/singletons-and-their-problems-in-
python)

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

~~~
moe
_1\. storing state in the module, or the singleton pattern in general, is not
going anywhere for a long time._

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.

------
cmelbye
That is the most subtle April Fools joke I have ever seen.

~~~
telemachos
No insult meant, but I don't think it was very subtle at all.

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.

------
acangiano
> However I got more than one mail asking me to release the sourcecode of it
> because people want to hack on it.

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. :)

------
Herald_MJ
I quite like the idea of using a decorator on a view function to define a URL
path. Could someone explain to me why this is a bad idea?

------
krainboltgreene
Aw, too bad. I was hoping there'd be a Python Sinatra. Oh well!

~~~
moe
What's wrong with werkzeug (the one this joke was based on), bottle, cherrypy,
or one of the other micro'ish frameworks that have existed for a long time?

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.

~~~
krainboltgreene
_I personally don't see the point in going more micro than those_

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.

~~~
moe
Well, but there is no difference in the learning curve.

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.

