Michael Olivero
The official blog of Michael Olivero, Software Architect & Humble Entrepreneur

Bank Failures App 1.0

Friday, 28 December 2012 17:44 by Michael Olivero

Over the fall quarter of 2012, we created the Bank Failures app for iOS.  I thank a colleague of mine for the detailed graphics and CSV parsing library we ended up using extensively for this and other apps. The idea is very simple -- banks have been failing at a very fast pace since 2008 and there is no easy way to access this information in an organized way to search or simply filter this data by year or by state.

Since we were applying techniques in iOS development, we decided to leverage this need while at the same time applying advanced UI techniques in iOS such as UITableView among others. A recently blog covers some interesting details with UITableView's.

The following are some screenshots of the app as submitted to the Apple App Store.  In a future blog update, I will decompose the entire application from the nightly process which pulls bank data from us government web sites to the filtering, tab views, etc.

Setting UITableView rowHeight property dynamically when reusing UITableViewCell via xib / nib

Monday, 1 October 2012 14:07 by Michael Olivero

xCode allows for multiple convenient ways for configuring the UITableView cells.  Using one of default custom configurations, specifying it in storyboard as a prototype, specifying it in a nib file which is then reused, and simply creating it in code directly.  While developing an app which makes use of the UITableView, I came across an interesting dilemma where I wanted the flexibility of using xCode's UI to configure it however I wanted to avoid certain issues each approach carries as described below.

One approach is to define each UITableViewCell as a prototype of each UITableView directly in storyboard as shown below,

however if there are going to be multiple UITableViews displaying cells in a similar fashion, the inclination is to configure them repeatedly in each UITableView.  This is very repetitious and may even lead to inconsistencies if one is not careful and generally is considered bad programming practice similar to copying a pasting an entire method just to make one small modification within.  One can improve upon this approach by inheriting a common base UITableView class where the configuration is specified in code, however this defeats the flexibility of using xCode's UI to custom configure the UITableViewCell's various sub views.

Another approach is defining the UITableViewCell in a separate nib / xib file, you can then register the nib and reference the UITableViewCell for reuse accordingly from any UITableView controller.  This method retains the configurability of the UITableViewCell via the xCode interface as shown below.


When reusing the UITableView cell in this fashion however, most online examples indicate to register the nib file for reuse and then dequeue as usual to populate the data for each individual cell.  The problem here is, the UITableView's rowHight property is not updated automatically as it is when one specifies the UITableViewCell as a prototype and at run time, you may see something like this:



Many online blogs emphasize the height should be specified as part of the cell construction while executing with the cellForRowAtIndexPath method within the UITableViewController.  The problem I have with this solution is quite frankly, even though perhaps only 10 or actual cells will be constructed and then reused, this code is repeated unnecessarily for those 10 or so times.

The easier route is simply to specify a fixed height in the nib file, say 60 and then specifying the same 60 points in the UITableView's rowHeight property as shown in both images below.



 This will produce the balanced height we are seeking as shown below:


While this has improvements on reuse as we will have consistently looking UITableViewCell's throughout our various controllers and retains the ability to configured and edited via the xCode UI, it still has the ill effect of having to maintaing the rowHeight in two or more different places whenever the height changes and is not yet to my satisfaction of cleanliness.

Further research online reveal many blogs emphasizing the implementation of the heightForRowAtIndexPath method for the UITableViewController. This method is great when there are UITableViewCells with dynamically varying content which need varying height for each cell, however this is not the case here. The problem with this approach continues to be the repeated calls for a UITableViewCell which doesn't vary in height.  Furthermore, in the various examples I found not only is the height specified repeatedly, but registration of nib is repeated as well and some additional lines of code which could also be avoided.


The Solution:

Since in this particular example, the UITableViewCell height will remain the same across all sections and rows and UITableViews, it makes sense to programmatically tell the UITableView it's rowHeight much like we would via the xCode UI, however do so once and be done with it.  The value should also be extracted programmatically from the UITableViewCell residing in the nib / xib file so if the height is ever changed in the future via the design tools, the UITableView is automatically adjusted accordingly without any further intervention in the code.

To accomplish this, the logical place to put such code would be in the UiTableViewController's viewDidLoad method as this code is executed once regardless of the number of rows to rendered.  In this method, we simply load the nib by name, register this nib with the UITableView, and then simply set the rowHeight of the UITableView to match the height of the first view in the nib which we already know is simply a UITableViewCell.


    UINib* nib = [UINibnibWithNibName:@"ADTableViewCell"bundle:nil];

    [self.tableViewregisterNib:nib forCellReuseIdentifier: [ADCustomCellIdentifier]];

    self.tableView.rowHeight = ((UITableViewCell*)[[nib instantiateWithOwner:selfoptions:nil] objectAtIndex:0]).bounds.size.height;


