Tuesday, July 11, 2017

In Search of the World's Greatest Beach

One of my favorite "getting to know you" questions is: What's your favorite type of vacation? I find that answers normally fall in roughly one of three buckets: ski, beach, or adventure.

I personally have a clear answer to this question, "beach", and I am continually in search of the greatest beach in the world. I've been in the process recently of planning yet another beach vacation and decided to list out my criteria about what makes a great beach.

Emptiness
Beach Depth and Length
Sea Floor & Seaweed
Surf - for me, this axis is a Goldilocks thing. You want some surf, but not too much.
Sand Softness
Water Color
Weather - how often the beach gets sun is a factor, but we'll assume if it's being considered in a "best" list, that the weather is already warm and sunny
Bugs

Let's take some of my recent and favorite beaches and run them against this criteria:
  1. Surfside Beach - Nantucket
  2. Kailua Beach - Oahu, Hawaii
  3. Fruit Stand Beach (my personal name) - Oahu, Hawaii
  4. Medano Beach - Cabo San Lucas, Mexico
  5. Kondoi Beach - Taketomi, Japan

Friday, January 22, 2016

The Best Javascript Autocomplete Libraries Analysis and Roundup

I run a timezone conversion website that has text fields for selecting the locations that you want to convert times between. There's a list of hundreds of common cities for people to choose. I created the site over 5 years ago and made a "Show HN" out of it (this was before there was Product Hunt, and even before there was "Show HN". Back then we called it a "weekend project").

The location text fields use an autocomplete library I chose in the beginning and haven't updated since. These fields aren't working well in Android Chrome and I've been getting a steady stream of emails from users complaining simply that the site "didn't work". An aside, if only everyone knew that when you report a web problem please say your browser, OS, and then both expected and actual behavior.

I decided to do some research on the top Javascript autocomplete libraries. There's tons so I tried to focus on the major ones. Here are my rough notes.

My top two criteria were that the library be:
  • Actively maintained or generally popular
  • Have desktop and mobile browser support
Select2 (active since 2012 / browser: all modern browsers)
Although mobile browser support isn't specifically mentioned in the docs, I tested this on iPhone and Android and found they work just fine. This one handles tags. It's got a long history (up to version 4 and started in 2012).

Because of these positives I went ahead and tried using it within my site. I quickly learned two things. First, it's difficult to customize the styling. Although it doesn't list Bootstrap as a dependency, you realistically need to include it to get things to look right. And then figuring out which classes you need to override to further tweak the appearance is not easy.

The second is questionably performance. All of the examples on their site use the 50 US States, but I tried throwing 1500 options at it and although things seemed ok on my 5 year old laptop and iPhone, a weaker Android tablet took 1-2 seconds between a tap on the control and displaying the dropdown.

Selectize.js (active since 2012 / browsers: ?)
Selectize has a large number of forks on GitHub. It has touch (mobile browser) support and goes back to IE8 with a shim. It was developed by Brian Reavis. It's pretty full feature with a specialization in tags (the blue rounded rectangles frequently found in autocomplete fields). It goes back to 2012 and has been actively maintained since.

Typeahead.js (last active April 2015 / mobile browsers untested)
It ranks highly in Google searches, so that must mean something. The demo on their homepage is impressive. It's got a nice UI, handles boundary cases well like typing meta keys during a search, and originally came from Twitter. All good signs. The bad news. Releases seem to have slowed down with the most recent being April 2015, before hitting 1.0. It's not tested in mobile browsers, although worked in my casual Mobile Safari test.

Ajax Autocomplete for jQuery (recent maintenance / browsers: ?)
Written by Tomas Kirda this is different than the autocomplete widget that is included in jQuery UI. It has lots of initialization options. The most recent commit was November 2015.

jQuery UI Autocomplete Widget (active maintenance / browser: only desktop)
This is the official widget included with jQuery UI (jQuery UI is a curated set of UI widgets built on top of plain old jQuery). It's autocomplete functionality is pretty basic. The library is actively maintained but it's browser support only seems to imply desktop browsers and not mobile.

