iOS SDK 4's SQLite has foreign keys support.

If you are like me, wondering if foreign keys is support is iOS 4, then I'll save you some trouble by telling you the secret. It is supported but off by default.

To enable it, enter this command for each database connection, "PRAGMA foreign_keys = ON;" and it will be enabled.

If I have the time, I'll publish the code to test and set it. :)

Interesting use of enum

I think this is an ingenious way to use enum I just saw from Apple. enum { ENUM_1, ENUM_2, NUM_ENUM, } The NUM_ENUM WILL grow as you add more enumeration. :D This is cool technique!

XCode 4 supports GIT!

Just got this piece of news today from Apple. WOOT! Finally a motivation to use GIT! I'm glad I think thrice before installing SVN. :D

Mind spin, blown, exploded!

Still gonna get iPhone 4

When in come to iPhone vs the world. I have many thoughts but I'm not going to speak much in this post.

My hates for Android (and their fanboy) is like how Android hates iPhone (and their fanboy). We are arch enemy, like Windows vs Macintosh.

Arch enemy will exploit every cracks to bring down its enemy. Open, Flash and now Antenna.

But Android is a copy cat. Android users are enjoying Android because it literally copied many ideas from iPhone. Note that prior to iPhone release, Android looks like a Blackberry/Nokia phone. Now see what they have become.

http://en.wikipedia.org/wiki/Android_(operating_system)

And yet they are trying hard to differentiate themselves and make them seems unique. Totally a joke.

They are not innovative, they don't know how to create great product by themselves. That's the reason I don't support them.

Steve Jobs owns Pixar and Apple. Two pioneer companies in their fields: 3D flims, PC and Full Screen Touch-based Phone. I enjoyed every single things they create and they always wow me.

Android is open hur. Open to corporate idiots.

Evo with battery problem. Droid X being locked down. Wait what? I thought Android is open? Totally laughable. All preinstalled with junks. Fragmentation at best.

If anyone gonna snatch shares from iPhone. I would bet on Windows Phone 7. VS2010 and ES4 to develop app for Windows Phone 7? This tools will pose serious threat to XCode.

I had an iOS 4 on my 3GS and I love it. I still love my 3GS and I will try to get an iPhone 4 if I can. :D

FO Android.

My thoughts on Adobe Flash

You know how Adobe got their speed bump for AS3 from AS2?

They make it less a scripting language and more a programming one. As a programmer back then, I liked the move, but its a cheap move. Moving from more static to dynamics almost always result in a significant increase of speed. Its like the argument assembly is faster than C/C++, C/C++ is faster than Java/C# and Java/C# is faster than python/lua. They simply shift from one category to another and everyone think they did a wonderful job.

But this move leave lots of Flash designers out in the cold. Its frustrate them that what once work for them doesn't work for them anymore. I pity them because they shouldn't be force to play in the field of programmers. It was once their playground, but unless they upgrade themselves real hard, it seems they need to rely on programmers.

HTML5 has become a buzzword. In formal definition, its a mark up language. But its formal definition is seldom used, they tend to use it to means the future of web standard.

Flash created when JavaScript couldn't deliver back then. Now with the JavaScript wars, Apple, Mozilla, Google, Microsoft are pushing aggressively for better JavaScript speed. In near future, we should see JavaScript competing Flash in term of speed.

Google move on Flash is mostly a PR move. Flash do have the problem of CPU hogging (which in turn kill battery life) and security holes. (Search the net on Android running Flash 10.1) As for security holes, all software will face this problem. If Google truly believe in Flash is the future of RIA, they would have develop their solution (Inventor/Docs/etc) in Flash, not JavaScript. They will not release Google Gears. And they will not pushing Chrome and Android JavaScript engine speed even further. You can clearly see where their allegiance.

As for Apple, I can see their points. It can turn out to be all excuses. But I can related to their points. I was a mobile developers back then. Fragmentation, Distribution and Support are what's missing back then. No one care much about developer like us back then, not the handset manufacturer, not the telco. They are like sharks, ripping us off. We are playing a losing game, we struggled, almost drown and no one save us, until Apple. Talk about open, in my opinion, Apple have open up and regulated a competitive market for developer. Something we desperately need in a world where developer always get the last small piece of the cake. That's the spirit of the indie movement in the game industry.

Their engineering from hardware to software to usability are top notch. You have to see it to believe it. A lot of their User Experience (UX) is bluntly copied by Google. These UX might seems nothing but it take years to come up with it. Android copied from iOS. That's is evident all over Android. Apple talk obsess with UX make them seems like a conman but only when you experience it will you realize they are not kidding in that expect. UX have been they strategy in any market and Google using Android to taunt Apple's iOS is like Microsoft using Windows on Apple Macintosh. They both copied from Apple. Be it UX or Font Typeface. Apple does copied from Xerox and others too. But what I am saying here is that credit have to be given when it is due. Also, doing it first doesn't necessary mean doing it right. Apple want to do everything right and better. Others one to do everything first.

