William Kasel's Posterous

Entrepreneur, and Mobile Technology Evangelist

Death of the checkin

How do you define a fad? How do you know when you're falling victim to what could easily end up being a fad? Our generation is obsessed with labels, and in the tech industry this is even more true. We love to label things "dead pooled", or passed. But seriously, what defines a fad? Was Twitter a fad? How about Foursquare? 

Checkins declined from 5% to 4% in May of this year. Yes, that was before Facebook Places launched, but don't be confused its not something here to stay. Now, don't get me wrong - Location is here to stay, but the way we interact with it is going to be more transparent. 

In the "future", as they say, we will be more open to sharing our location, and will automatically know when we are near a deal, a friend, or someone with similar interests. For example, a friend runs a location-based dating startup Urban Signals - this app allows you to find singles nearby. I imagine that the ideal situation would be if you happen to be near someone the app thinks you should be paired with - it would alert you. This isn't a technological hurdle, moreover, it is a social hurdle, and a privacy one. 

So, has the buzz around Foursquare warn off? I'd say yes, and furthermore, it has marked the beginning of the end of the checkin. 

 

iOS4 Hi Resolution PSD (Hacked)

UPDATE: Teehan & Lax has put up the new retina display PSD: here is the link http://www.teehanlax.com/blog/2010/08/12/iphone-4-gui-psd-retina-display/

If you have started developing for iOS4, and the iphone 4, you may have noticed the high-rez version is not available from Teehan & Lax yet, so in the meantime, I quickly just imported their PSD into photoshop, and adjusted the size. I have been designing with this for some time and thought I'd share it.

Here is the link: http://dl.dropbox.com/u/8423118/iPhone%20GUI%20PSD%204-hi-rez.psd.zip

The Resolution is 326 PPI, and remember - the screen size is 960 x 640.

(original Teehan Link : http://www.teehanlax.com/blog/2010/06/14/iphone-gui-psd-v4/)

Posted July 22, 2010

Using IP 2 Location in PHP to group users to networks.

Since this is posterous, and I have little patience to write these kind of things anyway, i'll keep this brief. 

For anyone who has ever played with IP 2 Location, it can be a bit daunting due to the massive file-size, and the use of the .bin file - but here are a few tips that will help you wade through that mess.

  1. Ignore the .bin file - use the cvs file, and import it into MySQL
  2. Upload the file to the server first, then import to MySQL.
  3. example: [ LOAD DATA INFILE "**(put your server root here (eg. /www/vhosts/www.example.com/htdocs/)** IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE.SAMPLE.CSV" INTO TABLE IPCountryRegionCityLatitudeLongitude FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n'; ]
  4. Do not try to upload that gigantic CSV to phpMyAdmin, it will time-out and tell you there is a formatting issue - this is because it stopped importing halfway through, so the last character it got was probably not a ; or a ,
  5. Once the CSV is imported - the hard part is over.

So after all that you are finally ready to start working with the DB. Remember that it isn't perfect, but it's not too far off. If you want a perfect system use Loki.

The script I wrote determines if you are within 200 Miles of a given metro, and if so, it can *do* something. In this instance it serves a different advertisement. We use Haversine forula which can be precise down to 1 meter, which is a bit of overkill for using IP2Location, but it does the job (and then some). For this example take a look at the distance calculator (from the app class): 

...

var $gR = 6371; //The distance around the world

var $met2eng = .621371192; // metric to english conversion (meters 2 feet)

...

function LatLonDistCalc($lat1, $lon1, $lat2, $lon2){

$dLat = deg2Rad(($lat1-$lat2));

  $dLon = deg2Rad(($lon1-$lon2));

    $gA = asin($dLat/2) * asin($dLat/2) + acos(deg2Rad($lat1)) * acos(deg2Rad($lat2)) * asin($dLon/2) * asin($dLon/2);

$gC = (atan2(sqrt($gA), sqrt(1-$gA))*2);

  $gD = $this->gR * $gC;

  return $gD;

}

The above is derived from the following:

R = earth’s radius (mean radius = 6,371km)

Δlat = lat2− lat1

Δlong = long2− long1

a = sin²(Δlat/2) + cos(lat1).cos(lat2).sin²(Δlong/2)

c = 2.atan2(√a, √(1−a))

d = R.c

We get the IP's Lat/Lon then run it through the aforementioned formula, and compare that to a list of metro's (inc/metro.inc.php) to figure out if it is in that particular metro.

Here is the source: http://www.williamkasel.com/files/locale-api-v2.zip .

Feel free to comment, or show some ideas you have to make it better.

Filed under  //   Geocoding   IP2Loction   PHP   Programming   code  
Posted July 20, 2010

New Site Personal Site, New Company Coming Soon

I'm pleased to announce a new williamkasel.com, it's simple yet descriptive. Also - my business partner Laura Castaneda and I are launching a new company soon, TappLocal is hyperlocal mobile ads. Sign up for the beta!

Posted July 20, 2010

robo.to rocks

Signed up for the beta a few weeks ago - just got accepted - robo.to is pretty cool. Check me out at robo.to/wkasel.

Posted May 18, 2009