Gattica & RVM 1.9.2 NameError:

December 5th, 2011 No comments

NameError: uninitialized constant Gattica::Auth::VERSION

If you find yourself running into this error, you’re probably running Ruby 1.9.2
I don’t know why this is the case, but Gattica works fine without alterations with 1.8.7 but throws this error on 1.9.2

In such a scenario – do the following

Find the file auth.rb, it’ll be in some folder. I use RVM so its in the following path for me :

.rvm/gems/ruby-1.9.2-p180/gems/gattica-0.4.3/lib/gattica/auth.rb

To this file, add the following line

VERSION = '0.3.4'

That’s it. You need to add it prior to Line 14. Before module Auth

Categories: Technology Tags:

How I handle email.

December 5th, 2011 No comments

I get a ton of email, and I find that every time I get one, I must check it.

Here’s how I’m dealing with it thus far.If you use Gmail.Google Apps in conjunction with a smart phone this will likely work for you too.

First – turn on Sanebox : this alone is a lifesaver. Here you can take a shortcut, and just hand your inbox over to @SaneTop/ @SaneBox – what that means is that your inbox will only ever see emails that are important. I don’t do well for the following reason -

Second Turn on OtherInBox : This will go through all your emails and classify them (shopping, coupons, shipment notifications, social media, business, travel etc.)

Third on your phone do the following – (this is specifically for an Android phone) turn on sync for label :@SaneTop. Then turn off notifications for everything other than @SaneTop.

That way your phone only ever interrupts you for important emails, and leaves you alone the rest of the time. At the end of the day open up your inbox and see your neatly classified unimportant emails, and decide what to do with them.

2 quick notes : One – You MUST turn off auto-archive in OtherInBox for this to work as seamlessly as I am describing.

Second – Sanebox works significantly better than Priority Inbox, although I’m not sure why. This is merely anecdotal evidence, but SaneBox has never been wrong. I’ve trained it to move things form Important (@Sanebox) to Very Important (@SaneTop) but its never had false positive or missed a truly important email.

Categories: Technology Tags:

On Entrepreneurship

July 19th, 2011 No comments

Paul Kedrosky – The tilt thing…

Entrepreneurship is and should be irrational. You are taking on huge risks, showing immense ego, and trying something with an absurdly high failure rate. But it at these moments when it feels like you’re nuts not to try being entrepreneurial — the Valley being on “tilt” — that we have an outside chance of resetting the base rate at which companies get created in this country. While I tease people about it on a regular basis, especially journalists-turned-entrepreneurs, I wouldn’t have it any other way. Other than maybe the Harvard MBAs. (I kid. Mostly :-) )

Steve Blank at SXSW… to a roomful of future entrepreneurs. I’m paraphrasing.

You’re all insane. There are ten of you that will exit for about 10 MM Dollars. There’s 2 of you that will exit for more than 100 MM Dollars.

He paused for a beat, and then continued.

Right now, every one of you is feeling sorry for the other 385 people in this room.

Categories: Business, Technology Tags:

Using RVM & Ubuntu

June 28th, 2011 No comments

If you’re using RVM and attempting to setup a fresh server, do not forget to do the following

$ rvm package install readline
$ rvm package install zlib
$ rvm remove 1.9.2
$ rvm install 1.9.2

Seemed to solve most open issues for me.

Also, you need to system install somedev libraries. For instance I needed to run the following because bundle install failed:

sudo apt-get install libsqlite3-dev, libreadline5-dev, libncurses5-dev

That last statement btw – solves most problems with RVM and readlines. After that you can follow the directions on beginrescueend around readline
.

Categories: Technology Tags: , , , , ,

Server side facebook login status

June 28th, 2011 No comments

Was fiddling with the facebook API last night for something, and came across a strange gap.

There doesn’t seem to be an easy way (from the documentation) to get a server side loginstatus for the individual. This isn’t exactly an enterprise app I was building, was just checking to see if I could get something up and running quickly, when I came across this issue.

Let me describe the problem, and how I solved it, but it might not work for all.

The issue is simple – how can I tell, server-side, if someone is logged into facebook or not.
There are two flavors of logged into facebook

    logged in, but not known to my application
    logged in, and have authorized my application to do X,Y & Z

Scenario 1 is even more perplexing, but I’ll get to that in a second.

In scenario 2 – if you already have the users auth_token, then, with every call that you want to protect non logged in users from making, you can ask for some non-public information from the facebook Graph API. When facebook denies you that access, the user has gone offline, and you should log them off.

However, let me add in a twist, what if you have asked for offline access. In that scenario, facebook doesn’t expire the auth_token, and my proposed solution above doesn’t work.

What’s more perplexing about this is that there used to be a solution for this in the Facebook_Connect (now deprecated) API.
There was https://facebook.com/restserver.php which when sent the right auth_token, and method could return auth.getsession.

This might still work, but there is no reference to it in the documentation anymore, and the PHP SDK specifically refers to it as the “old” method. I’m going to assume things labeled in that manner aren’t going to survive very long.

So, this leaves me with only the JDK API that references anything about getLoginStatus. How do I use that to work with the rest of my application that is entirely server-side code (in Rails)?

Well, the answer is I don’t really.

Here’s what I did
Session outside of facebook’s session
I create and use my own session for the most part. The only way to start a session is to authenticate into facebook, but assuming you give me permission, I have offline access and can keep accessing your fb data. When the user wants to do something “sensitive”, I run the following script at the top of the page

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId : 'YOUR APP ID',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});

FB.getLoginStatus(function(response) {
if(response.session) {
fbCheckUserPerms();
} else {
//no user session available. Either, you don't know them, OR, they aren't logged into facebook.
if(response.status == "notConnected") {
// They are logged into facebook. Redirect them to a page that proposes they authorize your app, and tells them why.
alert("But is logged In");
} else {
//They are no longer logged into facebook. Redirect to a page that destroys the current session
}
}
});

</script>

Note, that this script is a little more than needed to make the solution work, but it also helps with scenario 1 from above. They are logged into facebook, but unknown to me. In that case, I take them to a page that describes the value proposition of my application and personalizes the page with the Registration & Login button social plugin.

If they are not logged into facebook, I forward them to a page within my application that destroys their session, and then forwards them to the login screen.
Not the most efficient way by a stretch, and clearly not all server-side, but I can make that work for now,

One thing to be careful of. If they are already on a sensitive information page – and then log out of facebook in another tab, just running this at the top of the screen might not be enough. You might have to rerun this script prior to submitting whatever it is that you don’t want to let them do when they aren’t logged into facebook.

M app doesn’t allow for much of this, so I’m fairly safe, just checking on page load.

RVM

June 25th, 2011 No comments

In order to maintain different versions of Ruby, Rails and Gems on your machine, nothing works better than RVM.

Ruby Version Manager also allows for different versions of rails, and gems, and you can switch simply by throwing in
rvm system

Or to create a different ruby/rails environment follow Wayne’s Gist here, reproduced below for posterity.

This example shows how to setup an environment running Rails 3 under 1.9.2 with a ‘rails3′ gem set.
∴ rvm update --head
# ((Open a new shell)) or do 'rvm reload'

# If you do not already have the ruby interpreter installed, install it:
∴ rvm install 1.9.2

# Switch to 1.9.2-head and gemset rails3, create if it doesn't exist.
∴ rvm --create use 1.9.2@rails3

# Install Rails 3 final
∴ gem install rails

# Check to see we now have Rails 3
∴ rails --version
Rails 3.0.0

After you create a rails app, remember to run bundle install – and you’ll have all the necessary gems as part of the appropriate rvm version.

Categories: Technology Tags: , ,

The business of music… Convenience and scarcity.

June 21st, 2011 No comments

Music faces crumbling record sales, and all time lows in terms of physical goods sold.

For now, let me make the hypothesis that music is merely a specialized form of content. If we are willing to accept that premise, we can proceed to see if the path of content at large can help explain the trajectory of music in particular.

Money money, the mighty dolla dolla
Got to get my grind on, grind on, grind on
I don’t wanna be broke no more
- Bone Thugs n Harmony in Money Money

Content has been on a long and fairly steady march towards “wanting to be free”. From the creation of the printing press, to blogger, creation of content was being democratized further and further. More and more tools emerge every day to empower content creation – including but not limited to blogger, tumblr, wordpress, and any number of other publishing platforms.

Distribution of content has also gotten consistently easier with various technologies for syndication emerging, and then becoming the invisible force behind the features and tools we use everyday (think ~ RSS). Same with consumption – you can read content almost anywhere, and everywhere – including mobile devices, e-readers, almost any connected device possible. We even have time-shifting technologies like Instapaper to allow us to consume our content when we desire, and Readability that alters the form of the content before we consume it.

Everyday is my day I’ma do it my way everyday.
Everything about me what they love about me everything
Everywhere that I be feel VIP baby
- Fabolous in Everything, Everyday, Everywhere

So we’ve established that content today wants to be available everywhere, anytime we want it, and in any format we want it. There are very few limits around where and how we consume our content, and most attempts at controlling how, when, how much, and where we consume our content have been met with ridicule.

If we return to the earlier hypothesis that music is merely a specialized form of content – then we can safely assume that music will follow a similar trajectory and wants the same things that content does – to be available everywhere, anytime, and in any format we want it. So long as it is convenient, and customers get the above described ability, they will in fact pay for content. If the content is scarce, truly scarce – customers will pay significantly more – they will pay cash and attention . The trick is how to make content scarce – and how to monetize their attention.

Creation of music is becoming easier and easier every day. New ways to consume music appear every day – most meant to help satisfy some observable customer behavior, or arcane studio requirements etc. However, in the end, the best (read most convenient at market price) customer experience will win.

Music has a fantastic ability to be converted into an experience. You can hear a song, but you experience a concert. Books, blogs, and regular content have to work harder to do that – its tougher to experience the New York Times for instance, than it is, say Lady Gaga. Experiences, by their very definition are scarce. The content is merely the gateway drug to the expensive experience.

See Trent’s letter here to see exactly how scarce an experience can be.

Finally – what is to become of music – do applications like grooveshark represent the future of music, and how we consume it? I sense, as Fred Wilson puts it – music will eventually be like dial tone, and everybody will be able to access it whenever needed.

Music will continue to provide every generation to come the experiences that become the touchstones of their lives, much like it did for all the generations before. The actual physical experience will be different, obviously as we have already moved from the experience of pulling an LP out of its sleeve – to spending hours trying to take the CD’s out of their plastic straight-jackets – to clicking mice.

In the future who knows what it will be, but if the trajectory is accurate, almost anybody will be able to make music(thats not to imply that they would be good at it), and similarly, everyone will have access to almost every track ever created at their fingertips whenever they want it. As with everything else, curation will become important, and scarce goods will become even more expensive than they are now.

Finally, in such a world – the customer’s attention will be the scarcest good of all – and it’ll be very very expensive. Customers will continually strive to be free of exclusive arrangements, network exclusivity and any limitations on how, when, or where they can consume their content.

Categories: Technology Tags: ,

Shure SRH440 review

June 5th, 2011 2 comments

I’ve decided to start writing reviews of the equipment I use and consider myself a fan. Inspired by Marco who’s reviews I’ve found extremely helpful in a variety of causes.

So here goes – several people recommend the Sennheiser HD280 Pros. They are absolutely fantastic, but I could never get them comfortable on my head. So I started looking for an alternative for the purposes I had in mind.

The headphones had to be

- Closed, because I didn’t want noise to leak.
- Extremely comfortable because I intended on wearing them for hours on end.

The HD 280s failed on the second count. Not that they were uncomfortable, but I could never hit the point where I could “forget” that they were on. After looking at a ton of alternatives including Beyerdynamics, Denon’s AKG’s etc. I bought the Shure SRH 440.

The Shure SRH440

Sound Quality

The sound quality on the Shure is fantastic, and attempts to stay as close to flat as possible. The differ from the HD280 in their bass response. The HD280 had a ‘bigger’ bass response, and so if you’re looking for something that shines on the bassline, you will either have to nudge the EQ a little on the Shure or you might be better off with the HD280.  See the graph below from headroom (now headphone.com) for a comparison between the two on Frequency Response.

Frequency Response between the HD280 and Shure SRH440

Frequency Response between the HD280 and Shure SRH440

As you can see, the HD280 Pro has a significantly better frequency response in the 0 – 100Hz range.  That being said, in my day to day usage, I have not found the Shure’s lacking in bass at all.

 

Although the graph above doesn’t reflect it, I did find that the Shure sounds better in the mid to high range – brighter, but that might just be my perception.

General Fit

The tightness of the Shure is very well suited to my head (which may very well be very different from yours) . Neither too tight, nor too loose. They sit on my ears with what I would describe as a gentle squeeze at best.

In terms of comfort the SRH440 far outshone everything else I tried on, especially the HD280. They were spectacularly comfortable and I could keep them on for hours on end without feeling the need to remove them.

Given that they are not as tight on the head as the HD280, the result is lower isolation from your surroundings as witnessed by the graph below (again courtesy headphone.com)

Isolation test performed by headphone.com on SRH440 vs HD280 Pro

Isolation test performed by headphone.com on SRH440 vs HD280 Pro

That being said, I find that my office (my primary usage area) was quiet enough that I gained nothing from the increased isolation of the HD280. The leak from the headphones is probably similar, but there was no good way to test this hypothesis. However both the isolation provided and the leak was well within my acceptable parameters – which implies simply –  that I couldn’t hear my neighbor and he couldn’t hear my music.

 

Coiled cable for the Shure SRH440

Cable :

The SRH440 come by default with the coiled cable, but you can also purchase a straight cable. The coiled cable has a few advantages in that it occupies very little room, does not get tangled, and has the ability to stretch quite a bit. However the disadvantage is that it is definitely ‘heavy’. This usually means you have to deploy some strategy to minimize the amount of coiled cable that is suspended mid-air between your head and the device you are plugging it into.

As you can see in the image, it is quite a bit of cable. I can usually walk, and pace around my desk, and so long as the source isn’t mobile, the cable will stretch pretty much as far as I need it to (about 2 meters or so from the desk). However, the force the coiled cable exerts on the source is pretty high – so if you have these plugged into an iPod or your phone for instance, do not expect it to stretch. Instead, it will just yank the device off the table, onto the ground, and then … stretch. If you anticipate that being your primary use case, you will probably prefer the straight cable.

Cable connection to the Shure SRH440 and the swivel mechanism.

The cable can be disconnected from the headphones, hence the choice of cables and cable lengths. On the end that goes into the headphones the Shure has (what appears to be) a proprietary connection (its smaller than the 1/8th” stereo jack) as seen in the picture to the right. It locks into place by turning to the right, and I can vouch for the fact that once locked in, it is pretty much impossible to accidentally unlock it, or to pull it out without unlocking it.

The cable is only attached to one ear – the left as seen here. This might interfere with those who would prefer a cable on one side over the other, or attached to both sides, but overall, even with my comment about the cable being heavy, this one ear connection doesn’t bother me. I am right handed however. If I was left handed, and kept a mouse to the left of my keyboard, I can see how this cable could quickly become a pain. As with everything else, your mileage might vary.

The other end of the cable has been my biggest issue with the Shure thus far.  The end of the cable that connects to your device is rather large compared to other headphones (although probably not when compared to other headphones in this class – for instance it is the same size as the HD280 if I remember correctly), and sticks straight out.

This means that there is a greater risk of bending this particular end of the cable. Especially in an airplane (I’ve ruined two cables in that manner already.)

The business end of the cable for the Shure SRH440

The business end of the cable for the Shure SRH440

The end is gold-plated, and has the threads to allow you to screw on a 1/4″ adapter that Shure sells for these headphones if you truly want to use them as monitors or with any equipment that requires a 1/4″ connection.

Overall, if there was one thing I would change, its this end of cable- which makes these headphones more delicate than they need to be for the kind of day to day usage I put them thru.

A slightly smaller end, less likely to bend or break would have been awesome. That being said, this is mostly user error (I turned the laptop to an undesirable angle etc.) and not the fault of the headphones, so I can’t really blame them.

 

Cups

Also visible in the picture of the proprietary cable connection above is the mechanism that Shure uses to allow the cups to swivel. The fork seen in the picture allows an individual cup to swivel (up and down direction) the whole way until the cable gets in the way.

In addition the entire fork assembly allows a swivel of about 10 – 15 degrees in a back and forth angle to accommodate different head shapes.

Shure SRH 440 cup with quarter in it for scale.

Shure SRH 440 cup with quarter in it for scale.

The padding around the ear is soft, and a leathery (although I don’t think its really leather) kind of material. The upside is that it is very comfortable and you can definitely forget that you are wearing these headphones. The downside is that it does get warm inside these cups, and when I remove them I do frequently find that my ears enjoy the exposure to the cool air (note, – you do not realize this while wearing them however, just the split second that you remove them). This was even more apparent when I had the HD280 and would experience their vice like grip on my head though, so by contrast, this is a relief and an improvement.  The padding is removable, and also replaceable, which makes for a particularly long lasting pair of headphones – since the cups are the first to wear out, well before the rest of the headphones have begun to show any wear.

To get a good understanding of the size of the cups see the picture with a quarter in it. They are big enough that my ears fit entirely within the cups (as desired) and I am not the least bit uncomfortable.

The headphones are adjustable thru a simple expanding band that connects to both cups.

The band itself is very comfortable, and as with the rest of the headphones I often ‘forget’ that it is on.

Folded in Shure SRH 440

Folded in Shure SRH 440

 

These are not headphones meant for the gym, or even really for travel/commuting. Certainly not the sort of headphones one would consider portable – although they do fold in on themselves completely.

I generally keep these headphones in one place and do not move them anywhere. I did use them on planes, and they worked great in that context too, however after having two of my cables ruined on a plane, I’ve come to the conclusion that this cable isn’t meant to be handled in that fashion.

Overall, I tried several competitors in this space – closed over the ear headphones for use as my desk/office, and these were easily the best for my head shape, ear size etc. Finally, as with everything else – your mileage might vary.

When I bought them, they were available from J&R in NY for about $65 – which was a steal as far as I was concerned. The cheapest I can find them now is about $85 on Amazon. I didn’t try the Shure SRH 840 but from what I can tell the biggest difference is an extended range (5 – 25K Hz as opposed to the 10 – 22K hz in the 440).

I hope this is useful to some.

Categories: Review Tags: , , ,

What will e-commerce look like?

June 3rd, 2011 No comments

I’ve been thinking a lot about what e-commerce will look like in 10 years, or even half that time…

E-commerce as it stands today isn’t some new breakthrough technology-enabled process that was never possible before. Its still pretty similar to the act of what buying and selling looked like forever.

Customer wants something, customer goes to store, customer adds to cart, customer pays for it, customer checks out and leaves.

Note, the above could apply to a brick and mortar, or to an e-commerce player (such as my current employer – Quidsi Inc)

So what is different about online vs offline retail.

i) Unlimited shelf space.

Positive :

The constraints of what you can and cannot show customers is different in an online store vs a brick and mortar store. You can theoretically have a limitless collection of items, and are not constrained by the limits of shelf space in your store. No matter how large a store it is (think Costco) this is a very real limitation in the brick and mortar space. E-tailers are only subject to what inventory they can afford to purchase – but even that there are ways around (consignment, drop shipping, third party fulfillment, affiliate relationships etc.)

Negative :

Shelf space is a scarce resource and like all good scarce resources, brick and mortar stores monetize it. This is harder in an e-commerce world, and so e-tailers create scarcity in order to have an asset that they can monetize. (Landing pages, brand pages, micro stores within stores, the images on the home screen etc.) Also, the more products you add, the harder it gets to discover the right product for the customer.

ii) Supply chain

Positive :
E-tailers no longer need to manage and deliver product to stores across the nation. The complexities involved in keeping track of inventory per store, and its delivery is not trivial.

Negative :
The e-tailers cannot guarantee the same delivery experience across the country to all its customers, especially if it has only a limited number of warehouses. Also they cannot deliver the same immediacy that a physical store on your block can. Want something fast – no matter how quick an e-tailer can ship it to you – they cannot beat walking down the street and buying it in the corner store.

iii) Shopping Experience

Positive :
E-tailers can guarantee the same shopping experience to almost every customer that wanders into their URL.

Negative :
That experience has no local flavor to it, or for that matter any real personal interaction. Its a very impersonal shopping experience. No sales people, no friendly clerk to help you understand what you are purchasing etc.

I could go on, but you get the idea – in every way that e-commerce differs from traditional retail, there are opportunities for companies to be created and to grow. Here’s a few examples.

Discovery – Several large companies already exist to help customers discover the right product whether by search, navigation, merchandising etc. Endeca, Omniture, and a whole host of new start ups.
Delivery – E-tailers are competing nationwide to deliver fast free shipping and comapnies like webvan, freshdirect show that it is possible to take what would have seemed impossible only a short while ago and transform it into an online activity. Others will follow suit and the concept of local delivery for fast moving goods will become commonplace especially in urban areas. While this doesn’t exist yet, I think e-tailers (on the backs of delivery partners like UPS and Fedex) will also eventually allow you to pick a time-slot you want your package delivered (like Freshdirect allows now).
Personalization – Baynote, Certona, MyBuys, and a host of others are in the business of attempting to make the shopping experience more personal by showing you products, content, and experiences that they think are relevant to you at the appropriate time.
While all these are great, and the innovation and progress in this field does exist – I can;t help but wonder if this is what e-commerce will look like in 5 or 10 years.

However, several things have changed online, and they do allow for behaviors that were rarely possible before.

i) Access to information:
Information arbitrage is very difficult in a massively connected world.

ii) Access to similar people:
The ability to access a group of people that thinks and behaves like you is much more possible in today’s world than it has ever been before.

Why did I pick those two pieces to highlight? There are several other things that have changed, and are empowered by technology. However these two are going to do something interesting

Access to information includes price information. Eventually, customers will have total visibility across all products and categories. This will eventually drive prices to the lowest possible price as competition increases, and e-tailers will have to compete on something other than price. Alternately, they will create alternate streams of revenue and funnel the revenue into pricing.

Access to similar people is important because of the concept of the long tail. The minute I can find a large enough group of people interested in yellow doo-dads, I can afford to make, market, store, pick, pack and ship yellow doo-dads. The internet makes it easier and easier to find and/or create communities of people who are interested in something specific. This means no longer having to stock the products that will appeal only to the widest group of people. E-commerce will enable the carrying and selling of more and more niche products as communities pop up across the country that are willing to support and purchase such products. If you need at least 100 willing customers for yellow doo-dads, but they are spread across the country it will be impossible for a local store to carry them. Alternately, a huge chain of stores will carry one in every store in the hopes of finding the one person in that neighborhood who has a need for yellow doo-dads. However e-tailers with the ability to send the product to any corner of the country can and will move into such opportunities as they arise.

What does this mean for e-commerce? While I can’t claim to know the answer, here is what I think will happen.

    E-commerce, or atleast parts of it – will be commoditized. Scale will become all important. The ability to buy something online and have it delivered to your house as a particular time and date will become commonplace. The price will be reasonable and well known.
    As this happens, products will start to diverge from the lowest common denominator into ever increasing niche markets.
    Discovery of products is going to become ever more important, especially as the number of products available online explodes.
    Arbiters of good taste will be rewarded as e-commerce becomes a commodity, and ever increasing number of products show up online.
    Good taste isn’t objective – but subjective, so it means whatever you think it means. Large amounts of computing power are going to be spent trying to win the race to become trusted sources of good taste for as many people as possible.

There are several changes coming – curation will become more important, supply and demand will not look like it does now, and e-commerce tomorrow will see major innovation.

Disclaimer : The views above are mine and mine alone and do not represent those of my employer in any way shape or form. I am currently employed at Quidsi Inc, which was recently purchased by Amazon.

Categories: E-Commerce, Technology Tags:

Error while installing rails

April 18th, 2011 1 comment

If you experience this error while installing the latest version fo Rails 3.0.7 as of this date.

ERROR: While generating documentation for rails-3.0.7
... MESSAGE: exit
... RDOC args: --ri --op /usr/lib/ruby/gems/1.8/doc/rails-3.0.7/ri lib --title rails-3.0.7 Documentation --quiet

It’s because you are likely to be on ruby 1.8.7. Upgrading to 1.9.2 seems to solve this problem.

That being said, it doesn’t seem to hamper Rails in anyway.

Categories: E-Commerce Platform Tags: , ,