Adobe have stir up quite a bit of disharmony and probably had already closed its own door to Flash in iOS. Although Apple do have a lot of say Flash is in or out but Adobe inability to improve Flash in places where it matters also caused their rejection. They are like a bad lover. Flash is probably in its later years of its lifecycle and Adobe is probably busy thinking of strategies to milk its 5+ billions investment. Flash have been great during its golden age and served us well. Moving forward, JavaScript (together with HTML and CSS) is probably a better plane to take us into the future.

There's really no reason in needing to install another plugin just to have a full web experience.

Team

I know very well that by my own I couldn't achieve great things. I need a team and I always seek one. Its not that I don't believe in myself but I know how far I am and I need a team to cover my shortcoming.

Its almost a decade effort, yet it haven't been fruitful, not even close. I almost gave up on looking for a team and instead focus on my shortcoming.

I know very well how a team will fail, I failed countless time, but that somehow lead me to found one, in the least likeliness of place. Seemingly now, I might have found the team I'm always looking for and this team exceed my expectation in folds.

That's the furthest I have gone through with a team. I truly understand what it means by having good team dynamics. I am excited once again. :) I hope this time, it works.

Giving up gaming have been the most painful of choice. My sole entertainment has gone. I have to control the void left by it, I have no replacement for it.

I hope I can succeed soon. I hope I can break out of this shackle of life.

And I believe, again, that a team can help me achieve great things.

No one will grant you wishes, you better make them happen.

So true...

Singapore millionaires statistics is confusing.

I'm always interested in statistic about millionaires as its always my goal to break into that group.

I took special interest on a report of the number of millionaires in Singapore but found the statistic extremely confusing.

http://sg.yfittopostblog.com/2010/06/24/more-millionaires-in-singapore/

Disclaimer: I saw one similar one from Straits Times. This was just the first few result of a Google search so I took it out of convenience. Their report is almost the same.

FTA: The total number of high net worth individuals (HNWIs) in the city-state — those with at least US$1 million in net assets — has grown to 80,947 from 61,000 in 2008, according to the newspaper’s report.

Singapore have an population estimate to be 5 millions.
http://www.google.com/publicdata?ds=wb-wdi&met=sp_pop_totl&idim=country:...
http://www.singstat.gov.sg/stats/themes/people/hist/popn.html

So, 80,947 out of 5 millions is how many percentage? around 1.6% of the entire population of Singapore.

Compared to total number of singaporean + pr which is around 3.7 millions? around 2.2%.

Compare to the total number of singaporean which is around 3.2 millions? around 2.5%

The number we are dealing with is in millions so even if I am taking round up/down value the percentage movement won't be significant.

FTA: A recent study by the Boston Consulting Group put the number of people with at least US$1 million last year at 11.4 percent of households, which is equivalent to about 125,000, the paper cited.

This report will immediately put my previous calculation in doubt, so now I need to source for new info to back up my claim.

I continue my google search and found this.

http://www.singstat.gov.sg/pubn/popn/population2009.pdf

This report proved that my estimation previously is correct now I need to assert against the second report.

Residential household is around 1,093,100 at around 2008 which consist of 3,642,700 population. Seems like this is the household data of singaporean + pr. which average out 3.3 people per house hold.

So, 11.4% of all household is 124613.4. The second report is accurate up to here. but what is confusing is that does the same criteria apply to the first report apply to the second report as well? Lets say it applies. That makes around 412500 of people who are enjoying the millionaire status.

But it seems like 80% of these people are riding on 20% of the true millionaires. Of course I am discounting couples who when both net worth combined equate to over a millions.

Some more info as compared to the world. :)

http://www.capgemini.com/services-and-solutions/by-industry/financial-se...

I don't know what thoughts can these info trigger in you but it worth doing a fact check before heading for this goal. :)

Revert iPhone PNG optimization

Okay, you realize you couldn't view any PNG files extract from an iPhone app. This is due to iPhone PNG optimization.

For more info, go to http://developer.apple.com/iphone/library/qa/qa2010/qa1681.html

For those who want a solution that doesn't requires downloading/installing another application just to fix the PNG you are in luck. I only need you to download the attached bash script/create the bash script below and place in in the folder with those optimized PNG files. I also need you to have at least iPhone SDK 3.2 and later. Run the bash script and it will generate viewable PNG with reverted- as prefix.

#!/bin/bash
FILES=(`pwd`/*)
for f in "${FILES[@]}"
do
	extension=${f##*.}
	if [ "$extension" == "png" ]
	then
		if [[ "$f" != *reverted* ]]
		then
			/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -revert-iphone-optimizations -q $f reverted-`basename $f`
		fi
	fi
done

I notice a quite a bit of search have been coming in for this particular subject. I promise I will give a much better answer soon.

Test page

test test
Syndicate content