Posted on Jul 20, 2010

MapKitDynRoutes: Handle iOS4 routes dynamically

Since iPhone iOS4 has released I’ve been working on the new features brought by the new version of the OS.
One of the most useful thing (to me) introduced by iOS4 is the capability of drawing routes directly on the map using public APIs.
How that works is fairly simple: given two or more coordinates it generates a Polyline and put it on the map. This line automagically rescales/resizes in order to maintain the correct aspect even when zooming/panning.

Unfortunately, this new object doesn’t allow developers to update the line with new points. The only thing you can do is to destroy the line, remove the overlay from the map, recreate a line with all previous points plus the new one, generate the respective line associated with the map and add it (as overlay) on the map itself. This is quite a waste of CPU cycles.

I’ve written a set of two classes that tries to handle the Polyline growth automatically.

The project is called MapKitDynRoutes and the libraries are FFMapRoute and FFMapRoutes.

MapKitDynRoutes is shipped with a Demo project that shows how to use the library. It contains, furthermore, a small object FFLocationManager that simulates the GPS behaviour by injecting coordinates to the application using a timer and reading those from a CSV file.

MapKitDynRoutes is released under MIT license.

Posted on Jul 13, 2010

How hard is collecting information about products?

What’s the first thing you do when you are willing to buy something? Easy: collect information.
There are two ways to gather valuable information: looking for reviews and user comments on the Internet or asking to your folks and to few store employees about suggestions and opinions about the product you’re willing to buy.

Internet is a really handful place where you can find an huge amount of information, indeed, but this “huge amount” of data leads to a serious problem: how to understand whether a review/comment is valuable or not?

One thing you might want to do is to start looking for reviews. Reviews are usually written by technicians or experts that know the entire scenario surrounding the analyzed item. Since we don’t trust the first thing we read, we want more information and more reviews. We read about pros and cons but we are not satisfied since these “technical speeches” are quite good but too long and too boring for lazy people like us.
At the end of this search we have located the product, or the products, that fulfill our needs.

Now it’s time to look for user comments. People like us whom already bought our items and spent few minutes reviewing it for us.
What are the odds that a satisfied user opens a thread on a forum to say “hey I bought this item and I’m really satisfied so I strongly suggest you to buy it! Thank you moderators, you can close this thread”?
On the other hand, what are the odds that an unsatisfied user opens a thread complaining about something not working/working bad about it’s brand new product?
So we are expecting that the most of the comments we are going to read will be bad or unhappy and so it happens.

The item model we were so enthusiast to buy starts becoming ugly, not perfect at all. Then we start to becoming stressed and depressed.

But what to say about user comments? What we think we are talking to? Three kind of folks: stupid, normal, experts. But there’s no way to detect which category they fall into. So we have to trust their opinion basing to the fact they’re using the Internet or the way they write?
I think reviews are more reliable from that point of view, aren’t them?

What’s worst than that? What really really bad thing may happen when we are reading few users complaining about our “favorite” product? Easy answer again: an user that comments that he bought a similar product, maybe a little bit more powerful, more expensive than that and it didn’t give him any problem at all.
So this restarts over and over and we are back to the start googling like crazy monkeys.

Is there a final solution? I don’t think so.

I want to close this post telling you what happened to me few days ago.

I’m (still) thinking about buying a Nikon D5000 DSLR camera and so I started comparing prices and features of D3000 with a bigger lens (a 18-105 vr). I read tons of reviews, I watched almost 5 videos of people using them, technicians reviewing them and I made myself an idea about what to buy.
I asked few people suggestions about that.

Then I went to a forum asking people for suggestions: they completely ruined my thoughts. They complained about “reviewing sites” being payed and sponsored by a company, being “fanboys” for a certain company and so on.

Then I went to a store and the employee told me to buy the D5000 since it’s better than the D3000 and I shouldn’t even think about the D3000 because the D5000 really overtakes it.

What did I do? Nothing.
I’m still wondering about if I really need a camera.