Young Writers Society



Sunny and the Syntax Errors of Doom: Chapter 7.1

by Spearmint


It wasn't difficult for Sunny and Robert to find the train tracks leading away from the Loop Factories. It looked like a couple of trains were leaving as well, carrying armor to different parts of Javaland, as shown through the large label "suitsOfArmor" on the side of the trains. Sunny frowned thoughtfully when she saw that. "Hey, Robert, wasn't Eniac's house labeled with something like that too?" She flipped through her notebook and found the sketch she'd made of the house. "Yeah, it had ‘houseOfEniac' with a lowercase ‘h' and an uppercase ‘O' and ‘E'."

"That's called camelCase," Robert said. He shrugged. "It's just a common way of naming variables if you have to use more than one word. Makes it easier to read than squishing all the words together with the same capitalization, no?"

Sunny thought about that for a moment. "Hm, I guess that makes sense." Before she could ask anything else, she was distracted by the sight of the train station.

There were multiple tracks next to roofed areas where passengers were waiting. The sound of their chatter reached Sunny's ears, and with the help of Eniac's translation device, she could pick up snippets of conversation.

"I can't wait to see Method City!" A young girl bounced on her toes next to her family.

Nearby, an older Javalandian asked, "Is our train going to be late?"

"Ugh, I don't want to go to work."

That last one reminded Sunny of her parents, and suddenly she thought of what Robert had said about the previous Earthling to come to this world. She gulped and couldn't help but feel a pang of homesickness. Who knew how much time had passed back on Earth? What if her family was missing her already?

"You alright?" Robert was looking at her quizzically.

"Oh! Y-yeah." Sunny tried to smile. "We, um. We need tickets, right?" She shook herself out of her thoughts and looked around for a place to buy tickets.

Robert frowned, but followed Sunny after a moment.

Sunny walked up to a nearby booking clerk and smiled, focusing on the present. "Hello! Where's the closest stop to Spaghetti Code Mountain?"

The lady raised an eyebrow at her. "Something's been up with the mountain lately. Red text flying there, strange happenings… You sure you want to go?"

Sunny nodded decisively.

"Suit yourself. The closest the train can get you is Method City, then." She produced a pair of tickets. "Four and a half bars, please."

Sunny turned to Robert. "Would you happen to have any money on you?"

Robert rolled his eyes, then reached into a compartment on his side and pulled out some blocks that had a metallic shine to them. He pushed them over the counter.

"Thank you!" Sunny beamed, then took the tickets and walked with Robert to a bench to wait for the train.

Sunny spent a couple minutes observing the other passengers, then a couple more minutes observing the trains. Each of the trains that pulled in had numbered compartments. "Why do the numbers start at zero?" Sunny asked.

Robert floated next to the bench. "In Java, arrays are 0-indexed, so they start at zero."

"Arrays…?" Sunny had heard of the word "array" being used in contexts like "an array of chocolates" or something before, but she suspected it meant something different here. Just like how a double didn't mean a double scoop of ice cream.

"Think of arrays like collections of variables. You can have integer arrays, double arrays, String arrays, and more."

"Oh-kay." Sunny nodded slowly, although she didn't get what exactly arrays were yet.

"You can visualize arrays like rows of boxes. Each box contains a variable– a value– and has an index. The indices are kind of like labels for each box in the array. You can use the index to get values from the array, or to change values in the array."

Robert opened the computer in his head. "Here's an example."

"Read line three as, ‘int array numbers equals new int array size 5.' The first set of brackets indicates that we're creating an array, which in this case would be an array called ‘numbers' of size 5."

"Riight. So the number inside the last set of brackets is the size?"

"Exactly. Then, on line four, we set the first box in the array to hold the value 1, and on line 5, we set the last box to hold the value 100."

Sunny raised her hand. "Do arrays have to store things of the same type? Like, you said you could have int arrays, and double arrays, but can you put a double in an int array?"

Robert shook his head. "The short answer is no. In Java, arrays can only hold one type. Although there are type conversions… Anyways, finally, since arrays are initialized with the default value of 0 in each box, printing numbers[2] prints 0."

Sunny blinked, trying to absorb all that information. "Okay, I kind of get it." She pointed to one of the trains pulling in, which had compartments labeled 0 to 11. "So that train could be represented as an array of size 12? Except it would hold people instead of numbers?"

"Correct. I must be a good teacher." Robert smirked.

Sunny scoffed. "Or I'm a good student."

The train's doors opened, and a stream of Javalandians exited. The station's noise level increased for a few moments, then people started to board the train.

Sunny thought back to Eniac and the variapets. "Is it possible for someone to change this array's size, just like Eniac could change the variapets' size?"

"No; arrays in Java have a fixed size. You could set an array to be a new array of a different size, but if you want an array to just change its size, you'll have to use something different like an ArrayList instead." Robert hummed. "Plus, there's the fact that there are restrictions on speaking code, such as that people can only code what they own, or living beings like the variapets if they have their consent."

"Ah, makes sense." Sunny supposed they couldn't have people running around, speaking code and changing the size of things willy-nilly.

The train pulled out of the station again, and another one pulled in in its place. Sunny checked the number on the tickets. "Oh! That's us!" She grinned at the robot. "To Method City we go."


Note: You are not logged in, but you can still leave a comment or review. Before it shows up, a moderator will need to approve your comment (this is only a safeguard against spambots). Leave your email if you would like to be notified when your message is approved.







Is this a review?


  

Comments



User avatar
3779 Reviews


Points: 4173
Reviews: 3779

Donate
Sun Jan 29, 2023 11:11 pm
Snoink wrote a review...



Hello again!!!

It looked like a couple of trains were leaving as well, carrying armor to different parts of Javaland, as shown through the large label "suitsOfArmor" on the side of the trains.


Is this... more PPE? OR. Are they gearing up for war???? Honestly, this is the question that I want answered right now...

Hey, Robert, wasn't Eniac's house labeled with something like that too?" She flipped through her notebook and found the sketch she'd made of the house. "Yeah, it had ‘houseOfEniac' with a lowercase ‘h' and an uppercase ‘O' and ‘E'."


We've seen this several times... glassOfWater sticks out to me the most. Which reminds me... I'm thirsty...

Oh! Y-yeah." Sunny tried to smile. "We, um. We need tickets, right?" She shook herself out of her thoughts and looked around for a place to buy tickets.


It's... so easy to get tickets in this world, LOL. (Don't mind me, I'm just amused by the contrast of our stories, lol.)

"Correct. I must be a good teacher." Robert smirked.

Sunny scoffed. "Or I'm a good student."


Awwwww they are adorable together. :)

Ah, makes sense." Sunny supposed they couldn't have people running around, speaking code and changing the size of things willy-nilly.


That.. would be disastrous.

Onward to Method City!!




User avatar
436 Reviews


Points: 20490
Reviews: 436

Donate
Mon Dec 26, 2022 3:17 pm
View Likes
Liminality wrote a review...



Hi again mint! Lim here with a review.

Glows – What I liked in particular

I liked that there was more interaction between Sunny and Robert here! Now it feels more like they’re a team. I liked the little moments like when Robert pays for the tickets and the good teacher or good student quip.

I also like there being continuity on Sunny’s worry about not being able to leave Javalandia. I think it adds a layer of realism and also tension to the story, which is important since quite a lot of it is light-hearted. It can be hard to maintain story tension in a story that’s mostly humorous, and I think this element of the plot really helps with that.

The little worldbuilding elements here were interesting as well. I liked hearing snippets of conversations the Javalandians were having at the train station. I do wonder what the suitsOfArmor are being used for. Security? A war?

"Plus, there's the fact that there are restrictions on speaking code, such as that people can only code what they own, or living beings like the variapets if they have their consent."
"Ah, makes sense." Sunny supposed they couldn't have people running around, speaking code and changing the size of things willy-nilly.

This seems like a nice fix for the issue about variapet sizes I brought up a couple of chapters ago. I’d imagine the variapets wouldn’t want to destroy any buildings, so they wouldn’t consent to a value that goes into the billions or something?

Just like how a double didn't mean a double scoop of ice cream.

^ Also, I enjoyed this little bit of wordplay here :D

Grows – Ideas to consider

Something I’ve noticed in these chapters is that there are quite a few concepts being introduced or taught to Sunny without her having to use them to solve a problem just yet. Last chapter, it was the loops, here it’s camelCase and arrays. I wonder if there’s going to be a more complex problem she’s going to have to solve using all three? I kind of hope that’s what’s coming up soon, since it would be a good escalation to show that she’s approaching whatever final challenge lies waiting for her on Spaghetti Code Mountain.