In the example code above, we additionally reference a predefined class method for the cell identifier we conveniently placed in the strongly typed class representing the UITableViewCell with [ADCustomCell Identifier].

Tags:   , , ,
Categories:   iPhone / iPad | Software
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

StraightTalk on iPhone5 Step by Step Instructions

Saturday, 22 September 2012 23:04 by Michael Olivero


For those who are interested in knowing if iPhone5 AT&T GSM works on StraightTalk, the answer is "Absolutely Yes". Although I already tested it with my SIMM and cannot recreate the steps as I do not have another StraightTalk SIMM, I did create a video showing Step by Step Instructions for configuring StraightTalk on the new iPhone 5.


First, watch this video to see how I modify the SIMM.


Then, with WiFi enabled on the iPhone, visit this web site: http://www.unlockit.co.nz to configure your APN.

Tags:   ,
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

The New IPhone's or iPhone 5 New Features With Illustrations

Wednesday, 15 August 2012 01:44 by Michael Olivero

With the next iPhone just around the corner, I've decided to consolidate all the rumors i have read in the past 6 months into a concise list of the ones which are most certainly coming to the iPhone.


The new iPhone will have a 4" screen by increasing the height and making it a true wide screen 16:9 display

All iPhones up to and including the 4S have had the similar aspect ratio of the original iPhone released back in 2007.  The new iPhone for 2012 will have a slightly longer profile with a total resolution of 640x1136.  While this may seem to make the phone significantly longer and awkward, it was accomplished efficiently and with only increasing it's physical length every so slightly.  If you look at your current iPhone, the large areas where the home button and speaker reside are reduced by about 40%.  It not too obvious in the side by side comparison below as this was just a mockup using an existing iPhone 4S modified.  With this optimal use of space, along with a slight increase in height, Apple is able to add a 4" screen while retaining the similar look & feel of the already great iPhone 4S.

The new iPhone will have a unibody case.

Unlike the previous two iPhones, where a revolutionary stainless steel frame acts as the main support for the phone while doubling as an antenna for the various services, the new iPhone will sport a unibody case.  While the rumors don't solidly say this case is made of Liquidmetal, I will go on record and almost bet the farm on it being based on Liquidmetal.  The reasons are outlined in a separate blog to be posted soon.  Liquidmetal uses a very unique manufacturing method which allows for building very precise pieces out of molds much like plastics.  This method, while challenging to work with metals, can produce more intricate pieces than traditional CNC machining of metals or aluminum.


The new iPhone will sporta faster processor

Some competing smart phones are already using quad-core cpu's and the iPad3 introduced in early 2012 uses Apple's A5X CPU which is a dual-core cpu with quad-core graphics subsystem.  This CPU is necessary to push the extra pixels the iPad3 requires (4x as much as the previous iPads).  If this CPU is used for the next iPhone, it would be sufficiently powerful for all of the iPhone's needs as it's resolution is significantly lower and consequently making the next iPhone that much more faster on graphics when compared to the iPad3.  It's possible Apple may introduce the quad-core A6 processor, but this might simply be an overkill making battery suffer -- a high priority in a mobile device with aconstrained battery such as the iPhone and other smart phones.


The new iPhone will sport a thinner profile

The new iPhone, with the screen flush, will be 7.6mm thin.  If you want to compare how thin this is when looking at the current iPhone, imagine an iPhone4 or 4S with both of the glass pieces on the back and front removed.  This is approximately how thing the next iPhone will be and it's significant.  How can they do this without shorting battery life?  Two ways, one is of course ever improving battery technology and secondly by using an in-cell panel for the screen.  This simply means the screen and touch technology are built together reducing the space needed to fit both technologies separately as with previous generation iPhones.  Apple's new supplier, Sharp, also confirmed shipments of this new screen a few days ago.


The new iPhone will utilize next generation cellphone technology called LTE (Long Term Evolution)

