I love Google Buzz

I have played with Google Buzz on the web and on Google Maps 4.0. I’ve always been a huge fan of location based services, Google Maps w/Buzz is the ultimate one.

I like the world Google is building for us. There’s soo much data they allow us to access and build around everything.


Not related in anyway note : but well as nobody’s reading (even my girlfriend, isn’t that sad), I guess I can say useless things : I discovered the perfect “computer guy”’s girlfriend : Leah Culver. She is pretty, smart, loves to code and she even likes hamburgers. And she doesn’t seem disturbed by crappy cars.
There must be something wrong with this girl, maybe she’s a succubus from hell.
I reached my quota of useless links.

Posted in English. Tags: , . No Comments »

Google Chrome Browser & OS

The browser
I’ve always been on the BĂȘta version of Google Chrome. And the current bĂȘta (soon to be stable I guess) now supports plugins, the most interesting ones are AdThwart which blocks ads and Gmail Checker which displays the number of received mails.
Making some chrome extensions seems to be really easy, it’s entirely based on javascript.
The other very interesting thing is the developper tools. They are very close to Firebug, it’s now really easy to debug JS and CSS within Chrome.
The browser also bookmarks synchronizing using the google account. But I’m not sure everybody will love this (big brother blah blah blah).

Firebug like developper tools interface :

The OS
It surely starts fast but as, in this beta version, it’s just a browser it’s not really interesting. I hope they will add a lot of stuff around it.

Innovation

Google innovation chick, Marissa Mayer, says in her stanford show :

  • Innovation – Not instant perfection. Launch early and often get to the market.
  • Share everything you can – Information is KEY and powerful.
  • You’re brilliant, we’re hiring – Hire generalists than can speak to all areas of your organization. Specialists create silos.
  • A license to pursue your dreams – Give people a choice us to where they would like to invest their time and thinking.
  • Ideas come from everywhere – The power of many wins.
  • Don’t politic – Use data. Consensus of data wins not power or hierarchy.
  • Creavity loves constraint – Stay in the sandbox and focus on direction/output.
  • Users and usage are key – Money will follow.
  • Don’t kill projects – Morph them. Adjust or tweak and more on.

I really like what she says even if I don’t feel very concerned by the two last points.

For me one of the most interesting thing is the 20% time to work on personal projects. It’s the proof that google trusts their employee to make good use of their time.

This came from a friend’s powerpoint with the title “Google applies agile methodology”. Well, I’m really skeptical about that. I think it’s much wider than that. People do not need to apply any specific methodology if they’re smart and willing to do their work. They’ll get organized by themselves.

By the way, you should look at the other Stanford videos. They are really great. It’s not especially for “entrepreneurs” but for anyone willing to learm from other people experiences.

Access your Google Latitude position from PHP

The code to access your Google Latitude position is even simpler in PHP than it is in .Net :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?PHP
header('Content-Type: text/plain');
 
$userId = '5616045291659744796';
 
if ( $_GET['user'] ) {
	if ( is_numeric( $_GET['user'] ) )
		$userId = $_GET['user'];
	else
		exit('This isn\'t a valid user id.');
}
 
$url = 'http://www.google.com/latitude/apps/badge/api?user='.$userId.'&type=json';
 
// We get the content
$content = file_get_contents( $url );
 
// We convert the JSON to an object
$json = json_decode( $content );
 
$coord = $json->features[0]->geometry->coordinates;
$timeStamp = $json->features[0]->properties->timeStamp;
 
if ( ! $coord ) 
	exit('This user doesn\'t exist.');
 
$date = date( 'd/m/Y H:i:s', $timeStamp );
$lat = $coord[1];
$lon = $coord[0];
 
echo $date.' : '.$lat.' x '.$lon;
?>

This program is available for testing here. It requires PHP 5.2.0 to run the json_decode method.

I think this is the power of PHP, you can make some powerful code in no time. The drawback is that it’s really slow, and it becomes even slower if you begin to use heavy objects (and objects are often heavy). And I personally think it’s much easier and safer to debug and maintain complex .Net programs than complex PHP programs.

Access your Google Latitude position from a .Net app

When I saw that Google Latitude now enables you to access your data by a JSON feed, I decided to make it communicate with a little GPS tracking project of mine.

I’m really found of all these ways we now have to make anything communicate with anything. You can build interfaces from any system to any other system really easily.

This code enables you to automatically get your GPS position (or the position of a friend) from your JSON Latitude feed. To be able to do that, you have to enable your KML/JSON feed.
It requires .Net 3.5’s System.Web.Extensions

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
using System;
using System.Collections.Generic;
using System.Text;
using System.Web.Script.Serialization;
using System.Net;
using System.IO;
 
namespace LatitudeReader {
	class Program {
		static void Main() {
 
			Console.WriteLine( "What is your user id ?" );
 
			var userId = Console.ReadLine();
 
			if ( userId == String.Empty )
				userId = "5616045291659744796";
 
			// Url of the JSON Latitude feed
			var url = String.Format( "http://www.google.com/latitude/apps/badge/api?user={0}&type=json", userId );
 
			// We download the file
			var ms = new MemoryStream();
			Download( url, ms );
 
			// JSON in text format
			var textContent = UTF8Encoding.UTF8.GetString( ms.ToArray() );
 
			// We convert the JSON text file to an object
			// It returns 
			var jss = new JavaScriptSerializer();
			var jsonContent = jss.DeserializeObject( textContent ) as Dictionary<String, Object>;
 
			// We get the data
			var features = ( jsonContent[ "features" ] as object[] )[ 0 ] as Dictionary<string, object>;
			var geometry = features[ "geometry" ] as Dictionary<string, object>;
			var coordinates = geometry[ "coordinates" ] as object[];
			var lon = coordinates[ 0 ] as decimal?;
			var lat = coordinates[ 1 ] as decimal?;
 
			// And then the timestamp
			var properties = features[ "properties" ] as Dictionary<string, object>;
			var date = ConvertFromUnixTimestamp( (double) (int) properties[ "timeStamp" ] );
 
			// We convert the UTC date to local time
			date = date.ToLocalTime();
 
			Console.WriteLine( "{0} : {1} x {2}", date, lat, lon );
		}
 
		public static DateTime ConvertFromUnixTimestamp( double timestamp ) {
			DateTime origin = new DateTime( 1970, 1, 1, 0, 0, 0, 0 );
			return origin.AddSeconds( timestamp );
		}
 
		private const int BUFFER_SIZE = 1024;
 
		private static void Download( string url, Stream writeStream ) {
			var request = (HttpWebRequest) WebRequest.Create( url );
			var response = request.GetResponse();
 
			var readStream = response.GetResponseStream();
 
			var data = new Byte[ BUFFER_SIZE ];
 
			int n;
			do {
				n = readStream.Read( data, 0, BUFFER_SIZE );
				writeStream.Write( data, 0, n );
			} while ( n > 0 );
 
			writeStream.Flush();
			readStream.Close();
		}
	}
}

The only references you need are : System and System.Web.Extensions