When Sears was a startup

Therainfallsalike

The rain falls alike on the Just and Unjust. All should be supplied with mackintoshes

I'm here in Seattle for a quick family visit (though I couldn't resist visiting a couple of the local startups) and I found myself flicking through a copy of the 1897 Sears catalog left at our B&B. I was astonished at the energy that leapt off every page, these guys were building their own startup! Here's what seemed so familiar:

On a mission with a new business model. They can't stop talking about how they're cutting out the middle men who've been gouging their customers, with pages devoted to messianic rants against the monopolies trying to put them out of business. They contrast their order fulfillment process (dozens of clerks dealing with tens of thousands of orders a day) with the inefficient country stores full of assistants being paid to idly wait for customers, explaining how they can offer such low prices despite the shipping.

The customers are their evangelists. Want to save on shipping? Here's some examples of how you can get $10 of goods for $6 by persuading your neighbors to order along with you.

Information wants to be free
. Want to know more than you ever believed possible about all the differences in pocket-watch mechanisms? Here's several pages of detail that your local jeweler will never tell you, but we want you to understand what you're buying so you'll feel comfortable buying sight-unseen.

Trust in technology
. The very notion of sending money to some company a thousand miles away and hoping they'll send you decent goods in return was a leap of faith even bigger than typing your credit card into a web site. Instead of SSL certificates, they have an engraving of their building and letters from their bankers.

Searsfarm

Selling a dream. They knew people weren't just looking to buy something when they picked up the catalog, so they offer a hope of a better life in their descriptions and illustrations. People didn't just want barbed wire, they wanted that perfect farm, and Sears used that to sell.

They were completely nuts:

Searsdogpower

Like most innovators, they weren't afraid to screw up. Happily I'm pretty certain this dog-powered butter-churner never hit the mainstream, but they have thousands of new product ideas they were constantly trying out, along with really zany ads.

Grasssuits

Sure, online ad placement can be weird, but a real human being decided people interested in grass suits for hunting wild geese will also like a nice pram!

The BOSS, Bing and Google search APIs from a legal perspective

JudgewigsPhoto by Steve Punter

One of the most promising features of the cloud is the ability to leverage other companies' APIs to power your business. More than just saving money, it lets you do things that would be impossible for a startup to build in-house, like a search index for the whole web.

Of course there's always a downside. As Todd Vernon points out in his latest blog post, you're trusting a third-party with your company's future. This is an especial problem with Google since they tend to automate everything, so it can be near impossible to reach a real human being to fix any problems if they do decide to cut off your access. Jud Valeski spotted a classic example of this when some API providers 86-ed IP addresses on App Engine and EC2.

With those fears in mind, it was great to read Jay Parkhill's analysis of the BOSS, Bing and Google Search APIs. There's still plenty of ambiguity left in the agreements, and I've no doubt that the providers could arbitrarily cut me off despite anything in the terms, but it's a great insight into what the providers care about. It should make it a lot easier to skirt any uses that would hit hot-button issues for them, so I'm very grateful to Jay for taking the time to research this.

Why I switched my search API from Bing to Google

Googlelogo
Image by Mark Knol

Going through the Techstars program, a few of my mentors worried about how much I was revealing through my blog. Fundamentally it isn't a calculation, I love what I'm doing and I love talking about it, but I just ran into yet another situation where being open paid off.

Joehtweet

Joe Heitzeberg dropped me that note in reply to my last blog post on switching to Bing from BOSS, and it was gold-dust. I was aware of the Ajax API from a couple of years ago, but when I last looked into Google's offerings they were extremely restrictive about what you could do with the interface. Checking out their documentation I saw they talk about more than client-side apps, they offer a REST interface and even have some PHP examples! The terms-of-service don't prohibit non-client use, though they do specify that your application must be freely available to users.

After a bit of experimentation I was able to get it up and running, and it made me extremely happy. In the test case I'm running, Google finds 44 Facebook profile pages for Susan Fogg, Bing finds 6 and BOSS only finds 1. That makes a massive difference to the usefulness of the friend suggestion part of Mailana.

There are a few wrinkles to the API. By default it only returns 4 results per call, and I had to add the &rsz=large to get 8. Since I'm getting 50 at a time from the other providers, I then had to loop through adding &start=0, &start=8 , etc to pull in multiple pages. Google also don't include possible duplicate results by default, but adding &filter=0 fixed that.

Updated code included inline below, or you can download the complete source here