The first generation iPhone utilized EDGE, which was limited to about 128Kbs speeds and was good for emails and basic data, however wasn't good for general web surfing.  The original iPhone ushered in the mobile data era and not too much later, the next generation iPhone (iPhone 3G) ushered in the next generation mobile data - 3G.  As cellphone companies, particularly AT&T, struggled to keep up with data demands it was clear higher speeds where necessary.  In the US, HSPA (High Speed Packet Access) became the GSM standard for 3G on AT&T's network and later, with the iPhone 4S, introduced yet an upgraded version termed HSPA+ which provides very high speeds under ideal conditions.  The HSPA+ standard however was still not efficient and yet a newer, data oriented, transmission technology was necessary -- LTE.  With LTE (Long Term Evolution), we are littering entering the broadband era for mobile devices.  The speed at which your mobile devices operate is largely indistinguishable from your home broadband speeds with low latency and large throughput.  Early LTE chipsets, similar to initial 3G chipsets, where power hungry and significantly drained the battery when compared to the previous generation 3G and EDGE respectively.  With iPhone5, the LTE chipsets have improved significantly, even within the last 6 months, making LTE more suitable.  Verizon has the largest deployment of LTE, while AT&T has the largest deployment of HSPA+ with LTE available in about 25% of the population Verizon covers.  AT&T however claims more consistent speeds when switching in and out of LTE while Verizon will allegedly switch to their slower 3G technology.  Incidentally, for those which may require voice and data use simultaneously, Verizon's 3G has a small imitation where data cannot be used while on a phone call unlike AT&T's.  The choice of carrier for the new iPhone has become that much more difficult to decide.  Regardless if you choose Verizon or AT&T, you'll have access to the latest LTE speeds where available.

New Smaller Dock Connector

The next iPhone will certainly have a smaller dock connector.  Lots of miniaturization has occurred in the last ten years and retaining same 30pin dock connector now certainly start to impact the space utilization in modern devices.  As a result, Apple has little choice but to update the dock connector to not only support modern protocols such as USB3 or Thunderbolt, but also from a footprint perspective making it smaller.  The actual pin out is unknown with certainty, but you can expect it to be smaller and fit universally in either orientation unlike the existing dock connector which fits only in one orientation.


Relocated Microphone Jack

When you hold your phone in your hand, you hold it upright.  When you place it in your pocket, you usually place it top down while holding it in the same orientation.  If you have the audio headphones plugged on the top, as with previous generations, this would require you to reorient your phone in your hand prior to placing it in your pocket so the headphones remain in the upward position.  With the next iPhone, the headphone jack is relocated to the bottom and this particular scenario & inconvenience is alleviated.


Next Major Version of iOS, iOS6

  • As traditional with all previous releases of iPhone, the next iPhone will certainly be released with iOS6.  There are many interesting features of iOS6.
    1. New Maps application utilizing SVG graphics for better realtime scalling
    2. Turn by Turn Directions
    3. New Alarm features such as wake up to iTunes song
    4. New Bluetooth features such as specific group synching rather than all contacts
    5. Deeper Twitter integration as well as Facebook as an OS feature API available to all applications
    6. New metallic-like refresh in many areas such as phone & iPod apps, etc.
Tags:   , ,
Categories:   iPhone / iPad
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Microsoft Surface with VaporMG and Liquidmetal for Apple Mobile devices

Tuesday, 19 June 2012 18:25 by Michael Olivero

Today's announcement, aside from all the bells and whistles of their unique approach in making a content creation device as much as a consumption device, was the use of VaporMG (pronounced Vapor Mag).  When I saw the detailed presentation by Panos Panay, the general manager of Microsoft Surface, I was intrigued at his continual use of the word perfect and the variations there of predominantly centered around the material, the feel and precision of it.

The first thing that came to mind after seeing VaporMG is the strong resemblance to Liquidmetal Apple is expected to use soon.  In the case of Surface, magnesium, is injected into molds allowing for very high precision craftsmanship at unbelievably small thicknesses such as .65mm in the case of the Surface -- a similar process and technology is also applied with Liquidmetal.  I'm not certain if this was a mere coincidence, but on the same day the Surface was announcement, Apple decided to extend their exclusive license to Liquidmetal for another 2 years.  Apple originally acquired an exclusive license to Liquidmetal back in 2010 for mobile devices and is highly rumored to be used in the next iPhone.  Recent leaks of a very thin metallic like enclosure, if legitimate as many have been in the past, provides some support for this rumor, however we will not know for sure until Apple releases their iPhone 5 around October 2012.

I praise Microsoft for taking a full frontal attack on mobile.  I praise them for thinking out of the box in creating a content creation device as much as a content consumption device.  I have to admit, many times I've wanted to create a blog entry and didn't quite find the right convenience to do so with the screen-based touch keyboard and even found it somewhat inconvenient to pair up the bluetooth keyboard as well.  Having the keyboard integrated into the cover seems like a novel tradeoff to both scenarios.

In summary, competition is great for innovation and I look forward to awesome Liquidmetal or VaporMG products to come in the near future from both companies.

Some references:


Apple Extends Exclusive License to Liquid Metal: 

iPhone5 Liquid Metal Enclosure Leak: 

Tags:   , , ,
Categories:   iPhone / iPad
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Apple Siri Commands - Friends

Tuesday, 12 June 2012 20:44 by Michael Olivero

Here are some Siri sample to interact with Friends

Checking Up on Friends

  • Where's Mike?
  • Where is my sister?
  • Is my wife home?
  • Where are all my friends?
  • Who is here?
  • Who is near me?
Tags:   , , ,
Categories:   iPhone / iPad | Mac
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Apple Siri Commands to interact with the Address Book

Tuesday, 12 June 2012 18:51 by Michael Olivero

Here are some Siri sample to interact with the Address Book

Query Contacts with Siri

  • What's Michael's address?
  • What is Mary Jane's phone number?
  • When is my wife's birthday?
  • Show Rick's home email address

Finding Contacts with Siri

  • Show Jason Smith
  • Find people named Rick
  • Who is Michael Rodriguez

Relationships with Siri

  • My mom is Martha Smith
  • Michael Smith is my brother
  • Call my brother at work
Tags:   , , ,
Categories:   iPhone / iPad
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Cross Multiply Mental Calculation iPhone App Ver 1.1

Saturday, 12 May 2012 17:33 by Michael Olivero



This is the latest update to the original cross multiplication application released a few weeks ago -- original posting here

Version 1.1 of the app allowed me to practice with threading as well as state.  The app has an interactive timer which is not intrusive by starting/stopping automatically.  Your best error-free scores are saved so you can challenge yourself to beat it over and over.


Cross Multiply Mental Calculation iPhone App

Friday, 27 April 2012 19:42 by Michael Olivero

Update 5/9/2012:



Yusnier Viera, a former co-worker and current world record holder in calendar mental calculation, brought to my attention the concept of cross multiplying.  After learning the basics and practicing over time, I have been able to successfully multiply upto four digit by four digit computations in my head.  Since the exercise is stimulating and to a certain extent entertaining, I decided to build an iPhone application to easily practice.

Unlike paper and pencil, using an iPhone app allows for immediate feedback while entering the answer.  I've been learning how to develop iOS apps for both iPhone & iPad and I am on the verge of releasing this application.  Since I'm anxious to get it out to the world, I have defer creating the tutorial, the statistics page as well as game center integration, until future updates.

I decided to give the app a representative iconic person, so Einstein fit the bill.


Once loaded, you are presented with the home screen where you can link out to a video tutorial or simply start the app.



Once started, you can interactively create up to 4x4 multiplications to test your mental calculating abilities.  In a future update, I'll hook it up to game center and keep track of best times for each type as well as increase the scale up to 8x8.


Tags:   , , , ,
Categories:   iPhone / iPad
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

When to buy Apple products?

Monday, 26 March 2012 17:05 by Michael Olivero

All electronic devices, with few exceptions, decrease in value over time.  With Apple products, this is notoriously accelerated because Apple tends to release products on a yearly basis across most of their product line.  Take for example iPhone and the five releases thus far from 2007 to 2011.

ModelRelease Date
iPhone June 2007
iPhone 3G June 2008
iPhone 3GS June 2009
iPhone 4 June 2010
iPhone 4S Sept 2011

Apple traditionally upgrades the specifications of their products while keeping the pricing the same.  So a new iMac 27" may still be $1699, however this year's model has a much more powerful video card and larger capacity hard drive.  Apple rarely, only once that I can recall, adjusts their price prior to a new model announcement -- and when they did this, with the original iPhone, it created an uproar in complaints from early adopters despite the price being reduced.

Since Apple normally doesn't adjust the price on their products and is almost guaranteed to have a new model 12 months later, one could argue you get the best bang for the buck buying the product as soon as it's released.  Buying it 6 months later or near the next release sets one up to either delay the purchase again for the next release while at the same time remorse the previous purchase under the pressure of desiring the latest innovation.  It is true there are times where one doesn't want the new one because it is not incrementally more valuable to justify.  I for example didn't move up to the iPhone 4S having the iPhone 4.  Yes, I desire Siri, but I decided to hold off.  In doing so, I went ahead and purchased the Apple care warranty and guess what?  Since i purchased it on launch day, my warranty expired roughly around the time  as the iPhone 4S ( arrived and the extended warranty will cover me through a whole year until the next model arrives.  The warranty purchase couldn't have been more efficiently calculated -- and it was only possible because I purchased as soon as the product was released.

In summary, you'll get the best bang for the buck and the best options when buying right away.

Tags:   ,
Categories:   Mac
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed