February 8, 2013

If you are frustrated by the dismal the performance of the Android emulator, you should try out Intel’s Hardware Accelerated Execution Manager (HAXM) driver.   Android and Intel have introduced an Acceleration mechanism named HAXM.   http://developer.android.com/tools/devices/emulator.html#acceleration

 The bottom-line is that your Android emulator will run much faster.   See the bar in “RED” in the graph below. Bootup time is about 300% faster.   The Performance is about 700%.  Graphics acceleration will add another big boost.



Important Notes:

1) Download the driver through the Android SDK manager.   2) Must manually install the .exe file (or .dmg file for Mac) downloaded to the /extras/intel folder of your Android SDK installation

NOTE:  If you are using a Mac,  download the HAXM driver from here http://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager?page=1   .  Download release_1.0.4-hotfix  for Mountain Lion.  If not, your Macbook kernel will crash.  

After you install the HAXM,  Create a new Android Virtual Device (AVD) and choose the type as the Intel x86 image.   Also enable GPU for graphics acceleration.

Run the emulator and run your app.   You will be pleasantly surprised at how must faster everything runs.   In the long run, the better performance will save you a lot of time.   Try it out.

REFERENCES:  http://www.developer.com/ws/android/development-tools/haxm-speeds-up-the-android-emulator.html

Eclipse (Android) and Mountain Lion – Problem with Java version

November 23, 2012

Eclipse stopped working after upgrade to Mountain Lion.  My initial guess was that it could be due to Java not being available.  I installed Oracle Java 7.

Even then, eclipse wasn’t starting up.   I tried changing eclipse.ini to set the VM.   No avail.

Finally,  I realised it could be due to the new security settings in Mountain Lion. To resolve this, go to System Preferences > Security & Privacy > General, and choose the check-box for “Anywhere.”  (You may need to unlock the settings before you can make this change)

Finally, Eclipse started working.


Other useful information I came across during my search:

[Thread from StackOverflow]

JDK 7 will be installed under /Library/Java/JavaVirtualMachines/1.7.0.jdk, JDK 6 under /System/Library/Java/JavaVirtualMachines.

To trick OS X to accept Java 7 instead of proposing to install Java 6 a simple symlink is enough:

sudo mkdir /System/Library/Java/JavaVirtualMachines

sudo ln -s /Library/Java/JavaVirtualMachines/1.7.0.jdk /System/Library/Java/JavaVirtualMachines/1.6.0.jdk

Most Java Programms will run with this little hack without the need to install Java 6.

[Edit eclipse.ini to specify a Java version]


Disable Cross-domain Javascript security in Chrome for Development

March 13, 2012

This technique is very useful for writing Mobile apps and Ajax based apps.  Cross-domain Javascript security in all browsers will prevent you from making Ajax calls to other servers.   By passing the parameters to the browser, you can disable this temporarily.

For Windows:

1) Create a shortcut to Chrome on your desktop.  Right-click on the shortcut and choose Properties, then switch to “Shortcut” tab.

2) In the “Target” field, append the following:  –args –disable-web-security

For Mac, Open a terminal window and run this from command-line:
open ~/Applications/Google\ Chrome.app/ –args –disable-web-security


Get a Free Nokia Lumia for HTML5 developers! (Only for Singapore)

March 5, 2012

I wanted to share some new about this Free Windows Phone offer for developers in Singapore.  http://spiffy.sg/developers/lumia/

You need to submit 3 app ideas.  Once they are approved by the team, you will get a free phone.  You must submit 3 apps over 3 months to keep the phone.

I sent in my proposals and got approved for a free phone. I am going to write these apps with Sencha Touch and PhoneGap. You can give it a shot before all the phones are gone.

I previously tried a similar offer from Blackberry and got a Free Blackberry Playbook for submitting 1 app.   Seems like this is a great way for product vendors to increase the number of apps in their AppStores.


Spring Roo – Typicalsecurity Addon problem

January 15, 2012

I followed the steps to install this addon for Spring Roo.  But I kept getting this message.  “Command ‘typicalsecurity setup’ was found but is not currently available

I found that some generous developer provided a fix to this.  Install the new .jar file as per instructions here


After this, the addon ran successfully and created all the necessary Entities and scaffold artefacts.    One error I faced is  – “There is already ‘forgotPasswordController’ bean method”  I found that by explicitly adding @RequestMapping (value=”/forgotpassword/index”) to the controller classes, these issues were resolved and the application could be run.

Once issue remaining after changing the mapping to “/forgotpassword/index” I found that the links don’t work from the browser.  I must have missed something and will update this post once I find out the cause.


Why doesn’t my Spring Roo application not retain my data even after changing the persistence type?

January 14, 2012

In Roo, to change the persistence type, you issue the command.  But this doesn’t take effect and data is not retained for the next run.

jpa setup –provider HIBERNATE –database HYPERSONIC_PERSISTENT



JPA uses the file – /src/main/resources/META-INF/persistence.xml to specify how existing data should be treated upon every restart of the server.


Change the value of <property name=”hibernate.hbm2ddl.auto”>  to “update”

<!– value=”create” to build a new database on each run; value=”update” to modify an existing database; value=”create-drop” means the same as “create” but also drops tables when Hibernate closes; value=”validate” makes no changes to the database –>

<property name=”hibernate.hbm2ddl.auto” value=”update”/>

Add a task from QuickSilver to TaskPaper

July 23, 2011

A variation of the script from: http://blog.hogbaysoftware.com/post/62679297/quicksilver-to-taskpaper

This version has two enhancements
1) prefixes the entered text with a “-” so that it appears as a task
2) saves the file after adding the task.

To install it: (Full instructions in the link above)
Open Script Editor and paste in the script
Save the script as ~/Library/Application Support/QuickSilver/Actions/TaskPaper.scpt
Restart QuickSilver

using terms from application "Quicksilver"
on process text tasks_text
tell application "TaskPaper"
tell front document
if not (exists project named "Inbox") then
make new project with properties {name:"Inbox"} at front of projects
end if
tell project named "Inbox"
repeat with each in paragraphs of tasks_text
-- Add as a task by prepending with -
set myLine to "- " & each
make new entry with properties {text line:myLine}
end repeat
end tell
end tell
-- Autosave the file
front document save
end tell
end process text
end using terms from