was successfully added to your cart.
Category

Rant

When you wish you had a strongly typed compiler!

By | development, iPhone, Rant | No Comments

The other day a work colleague of mine ran into some troubles with an unrecognized selector exception crashing his iPhone application…the exception looked something like this:

NSInvalidArgumentException’, reason: ‘-[__NSArrayI addObject:]: unrecognized selector sent to instance …..’

After much frustration, and a fair bit of time spent with a bunch of us trying to hunt down the problem, it turned out to be a problem that could have been noticed immediately had the compiler been strongly (stronger) typed. Yes, ultimately the problem arose due to programmer error, however, this particular instance is just one example of why I prefer strongly typed languages (such as Java).

The error came about as a result of attempting to add an object to an NSMutableArray type that was actually pointing to an NSArray object. This type of scenario is shown in some demo code below:


NSString *test = @"test";
NSMutableArray *mutableArray = [[NSMutableArray alloc] init];
[mutableArray addObject:test];
NSArray *immutableArray = [[NSArray alloc] init];
mutableArray = immutableArray;
[mutableArray addObject:test]; // Exception: unrecognized selector

From the above code, it is easy to see that a subclass type is being assigned to a superclass type. In Java, for instance, this would immediately have been flagged as an error (conversion error between types), and the problem resolved fairly quickly. To be fair to Objective-C, a warning is given when attempting to perform an incompatible assignment, however, this simply just does not seem to be enough sometimes and the result can be a real pain for developers. Fortunately, this time around, it was not myself who bore most of this pain 😛

BlackBerry Dev is Horrible: reason 4

By | BlackBerry, Mobile Development, Rant | No Comments

Take a look at the BlackBerry API reference tool-tip above – the descriptions of the url and cookie parameters have just been left blank. Fortunately in this case the parameter names make their use self-explanatory, but in other areas of the API reference this kind of incomplete or often poorly described documentation makes development more difficult than it needs to be. How hard can it be to ensure that the API reference docs are complete?

Symbian: Going nowhere fast?

By | Rant, Smartphones, Symbian | No Comments

Research companies Gartner and IDC predict that the smartphone operating system market will remain dominated by Symbian in 2014, followed by Android in the No. 2 spot. AllAboutSymbian.com provides a summary – along with some unreasonable Symbian enthusiasm – of these predictions with some graphics relating to the future growth of the different platforms.

So, the bad good news is – that is if Gartner and IDC are correct – is that we have at least 3 uplifting years of  unobscure, well-documented, Symbian development to look forward to. I’m pumped. Not.

BlackBerry is Horrible: Reasons 2 and 3

By | BlackBerry, Mobile Development, Rant | No Comments

These two go hand in hand so thought I’d post them together:

2: BlackBerry’s almost always seem to require a restart when you update or install over an app or library. BlackBerry’s take possibly the longest of all devices to restart. As one forum poster put it: “If I have to reboot mine I go and take a nap or read War and Peace.” This makes testing on the device a wonderful experience.

3: BlackBerrys seem to have a single class loader, but no unique namespace assigned to each app. This means that you can’t have two classes of the same name loaded at once. So if two apps use the same package / class name or if you want to build seperate instances of a shared library for multiple apps…well…you can’t without the pain of refactoring. If you try to load multiple classes of the same name, the device doesn’t complain, it just seems load the first class and quietly forgets about the 2nd one. In practice this can make developing, testing and releasing apps for BlackBerry a nightmare in certain but fairly commen circumstances.

These issues were pointed out as far back as 2006 by worried developers; and now 4 years on, the problem’s still seem to exist.

Go BlackBerry.

BlackBerry Development is Horrible in So Many Ways: Part 1

By | BlackBerry, Mobile Development, Rant | No Comments

As much as BlackBerrys are reasonably sturdy devices when it comes to simple access to various communication channels (albeit doing it with the most profoundly boring interfaces ever); their weak attempts to lure developers away from iPhone and Android are extremely frustrating; as is their development environment. After developing for BlackBerry for a year now, I’ve come across one too many flaws in the BlackBerry dev environment and programs and need to vent – this could be a long series of posts…

First up is a look at their very average website – I’ve only ever had this error happen on the BlackBerry website…numerous times…and yes I have cookies enabled.

BlackBerry’s Alliance Program takes my breath away – and not in a good way

By | BlackBerry, Mobile Development, Rant | No Comments

A big attraction for BlackBerry users is the BIS (data) network and the way BlackBerry contracts are structured so that access to the network is charged at a flat and fairly low rate. As a result users feel they are getting unlimited mobile internet access cheaply.

Given Apple’s hold on the mobile app market and BlackBerry’s apparent desperation  to attract developers you would think that providing developers with easy access to the BIS network in their apps would be a given for BlackBerry. Unfortunately and to my amazement, this is not the case.

To gain approved (there are unapproved ways) access to the BIS network, you need to be a member of the BlackBerry Alliance Program in the associate tier. Sounds easy enough? Not quite… In addition to paying $2000 a year, to be an associate tier member you need to earn 45 member points; which can be earned in the following ways, many of which border on ridiculous:

ActivityPoint Assignment
Revenue Impacting
Influenced Revenues0-10 per quarter
Desired Behaviour
Customer References (limit to 2 per year)5 per submission
Valid Case Study (limit to 1 per year per partner, only if approved by RIM)10
Completed Competency (through Certifications, see Certification Requirements)10
Events
Sponsorship of RIM Organized Event (maximum points awawrded each year is 10)10 per sponsorship
Company representation at the BlackBerry Developer Conference5
Company representation at WES5
Company representation at Alliance Summit (either North American or European)5
Completion of Alliance Member Survey3
Promoting BlackBerry Alliance Membership on your organization’s website5
Requirements Completed
Submit quarterly activations or PIN numbers2 per quarter
Up-to-date company profile and contacts2
Up-to-date solution submission for RIM distribution2
Sales tools submitted for RIM distribution2

Giving points out for conference attendance and sponsorship smacks of desperation to me; and from a development houses point of view the rest look about as attractive to earn as writing Symbian apps. Companies don’t want users of their BlackBerry apps to be charged for data; and so when they have the choice of putting an iPhone app out or a BlackBerry app; this plays a major factor in helping them make that decision.

After numerous grumbles such as mine above, RIM has claimed that the BIS access will move down to the free, ‘0 member points required’ tier of the program. I asked them in January when this change would happen, to which they said February. Well, tomorrow is April and I still haven’t heard anything…