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:

  1. How to print integers, etc into a field
  2. OnBoardC and the glue library – changing control attributes
  3. On taking over foregin code
  4. Use C and C++ code together – undefined reference galore
  5. Register creator ID’s early

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting

© 2012 TamsPalm - the Palm OS / web OS Blog Suffusion theme by Sayontan Sinha