Dec/080
How not to show customer appreciation
Showing that you appreciate your loyal customers is a good thing to do, but doing it the T-Mobile way is not very appreciated. I just received a promotion from T-Mobile for being in the top 5% of their most loyal customers. It gives me a free companion plane ticket if I buy one from them at regular price. What a nice thing for them to do, right? I decided price out a flight from Oakland, CA to Tampa, FL for March 2009. The cost of a single round trip ticket was $815! Then I thought maybe it was spring break week for college students and Florida is a popular destination and therefore would drive the price up. So I checked Expedia.com and found the exact same flight for two passengers at $845. So what T-mobile is telling me is that my eight years of loyalty is worth, $30. The fact is that I was more content with them before they sent me this promotion. Now that I know my loyalty is only worth $30 to T-Mobile, I should shop around for a higher bidder. Maybe I can get $35!Â
Dec/080
Setup Ruby On Rails on Windows
http://wiki.rubyonrails.org/rails/pages/HowtoInstallOnWindows
This is where to get the fastcgi dll.
http://www.fastcgi.com/dist/
Sample Apache virtual host configuration
<VirtualHost *:80>
<Directory “C:/data/projects/testapp/public/”>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all</Directory>
Options ExecCGI FollowSymLinks
AddHandler cgi-script .cgi
AddHandler fastcgi-script .fcgi
ServerAdmin webmaster@testapp.dev
DocumentRoot “C:/data/projects/testapp/public/”
ServerName testapp.dev
ServerAlias www.testapp.dev
ErrorLog “logs/testapp.dev-error.log”
CustomLog “logs/testapp.dev-access.log” common</VirtualHost>
Dec/082
Update Delayed on Mysql and PHP
Wouldn’t it be nice if we could use UPDATE DELAYED in mysql just like we do use INSERT DELAYED? Unfortunately, the work around mysql created for this is to insert a record into the events table in order to separate UPDATE statement into another thread. There is a large overhead to inserting to then execute an update.
If you are using PHP with mysql, there is another work around. PHP has a function called, register_shutdown_function, which will execute a function during the shutdown of processing a script file. So if we add an UPDATE LOW_PRIORITY sql statement wrapped in a function that is passed to register_shutdown_function, we can allow the user to receive the page without delay while the UPDATE statement waits until all locks on the table has been release before proceeding.
function update_delayed()
{
$sql = "UPDATE LOW_PRIORITY table_name SET col1 = 'something'";
mysql_query($sql, $conn);
}
register_shutdown_function('update_delayed');
I wonder if there are even better ways to handle this problem.
Dec/081
Second Android phone, Agora, follows G1
It has been less than two months after G1, the first Android phone, was launch that the second one is announced by Kogan. It is the Agora, a phone looking more like a Blackberry than an iPhone. The great thing about this new phone is that it is not locked. However, it does not have as many features as the G1.
Here is what Howard Wong has to say about the Agora vs G1.
This is more blackberry-ish in style, slimmer and so in a way its a bit more “humble” and makes you wanna compare it to a blackberry.. which sort of allows Agora to scale back on memory features (256 meg, 128 meg flash, no WIFI). Also I think they were smarter about battery life by supplying a 1300mAh battery as opposed to G1’s 1150mAh.. G1 most prolly uses more power anyway. Clearly Agora’s niche is to bridge mainstream PDA users to Android.. a very smart move because quite frankly, most people don’t know or care about where mobile applications come from. I believe this phone to be a much more humbler/accessible stage to feature android apps.
Looking back, I think Tmobile should’ve released something like this and steared clear of IPhone envy. One of the first things I said to myself when I first played with the G1 was, “I can’t believe google allowed this to be the first phone.”
I still think the 4 buttons should be electro-sensitive like the touchscreen. For such mainstay controls, they deserve to be on par with the touchscreen. At least with this new Agora phone I won’t complain because interaction through the touchscreen seems more like a bonus whereas on the G1, it seems required.