At some point in the project you're going to have to break down and finally define the problem.
programmers' saying
"Okay," Larry Fox said, "what about corned_beef?"
Wiz had spent most of the previous afternoon and a good part of the morning meeting the team and reviewing what they had done. Now he was beginning to tackle the problems Jerry had dumped in his lapliterallytwo days before. All the stalls in the Bull Pen were taken so they had wedged a table in down by the whiteboard and tea urn. He and Larry had spent hours going over obscure bits of code and untangling particularly strange demons.
"corned_beef is a hashing routine, obviously," Wiz told him between bites of his third sandwich of the afternoon. "It's a fast way to search for a demona routineby name."
"But where's the rest of it? We figured out that it was doing a hashed look up, but we couldn't see how you searched the entries."
"Mmmf," said Wiz around his mouthful of sandwich. He shook his head and swallowed hard. "It's a perfect hash. One item per entry, always." He took another big bite of sandwich. "You take the first characters of the demon's name, multiply that by a magic number. That gives you the number that serves as a subscript to the array. If you pick your numbers right you always get a unique entry for each item."
"That's weird!"
Wiz shrugged. "It works."
"One more question. Why do you divide by 65,353?"
"Because you've got to divide by a prime number, preferably one at least twice as large as the number of entries you want in the hash table. 65,353 is a Mersinne Prime and it was the largest prime I could remember."
Larry frowned. "Are you sure 65,353 is prime? I don't think it is."
Wiz shrugged and took another bite. "It worked."
"Okay," Larry said, "I'll clear the rest of these changes with Jerry or Karl and get right to work on them."
"No need for that. I intended to fix those other points anyway and it's in the language specification."
Larry hesitated. "I'd still better clear them."
Wiz started to object and then stopped. It really wasn't his project any more, he realized. The original specification might be his, but even that had been modified in the process of development. Now it was a team project and Jerry Andrews was the team leader. It hurt to recognize that, but fighting it would only damage the project.
"Fine," he sighed. "Let me know what Jerry wants to do about it."
The next afternoon the entire team gathered in the Bull Pen. One of the long trestle tables had been cleared and stools and benches were pulled up around it. Wiz sat at one end of the table with Moira and Jerry by his side. In the center was the new version of the Dragon Book, with the small red dragon curled peacefully asleep atop it.
"The news from the Council isn't good," Wiz told them. "I was hoping they could solve their immediate problems by traditional methods once they understood what the problem was. They've been pushing for us to wave a magic wand," he smiled wryly at the phrase, "and make them go away. Well, as of this morning, it is definite. There is simply no way they can do it. We've got to come up with a magical means to head off a war."
"Not much to ask, is it?" Nancy said.
"Okay," Wiz said. "We've got two problems here. One of them is the hacked version of that protection spell. The second one is we've got to keep people from penetrating further into the Wild Wood until we get things straightened out."
"What's the main problem?" Judith asked.
"The spell, I think. That's what seems to be doing the most damage right now. We've got to either neutralize it or keep people from using it."
"Can you not neutralize their magic as you did at the City of Night?" Moira asked.
"The worms? That's too non-specific." He shook his head. "No, we can't afford to soak up all the available magic. That would leave the humans right back where they were before we started. We need something more subtle."
"But we have to have it quickly," the redheaded witch said. "We cannot afford to waste time in pursuit of the 'elegance' you keep talking about."
"So we're gonna need something quick and dirty." He held up a hand. "But not too dirty. Does anyone have any ideas?"
"Sounds like a job for a virus," Nancy said.
"Naw, as soon as they see the program is infected, they'll switch back to the old one."
"A birthday virus!" Danny shouted suddenly.
"A what?" Wiz asked.
"A virus that doesn't trigger until a specific event occurs. We set the magic event far enough in the future that the program will have had time to spread everywhere. Then it triggers," he waved his hands, "poof! The spell doesn't work anymore."
"You know," Jerry said suspiciously, "you talk like you've had a lot of experience at this."
The other shrugged. "It's, you know, been a special interest of mine."
Jerry snorted. "When we get back, remind me never to use any software you had anything to do with."
Wiz ignored the byplay. "Okay, what keeps them from going back to the old spell?"
There was silence down the table.
"We can't just wipe it out of their memories, can we?" Jerry sighed.
"Even if we could, there are sure to be written copies around. When the new program self-destructs, they'll just go back to the old one."
"Can we come up with a spell to attach itself to demon_debug and destroy it?"
Wiz thought hard. "I did something like that against the Dark League. The problem is, when it destroyed the spell it took out everything for about thirty yards around in a humongous blast. We don't want to kill them and it would be a big job to weaken the effect."
"Aw, they'd get the message after the first couple of explosions," Danny said.
"No," Wiz said firmly.
"Well . . ." The young programmer's face lit up. "Hey wait a minute! Suppose they get the idea the spell's no good?"
"The problem is that it is good against magic. Too good."
Danny smiled an evil smile. "Not if we're the ones making the magic."
Wiz looked at Danny and then at Jerry. "Now that's got possibilities. Suppose we cook up something demon_debug doesn't work against?"
"Yeah," Jerry said slowly. "Something that will convince them they don't ever want to mess with demon_debug again. Danny, stick around after the meeting, will you? I think I know how we can put that arcade-game mind of yours to work."
Wiz made a check mark on the slate in front of him. "Okay, that gives us a handle on one problem. Now for the other one, keeping humans out of the Wild Wood."
"I don't suppose we can just make a law?" Jerry asked hopefully.
Moira snorted and shook her head so violently her copper curls flew in front of her face.
"That is what the Council has been trying. The hunger for land is deep in our farmers and the soil within the Fringe is thin and poor." She reached up and brushed a strand of hair off her upper lip. Besides, I think you misread the relation between the Mighty and the people. The Mighty are guardians and protectors, not governors."
"And right now the Council's influence with the people is at an all-time low," Wiz said grimly. Thanks in part to my meddling.
"So we're gong to need a barrier," Judith said. "A wall."
"They would climb a simple wall," Moira told her. "Or else batter breaches in it."
"What about your basic wall of fire?" Karl asked.
"How do you keep from burning down the Wild Wood?"
"We could do a line of death," someone else suggested.
"We don't want to kill them, just keep them in," Wiz said.
"An electrified fence?"
"That's a thought."
"Yeah," Danny said, "with mine fields and guard towers!"
"That is not a thought," Wiz said firmly.
Again everyone at the table fell silent. The little red dragon whuffed in his sleep and scuffled the papers beneath him with tiny running motions as he chased a dream mouse.
"Okay," Cindy said slowly. "What about making them not want to go beyond a certain point?"
"A geas?" Moira shook her head. "You cannot lay geas on an entire people, including ones you have never seen."
"But ddt does essentially that for magical creatures," Cindy said.
"That isn't a geas," Wiz told her. That's a repulsion spell. Different animal."
"Well, how about a repulsion spell then?"
"Repulsion spells attach to specific objects," Moira explained. "You would have to put the spell on every rock, every tree and every finger-length of soil along the line."
"That's not a problemin theory," Jerry said. "We can write a program that will do it. It would take a lot of demons . . . No, wait a minute! We could use the principle of similarity. Mark the line on a map."
"Yeah, fine," said Nancy. "Where are we going to get a map accurate enough to make a spell like that stick? Have you seen what these people call a map?"
"Okay, so we make our own map," Wiz said.
"How are we going to do that?" asked Karl. "You can't just sketch it from dragon back."
"If we have to mark everything individually, it will take years to get the barrier up," Jerry said. "I don't think we've got years."
"We will be fortunate if we have weeks," Moira told him
"Wait a minute!" Wiz put in. "We can use a modified version of my searching spell. Generate thousands of mapping units. We'll have our data in a couple of days."
"Searching spell? You mean that R-squared D-squared thing?"
"No, the three-layer search system. You've used it, haven't you?"
"That is the spell I was telling you about, Lord," Moira said to Jerry. "The one we could not find."
Wiz frowned. "There was a copy in my notes. Well, it doesn't matter. It won't take long to rewrite it and I'd want to translate it to run under the latest version of the compiler anyway."
Wiz made another mark on his slate.
"That's it then. Okay people, split into your teams and let's get cracking. We've got a lot of work to do here."
"Are you sure this will work?" Bal-Simba asked dubiously as Wiz, Jerry and Moira showed him the team's latest creation.
"It will if they try to use demon_debug on it," Wiz assured him. "The basic spell is a modification of the one I used to create the watchers against the Dark League."
"And it will harm no one?" the giant black sorcerer pressed.
"It can't do physical damage to anyone, Lord," Jerry said confidently. Of course, what it can do to their mental state . . .
"Amazing," Bal-Simba said as he studied the creature on the table before him. "Where did you get the idea for these things?"
"Where I get all my best ideas," Wiz said jauntily. "I stole it."