Serious squatting

With everybody and their brother trying for the past couple years to bust into the the online calendar market, how is it that calendar.com is sitting there with one of those stupid fake-search-engine advertising pages?

Way back in the ’90s, Skip Montanaro of Music-Cal fame put it to good use. Digging through the archive.org history it looks like he may have sold it to mail.com.

I had to do a whois to see that mail.com still owned it. What the hell happened to that company? Sitting on calendar.com for the past two years is an astounding move. Or, rather, lack thereof.

Liking jQuery

jQuery I’m not trying to cop out of learning actual Javascript, honest. My copy of the DOM Scripting book is on its way and I’m sure I’ll learn a lot. And I like almost everything about Javascript (except the curly braces and semicolons). I still remember reading an article by Simon Willison several years ago which demonstrated techniques for standards-compliant and elegant use of Javascript. Like many who lived through The Great DHTML Frenzy circa 2000, I found this idea completely shocking at the time. Now it’s finally sinking in.

Two new Django-powered sites

One of the neat things about PyCon, even for those of us who aren’t attending, is that people save up goodies to announce and release during the conference. Django is certainly a hot topic at this year’s PyCon, and as of today at least two significant new Django-based sites have launched:

One is CheeseRater (great name!), from Jacob Kaplan-Moss, a quick-rating system for items in the Python community’s official package index, the Cheeseshop. In other words, if you think PyOMFG is the greatest module ever you can vote it up, and if you notice that PyFlockOfSeagulls hasn’t been updated since 1992 you can vote it down. The Cheeseshop is one of several pieces of python.org that I’ve thought could benefit from the application of some crowd wisdom; Jacob gets a prize for taking action. It will be interesting to see how this evolves.

Neat Python hack: infix operators

I came across this neat Python hack on reddit today, a technique for defining arbitrary infix operators. Not overriding + or >> et al., but creating keyword-style pseudo-operators that… well, the code is probably as clear as any description I could come up with:

class infix(object):
    """
    Clever hack (slightly modified) for defining infix operators. 
    Via http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/384122
    Intended for use as a decorator.
    
    >>> @infix
    ... def removing(str, chars):
    ...     for char in chars:
    ...         str = str.replace(char, '')
    ...     return str
    ...
    >>> print 'Hello, world!' |removing| 'eo'
    Hll, wrld!
    """
    def __init__(self, function):
        self.function = function
    def __ror__(self, other):
        return infix(lambda x: self.function(other, x))
    def __or__(self, other):
        return self.function(other)
    def __call__(self, value1, value2):
        return self.function(value1, value2)

Some people hate this kind of stuff. That’s why we call it a hack, to indicate that we don’t think it’s a great building block for your missile control software. Some of Those People still get their underoos in a bunch regardless. But you have to admit it’s damned clever.

iPhone, youPhone, weallPhone

Apple and Cisco have reached an agreement on the disputed “iPhone” trademark, and – surprise – Apple gets to keep using it. From the Cisco press release:

Under the agreement, both companies are free to use the “iPhone” trademark on their products throughout the world.

To further differentiate brands, the Apple iPhone will also be known as “the real iPhone”, with the Cisco model being referred to as “Oh, I thought you meant the other one.”