<?php

// You'll need to get your own API keys for these services. See

// http://developer.yahoo.com/wsregapp/

// http://www.bing.com/developers/createapp.aspx

// http://code.google.com/apis/ajaxsearch/signup.html

define('BING_API_KEY', '');

define('YAHOO_API_KEY', '');

define('GOOGLE_API_KEY', '');

function pete_curl_get($url, $params)

{

$post_params = array();

foreach ($params as $key => &$val) {

  if (is_array($val)) $val = implode(',', $val);

$post_params[] = $key.'='.urlencode($val);

}

$post_string = implode('&', $post_params);

$fullurl = $url."?".$post_string;

$ch = curl_init();

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

curl_setopt($ch, CURLOPT_URL, $fullurl);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_USERAGENT, 'Mailana (curl)');

$result = curl_exec($ch);

curl_close($ch);

return $result;

}

function perform_boss_web_search($termstring)

{

$searchurl = 'http://boss.yahooapis.com/ysearch/web/v1/&#039;;

$searchurl .= urlencode($termstring);

$searchparams = array(

'appid' => YAHOO_API_KEY,

'format' => 'json',

'count' => '50',

);

$response = pete_curl_get($searchurl, $searchparams);

$responseobject = json_decode($response, true);

error_log(print_r($responseobject, true));

if ($responseobject['ysearchresponse']['totalhits']==0)

return array();

$allresponseresults = $responseobject['ysearchresponse']['resultset_web'];

$result = array();

foreach ($allresponseresults as $responseresult)

{

$result[] = array(

'url' => $responseresult['url'],

'title' => $responseresult['title'],

'abstract' => $responseresult['abstract'],

);

}

return $result;

}

function perform_bing_web_search($termstring)

{

$searchurl = 'http://api.bing.net/json.aspx?&#039;;

$searchurl .= 'AppId='.BING_API_KEY;

$searchurl .= '&Query='.urlencode($termstring);

$searchurl .= '&Sources=Web';

$searchurl .= '&Web.Count=50';

$searchurl .= '&Web.Offset=0';

$searchurl .= '&Web.Options=DisableHostCollapsing+DisableQueryAlterations';

$searchurl .= '&JsonType=raw';

$response = pete_curl_get($searchurl, array());

$responseobject = json_decode($response, true);

if ($responseobject['SearchResponse']['Web']['Total']==0)

return array();

$allresponseresults = $responseobject['SearchResponse']['Web']['Results'];

$result = array();

foreach ($allresponseresults as $responseresult)

{

$result[] = array(

'url' => $responseresult['Url'],

'title' => $responseresult['Title'],

'abstract' => $responseresult['Description'],

);

}

return $result;

}

function perform_google_web_search($termstring)

{

$start = 0;

$result = array();

while ($start<50)

{

$searchurl = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&#039;;

$searchurl .= '&key='.GOOGLE_API_KEY;

$searchurl .= '&start='.$start;

$searchurl .= '&rsz=large';

$searchurl .= '&filter=0';

$searchurl .= '&q='.urlencode($termstring);

$response = pete_curl_get($searchurl, array());

$responseobject = json_decode($response, true);

if (count($responseobject['responseData']['results'])==0)

break;

$allresponseresults = $responseobject['responseData']['results'];

foreach ($allresponseresults as $responseresult)

{

$result[] = array(

'url' => $responseresult['url'],

'title' => $responseresult['title'],

'abstract' => $responseresult['content'],

);

}

$start += 8;

}

return $result;

}

if (isset($_REQUEST['q'])) {

$termstring = urldecode($_REQUEST['q']);

} else {

$termstring = '';

}

?>

<html>

<head>

<title>Test page for Google, BOSS and Bing search apis</title>

</head>

<body>

<div style="padding:20px;">

<center>

<form method="GET" action="searchexample.php">

Search terms: <input type="text" size="40" name="q" value='<?=$termstring?>'/>

</form>

</center>

</div>

<?php