Chosen (active / browser: explicitly no mobile)
This one seemed great until the lack of mobile browser support.

Inactive libraries I didn't spend much time looking at: Tag-itCompletely

Tuesday, July 28, 2015

Minimal Bootstrap "Hello World"

I hadn't checked out Bootstrap in a while, but came back to it this weekend while working on a side project. I re-read its getting started guide and found that their "hello world" was still too complex for my taste. It included cruft for IE8 support and required uploading extra files to my server.

So I present my own, further slimmed down, version of a Bootstrap hello world example. Bootstrap tells us that all of these lines are necessary:

<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

We then need to include the minified Bootstrap CSS file and a default theme.
  
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
  </head>

I'm using Bootstrap's recommended CDN so there's no need to upload extra files to my own server. Finally, our body includes one simple container with two example columns, and the minified required .js files.
<body>
<div class="container">
  <h1>Hello, world!</h1>

  <div class="row">
    <div class="col-md-6">.col-md-6</div>
    <div class="col-md-6">.col-md-6</div>
  </div>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>
An important note is that I've stripped out elements needed for IE8 support. I also haven't had the chance yet to test this template in IE.


Monday, July 20, 2015

Don't give up?

Not an amazing article, but short enough to be worth recommending:
There’s actually a good name for this in the realm of psychology. It’s called “goal disengagement,” and it’s actually a good thing when you get older. A 2011 study on the topic ... found that a willingness to give up goals that were no longer attainable actually helped decrease depression in the elderly. 
http://www.atlasobscura.com/articles/the-art-of-quitting
It doesn't necessarily support the point made in my previous post but provides incentive and a rational explanation for not persevering beyond the point of failure.

Tuesday, July 14, 2015

Failure and Giving Up

You can't fail, if you don't give up. -- Stephen in The Last Kiss
It's a "deep" statement that isn't obviously true or false.

There's an entrepreneur I know who has tried an idea that has clearly failed. It's failed due to a combination of it not being needed enough and other people doing it better. I don't know which is the killer of his implementation, but one of them is. This person has still not realized that their version won't ever be enough or that it fails to beat competitors' versions. Yet they keep trying. They've failed, but they have not given up.

Here are some signs that tell me they've failed:
  • It's been a long time. The person has been at it for 8+ years. Set a deadline for yourself. If it's over some reasonable amount of time, you're probably deluding yourself.
  • Failure is ignored. The person has already achieved failure. The product has no adoption after repeated attempts. There's no revenue, no recent investment, nothing. The world is saying he's failed but the person is ignoring it. Set metrics for yourself. If you haven't achieved them, you've probably failed.
But here's how the original quote could be true. The most successful founders are "relentlessly resourceful" [PG's great essay]. They are relentless. They do something which is resisted. It doesn't matter how long it's been. It doesn't matter how many signs paint a picture of failure. If they believe, they can make it true. 
  • Maybe you haven't tried for long enough to figure out if the market wants your product. Maybe, with just the right change, growth will accelerate and you'll find product market fit.
  • In the movie the quote is from, this problem is considered in a personal context. You've waited on her doorstep for hours. But maybe it takes days. She's told you there's no hope. But maybe she doesn't mean it. Or maybe she means it but doesn't realize that there is hope, and she just doesn't know it yet.
The problem is, the statements supporting the original quote being true are silly graduation-speech-style stupid self-help statements. In reality, there are thousands of people who believe they can overcome failure but actually can't. They simply morph what they were originally believing into something different, and fool themselves about their original belief.

It's the pessimist in me... but you can fail even if you don't give up. The original statement is not true.

Wednesday, August 1, 2012

Craigslist now asks for exclusive license when posting


I don't remember seeing this before at the bottom of the Craigslist posting form. I'm guessing this is the result of the Padmapper debacle? (bolding mine)
Clicking "Continue" confirms that craigslist is the exclusive licensee of this content, with the exclusive right to enforce copyrights against anyone copying, republishing, distributing or preparing derivative works without its consent.

