15 Dec 2008 @ 2:15 PM 

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!  ;-)

Tags Tags: , ,
Categories: Just nonsense
Posted By: frank
Last Edit: 15 Dec 2008 @ 02 15 PM

E-mailPermalinkComments (0)

 14 Dec 2008 @ 2:43 PM 

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>

Tags Tags: , , ,
Categories: admin, apache
Posted By: frank
Last Edit: 14 Dec 2008 @ 02 47 PM

E-mailPermalinkComments (0)

 11 Dec 2008 @ 3:10 PM 

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.

Tags Tags: , ,
Categories: Coding, Open Source, mysql
Posted By: frank
Last Edit: 11 Dec 2008 @ 03 10 PM

E-mailPermalinkComments (0)

 05 Dec 2008 @ 10:19 AM 

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.

Tags Tags: , , ,
Categories: android, mobile
Posted By: frank
Last Edit: 05 Dec 2008 @ 10 31 AM

E-mailPermalinkComments (0)

 16 Nov 2008 @ 1:21 PM 

If you’re like me, accustomed to installing most packages via Ubuntu’s package manager, you might be a bit confused as to where to install Eclipse since it should be in a place thats accessible by every user on your system.  Sure you can install it in your user home directory but that wouldn’t be very tidy.

I extracted part of these instructions from: http://flurdy.com/docs/eclipse/install.html

These instructions assume you’ve downloaded and extracted the Eclipse tarball:

sudo mv eclipse /opt/eclipse cd /opt sudo chown -R root:root eclipse
sudo mv eclipse /opt/eclipse cd /opt sudo chown -R root:root eclipse
sudo chmod -R +r eclipse
sudo chmod +x `sudo find eclipse -type d`

Then create an eclipse executable in your path

sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse

sudoedit /usr/bin/eclipse

With these contents:

#!/bin/sh
export ECLIPSE_HOME=”/opt/eclipse”
$ECLIPSE_HOME/eclipse $*

Now you can execute Eclipse from anywhere in your bash shell. Check out the original article for generating a desktop icon. In the tarball I downloaded, it didn’t come with the icon.xpm that contains the Eclipse icon but no worries for me.

The take-home lesson here is that /opt is meant as a place to install application software packages. The topic is Filesystem Heirarchy Standard (FHS) .. these folks seem to be the standard authority on it:

http://www.pathname.com/fhs/pub/fhs-2.3.html#OPTADDONAPPLICATIONSOFTWAREPACKAGES

However it’s not to say that this standard is the most progressive one we have today.  I found GoboLinux to be particularly interesting: http://en.wikipedia.org/wiki/GoboLinux#The_GoboLinux_hierarchy

Tags Tags: , , ,
Categories: Uncategorized
Posted By: howie
Last Edit: 16 Nov 2008 @ 01 38 PM

E-mailPermalinkComments (0)

This blog gives pointers on getting the Android development environment working on a base Ubuntu 8.10 installation.

This assumes you’re familiar with google’s installation instructions (see http://code.google.com/android/intro/installing.html) and might still be having some problems.

This also assumes you’ve installed Sun JDK 1.6.

So here are some tips and gotcha’s:

  • Don’t install Eclipse with Ubuntu’s package manager. At time of writing, Eclipse 3.2.2.2 is in the distro. Make you sure have the latest Eclipse version by downloading directly from Eclipse’s site. See http://www.eclipse.org/downloads/
  • With most (if not all) base Ubuntu installations, java-6-openjdk or java-gcj is used, not Sun’s JDK. You don’t want to uninstall java-6-openjdk either because other apps in your system will be uninstalled along with it. In your Ubuntu filesystem, JVM tools (e.g. javac, javah, javadoc, java) are actually symlinks to the actual JDK. So what you want to do is update these symbolic links. There are at least 2 tools I’ve come across to help do this. I found the following:
  • sudo update-alternatives –config java
  • sudo galternatives
  • In Eclipse, for some reason I’ve not been able to add the ADT plugin via add site.  I had to download the SDK zip file and install as a local archive.
  • If you don’t know where to install Eclipse, check out my post on where to install eclipse since we’re not using the comfy package manager to take care of things for us. ;)

That’s it for now.

Tags Tags: , , , , , , , ,
Categories: Uncategorized
Posted By: howie
Last Edit: 16 Nov 2008 @ 01 37 PM

E-mailPermalinkComments (0)

I was trying to get an Android app that uses Google Maps API to display a MapView running on the emulator.  It took quite a bit of hair pulling to finally get it working.

First, I tried using a self-signed keystore instead of the the debug.keystore provided through the Android SDK.  I created my keystore using keytool -genkey from JDK.  Then I switch the app from using the default, debug.keystore, to my-new-self-signed.keystore.  Using keytool -list, I got the MD5 of the certificate that is needed to obtain a Google Map API key.  Then the API key was put into the MapView android:apikey attribute.  When I brought up the app in the emulator, I got a blank map grid screen.  The reason I wanted to use the self-signed keystore instead of the debug keystore is so I don’t have to obtain a new Map API key and change the code to reflect this upon releasing the app.

