One of the worst horrors of every developer is the leakage of a almost-done but unprotected beta version of a new application… . The program makes it onto the internet…and once it is there, removing it becomes impossible. So far so good..but please look at the code below:
static void
mainFormInit (FormPtr pForm)
{
gY = 20;
if(OpenNetworkLibrary()!=errNone)
{ // On any error!
CloseNetworkLibrary();
FrmCustomAlert(AltError,"Failure to open network library! ","Tapping 'OK' will Quit appl.", "");
EventType event;
event.eType = appStopEvent;
EvtAddEventToQueue(&event);
return;
}
// On success:
FrmSetGadgetHandler(pForm,FrmGetObjectIndex(pForm, GdgChanList),chanBarHandler);
}
This bit of code comes from a new, soon-to-be-released network application for the Palm OS. It terminates application start-up if the net library doesn’t come up…and wreaked havoc in the testing department of the developer!
Testers were used to ‘blind-test’ non-network parts of the UI on the go/on non-connected Palms…and failed miserably because of the ‘booby trap’ above.
Avoiding this development disaster is easy – do not insert code that harms testing operations unless you absolutely have to. The code above belongs into a release candidate…but not into an UI test build…
What do you think?
Related posts:
