CHAPTER 47
Albert had to re-program the Compressor/Decompressor so that the breadbasket limit was not enforced. This was possible due to the Fast Forward & Back and Zenia Zephyr providing a display screen, on which the code for the various features and add-ons could be edited.
Although he was no programming expert, Albert had been taught enough in mechanic’s school to “get by in a pinch,” and so my good friend decided to look over the code that ran the Compressor/Decompressor and see if he could figure out how to alter it to meet the new exigency.
Albert found the relevant piece of code in the compressor_decompressor.cs file. It looked like this:
private void btnCompress_Click(object
sender, EventArgs e)
{
const double breadbasketSize = 512;
double currentSizeOfSubject = GetSizeFromWand();
while (currentSizeOfSubject > breadbasketSize * 2)
{
currentSizeOfSubject = currentSizeOfSubject * 0.5;
}
SetSizeOfSubject(currentSizeOfSubject);
}
This code caused the object being acted on (the animal being decompressed) to be continually halved in size until it got to the point where decompressing it another step would make it smaller than a breadbasket. At that point, the reduction in size (the compressing) would end.
Albert wanted to change the code so that it would not stop until the size of the object approximated that of a fingernail.
So, he changed the code to this:
private void btnCompress_Click(object
sender, EventArgs e)
{
//const double breadbasketSize = 512;
const double fingernailSize = 4;
double currentSizeOfSubject = GetSizeFromWand();
while (currentSizeOfSubject > fingernailSize * 2)
{
currentSizeOfSubject = currentSizeOfSubject * 0.5;
}
SetSizeOfSubject(currentSizeOfSubject);
}
Albert then recompiled the code, applied the changes to the Zephyr’s codebase, and tested it.
The first animal to be tested was . . . no, not a guinea pig, but a “River Horse” — otherwise known as a Hippopotamus. Jowls had always wondered what it would be like to be small, and so he threw caution to the wind and volunteered to be the first Hippo in history to become, albeit temporarily (hopefully only temporarily, anyway), smaller than a dung beetle.
As Jowls got smaller by half with every loop through the Compressor/Decompressor’s code, the other animals pressed in closer to watch the process in action.
“Does it hurt, Jowls?” Ooga the Gorilla asked, as he passed from breadbasket to dinner pail size.
“No, not at all! It kind of tickles, actually,” Jowls said.
All of us watched Jowls as he shrunk down to the size of a pomegranate, then an apple, then a lime, a walnut, a peanut, and finally — thankfully! — stopped shrinking as he was halved in size one final time.
“That was fun!” Jowls yelled, in a squeaky voice barely audible to those standing close to him.
That opened the floodgates, so to speak, and Albert handed the wand-passing duties over to Ward as he went to the Fast Forward & Back and made the same code changes in that vehicle.
Taterskin & The Eco Defenders (in paperback, kindle, or hardcover) is available here.