Alderson loop
From Wikipedia, the free encyclopedia
In computer programming, an Alderson loop is a type of infinite loop, where there is an exit condition available, but inaccessible in the current implementation of the code. Typically this is created by a bug in user interface code.
[edit] Examples
- The term supposedly received its name from a programmer who had coded a modal message box in Microsoft Access with no OK or Cancel buttons, thereby disabling the entire program whenever the box came up. The message box had the proper code for dismissal and even was set up so that when the non-existent OK button was pressed the proper code would be called.[1]
- A typical example is a menu stating, “Select 1-3 or 9 to quit” and 9 is not allowed by the function that takes the selection from the user.
- An Alderson loop in PHP:
$i = 1; while (true) { if ($i > 10) break; // We forgot to increment $i! }
[edit] See also
[edit] References
- ^ Alderson Loop The Jargon File, Version 4.4.7. Accessed 21 May 2006. (Public Domain)