For comparison, here's Yelp's language:
As such, you hereby irrevocably grant us world-wide, non-exclusive, royalty-free, sublicensable, transferable rights to use Your Content for any purpose.
 And Facebook's:
you specifically give us the following permission, subject to your privacy and application settings: you grant us a non-exclusive, transferable, sub-licensable, royalty-free, worldwide license to use any IP content that you post on or in connection with Facebook
Google:
When you upload or otherwise submit content to our Services, you give Google (and those we work with) a worldwide license to use, host, store, reproduce, modify, create derivative works, communicate, publish, publicly perform, publicly display and distribute such content. 

Saturday, July 14, 2012

Do you know anyone who...?

In the business world, the question "do you know anyone who..." must get asked thousands of times a day. Do you know anyone who... can program? Would be interested in investing? Would be a good fit for this position? Is looking for a job and has this particular skill and background?

I personally get asked this question several times a week. Most of the time it's by a business contact that I'm either friends with or have recently met. Sometimes the question is code for "Are you interested?" But most of the time, when it's used in that way, the sentiment comes bundled with "well if you aren't, do you know someone who might be that you'd recommend?"

Whenever I get asked this question, I struggle to think of names on the spot and often promise that I'll "keep them in mind" afterwards and send anyone I know their way. Although I try to follow-through on this commitment I almost always feel like I'm letting the person down afterwards. In my address book are 728 entries and I probably "know" several more thousand people in Silicon Valley alone.

Not only can I not remember everyone I know, an equally hard if not harder problem is that I don't know what they're all up to. Each person is in a different state of their career progression and while I might know someone with the right skill set to answer the "do you know someone" question getting that person at the right time is difficult.

In a sense, answering this question is an information retrieval problem. The field of information retrieval has the notion of precision versus recall. When people struggle to answer this question they're primarily facing a recall not a precision deficit. In other words, the people they're able to remember are probably pretty good fits (no false positives) but they are likely missing many individuals who would make good candidates (many false negatives).

Why are so many missing? For two big reasons: they can't remember people or they don't know if a person would be a good fit. They're both large components of why the question is tough to answer and I'm not sure which is the larger factor. The first reason is a consequence of how the human brain works. It just isn't made like a computer database, able to lookup thousands of entries in milliseconds by a particular criteria. The second is the lack of perfect information. You might remember that Jane would be a good fit for a particular position, but is she looking for a job right now? Or is she happy as a product manager at Facebook.

Finally, even if you have remembered someone and have recently spoken to them (thus having perfect information) the actual assessment of whether they match the criteria asked in the question is a difficult and fuzzy one. Would an engineer who became a product manager be a good fit for a role at a venture capital firm? It depends. Notice how this assessment of relevance is more complex than picking a restaurant, where the most important relevant factors are likely only location, price, food type, and star rating.

To summarize, why is answering the question "do you know anyone who..." difficult:

  1. Recall - it's impossible to remember everyone you know, especially when trying to filter according to a particular criteria. Your brain isn't designed to sort through thousands of entries and find the correct ones.
  2. Missing or outdated information - even if you remember a person, you might not know that they're looking for a job, unhappy in their current position, or would be enticed by a new role. What's worse, this information is constantly in flux. You might have checked in with a person a two months ago but now they've found a new job.
  3. Complex criteria matching - assuming you've remembered a person and have perfect information about their situation, making an assessment about how well they satisfy the criteria of the question is a difficult one. 
I personally don't like the feeling of not living up to my commitments. I also like the feeling of genuinely having helped someone else out. The solid referrals I've made in the past are some of the more emotionally rewarding "favors" I've been able to perform.

Some of my recent brainstorming has been around building a tool that would better help me (and hopefully many others) better answer this common question. And I believe before thinking about solutions it's best to understand deeply the problems associated with answering it.