How to Load a Custom Firefox Profile in Selenium RC2

Posted in Uncategorized | Tagged , | 2 Comments

Land

LAND

his approach
to love he said
was that of a farmer
most love like
hunters and like
hunters most kill
what they desire
he tills
soil through toes
nose in the wet
earth he waits
prays to the gods
and slowly harvests
ever thankful.

via Ayo

Posted in Uncategorized | Leave a comment

Hello WordPress. Tidying up, mind the dust!

I just made the move back to WordPress. Posterous has been a great service for the past three years, but it’s time to make the jump back into blogging with WordPress.

For those of you who aren’t familiar, Posterous is a great service that makes blogging simple. Just shoot an email to post@posterous.com and your blog is online. Great execution, elegant UI, gets the job done well.

Luckily, I was able to import all of my posts and comments over to WP using the Posterous to WordPress Importer. It’s a great tool but there was one bug, something to the tune of:

Line 215: Serialization of 'SimpleXMLElement' is not allowed

Anyways, the fix is well-documented here. Simply replace:

add_post_meta( $post_id, 'posterous_' . $this->bid . '_post_id', $entry->id, true );

with

add_post_meta( $post_id, 'posterous_' . $this->bid . '_post_id', 
    (string)$entry->id, true );

Then re-run the importer and all should be well.

Anyways, I’ve got a few posts that I’m looking to write in the next couple of weeks. I don’t plan on posting every day, or even every week, but I’d rather use this as a place to share things that are on my mind.

Online privacy is an interesting concept. I started using Google Plus a few weeks ago. Here is my profile. I won’t go into as much detail as many people have in the past weeks, but I think they’re approaching the right problem. Hats off to the Google Plus team.

Posted in meta | Leave a comment

No price is too high to pay for the privilege of owning yourself.

The individual has always had to struggle to keep from being overwhelmed by the tribe. If you try it, you will be lonely often, and sometimes frightened. But no price is too high to pay for the privilege of owning yourself. —FRIEDRICH NIETZSCHE

 

- Kaufman, Josh (2010). The Personal MBA: Master the Art of Business (Kindle Locations 5362-5364). Portfolio. Kindle Edition.

Posted in quotes | Leave a comment

It is a more inspiring battle cry..

It is a more inspiring battle cry to scream, “Die, vicious scum!” instead of “Die, people who could have been just like me but grew up in a different environment!”

—Eiliezer Yudkowsky, Artificial Intelligence Researcher and Founder of  lesswrong.com

Posted in quotes | Leave a comment

Our Superficial Scholars

[...] the trend is unmistakable. Our great universities seem to have redefined what it means to be an exceptional student. They are producing top students who have given very little thought to matters beyond their impressive grasp of an intense area of study.

via The Washington Post

Posted in quotes | Leave a comment

Forecast: Advertisements shown on the Amazon Kindle will drive higher click-through rates than current online advertising networks

Amazon announced their intentions of releasing an ad-supported Kindle today. There has been much discussion, and I’d like to add my thoughts. 

I purchased an Amazon Kindle in November 2010 and have had an interesting relationship with it from the beginning. I went through several typical phases that I imagine most Kindle owners go through:

Days 1-7: Honeymoon

  • Kick-start my reading list with those books that I’ve been meaning to buy on paperback. 
  • Impressed by how quickly I can acquire new content to read.
  • Keep the Kindle out everywhere. At a cafe? Laptop and Kindle. At the office? Laptop and Kindle. Morning coffee? Kindle.

Days 8-21

  • Buy a Kindle case and screen protector because I take it everywhere and don’t want to scratch the screen.
  • Take it with me everywhere: Bus, car, long trips – it stays in my backpack and goes everywhere my laptop goes.
  • It’s fun to read, but I’m getting bored of reading books for the sake of reading books. Usage drops off.

Days 22 – 40:

  • Reading falls back pre-Kindle levels – finishing a book every two weeks, as opposed to the prior 2 books/week.
  • Faced with the critical decision: “do I need to bring my Kindle today? No, I’ll just listen to that new album I downloaded on the way to work.”

