When Sunny stepped out of the portal, she found herself on a small hill overlooking a town. There were suburban houses with curved roofs standing alongside neat roads, and Sunny saw a few people walking around. "Hm, this must be the starting point for my quest," she said to herself. "I wonder if one of the townspeople will come up to me and ask for help with something? Or will it be a more dramatic prophecy of the Chosen One kind of thing? Or-"
A slightly monotonic voice interrupted her. "Oh, great. You’re a hero wannabe. Am I supposed to be your sidekick, then?"
Sunny gasped and swiveled around, looking for the speaker. But there was no one there except for a strange, floating rock, about half Sunny's size. She frowned at its smooth, white surface. "Okay, first off, I feel like I've just been insulted. Second, who or what are you?"
The rock floated silently for a moment, then opened its eyes. Wait. What?
Sunny stepped back as the sides of the rock separated from its body, forming arm-like appendages. A mouth formed on the front of the rock, and the rock’s eyes blinked as it completed its transformation.
"I'm Robert. Who are you?"
Sunny stared at the talking rock in shock. Then she remembered Rule #7 in her questing notebook: "Don't be surprised if anything odd, extraordinary, or impossible happens. Being surprised does nothing but waste time you could be using for important questing things." So Sunny shook herself, forced herself to accept the fact that rocks could talk in this world, and glanced down at the scrap of notebook paper still in her hand.
Apparently, this was the mysterious Robert who'd help her communicate… "But how?" Sunny blurted out. "Where am I supposed to use this code?" She looked back at her hand and frowned. "And didn't a small white rock come with this note?"
Robert bobbed up and down in the air. "That rock was my disguise in the human world. Here, I'm a robot. Top of the line assistant bot, here to help you in any way I can! Robert the Ambassador at your service." The robot arranged its face into an enthusiastic smile.
Oh, so Robert’s a robot. Perhaps rocks can’t talk in this world, then. Sunny nodded slowly. "How exactly can you help me?"
Robert made a sound that seemed awfully like a scoff and adopted a neutral expression again. "What I said about being at your service is just what Marketing tells us to say. Really, all of us robots were granted free will after the Great Protest at Spaghetti Code Mountain." Robert shrugged. "But assuming I decide to help you, you can type code into the IDE– that’s an integrated development environment– installed in me, and I can run your code."
Robert popped open the top of his head, revealing a glowing blue keyboard and a computer screen.
Sunny stifled another gasp, keeping Rule #7 in mind.
Robert continued talking, unfazed. "See? This is my interface. There's a keyboard and a screen and everything. Think of it as a laptop."
Sunny stared at the keyboard and screen for a moment. The screen had a few lines of code already, as well as a few buttons at the top.

"Unfortunately, I don't have any games installed." Robert floated silently for a second, then added, "No internet browsers either. Really, it's just a place to code. Any questions?"
Sunny swallowed and nodded, then held up the note. "Do you mind if I try this code out?"
Robert squinted at the paper. "Alright, that should be easy enough."
With a deep breath, Sunny stepped closer to the robot and placed her hands on the keyboard. So, the note says to use System.out.println("[your message]"); to say stuff. I don't want to interfere with the code that's already there, so I'll just type on a new line…

Once Sunny had finished typing, she said, "Okay, Robert. I'm assuming the green button runs the code?"
"That's correct."
Sunny nodded and clicked the button.

"Great. There's an error." Sunny frowned at the red text. "Okay, well, how do I fix it?"
"Oh, you should code inside the main method. See that space on line 3? Your code goes there." Robert made a humming sound. "Apologies, we've been having problems with our errors lately… they should be more descriptive."
Sunny suddenly perked up. "Problems, you say? Anything a potential hero could help you with?"
Robert made a surprisingly good imitation of a snort. "Perhaps, but not before you run your first program. Right, and there's one more thing. I forgot to tell you that it's typical to print, 'Hello, World!' in your first program. Doesn’t matter to me, but I figured you'd be one for tradition." The robot shrugged.
"You figured right!" Sunny edited her code. "But…" She clicked the green button again.

"...I also like to add my own flair to things." Sunny winked. "Alright, time to try the next bit of code!"

"Oh, the cursor's blinking. I guess I'll type something for input?"

"It just repeated what I typed." Sunny glanced down at Robert.
"That's right. The denizens of Javaland speak a completely different language, and the best way we've figured out to communicate with you Earthlings is through text. So the people here can plug in one of their multipurpose devices right here, and the device will translate what they say and input it into your program." Robert slid open a panel on the side of his head, revealing a rectangular port.
"Ookay, but you speak English just fine. Talking seems like a better way than typing." Sunny raised an eyebrow.
"That's because I was made to be an ambassador between Earth and Javaland. Most people here don't bother learning other languages because it's rather rare to see otherworldly strangers here. Also, I refuse to act as a translator for you. Free will for robots!"
"Fine then." Sunny sighed. "Anyways, I've run some code, so can you tell me about those problems with the errors now?"
"Right, I suppose you have." Robert hesitated for a moment, then said, "Actually, it might be better to show you. Because the thing is, we've lost their descriptions."
Points: 65
Reviews: 49
Donate