Blog

Stock Analyzer App

Posted on October 14, 2011 by Sylvain

A friend of ours created this app called StockAnalyzer. As the name suggests, the app can be used to analyze market stocks and determine if certain stocks (NYSE and Nasdaq) are worth buying or selling. The app is based on a technique published by Phil Town (Rule #1 and Paybacktime) and is very simple to use. You enter a stock symbol (say AAPL) and within seconds returns with its analysis based on current growth, projected growth, so on.

The analysis is best explained on their website so you are best to go there if you need more information; however, they do provide a simple “How it works” section in the app which could be considered the dummy explanation for the app.
That section includes a simple flow charts with the following questions

  1. Are all or the majority of the Growth Rates green?
  2. Is any of the Top 3 Discount Prices green?
  3. Do charts indicate BUY momentum?

If you have answered yes to all, then the stock is considered a good performer at a discount price with BUY interest. As you can see, Apple is a good buy according to this technique.

The app is only $1.99 and at that price, it is way cheaper and perhaps less subjective than using a stock broker.

RIP Steve

Posted on October 6, 2011 by Sylvain

The team at 14 Oranges was deeply saddened to hear about Steve Jobs’ passing yesterday. Who knows if/where 14 Oranges would be if it were not for the work that Steve and the team at Apple did over the years. We used Apple products everyday (I am writing to post from my iPad while feeding my daughter) so he had and and still has a tremendous influence on how we run our everyday lives. So with that we say “thank you Steve, we promise to stay hungry and stay foolish”

14 Oranges One of 12 Winners of the Entrepreneurship@Wavefront Program!

Posted on September 8, 2011 by Sylvain

We are proud to announce that 14 Oranges was selected from over 40 applicants as one of the 12 winners for the Entrepreneurship@Wavefront program! The announcement was made yesterday by Ms. Dana Hayden, Deputy Minister for Jobs, Tourism, and Innovations as part of an event organized by Wavefront. The announcement was covered by the local media and made today’s Vancouver Sun, and also was picked up by BIV. We are all very excited about what this means for 14 Oranges and the road ahead.

Happy Birthday 14 Oranges!

Posted on September 2, 2011 by Sylvain

Today 14 Oranges turned 2!! Time sure flies when you are having fun. We have some great news coming up in the next few weeks so keep checking this space!

How to Use JSONKit for iOS and the Rotten Tomatoes API

Posted on August 7, 2011 by Sylvain

Here is a short tutorial on how to use JSONKit and since it is best to have a tutorial with a real life example, we decided to show how to use it with the Rotten Tomatoes API. Now we know that using JSONKit is rather easy but we felt a tutorial could still help a few out there so here goes.

UPDATE: The article had a mistake. It used to say to use the objectWithData and objectWithString methods of JSONDecoder and should have said to use the NSData objectFromJSONData and NSString objectFromJSONString methods. Thanks to reakinator for pointing that out. The example project with source code had the correct API all along. The article has now been corrected. Apologies for the slip.

Preparation
Here are the steps you will need to do before getting started:

  1. Go to Rotten Tomatoes API site and apply for an account and a key. It is free to do so. Without a key, you won’t be able to get responses from their API.
  2. Download JSONKit source code from Github

Note: We completed those steps with XCode 3.2.6 against 4.3 iOS SDK.

Using JSON Kit
Using JSONKit is super easy. What you need to do:

  1. Once you have downloaded and unzipped the zip file obtained in the preparation steps above, you will need to drop JSONKit.h and JSONKit.m in your project.
  2. Then import JSONKit.h” in your .m files where ever you need to parse a JSON response
    import "JSONKit.h"
  3. Whenever you have JSON data that you need to parse (more on how to get some later), you just use the objectFromData method like so

    NSData* jsonData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&err];


    NSDictionary *resultsDictionary = [jsonData objectFromJSONData];

    Alternatively, if you have your data in string form, you can use the following:

    NSDictionary *resultsDictionary = [jsonString objectFromJSONString];

  4. Once you have your dictionary, you can inspect it using the objectForKey method to get objects out of it.

Note: JSONKit is free but is licensed under BSD license or Apache License Version 2. Make sure to follow their licensing terms as specified in the source code.

Using Rotten Tomatoes API
The Rotten Tomatoes API allows you to do queries so you can obtain information about movies such as “year of release, runtime, cast, posters, audience scores, critics scores, reviews, and a slew of other data. Typically the steps to get what you want are

  1. Search for the movie name
  2. Find the movie in the list of results and get its id
  3. Do specific query using the id