Days 41-X:

  • Kindle sits in my room and collects dust. 
  • Still, when debating a book purchase, I buy the Kindle edition because I’m used to reading on the screen and have already locked-in. Purchasing a paperback would be irrational and against my $139 purchase. 

Days X+1 – Now:

  • Life/Work/Everything slows down somewhat, and suddenly I have more time to read. I pick up my Kindle and all of a sudden, it’s replaced most books in my life.

 

I now prefer reading on my Kindle and will buy the Kindle version if it’s possible. After a sufficient time X, the Kindle stops becoming another gadget and proves itself to be a more efficient to read books. This is the best part – this is where I begin to see the Kindle as something more than just another device in my life. Kindle becomes a means for me to read books and learn new things, regardless of where I am. 

I’m not sure if other people feel the same way, but reading on my Kindle makes me happy. It evokes positive emotion. Each time I turn on my Kindle, I receive utility and this rationally makes me happier. 

So this is my experience with a Kindle. But now we segue into online advertising.

When was the last time you clicked on a banner ad? A contextual ad? A search ad? It’s probably hard to remember, because most people know that ads are to be tuned out. Paying attention to an ad would be against your rationality, because ads are there to distract you. Ads are a way that content providers finance their endeavors and to deliver free content to you. Paying a premium for an ad-free experience is like taking a taxi, when you can just as well take the bus for a fraction of the price. One experience is better than the other – we value our quiet time and dislike distractions. 

Internet users are taught that they can use a free version of something by simply paying via the disutility of online ads. This is an even value proposition – I give you my attention and you try to get me to click ads on your page. I ignore your ads and continue to consume content that is financed by advertisements.

We evolve quickly and learn to tune out these ads, since they’re a disutility for us. We’ve even built systems that do this for us. See the AdBlock firefox extension. If someone showed me an ad and I received nothing in exchange, I’d be pretty angry. That’s why we have laws like CAN-SPAM. It’s why people react so furiously (this was the first that came to mind) to unwanted mobile ads and hate playing the free version of Words With Friends. That’s why people get annoyed by telemarketers. When somebody says that “those pesky telemarketers always call at dinner”, what they actually mean is “those telemarketers have to do their job but they always try to take some of the highest-valued time during my day.” 

So many forms of online ads, are simply stated, broken.

Back to the Kindle.

Powering on my Kindle evokes a positive emotion. When I turn on my Kindle, I’m actively looking to discover new information. I’m in the mood to explore and will be receptive to anything that the Kindle sends my way. I push the oversized right arrow button and more content appears. I’m in a discovery mode. The Kindle is a device for discovery. 

Books are very personal. The Kindle is the same place. My mind perceives the Kindle the same way it would interact with a book. I know that my Kindle will show me something I want to read.

But then, how would advertising work? 

Amazon is treading on very fine water. Ads could break a user’s trust with their Kindle. Luckily, lowering the price to $114 is a form of insurance. That’s $25 savings from the $139 alternative. This is marketing of the best form. Anybody who goes to purchase a Kindle will see that they can either pay $139 and get an ad-free Kindle, or pay $114 in exchange for putting up with a few advertisements.

Right then and there, people using ad-supported Kindles will be more perceptive to the ads they get. They’re okay seeing ads when they turn their device on or off, because this tolerance saved them $25. Their cognitive dissonance kicks in and even further justifies the ads – “I saved $25 so this advertisement isn’t a problem. Because if it was a problem, I would have been irrational at the time, and I’m not irrational so these ads are okay after all. I agreed to have this experience and it’s no different from my expecta .. wow! a $90 massage for $20?”

The user’s guard is down. Users won’t be angered by these ads, given that they’re not obtrusive and that they won’t get in the way of my reading experience. Amazon has already made that clear – these ads will show up, but not when you’re actively reading. That’s what the $25 contract says. Only before and after reading, never during. And that’s when I’m switching contexts and am interested in exploring new things.

