The Better Guide to Installing Android SDK

I wasn’t impressed with Android team on their documentation for installing Android SDK. It is long, and jumps from page to page. Here is my better version:

 

Step 1 – Install Eclipse IDE

Go to http://www.eclipse.org/downloads/ and download Eclipse Classic (the latest version is 3.7.1).

After downloading, install and verify that it can run.

Note: If there is any error, check the System Requirements. In particular, you might need to install the JDK.

 

Step 2 – Install Android SDK

Go to http://developer.android.com/sdk/index.html and download the Android SDK package.

For Mac and Linux users, download the zip/tgz package and unpack it to a safe location. The SDK files will be unpacked into a directory named android-sdk-<machine-platform>. Proceed to step (3).

For Windows users, download the .exe package, and run it to install. After installation is complete, the installation wizard will launch the Android SDK and AVD Manager. There is a slight inconsistent behaviour for Windows users here. Go to step (4) first, and return back to step (3) after you have finish step (4).

 

Step 3 – Install ADT Plugin

  1. Start Eclipse, select Help > Install New Software. Click Add.
  2. Enter “ADT Plugin” for Name and the following for Location:
    https://dl-ssl.google.com/android/eclipse/
  3. Click OK
  4. Click Next, NextNext.. and Finish
  5. When the installation completes, restart Eclipse.
  6. In Eclipse, select Window > Preferences (Mac OS X: Eclipse > Preferences).
  7. Select Android from the left panel.
  8. For the SDK Location in the main panel, click Browse and locate your downloaded SDK directory.
  9. Click Apply, then OK.

Step 4 – Adding Android Platforms

The Android SDK uses a modular structure that separates the major parts of the SDK. Specifically, the different versions of Android OS are each a module. To develop for a particular version, you would need to add the platform for that version.

To do so, from within Eclipse, select Window > Android SDK and AVD Manager.

Go to Available Packages, and select at least 1 platform. You may select additional platforms if you require.

Click Install Selected to download and install. Done!

SG Radio is Fixed

One year ago, I released SG Radio, but the app encountered a major glitch, and was taken down.

I am sorry for taking so long to fix an app.. yeah 1 year to be exactly apologetic

Here it is, back to the App Store.

4 Headlines to Get Readers Excited

I read from problogger on writing good headlines for your blog post, and thought it is worth sharing.

Instead of always writing your headline in usual plain ways, follow these rules to get your readers excited. These are the 4 proven styles.

 

1. Intrigue Style

Intrigue readers by making them think “how can that be possible??” or “what is this stuff about??”.

eg. “Learn How to Develop Facebook Platform in a Day”

 

2. Finality Style

This usually consist of the words “The Ultimate Guide to …” or “The Secret Guide …”

eg. “The Ultimate Guide to Android Programming”

 

3. Topic + Hype Style

Add hype to your topic statement.

Eg. “iOS Development Guide: Earn Your First Million Dollar”

 

4. List Style

This includes a number in the title.

Eg. “4 Headlines to Get Readers Excited” :) 

HTML5 or Native App for mobile ?

This is a decision that mobile developers got to make when they develop an app.

There are pros and cons to both the platforms, and the decision largely depends on what you need to accomplish. These are the main factors.

EDM

  • Capabilities
    The #1 factor would be the capabilities offered by the 2. Native App provides more integration with the mobile OS, and therefore can do much more. If you need access to address book, photo album, MP3, camera, etc, and accessing them is important to your app, then native app is a better choice. HTML5 is still pretty restricted, and is best for data-oriented web apps.
  • User Experience
    Native app provides native UI components from the OS, and that makes you feel like the app belongs to the OS itself. Native app also perform better, such as faster scrolling and switching views. HTML5 can provide more fanciful interfaces, largely because of the available JavaScript components.
  • Where can it run
    Native app must be built per mobile platform. So you got to build separately for iOS, Android, WP7, BlackBerry, etc. That means the same app built multiple times, with multiple programming languages and platform! HTML5 can be run on most new mobile platform. That is write once, run everywhere (but usually with some incompatibilities).
  • Updates
    Native app needs to be installed on the phone, and updating the software is controlled by the user, which means usually days or months before they do so. That is bad for critical bugs or rolling out of features. HTML5 on the other hand is instantaneous.
  • Development Effort
    Native app takes more time and more people with different skills on different platforms. It is also harder to code than HTML5. HTML5 is easier and faster develop.

However, you don’t really need to pick sides. A hybrid approach is possible, such as how Pandora does it. You can build a native app, which contains a webview that loads the HTML5 website (webview is a native app UI component such as iOS UIWebView)!

My THack (Hackathon) Experience

guidebnb logoI participated in a 24hr hackathon over last weekend, and created Guidebnb – an app to find local guides. It is an Airbnb for local guides.

If you want to try out, head over to http://guidebnb.just2us.com.

The whole hacking session was fun, and here are some random things I would like to share.

 

Setup your servers first

The hacking started at 10am, and we didn’t write a piece of code until 4pm! For 6 hours, we were merely setting up our server and development environment. We have a plan of what to use, but things didn’t work out. This is what we did:

  • The plan is to use Heroku PHP. However, Heroku does not support MongoDB! (they supported eventually, a few days after the hackathon)
  • So we go for Amazon EC2. We setup the instance, installed Apache. However, MongoDB has a dependency which could not be installed. (probably our fault)
  • So we go for Slicehost. PHP and Mongo driver setup successfully. However, their PHP version is an older version (5.1), which caused some headache with Facebook API.