if ($termstring!='') {

$googleresults = perform_google_web_search($termstring);

$bingresults = perform_bing_web_search($termstring);

$bossresults = perform_boss_web_search($termstring);

print '<br/><br/><h2>Google search results ('.count($googleresults).')</h2><br/>';

foreach ($googleresults as $result) {

print '<a href="'.$result['url'].'">'.$result['title'].'</a><br/>';

print '<span style="font-size:80%">'.$result['abstract'].'</span><br/><hr/>';

}

print '<br/><br/><h2>Bing search results ('.count($bingresults).')</h2><br/>';

foreach ($bingresults as $result) {

print '<a href="'.$result['url'].'">'.$result['title'].'</a><br/>';

print '<span style="font-size:80%">'.$result['abstract'].'</span><br/><hr/>';

}

print '<br/><br/><h2>BOSS search results ('.count($bossresults).')</h2><br/>';

foreach ($bossresults as $result) {

print '<a href="'.$result['url'].'">'.$result['title'].'</a><br/>';

print '<span style="font-size:80%">'.$result['abstract'].'</span><br/><hr/>';

}

}

?>

Why I switched my search API from BOSS to Bing

Bing

I'm a massive fan of Yahoo's developer tools, I think they're massively underrated by geekdom, and I'm still heavily reliant on their geo-coding services like Placemaker. It makes me pretty sad to admit I've recently switched from Yahoo BOSS to Bing's search API, so I thought I'd share my reasons, together with some PHP sample code.

In a nutshell, BOSS wasn't finding enough results for the sort of work I'm doing. Here's an example search, looking for people called Susan Fogg with public Facebook profiles:

http://www.bing.com/search?q=site%3Awww.facebook.com%2Fpeople+intitle%3A%22Susan+Fogg%22
6 results

http://search.yahoo.com/search?p=site%3Awww.facebook.com%2Fpeople+intitle%3A%22Susan+Fogg%22
1 result

http://www.google.com/search?q=site%3Awww.facebook.com%2Fpeople+intitle%3A%22Susan+Fogg%22&filter=0
15 results

This is not a scientific survey by any means, but Bing seems to index a lot more of the obscure pages on social networks than Yahoo. If only Google offered an API, they would be even better, but switching to Bing still offers a big improvement for my application.

I was nervous that Bing would be crippled by usage terms, but luckily they are effectively unrestricted and can be used for non-user-facing applications like mine.

Here's the code I'm using, as a download or included inline below:

<?php

// You'll ned to get your own API keys for these services. See
// http://developer.yahoo.com/wsregapp/
// http://www.bing.com/developers/createapp.aspx
define('BING_API_KEY', '');
define('YAHOO_API_KEY', '');

function pete_curl_get($url, $params)
{
    $post_params = array();
    foreach ($params as $key => &$val) {
      if (is_array($val)) $val = implode(',', $val);
        $post_params[] = $key.'='.urlencode($val);
    }
    $post_string = implode('&', $post_params);

    $fullurl = $url."?".$post_string;

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($ch, CURLOPT_URL, $fullurl);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mailana (curl)');
    $result = curl_exec($ch);
    curl_close($ch);

    return $result;
}

function perform_boss_web_search($terms)
{
    $searchurl = 'http://boss.yahooapis.com/ysearch/web/v1/&#039;;
    $searchurl .= urlencode(implode(' ', $terms));
    $searchparams = array(
        'appid' => YAHOO_API_KEY,
        'format' => 'json',
        'count' => '50',
    );

    $response = pete_curl_get($searchurl, $searchparams);
   
    $responseobject = json_decode($response, true);
   
    if ($responseobject['ysearchresponse']['totalhits']==0)
        return array();
   
    $allresponseresults = $responseobject['ysearchresponse']['resultset_web'];

    $result = array();
    foreach ($allresponseresults as $responseresult)
    {
        $result[] = array(
            'url' => $responseresult['url'],
            'title' => $responseresult['title'],
            'abstract' => $responseresult['abstract'],
        );
    }

    return $result;
}

function perform_bing_web_search($terms)
{
    $searchurl = 'http://api.bing.net/json.aspx?&#039;;
    $searchurl .= 'AppId='.BING_API_KEY;
    $searchurl .= '&Query='.urlencode(implode(' ', $terms));
    $searchurl .= '&Sources=Web';
    $searchurl .= '&Web.Count=50';
    $searchurl .= '&Web.Offset=0';
    $searchurl .= '&Web.Options=DisableHostCollapsing+DisableQueryAlterations';
    $searchurl .= '&JsonType=raw';

    $response = pete_curl_get($searchurl, array());
   
    $responseobject = json_decode($response, true);
    if ($responseobject['SearchResponse']['Web']['Total']==0)
        return array();
   
    $allresponseresults = $responseobject['SearchResponse']['Web']['Results'];

    $result = array();
    foreach ($allresponseresults as $responseresult)
    {
        $result[] = array(
            'url' => $responseresult['Url'],
            'title' => $responseresult['Title'],
            'abstract' => $responseresult['Description'],
        );
    }

    return $result;
}