Another suggestion I’d make to help boost the descriptions/ atmosphere is to consider using more specific descriptions. I guess the main thing that comes to mind for me would be colour? For example:
Robert rolled his eyes, then reached into a compartment on his side and pulled out some blocks that had a metallic shine to them. He pushed them over the counter.

I like that the blocks have a “metallic shine”, though it’s still a bit vague as to whether this metal is something like copper and so brown and earthy, or something more like silver. Aside from colour, I’d imagine a reader might want to know what the aesthetic of the train station looks like. I remember I really liked the surreal feel of the Loop Factories and the nature-focused trek down the Conditional River, so having a specific vibe for the train station might also help give this scene extra ‘oomph’.

Overall

This was a mostly comfortable chapter, though with a hint of things to come with Sunny’s worries. Like Sunny, I’m interested in seeing what’s going on in Method City. I don’t remember ever successfully programming a method myself, so maybe this will help me too xD

Hope this helps – let me know if you’d like more feedback!
-Lim




Spearmint says...


Thanks for the wonderful review, Lim!! ^-^
I do wonder what the suitsOfArmor are being used for. Security? A war?

Hmm%u2026 good question xD Probably security; a war%u2019s recently ended, but the nations are still likely thinking about defense. I%u2019ll make sure to add that in somewhere! ^^

Something I%u2019ve noticed in these chapters is that there are quite a few concepts being introduced or taught to Sunny without her having to use them to solve a problem just yet.

Haha, well, there%u2019s a small problem in the next chapter! I%u2019ll have to look into adding some more problems for Sunny to solve, though%u2026 practice is an essential part of learning. :D
Aside from colour, I%u2019d imagine a reader might want to know what the aesthetic of the train station looks like.

Both great suggestions. Hm%u2026 maybe the train station is metallic gray and futuristic-ish? I%u2019ll think on that more for revisions.

Thanks again for the helpful review! <3



User avatar
3850 Reviews


Points: 210016
Reviews: 3850

Donate
Tue Dec 06, 2022 12:26 pm
View Likes
KateHardy wrote a review...



Good Morning/Afternoon/Evening/Night(whichever one it is in your part of the world),

Hi! I'm here to leave a quick review!!

First Impression: Okayy...so we're moving closer and closer here, although this one stands out a little because its the first chapter part I'm seeing where there isn't an underlying bit of tension out to make us all paranoid, rather we've just got Sunny learning a few more skills.

Anyway let's get right to it,

It wasn't difficult for Sunny and Robert to find the train tracks leading away from the Loop Factories. It looked like a couple of trains were leaving as well, carrying armor to different parts of Javaland, as shown through the large label "suitsOfArmor" on the side of the trains. Sunny frowned thoughtfully when she saw that. "Hey, Robert, wasn't Eniac's house labeled with something like that too?" She flipped through her notebook and found the sketch she'd made of the house. "Yeah, it had ‘houseOfEniac' with a lowercase ‘h' and an uppercase ‘O' and ‘E'."

"That's called camelCase," Robert said. He shrugged. "It's just a common way of naming variables if you have to use more than one word. Makes it easier to read than squishing all the words together with the same capitalization, no?"


There is definitely a point to be made there about it being clearer. At least when you don't have spaces like within code. I was wondering when Sunny would end up questioning that. It ended up taking slightly longer than I expected there.

Sunny thought about that for a moment. "Hm, I guess that makes sense." Before she could ask anything else, she was distracted by the sight of the train station.

There were multiple tracks next to roofed areas where passengers were waiting. The sound of their chatter reached Sunny's ears, and with the help of Eniac's translation device, she could pick up snippets of conversation.

"I can't wait to see Method City!" A young girl bounced on her toes next to her family.

Nearby, an older Javalandian asked, "Is our train going to be late?"

"Ugh, I don't want to go to work."


Oooh gotta love seeing a few more examples of normal citizens at work here. I love how seamlessly these all just fit in here and there reminding us of the world we're in and of the people there. Its not too often moments like these show up without it sounding forced.

That last one reminded Sunny of her parents, and suddenly she thought of what Robert had said about the previous Earthling to come to this world. She gulped and couldn't help but feel a pang of homesickness. Who knew how much time had passed back on Earth? What if her family was missing her already?

"You alright?" Robert was looking at her quizzically.

"Oh! Y-yeah." Sunny tried to smile. "We, um. We need tickets, right?" She shook herself out of her thoughts and looked around for a place to buy tickets.

Robert frowned, but followed Sunny after a moment.


Oooooh well well. This is quite the moment. Our second point in time where we end up encountering some emotions that have really trended towards the bad side of things. Well this is quite a rare moment here. I can't wait to see what more ends up coming up as a result of this. The really dangerous stakes of this story definitely seem to rest in that particular recurring issue.

Sunny walked up to a nearby booking clerk and smiled, focusing on the present. "Hello! Where's the closest stop to Spaghetti Code Mountain?"

The lady raised an eyebrow at her. "Something's been up with the mountain lately. Red text flying there, strange happenings… You sure you want to go?"

Sunny nodded decisively.

"Suit yourself. The closest the train can get you is Method City, then." She produced a pair of tickets. "Four and a half bars, please."

Sunny turned to Robert. "Would you happen to have any money on you?"


Completely forgot about money needing to be a thing for a moment, and I definitely thought this train situation was going to end up being some sort of heist based jump into it, I did not see this very calm collected buying the tickets and going there plan coming xD.

Sunny spent a couple minutes observing the other passengers, then a couple more minutes observing the trains. Each of the trains that pulled in had numbered compartments. "Why do the numbers start at zero?" Sunny asked.

Robert floated next to the bench. "In Java, arrays are 0-indexed, so they start at zero."

"Arrays…?" Sunny had heard of the word "array" being used in contexts like "an array of chocolates" or something before, but she suspected it meant something different here. Just like how a double didn't mean a double scoop of ice cream.

"Think of arrays like collections of variables. You can have integer arrays, double arrays, String arrays, and more."


Oooh we're getting more knowledge being dropped here. We always love to say that, I was waiting to see how the mechanics of this train were going to end up being linked to array's here, and it seems we're about to start getting those answers.

Sunny blinked, trying to absorb all that information. "Okay, I kind of get it." She pointed to one of the trains pulling in, which had compartments labeled 0 to 11. "So that train could be represented as an array of size 12? Except it would hold people instead of numbers?"

"Correct. I must be a good teacher." Robert smirked.

Sunny scoffed. "Or I'm a good student."


Ahhh love the banter between them as usual. I think this method of bombarding us readers with information and then having it all explained as Sunny understands really works to break all of that down into chunks that we can also learn from, which just makes it all better as a result. The quips at the end don't hurt either.

The train's doors opened, and a stream of Javalandians exited. The station's noise level increased for a few moments, then people started to board the train.

Sunny thought back to Eniac and the variapets. "Is it possible for someone to change this array's size, just like Eniac could change the variapets' size?"

"No; arrays in Java have a fixed size. You could set an array to be a new array of a different size, but if you want an array to just change its size, you'll have to use something different like an ArrayList instead." Robert hummed. "Plus, there's the fact that there are restrictions on speaking code, such as that people can only code what they own, or living beings like the variapets if they have their consent."

"Ah, makes sense." Sunny supposed they couldn't have people running around, speaking code and changing the size of things willy-nilly.

The train pulled out of the station again, and another one pulled in in its place. Sunny checked the number on the tickets. "Oh! That's us!" She grinned at the robot. "To Method City we go."


Hmm well it seems the Array Train is so far just a bit of a pit stop for us to learn a bit more about array so far. So that long awaited moment where we have something go wrong will not be here either. Onto Method City it is then.

Aaaaand that's it for this one.

Overall: Overall, another fun and informative little part here. I'm looking forward to seeing how this train is going to function here and if we learn any more interesting things before we actually end up reaching method city.

As always remember to take what you think was helpful and forget the rest.

Stay Safe
Harry




Spearmint says...


It ended up taking slightly longer than I expected there.

Ahaha yeah, I realized I forgot to mention camelCase, so I just stuffed it in here... Will probably revise that later xD

Thanks again for all the reviews!! I enjoyed reading them, and I hope you have a fabulous day/night!! =D <3



KateHardy says...


You're Welcome!! <3




Darkness cannot drive out darkness: only light can do that. Hate cannot drive out hate: only love can do that.
— Martin Luther King Jr.