Robert hummed. "Alright. Perhaps some hands-on practice would help." He reached to the side of the table and pulled out a bag of colorful strips. Judging by the way they stuck to his arm slab, they must have been magnetic.
Robert detached the magnetic strips from his arm slabs and placed them in front of Sunny. "Here. Try sorting these by height."
Sunny looked at the strips for a moment. Each of them had a number written on the bottom and a cute animal at the top, with a green one being a frog and a blue one being a penguin. She started to smile, but then stopped.
Wasn't this all… a little too childish? First there was Elsie saying that apparently everyone except Sunny knew about objects and classes, and then the video with its smiley face, and the cartoon animals on the strips… Normally, Sunny was a fan of smiley faces, but it hadn't reassured her in this case. She couldn't help but feel like she was one step behind everyone else– even the elementary schoolers in Javaland.
She shook her head and opened the bag of magnetic strips. It didn't matter. All she had to focus on right now was understanding this. She'd catch up, right? Besides, she'd already solved the error problem… That was more than an elementary schooler could do.
Soon enough, Sunny had the strips sorted in order of increasing height. Seven cartoon animals smiled encouragingly at her. Their numbers were:
0 2 3 5 7 9 10
"Now, make a table with three columns," Robert instructed, gesturing towards the paper. "This is where you'll keep track of left, right, and mid. Start with left being 0, right being 7, and mid being 0."
Sunny obeyed. Then she took a closer look and frowned. "Why is right 7? Isn't the last index 6? Wouldn't that be a… what was it… IndexOutOfBounds error?"
"Ah, excellent question." Robert hovered higher. "That's on purpose. The thing is, we'll never be attempting to access the element at index right. It'll just represent the upper bound. We're saying that we know the value we're searching for will never be at index right."
Sunny wrinkled her forehead. "Okayy…"
"Hopefully it'll make sense later. So, say we're looking for the value 2. Let's run through the first iteration of the while loop. Left is less than right, so we update mid. Don't forget integer division."
At least Sunny was confident in her addition and division skills. She wrote down "(0 + 7) / 2 = 3."
"What's the element at index 3?"
Sunny pointed to a white chicken in the middle of the row of strips. It had the number 5 written on it.
"Yes, exactly. Now, 3 is less than 5, so what do we change right to?"
"Mid?"
Robert bobbed up and down in affirmation. Sunny updated the table and wrote "0" for left and "3" for right.
Then she updated mid, which pointed to index 1 now. "It points to 2." Sunny looked at the pink pig.
"Yes, and 2 is the value we were looking for, so we're done. Does that make sense?"
"I suppose so." Sunny got the overall concept of halving the search area, at least.
Robert swept the magnetic strips away. "Great. Now then, you should learn about prefix sums."
Sunny bit her lip. More new concepts? She knew being a hero wasn't easy, but couldn't they have a stretch break, at least?
She was about to ask for a five minute break when the TV flickered on again.
A reporter appeared, standing in a field with workers moving books behind her. "Breaking news!" she announced. "The books recently stolen from the Method City Public Library were recovered here, a field near Parentheses Town." She tucked a curl of dark hair behind her ear while she gestured to the grass that was currently covered by hundreds of books.
Sunny gasped. "Robert, let's go!"
"Hold on. Look at what they're doing." Robert pointed at the trucks in the background. "Where else would they be moving the books but back to the library? We just need to wait."
"But– but what if they miss a book? We need to get that dark magic guide back."
Robert's pixelated eyes narrowed. "Shh."
Sunny was about to feel insulted at him shushing her when she realized the reporter had passed the mic to a police officer, who was holding up a large piece of wood.
On the wood was burned two sequences of numbers: 113, 230, 331, 448, 549 on top, then 99, 196, 311, 427, 535, 636 on the bottom.
"We found this code propped up next to the books. We are humbly requesting aid from the brightest minds in Javaland in cracking it."
Sunny sat up straighter.
"There will, of course, be a reward." The police officer paused for dramatic effect, then said, "Free debugging services for ten years!"
The reporter gasped. "Really? Well, you heard her, folks! Better get cracking on that code."
The police officer held up the board for a few more minutes, and Sunny scribbled the numbers down into her notebook. Then the TV screen fizzled back into blackness.
Sunny tapped her pencil against her chin. What could the numbers mean? Well, it looked like both sequences were increasing, and they were in the hundreds. "Robert, any ideas?"
The robot hovered closer to look at the notebook. "Well, whenever I see numbers, I think of the ASCII table. That's a table of all the number representations of different characters. For example, lowercase 'a' is represented as 97. But as far as I know, the ASCII table only goes up to 127…"
"Hmm." Sunny rotated the notebook upside down. "No luck there." She squinted at the numbers, just in case they were supposed to look like letters. "Nope."
"Shall we head to the library?" Robert asked. "Chances are, other codebreakers might be meeting there. Perhaps we can glean some insights."
Sunny nodded. "Let's get the guide back too."
With that, Sunny and Robert left the room and headed back to the Method City Public Library.
Points:
Time spent:
Canary word: Present
Possible AI signals:
Original Text:
Are you sure you want to delete this comment? This cannot be undone.
Mark this comment as a review? Points will be awarded to the poster.
Your comment was posted, but it wasn’t long enough to count as a review. Reviews need about four complete sentences (at least 250 characters). Try writing another review that explains your thoughts in more detail — the author will appreciate it, and you’ll earn points for it.
Hey mint! I confess I haven't read book one of this series (although I might have caught a chapter or two along the way). I've gone back and read all the chapters of book two though, so I have a rough idea of what's going on.
I feel like there was mention of Sunny being able to get home in chapter one and then she couldn't but that doesn't seem to be a problem? I'm missing the context of how she got trapped in this world in the first place and whether she's missing anyone she left behind but I just wanted to call this out in case it's not intentional and perhaps she is wanting to go home?
I'm enjoying the experience of reading so far but I also feel like I'm not super invested in either the characters or the outcome of the current adventure. This may again be a factor of jumping in at book two and not having read all the work you did to connect me with the characters/story but I also feel like the lighthearted fun tone is having a contributing effect. Like I'm having a nice time reading it but I don't find the stakes to be super high either - does that make sense?
I've jumped straight to the Dewey Decimal System because they're library books but it's the end of the day, my brain is frazzled and I can't bring myself to sit and think about it right now.
That's kind of how I feel about the coding element in these chapters too. It looks like it's presented in a friendly way but I kind of skipped over it to get back to the plot because my brain is tired. Again, I think I'd find it easier if I read book one.
I fell like I've just given you a lot of vague commentary that's culminated in: Sleepy Icy should have read the first book xD
But I hope that some of the comments among this were helpful, and I'm hoping to catch up with chapter four soon too!
Icy
Hey Icy, thanks for the review!! ^-^
Haha yeah, that's still a problem. Right now, Sunny and Robert are looking to investigate this guide to dark coding magicks book that they picked up, in hopes that it'll lead them to finding a portal, and they've gotten a bit sidetracked with training and this puzzle. Uhh it's not super well planned out right now;;; >.> Anyways, I think this also connects back to the other issue you mentioned with not being invested in the characters/this adventure-- the stakes aren't that high, and I struggle with adding conflict, lol. xD Hmmm I should stop being so nice to my characters... Thanks for the feedback! <3 Hope you have a wonderful day/night! =D
A puzzle!!! I'll have you know I wrote down the numbers and stared at them for like 20 minutes while waiting on an API call at work.
I don't know if this what you want, but I get some very Professor-Layton-but-code vibes from this whole series. It's not a bad thing, but it does sort of feel very silly and whimsical and unserious, which could be a problem later if you're not careful about how you get us from fun-and-silly to Dramatic.
I think what also contributes to that is that I can't quite understand the stakes, particularly for this act of the series. In Syntax Errors of Doom, there was a pretty clear issue, and though it felt more like a massive inconvenience than a real world-ender, we still saw the impact of the missing errors very clearly.
I think, even though this new evil organization hasn't done anything beyond the theft as far as we can see now, there ought to be characters intelligent enough to extrapolate some possible repercussions--or maybe it would have helped for Sunny to better understand the real power of her bad-vibes-code book by now. Well, understanding beyond the bad vibes.
I guess in short: I feel like I understand the possible evils a little, but only so far as what we saw in Syntax Errors, which I thought felt like a very light first-quest kind of task. It'd be nice to see the stakes ramp up a little higher.
...though I guess if this turns out anything like Professor Layton, then the stakes probably will get very high indeed.
The puzzle is so awesome though. I can't resist. It's just the right thing to keep readers engaged.
On to the next one!
-Vento
Hi Vento, thanks for the fun, thoughtful review!! ^-^
Omg xD I'm flattered-- that's a mark of a good puzzle.
Ooh, okay, that makes sense. I think Snoink mentioned something similar at the beginning of the first book-- having higher stakes/showing the problem so readers can get invested. Hmm... perhaps some foreshadowing... Or actually, having something bad come about because of the book might be interesting. Perhaps I can add things about those other dark magic books the librarian burned having caused more chaos? I need to think more on this. xD
Thanks again!! <3