This is already looking like a favorable position, but we must remember to couple it with the fact that the Kindle is cognizant of its own location, as well as the tastes and interests of its owner. My Kindle knows that I like books about software, statistics, algorithms, and business. Amazon knows about everything I’ve purchased online in the past five years. There is an immense amount of data there. And it’s not intent-based data, it’s a list of products that I’ve spent real money on. There is enough so that the proper data sample, combined with my purchasing and browsing behavior, along with Amazon’s good [non-obtrusive] taste, will deliver an advertising experience that significantly outperforms current advertising technologies. 

What kind of ads could the Kindle show me? It would be hard to deliver something relevant out of nowhere, but the Kindle is cognizant of both my location and my normal purchasing habits. This sets the stage for relevant local deals – think LivingSocial. They did invest in them a little bit ago, but I might be reading into things too much. The local deals space is all about location. Most deals that I’ve purchased are within 5 blocks of where I live and I firmly believe this applies with many other people. Humans favor proximity. Less work to get a discounted deal. 

The Kindle is cognizant of its location (all models have 3G or Wi-Fi) as well as the purchasing patterns of its owner (Amazon). With dozens of overlapping local deals in my city, I know that Kindle could figure out which deal I’d be most likely to buy. So not only does it show me ads that I’m potentially interested in, but my Kindle can now save me money by showing me things that I’m interested in.

I’m not claiming that the Kindle will make me happy by displaying ads, but I know that this beats the baseline of current online advertising. I’d much rather see something relevant than something completely unrelated – my attention and focus are limited. The Kindle’s advertisements certainly won’t add concrete value to my life, but they certainly will not be a disutility either.  

And here’s the best part. I saved $25 and get to see relevant local ads.

I might be taking it a little bit far, but I believe that ads on an Amazon Kindle will deliver a higher click through rate than any traditional online advertising media because the users are more interested and engaged. I think that by the time the magazine articles are written and the stories make in into the Wall Street Journal, the Amazon Kindle will be a better advertising medium than most online ad exchanges. 

In short, I think that the great experience that my Kindle delivers, coupled with Amazon’s abilities to mine data and find relevant trends will make the Kindle (and more generally, the tablet) the leader in the online advertising market.

 

Posted in Uncategorized | Tagged , | 1 Comment

On Leadership

To me, ‘Leader’; is a word that is given by people who don’t necessarily have power to describe someone who gives them power. It is a word to be treasured and sought. A word that describes very few people though it should describe very many people.  A leader is someone who is looked up to by their colleagues, whether those colleagues are further up or further down the totem poll. A leader makes other people want to do a better job and be a better person.

-via lovestats 

Posted in quotes | Leave a comment

Nikola Tesla, in need of work..

Tesla, in need of work, eventually found himself digging ditches for a short period of time for the Edison company. He used this time to focus on his AC polyphase system.”

via wikipedia

Posted in quotes | Leave a comment

Easy Handling of Python datetimes in JSON.

Passing date objects between Python and Javascript can be difficult. I started using this as a workaround to handle python’s datetime objects, but it should work for any non-standard, non-primitive python type:

import time, math
def dt_handler(obj):
    if isinstance(obj, datetime) or isinstance(obj, date):
        v = math.floor(time.mktime(obj.timetuple()))
        return "DATE(%d)" % v
    else: return repr(obj)

Instead of worrying about converting things into javascript friendly date objects on the server-side, this solution pushes the processing client-side. Basically, all it does is convert any datetime object into a string of value “DATE(timestamp)” where timestamp is a unix timestamp. It’s also useful because it doesn’t need to know anything about how your data is structured – it’ll simply parse the values out of a JSON dictionary.

I’m making use of underscore.js, perhaps one of the best JS libraries out there. Have a look at it here if you haven’t already.

This solution disregards timezones, so be careful.

Enjoy! As always, ping me if you have any questions or improvements.

Posted in python | Leave a comment