2D Boy: I love you, 2D Boy! » Blog Archive » Pay-What-You-Want Birthday Sale Results

Ever since I read about the pay-what-you-want-for-bagels model in the Freakonomics book, I’ve been curious whether or not I might be able to apply it to other transactions. I’m glad to see someone testing the waters. About 40% paid all they could afford, or paid specifically because of the model, which suggests that a large percent of these sales would not have occurred had the model not been in place.

Fact Sheet - The Health Insurance Portability and Accountability Act (HIPAA)

There’s a little bit of misconception running around about pre-existing conditions and the evils of insurance companies. The HIPAA link explains that when you switch insurance carriers, the new one can’t exclude pre-existing conditions. The key here is that you can’t let your insurance coverage lapse; if you’re laid off or you quit to work on a startup, you absolutely must make sure that you’re on Cobra or perhaps a low cost high deductible plan.

If you do let your insurance lapse, then the next insurance company can only exclude covering the cost of pre-existing conditions for the next 12 months at most (less than that, if you had any continuous coverage the previous year — but see the HIPAA link for details).

Why am I blogging about this now? Because Cobra coverage from my previous company is running out, and since startups often times aren’t cash flow positive, they need to understand the details of how insurance coverage works. My situation is compounded by the fact that I’m also doing no-charge freelancing work for some non-profits and groups that I like, and so it’d even be a stretch for me to qualify for Freelancers Union insurance.

Musings on Markets: The dangers of relative valuation

Larry Summers mocked efficient market theories, saying that they’re as insightful as finding that two quart bottles of ketchup are twice as expensive as one quart bottles. Relative valuation seems the same deal to me.

CyLucene released!

We’ve officially released CyLucene, a Python interface to CLucene. CLucene is a C++ implementation of Apache Lucene, the popular search engine library.

Python developers wishing to use a well supported search engine typically head to PyLucene. PyLucene’s approach is to build an interface to a C++ layer using their custom grown JCC compiler, which then talks to Java Lucene via JNI. That’s two layers of indirection, one of which is JNI.

Even if you believe JNI is efficient, there’s still the added overhead of requiring Java at runtime. If you run a website on a shared hosting service that restricts you to, say, 80 MB of RAM, CyLucene might be for you.

CyLucene 0.1 is minimally useful. It good enough to power Standing Room’s upcoming search features, but it’s far from a complete CLucene bridge. We’re in real need of feedback as to what features we need to expose to make the package more generally useful. You can find contact info in the readme.txt file, and can file a bug as always.

9.3. collections — High-performance container datatypes — Python v2.6.2 documentation

Very glad to see named tuples!

When I was a Python n00b (maybe I still am?), I asked on Stack Overflow whether or not such a feature existed. I received one particularly arrogant response, in my opinion, along the lines of “why insist that your code looks like C++? It destroys my Python zen.”

That comment is contrary to one reason why I’ve become such a Python fan — the design and community is the optimal balance of sanity for my tastes.

Other languages of this genre that I’ve used are Ruby, Lua, and Scheme.

Ruby is beautiful, but the community is blinded by that fact.

Lua is a little too hurriedly practical, sprinkled with language quirks that are hard to keep track of for an occasional programmer.

And Scheme… oh, Scheme, such wasted potential. It had 20 years lead time to become the Python of our age, and countless numbers of computer science students indoctrinated via SICP. But even with those advantages, scrappy little brother Python is the one that took the limelight.

Oh well.

import this

Python 2.5.1 (r251:54863, Feb  6 2009, 19:02:12) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import this
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

Opid, a Python WSGI OpenID app.

I’m excited to announce the first official free software release by S7 Labs! I wrote Opid to replace the AuthKit module for OpenID authentication in Standing Room. AuthKit, built for the Pylons framework, provided more functionality than I was looking for, and proved to be difficult to customize. Opid is orders of magnitude smaller in code size and more flexible, IMO, though it leaves a user model implementation up to the developer. Check it out!

Beaker sessions with file backend.

The Beaker documentation mentions that you can use a file backed session backend, along with numerous other methods (memory, dbm, various SQL flavors, even Google App Engine datastore).

What they don’t explain is how you actually use a file backend, and searching around was turning up nothing. It turns out to be similar to how you configure Beaker caching, a la with data and lock directories:

session_app = beaker.middleware.SessionMiddleware(app,
                                                  type='file',
                                                  data_dir='/path/to/some/dir',
                                                  lock_dir='/path/to/another/dir')
Frameworks ought to gracefully fade away as you replace them, bit by bit, with domain-specific code.