[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This question is best answered with a story.
Cogsys is a system for displaying stimuli and recording responses. It is easy to design general routines which can load and display pictures or text. The user is responsible for creating all the pictures he needs beforehand, and Cogsys displays those pictures. So far, so good--this static picture system was (and still is) used successfully for years.
One day, however, a particular experiment called for a series of random dot pictures. Each time the experiment was run, different pictures needed to be used. With the static picture system, this meant thousands of pictures needed to be generated before each set of experiments. Worse, each of these images was only shown once, for a split second, and then never used again. Clearly, this is a very wasteful and tedious setup.
The obvious answer was to add new commands to Cogsys that tell it to generate the images in memory just before it actually showed them, and then erase them from memory after they were displayed. There was nothing wrong with this approach, and in fact in the past whenever new functionality was needed, it was always added as a new command.
However, three issues stood in the way of the "just add another command" solution. One, Cogsys was getting very big and bulky. Over time, the number of "just added" commands had ballooned into a big mess. Because Cogsys must run in DOS real mode, it has to keep itself under the infamous 640 kilobyte conventional memory limit: there just wasn't room for more code in the main program. Second, these commands were only going to be used for a small set of experiments. Adding so much code to the main program for such limited use would have been very wasteful. Finally, and most importantly, the random dot commands needed lots of variations. If the random dot commands were part of the main Cogsys, every time a small change was made in the picture generating routine, a whole new Cogsys would have to be built and deployed.
Extension routines neatly solve all these problems. By separating the development of the random dot routine from the main program, the picture generator could be tinkered with as much as necessary without touching Cogsys at all. Only the extensions would have to be updated on the client systems.
This approach was used successfully in the final versions of Cogsys 2.9. Cogsys 3.0 cleaned up the syntax and made loading and using CXRs an integral part of the system.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |