The Customers You Really Want

Posted October 17, 2011 under News

Love or hate the apple fanboys, they’re the ones who keep coming back every year for the latest hardware revision. What’s that, a new screen? OMGWTFBBQ. Gotta have it. They send your company’s praises constantly to family, friends, and strangers.

These are the people who will be with you through the hard times. These are the customers you want for your business. But how do you get them?

Let me give you an example. I read about CottonBot the other day on Hacker News. Put simply, it’s a side project by Muzzammil Zaveri and Ethan Fast. I wasn’t aware of it, but Startup Schwag had shut down, but the basic premise is that you can subscribe and get cool startup schwag each month.

After checking out their idea, I loved the idea, disliked the price, and was unsure whether I’d like all the shirt designs they would release. I figured I’d send them an email with a couple questions too see if I’d get a response.

Would you look at that. They got back to me in a couple days, had lowered the price, and had noticed me talking about the Stripe tshirt on Twitter and offered to send me one for free!

That sold me right then and there. They cared, and I trusted they would do a good job. I received a hand written thank you and the tshirt in the mail yesterday. I’ll be a fanboy for life.

It didn’t take much, they didn’t even need to send me a tshirt to gain my trust. All they did was listen and show me some respect. It’s more than you get from most businesses, even when you’re talking in person with someone.

Simple customer service can turn an unsure customer into a fanboy with a simple email. They are more likely to be understanding when you have to raise prices. Netflix could have used this tactic when they raised theirs. Without customers you have nothing. Never forget that.


NoMethodError: undefined method `eq’ for nil:NilClass

Posted October 10, 2011 under News

I ran into this error the other day when trying to update a join table without a primary key:

NoMethodError: undefined method `eq' for nil:NilClass

Unsurprisingly, ActiveRecord freaks out when you don’t have a primary key and gives you this error. Adding a primary key back into the fixes the issue. It’s a little unnecessary, however, it’s important to have a primary key so AR knows which record to update.

If you still don’t want to have a primary key, create a composite key across multiple columns. I ran into this issue because I was using acts_as_list and storing the position in the join table. Updating that position is what lead me down this path.


What Would Steve Jobs Do?

Posted October 7, 2011 under News

Every time I hear someone talk about Steve Jobs it is either insurmountable praise or it’s hatred. The man was a legend. At the very worst, he gave you something amazing to complain about. iPhone 4s not what you expected? Complain that it’s not good enough.

Meanwhile in hundreds of other countries, children are running around shoeless. They have more problems with their feet than you can imagine.

I look around today at who is writing in memory of Steve Jobs. Among them? Larry Page, Sergey Brin, and Vic Gundotra from Google have written amazing little pieces about him. Why would they do that if they’re truly arch nemeses like the media makes them out to be?

That’s right, their not. If they are, they are all men here and know when to draw the line. Life is finite and there is more to it than complaining. With Steve, they set out to take the world places we never expected. You should be too. After all, if you’re not doing the absolute best you could be, what’s the point?

John Gruber put it best:

One of Jobs’s many gifts was that he knew what to give a shit about

It’s as simple as that. So next time you start complaining about something, think about what Steve would do. You may not take his approach, but you can be sure he would want everyone trying their hardest. Go do the same.


The Definitive Guide To Brogramming

Posted October 6, 2011 under News


How To Use A Facebook Access Token In Rake Task

Posted September 26, 2011 under News

Recently I was working on a Rake task that was going to cache updates from Facebook locally. Of course, the permission for what I was doing meant that I needed an access_token to access the Graph API. This is definitely beneficial if you’re wanting to create a cron job or rake task that hits the API periodically.

The access_token you get normally only works while you’re logged in. That doesn’t do you much good in a Rake task. Oh yeah, and the docs don’t do much good either. 14 gray hairs later, I had a working solution that works pretty well.

In order to obtain a “permanent” access_token you need to request permission for offline_access along with any of the permissions you need normally. You’ll also need to setup a Facebook app so that you can use the API key and secret to obtain said token.

Once you’ve got that information it’s pretty simple steps to get what you need. I just fired up a local Rails app so that I could retrieve the postbacks from Facebook OAuth.

First you navigate to this url, replacing it with your API key:

https://graph.facebook.com/oauth/authorize?client_id=YOUR_API_KEY_GOES_HERE&redirect_uri=http://localhost:3000/&scope=read_insights,offline_access

That will make a request to localhost:3000 with a code parameter. Then you visit the following url that contains this code and your api key and secrets.

https://graph.facebook.com/oauth/access_token?client_id=YOUR_API_KEY_GOES_HERE&client_secret=YOUR_API_SECRET_KEY&redirect_uri=http://localhost:3000/&code=THE_CODE_WE_JUST_GOT

And voila, you should get back an access_token. Just save this key and use it in your rake tasks! If you know of a better method of doing this let me know, it certainly doesn’t seem optimum, but it does the trick for now.


« Older | Newer »