Thursday, November 13, 2008
Google Chart API
It's no secret I'm a big fan of Google most developers are. I've been using the Google chart API a lot lately and thought it should get some exposure in my Blog. For those of you that follow my blog you really should be using this API. It's so darn simple and has no overhead because google takes the hit on processing!
You simply use a URL to get your chart so you're ultimately limited by the URL length and their encoding. While this wont be a full featured reporting system like Jasper or Pentaho putting quick graphs on a webpage or website is a piece of cake.
http://chart.apis.google.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World

Is google's chart example and it's simple and elegant. You can use any type of code to generate your URL.
Google has a javascript code that can encode the URL with values to save space.
I wrote some PHP code (below) that you can use to encode the same type of array with PHP. This has the advantage of calling a function to encode it within your PHP page.
You should use this sort of API an in any website where you dont want (or need) to have a full blown reporting engine. Stats and metrics can easily be charted with this. Additionally when you read the full API you'll see you can also change colors, control chart types and do all sorts of neat stuff with it.
These charts look great too. Since the cost is low (Free) and the use is simple this is a great way to splash up any webpage with some simple calls to a URL. Google allow you to do 250K of these requests a day which would be a lot for most websites. A little tip too this saves on your overall badwidth on your website too. 250K requests for a 4.8K chart image is about 1.2 gig in bandwidth. So google gives you that for free too. Unless you need some high customization there is no reason you shouldn't be using this everywhere.
Happy Charting!
You simply use a URL to get your chart so you're ultimately limited by the URL length and their encoding. While this wont be a full featured reporting system like Jasper or Pentaho putting quick graphs on a webpage or website is a piece of cake.
http://chart.apis.google.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World
Is google's chart example and it's simple and elegant. You can use any type of code to generate your URL.
Google has a javascript code that can encode the URL with values to save space.
I wrote some PHP code (below) that you can use to encode the same type of array with PHP. This has the advantage of calling a function to encode it within your PHP page.
You should use this sort of API an in any website where you dont want (or need) to have a full blown reporting engine. Stats and metrics can easily be charted with this. Additionally when you read the full API you'll see you can also change colors, control chart types and do all sorts of neat stuff with it.
These charts look great too. Since the cost is low (Free) and the use is simple this is a great way to splash up any webpage with some simple calls to a URL. Google allow you to do 250K of these requests a day which would be a lot for most websites. A little tip too this saves on your overall badwidth on your website too. 250K requests for a 4.8K chart image is about 1.2 gig in bandwidth. So google gives you that for free too. Unless you need some high customization there is no reason you shouldn't be using this everywhere.
Happy Charting!
Thursday, September 04, 2008
1PB Storage, $17,8800 Not bad eh?
So today while looking at the tiger direct deal for a $149 1TB SATA drive I wondered "just how long before someone has the 1PB (Petabyte) system. Well quick search into google and I found one. Check this article out.
What is interesting is that a 1GB Seagate drive in 1995 cost $849, today, a 1TB drive for end consumers (13 years later) is only $149 at Tiger Direct. So how long for the 1TB drive?
Doing the math you can get 1200 SATA drives, chain 'em together and get 1PB of storage. A bit pricey for me though.
What is interesting is that a 1GB Seagate drive in 1995 cost $849, today, a 1TB drive for end consumers (13 years later) is only $149 at Tiger Direct. So how long for the 1TB drive?
Doing the math you can get 1200 SATA drives, chain 'em together and get 1PB of storage. A bit pricey for me though.
Tuesday, September 02, 2008
Google Chrome Anyone?
Wow, what a great first impression. I downloaded Google Chrome today. Installed the beta and now have it currently set as my default browser. I tried the IE8 beta and instantly turned it back to IE7 Compatibility. With Chrome I've only submitted 2 sites now that haven't looked right. IE8 I didn't bother because everything looked funky.
Now being who I am I have to start digging into Chrome and under the hood. From a web developer standpoint I think Chrome will fair well so far. Out of the box websites look good. I dont see huge problems in compatibility. DOM seems to be sane and jQuery heavy pages work just fine.
I like the clean look however IMHO google has very minimalist applications. Why GoogleTalk is still lacking features like grouping is beyond me. This post is about Chrome though.
I have to say it is worth trying out. I enjoy using it and unlike the IE8 beta I dont feel like i'm being forced anything down my throat. Guess that's why Microsoft Developers leave for google all the time. Why don't I work for Google?
It's no surprise I'm a google fan and I like the fresh thinking with the browser. Seems fast, looks great and does the job. I'll blog about it later after I've kicked the tires some more. So far only good things to say...
Now being who I am I have to start digging into Chrome and under the hood. From a web developer standpoint I think Chrome will fair well so far. Out of the box websites look good. I dont see huge problems in compatibility. DOM seems to be sane and jQuery heavy pages work just fine.
I like the clean look however IMHO google has very minimalist applications. Why GoogleTalk is still lacking features like grouping is beyond me. This post is about Chrome though.
I have to say it is worth trying out. I enjoy using it and unlike the IE8 beta I dont feel like i'm being forced anything down my throat. Guess that's why Microsoft Developers leave for google all the time. Why don't I work for Google?
It's no surprise I'm a google fan and I like the fresh thinking with the browser. Seems fast, looks great and does the job. I'll blog about it later after I've kicked the tires some more. So far only good things to say...
Thursday, August 28, 2008
Fun IT Stuff
This tasty little nugget I received from a friend. There is some serious fun you can have with those pesky neighbors who hijack your wifi. I personaly use WEP on mine but you might find it entertaining just a fun joke to play on your friends.
Not your typical development stuff, but amusing at the very least.
Not your typical development stuff, but amusing at the very least.
Search Site