Amazon announces micro instances

Micro instance pricing for On-Demand instances starts at $0.02 per hour for Linux and $0.03 per hour for Windows. That translates to monthly costs of US$14.88 if hosted in North Virginia and US$18.60 if hosted in Singapore (Asia Pacific). Prices have yet to include bandwidth and EBS storage charges.

Lately I’ve been looking at Linode’s 512MB VPS offering that would set me back US$19.95 monthly which includes storage and bandwidth. This new Amazon announcement is particularly attractive due to the option of having a website hosted closer to me (i.e. Singapore).

So what are micro instances

According to Amazon (link to the EC2 page): “Instances of this family provide a small amount of consistent CPU resources and allow you to burst CPU capacity when additional cycles are available. They are well suited for lower throughput applications and web sites that consume significant compute cycles periodically. Micro Instance 613 MB of memory, up to 2 ECUs (for short periodic bursts), EBS storage only, 32-bit or 64-bit platform.”

Things to watch out for

EBS storage is chargeable so you have to estimate that yourself. And ECU (EC2 Compute Unit) is for short periodic bursts only. It’s hard to understand what exactly is ECU and it’s some sort of voodoo unit that you can only compare among Amazon EC2 packages.

Amazon web services

It’s still a good promotion, especially if you are considering finding a host in Singapore. Amazon is being very competitive in this region. I am almost certain no other web hosting service in Singapore is able to best their offering at this moment.

[via Uzyn]

How to autozoom and autocenter in Google Maps

Sometimes in the given set of latitudinal and longitudinal coordinates you want to just automatically zoom or center for your map. This is achievable using Google Maps JavaScript API 3.2 with the following code. The code assumes you can loop through your set of latlng values to discover the minimum and maximum of both values.

(Autoscaling Google Maps with multiple markers.)

I just want this tutorial to be focused on autoscaling so I’m not writing how to display the markers like the screenshot above. There’re many articles and demos covering that subject much better than I can. If you just like to see the full set of codes, just scroll to the bottom of the article.

1. Creating the Google Maps object

First, we’ll need to create the Google Maps object which initialize Google Maps on your webpage. I have a div element with the id “panel_maps” which I intend to use for this tutorial. This would initialize Google Maps as an object but I haven’t specify the centering and zooming parameters yet:

[code lang=”javascript”]var map = new google.maps.Map(
{mapTypeId: google.maps.MapTypeId.ROADMAP}

2. The minimum and maximum of latitude and longitude

I’m skipping this step to get the min and max of the latitude and longitude since the method is largely dependent on how you iterate through your data structure. I will use the following values for the minimum and maximum:

[code lang=”javascript”]//Example values of min & max latlng values
var lat_min = 1.3049337;
var lat_max = 1.3053515;
var lng_min = 103.2103116;
var lng_max = 103.8400188;[/code]
Continue reading “How to autozoom and autocenter in Google Maps”

Epicurus’ doubt on god

Time for a random quotation again. This one posts some doubts about god.

Is God willing to prevent evil, but not able?
Then he is not omnipotent.
Is he able, but not willing?
Then he is malevolent.
Is he both able and willing?
Then whence cometh evil?
Is he neither able nor willing?
Then why call him God?

— Epicurus (BC 341-270)

Underwater astonishments

You should really check this TED talk out; it’s around 5 minutes. Some of the most beautiful footages of marine animals:

David Gallo shows underwater astonishments

David Gallo shows jaw-dropping footage of amazing sea creatures, including a color-shifting cuttlefish, a perfectly camouflaged octopus, and a Times Square’s worth of neon light displays from fish who live in the blackest depths of the ocean.

India government to access Blackberry encrypted messages

Seems like another loss for privacy advocates. On a lighter note, at least Blackberry can continue to function.

CrackBerry addicts rejoice: No ban in India. For now.

At an eleventh hour meeting with government officials Monday, Research in Motion (RIM) caved in to India’s demands for access to users’ emails and other data to avoid an immediate ban on its encrypted data services.

Under the agreement, RIM will immediately implement systems to grant “lawful access by law enforcement agencies” to customer data, India’s Home Ministry said in a statement. The
regulatory bodies will evaluate the feasibility of this arrangement for the next 60 days, even as India presses forward with demands to force not only RIM, but also Google and Skype to set up servers for hosting customer accounts in India — which would facilitate easier access to private data and wire tapping of voice-over-Internet-protocol (VoIP) phone calls. (via Globalpost)

To be honest, I don’t think this would work. If users are really going to send something really secret, there are still ways to do that unless encryption is entirely outlawed. What if the government monitor these supposedly encrypted messages and use them to gain competitive advantage in business that they have an interest in? I would rather trust corporations than government here.