if (isset($_REQUEST['q'])) {
    $terms = explode(' ', urldecode($_REQUEST['q']));
} else {
    $terms = array();
}

$termstring = implode(' ', $terms);
?>
<html>
<head>
<title>Test page for BOSS and Bing search apis</title>
</head>
<body>
<div style=&quot
;padding:20px;">
<center>
<form method="GET" action="index.php">
Search terms: <input type="text" size="40" name="q" value="<?=$termstring?>"/>
</form>
</center>
</div>
<?php
if (count($terms)>0) {

    $bingresults = perform_bing_web_search($terms);
    $bossresults = perform_boss_web_search($terms);

    print '<br/><br/><h2>Bing search results ('.count($bingresults).')</h2><br/>';
    foreach ($bingresults as $result) {
        print '<a href="'.$result['url'].'">'.$result['title'].'</a><br/>';
        print '<span style="font-size:80%">'.$result['abstract'].'</span><br/><hr/>';
    }

    print '<br/><br/><h2>BOSS search results ('.count($bingresults).')</h2><br/>';
    foreach ($bingresults as $result) {
        print '<a href="'.$result['url'].'">'.$result['title'].'</a><br/>';
        print '<span style="font-size:80%">'.$result['abstract'].'</span><br/><hr/>';
    }

}

?>

Net Promoter Score (NPS) Example Code

Orb
Photo by Jjjohn

I first ran across the Net Promoter Score through a post by Eric Ries and it seems like a simple but effective measure of how happy your customers are. Its beauty is how basic it is, which both makes it easy to interpret and straight-forward to gather without annoying your customers.

Unfortunately there don't seem to be any off-the-shelf solutions to help gather the information. In the past I've created surveys through companies like SurveyMonkey, but that's both a pretty intrusive experience and they don't give you any way to calculate an NPS without downloading the raw data into Excel and doing it yourself!

What I wanted was a way to survey my customers from within the site, without sending them to an external page or another window, store the results on my own server and then have a simple way of viewing reports on the data over time. Since there was nothing else out there, I wrote a simple Javascript/PHP/MySQL module to handle these requirements, and since I'm sure there are other people who could use something similar and I hate seeing wheel-reinvention, I've released it under a BSD license.

It works by randomly bringing up an in-page popup, asking the user whether they'd recommend the service to a friend, and then requesting any other comments. The data gets passed back to the server and stored in the database, where you can then get a very basic HTML report, or pull the data as JSON to pass into your metrics pipeline, for things like daily email reports.

You can download the code here:
http://code.google.com/p/npspopup/

If you want to try in action, here's the demo page:
http://web.mailana.com/labs/npspopup/index.php

I'm testing it on my own site but the code is still pretty pre-alpha, so don't be shy with bug-fixes and other modifications.

Lean Startup Workshop Review

Workshop
Photo by Dammit Jack

Eric Ries is on a nationwide tour for the next couple of months, and I was lucky enough to attend his Lean Startup Workshop right here in Boulder. If you're not familiar with Eric's work, he's a serial startup founder who's made it his mission to save the world from the avalanche of tech companies that fail. At the start of the workshop he brought up a wall of well-known web 2.0 company logos, with all the dead ones marked. It was sobering, but what really drove him crazy wasn't that most failed tech startups never had a single paying customer!

The Customer Development process is aimed at solving that problem, and Eric started us off with a little taster by splitting us up into groups to write down a description of who we thought the customers of the workshop would be. We then took those descriptions and tried to turn them into yes/no qualifying questions that we could use to distinguish customers from non-customers.

After that I had a chance to quiz Eric about one of the underlying assumptions of the philosophy, that market risk is far more important these days than technology risk to software startups. This wasn't true in the dot-com era, it took millions of dollars and obscure technology to build an interactive website, and a lot of the startup world has been slow to adapt as things have changed. As he put it, democratizing technology means the technology risk is reducing.

This is a bitter pill for me to swallow in some ways, my background is tech-heavy so it would be to my advantage to have more technical barriers, but as an unfunded startup it's also amazing how much I can accomplish on a shoestring budget these days.

