Categories
iPhone app

Did Apple change iTunes App store ranking algorithm lately?

Reading Time: < 1 minute

Last Updated on June 29, 2011 by stlplace

It looks like it. Obviously my observation could be quite limited. But here is the background, in the good old days, Apple ranks app mostly by the download number in a given amount of time, and the ratings/reviews. So basically the popular the app, the higher the rank. This process could reinforce itself. Apple realized this approach probably has its limitation, one example being a fairly popular app Facebook (by usage) is not ranked the 1st. So Apple changed its algorithm a bit, it not only ranks by the download number, it also monitors the usage. By “usage” I assume Apple measures mostly by network activity, my reasoning being if an app just does its thing locally, Apple has no way to know it.

Also keep in mind the rating and reviews also play a role in the ranking, my understanding is if all things equal, higher rating or favorable reviews will push the rank higher.

More recently, it seems Apple started to give usage more weight. This is just from my own observation, I have 2 little apps, both are standalone (no network features), and one does fairly well last few month, until recent, it totally went down cliff. I did not know why until I did keyword search, in the past, it ranked 2 or 3, not it fell out of top 25. I tried to rescue such as free download for a limited time. After the free period, download number drops back, and this thing fell out top 25 again 🙁

I think from product lifecycle management (PLM) point of view, this app thing is not as good as traditional software revenue model 🙂

Categories
iPhone app

Create a timer on 2nd thread using Grand Central Dispatch GCD

Reading Time: 2 minutes

Last Updated on June 24, 2011 by stlplace

(Update 06-24-11) Last night I found “More iPhone 3 development” (by Dave mark and Jeff Lamarche) chapter 14 deveoted full chapter to multithread including timer.

(Original) As of iOS 4, Apple made blocks and Grand Central Dispatch (GCD) available. Previously it was available on Mac.

Some pre-requisite or recommend readings
WWDC 2010 video session 206: Introduction to Blocks and Grand Central Dispatch GCD (you need to be a registered Apple developer to download this).

Or if you read the nice intro “guide to blocks and grand central dispatch by Cocoa Samurai (Colin Wheeler).

The problem I attempt to solve
I have couple buttons waiting for the user to touch, and the buttons can not wait there forever, they wait for 2 seconds if a user does not touch any of them, and a new set of button will display at that time.

I thought about this problem for a while, thought about using NSNotifications which is essentially a callback mechanism (see “love to be notified” by Cocoanetics for more info). I need more, essentially I need a second thread which is a timer, to notify the main thread (which does display and handles touch) when 2 seconds is up.

I found fieryrobot’s Watchdog timer in GCD which meets my basic need for timer. But I need to return from timer to the main thread. Quote Fieryrobot:

…If you needed to return results to your main thread, you can just use dispatch_async to execute the code on the main queue (dispatch_get_main_queue() as we’ve seen in previous posts…

I am sure there is ways using blocks (callbacks) to do that, but I don’t know on top of my head. So I used Notification instead. Here is what I did in ViewDidLoad
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(twoSecondsNotification:)
name:@"TwoSecondsReached"
object:nil];

In the timer, I post notification when it’s time to go back to main queue (thread).
// Hey, let's actually do something when the timer fires!
dispatch_source_set_event_handler(_timer, ^{

NSLog(@"WATCHDOG: task took longer than %f seconds",
timeout);
// ensure we never fire again
dispatch_source_cancel(_timer);

// pass control back to main queue
dispatch_async(dispatch_get_main_queue(), ^{
[[NSNotificationCenter defaultCenter] postNotificationName:@"TwoSecondsReached" object:nil userInfo:nil];
});

last but not least, the “TwoSecondsReached” function
- (void)twoSecondsNotification:(NSNotification *) notification
{
// clean up the timer here
if(timer != nil)
{
[timer invalidate];
[timer release];
}

// do things you want to do here.
}

One more thing
In my code, I initialize timer and release timer in different methods, and I found it’s easy to lose tack of timers and have multiple timers. One phenomena I saw is multiple timers fire at the same time, and make the app go crazy. I am thinking use a singleton pattern for the timer at this time.

Categories
finance

Some questions about 529 plan

Reading Time: 2 minutes

Last Updated on June 19, 2011 by omaha

I got those questions from a reader:
Why there is no national 529 plan? Looking at some states plan, it’s pretty much mutual funds like 401k, the investment return is like S&P? Why bother (consider S&P return is so low)?

I am not expert on this, I think why each state has a plan is pretty much why each employer (or most employers) has a 401k plan. The main purpose for such as plan is this: 1) Save some money for future liability (retirement or college tuition); 2) Hopefully the money can grow with the power of compound interest (snow ball effect); The tax deferral (in the case of 401k) or tax deduction (most 529 plans) are just ice on the cake.

As to why there is no national plan and federal tax deduction, I think this partially explained by college savings is still very small compared to retirement savings. Another indicator is the sales (or willingness for people to pay) my iPhone retirement savings/college savings app. Basically I gave away college savings calculator there because very few people are willing to pay 99 cents.

A side note: most people think spx (S&P index) is just boring, and some people think their retirement savings investments can grow 20% year over year. I think those people are too optimistic about their future. WSJ has an excellent article “The other midlife crisis” which explains why people expectations on income growth and retirement investment return are unrealistic.
Retirement income picture (via WSJ)