So, I decided to go with the debug.keystore and that worked fine.  Here is what I had to do.

  1. $ keytool -list -alias androiddebugkey -keystore <path_to_debug_keystore>.keystore -storepass android -keypass android
  2. Copy that MD5 and goto http://code.google.com/android/maps-api-signup.html
  3. Signup for an API key
  4. In my xml file that has the views for the activity, add
    <com.google.android.maps.MapView
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:enabled="true"
     android:clickable="true"
     android:apiKey="example_Maps_ApiKey_String"
     />
  5. In the Manifest.xml file, add the permissions needed
    <uses-permission android:name=”android.permission.INTERNET”></uses-permission>
    <uses-permission android:name=”android.permission.ACCESS_FINE_LOCATION”></uses-permission>
  6. In the Manifest.xml file, add the maps library
    <uses-library android:name=”com.google.android.maps” />
    within the application tag
  7. The entire Manifest.xml looks like this
    <?xml version=”1.0″ encoding=”utf-8″?>
    <manifest xmlns:android=”http://schemas.android.com/apk/res/android”
    package=”com.informationideas.mapapp”
    android:versionCode=”1″
    android:versionName=”1.0.0″>
    <uses-permission android:name=”android.permission.INTERNET”></uses-permission>
    <uses-permission android:name=”android.permission.ACCESS_FINE_LOCATION”></uses-permission>
    <application android:icon=”@drawable/icon” android:label=”@string/app_name”>
    <uses-library android:name=”com.google.android.maps” />
    <activity android:name=”.ShowDesktop”
    android:label=”@string/app_name”>
    <intent-filter>
    <action android:name=”android.intent.action.MAIN” />
    <category android:name=”android.intent.category.LAUNCHER” />
    </intent-filter>
    </activity>
    </application>
    </manifest>
  8. The default activity file should look like this

    package com.informationideas.mapapp;
    import android.os.Bundle;
    import com.google.android.maps.MapActivity;

    public class ShowDesktop extends MapActivity {

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    }

    @Override
    protected boolean isRouteDisplayed() {
    // TODO Auto-generated method stub
    return false;
    }
    }

Now off to building cool things with the map!

Tags Tags: ,
Categories: Coding, Open Source, android, mobile
Posted By: frank
Last Edit: 06 Nov 2008 @ 12 47 PM

E-mailPermalinkComments (4)

 22 Oct 2008 @ 1:28 PM 

I just received my G1 phone in the mail as it is spectacular.  The touch screen works very well and the built-in GPS, wi-fi, and 3G network/ functionalities will allow developers build some very exciting new applications for these phones.  It also has a compass that is demonstrated using the Street View of Google Maps.  When viewing Street View, if you start spinning in one spot the image will rotate according to the direction the back of the phone is facing.  It probably has a built-in level also that allows the Street View to pan up to the sky or down to the ground when the phone is moved in those directions.

The Android Market is where users can download application that runs on the phone built by developers (Google and other developers).  It currently has about 50 applications from their Android Developer Challenge.  On October 27, 2008, they will open up the Android Market to all developers to submit their applications.  Currently, all applications in the market must be free of charge, but in the first quarter 2009 they will allow applications that charge a fee.  It is interesting that Google has made the Android Market totally open and policed/ ranked by users.  They will not require approval for any application and anyone can put applications on the market.  That is very different form Apple’s iPhone App Store where they are gatekeepers to every application sold to iPhone users by using a review process.  We will see how this pans out, but so far it seems promising.

Well, I’m going to start building Android Apps so that’s it for now.

Tags Tags: , ,
Categories: Open Source, mobile
Posted By: frank
Last Edit: 22 Oct 2008 @ 01 28 PM

E-mailPermalinkComments (0)

 29 Jul 2008 @ 11:45 AM 

I encountered problem with the formview not switching to edit mode using the standard commandname=”Edit” for a linkbutton.  It turns out the problem was with the way I bind the data source to the formview through code behind.  I changed that to defining the formview tag with the attribute of datasource while defining the data source on the page code and everything worked just fine.  Go figure.

Tags Categories: .net Posted By: frank
Last Edit: 29 Jul 2008 @ 11 45 AM

E-mailPermalinkComments (0)

 24 Jul 2008 @ 1:32 PM 

Something to remember when using header location to redirect a page from a server-side script.  The output is redirected to the new page, but the logic on the original file will continue to execute.  Therefore, if there are database calls the changes to the data will still be made even though a header redirect was issued.

To solve the problem, make sure to issue an exit() command after a header location command.

Tags Categories: Coding Posted By: frank
Last Edit: 24 Jul 2008 @ 01 32 PM

E-mailPermalinkComments (0)

\/ More Options ...
Change Theme...
  • Role »
  • Posts »
  • Comments »
Change Theme...
  • VoidVoid (Default)
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LiteLightweight