Eric spent the rest of the workshop doing a fireside chat as we went through his slides. My favorite part was the cringe-inducing video of Ali G pitching his 'icecream glove' to VCs. I defy any entrepreneur to watch that and not feel a twinge of recognition. What I got out of the talk was a much stronger grasp of the customer discovery process. He spent a lot of time talking about their experiences at IMVU, as all the pesky teenagers using the service prevented them getting in touch with who they thought their real customers were, stay-at-home moms. Of course the punch-line was that their real customers, at least at first, were those kids and they had to learn to build the business around them.

One of his observations was that there was no substitute for bringing in customers and having a face-to-face chat with them about the product, the bandwidth is massively higher thanks to body language and other subtle clues. The same goes for this workshop, compared to reading Eric's writing. We had a chance to ask questions and to watch Eric jam on a topic, really getting across the experiences that drove him to his conclusions.

A lot of my focus has been on the metrics side of the process, maybe unconsciously because as a techie that's a lot less threatening than spending lots of time meeting people! The workshop helped me take a wider view of Customer Development, but it did also make me wish there were more tools being shared for some of the common techniques. I've posted some code to generate a simple daily metrics email, and it sounds like Eric might be working with KISSmetrics to produce an A/B testing framework, but there's still a lot of us reinventing things like a NPS popup and recording system. I'm hoping to put some of these components into the Lean Startup Wiki over the next week.

I'd highly recommend this workshop to anyone who wants customers for their startup, it's a great way to learn both from Eric himself and from the like-minded people who'll be there with you. Check out the wiki or Eric's blog to see if there's going to be one near you.

Three books for entrepreneurs

Threebooks Photo by Tim Green

I don't like Fred Wilson and Brad Feld's entrepreneurial books you should read before you're 21. Actually, I love most of the books they mention, but they're the same list I'd recommend to anyone who wants a positive and fulfilling life. You need a special brand of insanity to be an entrepreneur, and stories from the trenches are a much better introduction to that world.

Read these three books, with all their years of painful struggle, frequent failures and rare shining moments of achievements and picture yourself going through the same journey. For me they're inspirational, but a lot of people seem to run away screaming when confronted with the reality of startup life.

The Mousedriver Chronicles

Two MBA students are inspired to turn their business plan of a computer mouse shaped like a golf driver into reality. They start off with no clue how to sell or even make the product, but they spend a year working extremely hard and by the end they finally start to take off. The best part is their honesty about the grueling process of connecting with the right people. They would literally be cold-calling companies from the yellow pages, and if they got someone vaguely sympathetic and knowledgeable, pump them for any help they could.

Starting Something

Wayne McVicker was a founder of Neoforma, a healthcare startup that IPO-ed in the dot-com boom. What marks the book out as something special is his focus on the failures and disappointments that accumulated as he built his company, and his personal run-ins with depression. What kept him going through the dark times was the "hope that someday it would again deliver amazing value to customers", and that shines through his story.

No Vision, All Drive

Pinpoint went through multiple near-death experiences to a very successful exit, and David Brown chronicles everything from the early stumbles to the final sale. Despite the title they did have a vision, but it was just to serve their customers incredibly well, and the book shows much work and struggle it takes to turn that simple phrase into reality. The strength of the book is how well the employees are sketched. My favorite part of being an entrepreneur is that if you're successful, you have a massive positive impact on everyone around you. The employees stories show how Pinpoint literally changed their lives, not only giving them a salary but helping them develop new skills and finally sharing in the company's acquisition.

I’ve never won with (just) a great idea

Lightbulbexplodes
Photo by Eqqman

For the successful products I've worked on, the process has always been like this:

1 – Take an general idea (eg there's a lot of valuable data in everyone's inbox that can be used to solve problems)
2 – Think through some practical applications and users
3 – Prototype the product, and try it out on people
4 – Take what clicked, if anything, and repeat steps 3 and 4 until you have something awesome

I have a bias against big visions, pre-market analysis, or even having a detailed plan up-front. I prefer to bet on my ability to execute the product development stages really well and end up in a good place.

This is not how most people work, and it's definitely not what potential investors and other people involved in evaluating a startup want to hear. I've spent the last few months focused on selling other people on my ideas for where I can take the business, rather than iterating on the product. What I've found is that I'm just not that great at communicating a grand vision. In my heart I believe you always start off with a product that sucks, and you find your way to Jesus through your interactions with customers.

With that in mind, over the next couple of months I'm going to play to my strengths and focus on getting more folks using Mailana and helping me improve the product. If you're interested in helping, please sign up for beta testing!