Easy enough right? Let’s see the details:

  1. Search for the movie name:
    You can use the http://api.rottentomatoes.com/api/public/v1.0/movies.json?apikey=YOURKEY&q=MOVIENAME to make your search request (where YOURKEY is the API key you obtained in the preparation steps and MOVIENAME is the movie you are looking for. The response you will get should be something like:

    {
    total: NUMBEROFMATCHES
    -movies: [
    +{ … }
    +{ … }
    +{ … }
    ...
    ]
    +links: { … }
    link_template: "http://api.rottentomatoes.com/api/public/v1.0/movies.json?q={search-term}&page_limit={results-per-page}&page={page-number}"
    }

    Note that we “shrunk” the actual movie match details down to +{ …} for clarity. To read this, you need to understand that NUMBEROFMATCHES is the number of results that you got. For example, searching for Toy Story, will results in 7 matches (Toy Story 3, Toy Story 2, Toy Story, Toy Story & Toy Story 2 in 3D Double Feature, so on).
    Now to make that request you would do it like so:
    NSString* theURL = [NSString stringWithFormat:@"http://api.rottentomatoes.com/api/public/v1.0/movies.json?apikey=%@&q=%@",YOURKEY, SEARCHTERM];
    NSError* err = nil;
    NSURLResponse* response = nil;
    NSMutableURLRequest* request = [[[NSMutableURLRequest alloc] init] autorelease];
    NSURL*URL = [NSURL URLWithString:theURL];
    [request setURL:URL];
    [request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData];
    [request setTimeoutInterval:30];
    NSData* data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&err];

    Note: We chose to use a synchronous request here for simplicity. In reality, you likely want to use asynchronous methods so that your code isn’t stuck on waiting for Rotten Tomatoes to respond.

    Now when you use objectFromData method to put that into an NSDictionary, any terms that have the answers right away, will be returned as an object.
    For example:
    id: 770672122
    title: “Toy Story 3″
    year: 2010
    Doing [resultsDictionary objectForKey:@"id"] would return an NSNumber with the movie id while [resultsDictionary objectForKey:@"title"] would return an NSString with the movie name. Similarly, you would get NSNumber for the @”year” key. Now the API sometimes return the year in quotes; therefore, you do need to test to see if the object returned was an NSNumber or an NSString. In the cases where the responses include a [, it means you are getting an array. For example:
    -movies: [
    Means that doing [resultsDictionary objectForKey:@"movies"] would return an NSArray of NSDictionary.

  2. Find the movie in the list of results and get its id
    Now finding the movie in the list will depend on your search criteria. We used the year to match. The code looks like this:
    NSString *aYear = yearField.text;
    NSDictionary *results = [jsonString objectFromJSONString];

    NSArray *movieArray = [results objectForKey:@"movies"];

    // Search for year to match
    for (NSDictionary *movie in movieArray)
    {
    NSNumber *year = [movie objectForKey:@"year"];

    if ([[year stringValue] isEqualToString:aYear])
    {
    NSNumber *ID = [movie objectForKey:@"id"];
    // Now use this ID for the next query
    }
    }

  3. Do specific query using the id
    Once you have obtained the id, you can then do another JSON request using the id. The URL will be of this form:
    http://api.rottentomatoes.com/api/public/v1.0/movies/MOVIEID.json?apikey=YOURKEY"

That's basically it. Rotten Tomatoes provides extensive documentation on their API here.

We are providing the code for this example here. Note that you will need to put in your API key at the top of RottenTomatoesJSONViewController.m class.

UPDATE:: We are doing an informal poll to see the iOS verstion distribution amongst our readers. Head over to our statistics post and let us know which version you are currently using.

Ride Buzzer 1.1 Now on the App Store and Free

Posted on August 3, 2011 by Sylvain

We are pleased to announce that Ride Buzzer 1.1 is now on the App store.

New Features:

  • Now available in French! Maintenant disponible en français!
  • Fixed bug with approach warning not always working
  • Updated to latest iOS SDK

And since we are in a good mood, we decided to drop the price to … FREE … for a limited time. We hope you enjoy it!!

Ride Buzzer Available on the App Store

Vancouver hits 97 food carts – There’s an App for that

Posted on July 28, 2011 by Sylvain

The City of Vancouver in the last year has finally allowed more street food carts to adorn its streets. I guess as a token of appreciation to the vendors, they have prepared an app to inform customers where the food carts are located and their hours of operation. A very local use of an app but still quite useful.

The app is well done and provides a standard map where you can zoom in and find the locations of the food carts via drop pins. Clicking provides a small menu where you can click to find more information about the vendor like hours of operations, so on. You can also find the food carts via a list which can be filtered by “Nearby”, “A-Z”, “Popular”, “Faves”, as well as a pure search field.

You can find the app on the store by searching for “Street Food Vancouver”.

You can also read more about it here.

48 percent of smartphone buyers want an iPhone next, says survey

Posted on July 22, 2011 by Sylvain

CBS reported on a ChangeWave survey that close to 50% of smartphone buyers are wanting an iPhone for their next phone. That’s also pretty much the same number obtained in a recent poll on Pollate. Now there is “wanting” something and actually being able to get it. For example, I have been wanting a Porsche 911 since I was 10 years old and still no where able to get it but that’s a different story. What the survey shows is that although a lot of ink has been spilled over the fact that Android has taken over the OS market share (in North America at least) for smart phones, the iPhone still has after 4 years a very strong staying power. I believe it was once said that “Rock and Roll is here to stay” and much could be said about the iPhone.

Another 14 Oranges Production Hits the App Store – mControl for iOS 1.0

Posted on July 14, 2011 by Sylvain

We are proud to announce that our latest creation has been released on the app store by our customer Embedded Automation. The application lets you access Embedded Automation’s mControl “Digital Home” software from your iPad, iPhone, or iPod Touch. Control your house lights, thermostat, alarm system, and even your security camera right within your iPad!. The application is deployed as a universal application simplifying the application management (acquisition, download, and update) while still providing user interfaces targeted for the device to be used: either iPad or iPhone/iPod.

For this application, 14 Oranges provided development services for the following areas:
1) User interface design and implementation for both iPad and iPhone/iPod Touch.
2) Graphical design for buttons, backgrounds, splash screens, and color scheme options.
3) Client / data model implementation against a REST API provided by mControl.
4) Unit testing / system testing / performance testing.

The application is free and can be used in demo mode without requiring a server so feel free to give it a try!

mControl for iOS Available on the App Store

For more information on this solution or any questions regarding our services, please contact us at sales@14oranges.com

Inseminating cows? There’s an app for that

Posted on July 13, 2011 by Sylvain