In the end, we settle for EC2 with MySQL.

 

SQL database has lots of boilerplate code

I hate SQL database, because they need too much setup. You need to create database, create table, design schema, then write complex SQL statements. You need to use mysql commands.

And when you need to add a column, you need to write SQL to add the column to the table, and also change all your affected SQL statements.

I have done that many times before, yet I am doing it again, all because the NoSQL-MongoDB could not be installed..

 

Facebook API is not that easy

Facebook API is one of the widely used, yet also the also widely criticized API of all time.

It does give you problems, and high learning curve since there is a lot that you can do with it and you need to go figure it out yourself. They have non working examples too.

 

Hoiio & Expedia API are easy

We used 2 APIs

Both are easy to use and do their stuff as intended. Took less than an hour to integrate the APIs.

 

I became a CSS ninja

I am a mobile developer, and API designer.

I don’t dwell with web development and CSS stuff. However, for the hackathon, I have to do quite a bit of CSS. I started with a template that help start things. I typed a lot of inline CSS to solve things quickly. I used chrome developer tool and inspected elements one by one. I learnt stuff like preventing CSS caching.

I can write, but it is not my cup of tea.

 

Don’t change MAMP password

Being quirky about security, I changed the default password of my MAMP’s MySQL’s password.

That is extra, and that wasted 1 hour. (run into problems and ended up reinstalling MAMP)

 

7 min presentation ain’t enough

When you have something cool and a lot to brag about, 7 min ain’t enough!

How to fix your iPhone Home button

The Home button got to be the most problematic hardware on the iPhone.

Recently, my iPhone 4 Home button started to respond slower. I either have to press multiple times, or press harder.. If you faced the same problem, you are not the only one.

Luckily, there is a fix for it! I tried the fix, and it did work help! Here is what you need to do:

  1. Open any application
  2. Press and hold the power button until the slide to shutdown swipe bar appears.
  3. Release Power button
  4. Press and hold Home button lightly, until screen returns to icon screen
  5. Enjoy your functioning home button!!!
This procedure recalibrates the home button after normal wear or heavy use.

AsiaTop50Apps voting system fixed

Five days ago, I posted what happens when you have a hackable voting system, and I decided to curl SG Blood to become an undisputed winner.

However, under pressure, e27 admitted their epic mistake and fixed their voting system. They employed Facebook’s like and Google’s +1.

With the voting system fixed, there is no way for me to curl SG Blood to become the winner Open-mouthed smile

I know SG Blood is not a top 50 app candidate. . It was submitted to asiatop50apps merely because of the hackable voting system.

So my game halted. However, if you want to show support, please go ahead and vote SG Blood!

A couple of useful apps

There are a couple of good & useful apps, and I want to take this chance to highlight some that I cast my votes for:

  1. Hoiio – Yeah, I do work for Hoiio, but our phone bill slashing app is definitely useful!
  2. Gothere – The #1 app for finding your way around Singapore by bus, train or car
  3. around! – Nice app for finding discounts around the island
  4. movend – This is not really an app, but their payment SDK is a good work
  5. SG Buses – Very useful for finding bus arrival times
  6. Pigeonhole – Innovative real-time Q&A tool
  7. Zopim – Add live chat to your website, like how I use it

So those are my selections, go cast your votes too!

10 ways to think like Bill Gates

There are 10 ways to think like Bill Gates:

  1. Prioritize
  2. Ask smarter questions
  3. Make data-driven decisions.
  4. Divorce your ego
  5. Frame the problem
  6. Get perspectives on the problem
  7. Model the problem
  8. Think of the system and the ecosystem
  9. Think of the problem over time
  10. Think strategically

This Bill Gate’s thinking framework is further elaborated on Sources of Insight. Another alternative framework would be the six hats way.

What happens when you have a hackable voting system?

Unfortunately, this happened to Asia’s Top 50 Apps nomination, presented by Singtel Innovation Exchange, and e27 as the organizer.

Interestingly, e27 community manager posted a blunt story about their flawed voting system.

I like how the story revealed things from an organizer perspective. However, he is admitting to his mistake, and yet not doing anything about it. Quoted:

Go ahead, do it. We probably won’t find out.  Keep it up, kudos to you. You’ll probably end up on the top of the list and be awarded the People’s Choice Award.

Since the voting system is not going to be fixed, there are only 2 possibilities:

  1. No one cheated (because developers have integrity!)
  2. Someone cheated

Since (2) is always a possibility, whoever turn out as the winner, will also turn out to be a cheater/loser..

I thought, since that is the case, I might as well submit my SG Blood and curl it to be the winner.

No one going to dispute a non-profitable app winning for a good cause, right?

How Many Developers Are There In The World?

I have always been curious over the number of developers in each country. Recently, out of a need to present this statistics for my work, I went deeper to search for an answer.

StackExchange provided me with data for a few countries. For example, US has a population of 300 million, and has 1 million programmers (that is 0.33%). 

I took a lower figure and estimated that around 0.1% of a population are active developers who work on web/mobile. With that, I estimate the number of developers in each country as such:

Country Population No. of developers (0.1%)
US 300 mil 300,000
UK 61 mil 61,000
Japan 127 mil 127,000
Singapore 5 mil 5,000
Hong Kong 7 mil 7,000
Australia 22 mil 22,000
China 1,330 mil 1,330,000

Quora also provided me a good answer, adding that around 10% of developers specialize in mobile development. That estimate does relate to the 40,000 iOS and 10,000 Android developers reported in appstorehq in 2010.

←Older