2,485 karma · joined November 3, 2009
This is crazy, right? Let's take SQLAlchemy, all the experience and expertise that went into building it, throw that out the window and make the dumbest possible wrapper on top.
def configure_ring():
if DEBUG:
return Ring(backend='debug')
else:
return Ring(backend='memcache', ...)
ring = configure_ring()
@ring.cache(expire=60)
def get_url(...):
...
Tons of other libraries out there that implement this exact pattern.Yes, you can "dynamically"-decorate your functions at run-time using whatever global conditionals.
Yes, you can re-decorate the ring decorators.
But you shouldn't have to.
This design is guilty of the cardinal sin of being un-pythonic.
* Not DRY. What if I want to use a cache for production but disable caching in development? And I have 10s or even 100s of functions that rely on the cache? Because the decorators contain implementation/client-specific parameters, I now have to add another entire layer of abstraction over this.
* Implementation is tied to the decorator, e.g. `ring.memcache` -- seriously? Why does it matter?
* What about setting application defaults, such as an encoding scheme, a key prefix/namespace, a default timeout?
I'm sorry but this is over-engineered garbage and good luck to anyone who uses it.
Also, I've read his books. Wikipedia quotes don't really give the same impression as his writing.
One of the things I like most about gtk apps is the ability to theme them to achieve a uniform look across all my apps. I would rather use a slightly less functional gtk app than a qt/kde thing for this reason.
Users who care enough to mess with themes by necessity accept that sometimes things may need some tweaking. Most popular themes are on gh and have responsive maintainers who are invested in their themes looking good/uniform. The burden should be placed on the theme maintainers and the users who choose to use non-default configuration, rather than disabling themes on an ad-hoc basis.
A guy is standing on the beach and his clothes and hair are all ablaze. Another guy says to him, "dude go jump in the water, you're on fire!" To which he responds, "I know, just a minute tho, I gotta figure out where this damn fire came from."
When you have a huge list like that in a filter, the answer is to treat it like a table and perform a join. Then the query planner can optimize the ordering of the loops. But this is just mind-boggling ignorance dressed up as a "debugging horror story".
Remember the new python official motto: what is dead can never die.
Although he's "stable", thanks to an injection every 3 weeks, he's not going to ever get better. In fact he continues to retreat further and further away from the world and life. Why don't you go to the bowling group, movie night, job placement, etc, I used to ask him (events organized by a local psych facility for their patients, etc). Those people are crazy, he said.
It's a baffling disease. Besides his hallucinations and delusions, the defining feature seems to be that it resists treatment of any kind that would lead to what you and I would call a normal life.
If code is your thing, Peewee has quite a few examples:
Another thoughtful read, from the other side: https://nplusonemag.com/issue-25/on-the-fringe/uncanny-valle...
It's about minimizing the effort needed to find what you're looking for. Speed of index construction time, unless we're talking orders of magnitude, isn't really meaningful. I don't know if this is just a really clumsy attempt at "marketing" or what, but I can't imagine this is going to convince anyone to drop es for this thing.
When I left a straightforward review, it was taken down with no explanation and no recourse. I called and got a refund, but the fake 5-star reviews are all still up.
Now, the worst part: about a month ago I got pulled over for texting and driving. I wasn't even thinking about it. The cop said, "were you texting?" And I said, "I don't think so, let me check"... pulled up my phone.. yeah a half-written text to a friend. I got a ticket and have kept my phone in my pocket since then.
Something funny happens. I would think, "ah I'll just check that message, maybe it's important?" Or, "I've got to tell someone something" and out comes the phone. Mindless. Or maybe I think I can drive and text, it's those other clowns that are the dangerous ones. I'm glad I got the ticket. I deserved it. I think it helped me connect my actions to real life consequences. Glad it was just a ticket and not a wreck.