z
  • Home

Young Writers Society


12+

Sunny and the Algorithms of Gloom: Chapter 1.2

by Spearmint


"I– well, I'm not quite sure yet. I was hoping you'd have some clues." Sunny frowned down at the book. "How did the other guides appear here?"

The librarian tucked a curl of gray hair behind her ear. "Well, dear, sometimes we receive donations of books, and a dark guide might be hidden among the other innocuous texts. Or a patron will wander in asking about a spell in one of them."

"Do you have the contact information of any of them?"

Behind Sunny, another visitor to the library cleared his throat impatiently. Sunny jumped a little. "Oh, I'm sorry! I'm almost done."

The librarian glanced behind Sunny at the short line that had formed, then looked at the main area of the library and waved a young woman over. "If you've got your heart set on investigating that book, Elsie here can help you out. But we do have to ask that you allow us to burn the book before leaving the library."

Sunny bit her lip uncertainly, but nodded. She didn't like getting rid of evidence, but for now, she'd go along with what they said and gather more information. Sunny smiled at Elsie and stepped to the side.

As the librarian at the front desk talked to the other patrons, Sunny introduced herself to Elsie. "I'm Sunny, fantasy enthusiast and aspiring hero." She stuck her hand out for Elsie to shake.

Elsie fingered a streak of rhubarb red in her hair and reluctantly shook Sunny's hand. "Elsie. Assistant librarian. Now then, how can I help you?" She shifted a stack of books in her arms impatiently.

"I was looking for more information on the source of this book." Sunny held out the guide to Elsie.

"Have you checked all its attributes yet?"

"Attributes?" Sunny stared at her blankly. "Uh. What do you mean? Could I have some examples?"

Elsie blinked at Sunny, then coughed. Sunny had a faint suspicion that the cough had been used to cover an incredulous laugh. "Sorry, I forget that not everyone is educated on objects and classes in school. I thought even schools in the country taught that now…" Elsie shook her head. "Never mind. Come on, I'll give you a crash course as I shelve these books."

Elsie stalked confidently through the aisles of the library and Sunny trailed behind her in confusion.

Elsie stopped in front of a shelf that held thick books organized by color. On the left were crimson red books, and the color of the books' spines shifted from orange to yellow as Sunny looked towards the right. Finally, there was a deep violet book at the far right.

"We call this Rainbow Row." Elsie rolled her eyes. "I know, I know. So original. Anyways, each of these books are objects."

Well… duh? Sunny could see plainly that they were solid things.

Elsie noticed the look on Sunny's face and shook a finger at her. "Not normal objects like a vase or a table. These objects are related to classes, which are also not math class or history class or whatever kind of class you're thinking about." Elsie set down her stack of books and turned to face Sunny.

"Think of it like this. The Book class is the template, and each of these books are objects made from that template." Elsie produced a page of paper from a pocket in her skirt and scribbled on it.

Sunny looked over her shoulder and read, "String title, author, color. int numberOfPages."

public class Book {

    String title, author, color;

    int numberOfPages;

}

Elsie capped her pen and pointed to the paper. "This is a class. A class can have attributes, which are basically variables that describe various aspects of the class."

Then she picked up the piece of paper and waved it in the air. "But this is just a class, not an object. So this piece of paper doesn't actually have a title or an author. It just describes what a Book object would be like and what attributes it would have. In essence, it's a template. Got that?"

Sunny frowned. "Why do these things have to be named in such confusing ways all the time? Like, who came up with 'class' and 'object?'"

Elsie shrugged. "Don't know, don't care. But if you need a way to remember it, think of classes as more intangible things– like, you can't pick up a math class– and objects as more tangible things– you can pick up a book object." She slid out an orange book from the shelf and hefted it to demonstrate. "Likewise, you can't actually get the attributes of a class, but you can get the attributes of an object."

"But… but… How is any of this useful?" Sunny burst out. Variables made sense; they could store information. Methods too; they could store instructions. But who needed classes or objects, unless that person was some kind of masochist who loved complexity in programming?

Elsie pinched the bridge of her nose. "I was just getting to that."

She held up the piece of paper again and slapped it against the orange book. "This book, an object, is an instance of the Book class. That means I know it'll have the attributes of title, author, etc." Elsie turned around and waved at all the books in Rainbow Row. "In fact, all of these Book objects have those attributes."

"That means I can do cool things like this." Elsie checked the inside cover of the book she was holding, then took a deep breath and said,

System.out.println(datatypesRefManual.getAuthor());

Once she'd said the final "semicolon," a little window popped up in front of the book and displayed the text: "Mr. Ian Bool."

Sunny's eyes popped open. "You can do that for any book?"

Elsie nodded proudly. "As long as I know its name. All the books in our library have the name on the inside cover."

Sunny immediately cracked open A Guide to Dark Coding Magicks and checked its inside cover. It was blank. Sunny groaned. She checked the back cover and flipped through the rest of the book, but she didn't spot any text other than the text of the spells. And reading that text made her queasy.

"Ah…" Sunny sighed. "Thanks for your help, Elsie, but I don't think that'll work on this book."

Sunny glanced around. How long had she been talking to Elsie? "Sorry, you're probably busy. I'd better find Robert and get out of your way."

"Where do you think you're going?" Elsie hooked a finger into Sunny's collar and dragged her back. "If I had to spend all that valuable time lecturing you on basic things like objects and classes, you'd better help me make up for it by shelving some books."


Is this a review?


  

Comments



User avatar
469 Reviews

Points: 26154
Reviews: 469

Donate
Sat Apr 08, 2023 2:57 am
View Likes
Liminality wrote a review...



Hi mint! Lim here with a review.

General Comments

I’m really enjoying seeing more locations in Javaland. The way the library works is so interesting – it feels both magical and technological, with how they can retrieve the information about the books but also need to burn them when there is dark magic encoded there.

I was a bit skeptical when the librarian said ‘burn the book’ though, since it is Sunny’s only lead. Maybe she might find a way to sneak it out? Or maybe she would think it’s not very hero-like to disobey the librarian’s instructions and so let them burn the book after all. But I’d imagine she’d have to have gotten a lead on the author’s whereabouts before she’d want to do something like that.

Elsie comes across as intelligent and authoritative. I laughed when she decided Sunny had to help her shelve some books as a ‘fee’ for her teachings. Another line that made me laugh was:

But who needed classes or objects, unless that person was some kind of masochist who loved complexity in programming?

As a side note, I never got far into the object-oriented stuff in programming (it’s so difficult!), but what Elsie talks about here about only objects (and not classes) having attributes kind of reminds me of the Platonic Forms (a concept in Ancient Greek philosophy). Only the ‘imperfect’ instantiations of the Form can be seen / touched or have perceivable properties, while the Form itself is just an abstraction.
"Sorry, I forget that not everyone is educated on objects and classes in school. I thought even schools in the country taught that now…"

^ Huh, it looks like Elsie doesn’t know Sunny is from Earth? Or maybe she thinks objects and classes are taught in Earth schools as well?

I like that there is a concrete problem for Sunny to solve at this stage that spurs on the main plot, namely finding out the author or owner of the dark magic book. I wonder what she will try next now that asking the librarians directly doesn’t seem to have worked.

Grows – Description Ideas

I liked that the characters’ hair colours were described, and I especially like that Elsie’s gait was described. “stalked confidently” def conveys a lot about her character. I think I’d be able to picture them a lot better if I had a description of more things like maybe eye shape, face shape, height, clothes, etc. For instance, do the librarians wear a uniform?

I’m also craving more ‘fantasy vibes’ from the setting descriptions. There’s a lot of good stuff in the concept of the setting, as I mentioned earlier, and I’d love to see some more concrete descriptions of that which evoke awe and wonder. The “Rainbow Row” felt quite understated, since a book display like that is quite commonplace in our world as well, and neither Sunny nor Elsie seem very impressed by it, which colours the reader’s impression as well.

Overall

The humor and the story set-up stand out in this chapter. My main suggestions for revisions or future chapters would be to give more and a wider variety of details in descriptions. Maybe harvest random notes you made in your early character sheets if you have something like that – that’s what I do sometimes when I need to add more detail. This could be easier to do in a second draft rather than a first, though!

Hope this helps – and keep writing!
-Lim




Spearmint says...


I will definitely come back and re-read this review when revising, but thank you so much for the feedback!! I'll try to be more descriptive as I keep writing. ^-^



User avatar
3996 Reviews

Points: 238316
Reviews: 3996

Donate
Tue Mar 07, 2023 2:55 am
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 this is a lovely little introduction to yet another fun aspect of coding. I wonder how Sunny is going to end up using that given at first glance it looks like it won't be helping us find out too much more about this current mystery that Sunny is trying to solve here.

Anyway let's get right to it,

"I– well, I'm not quite sure yet. I was hoping you'd have some clues." Sunny frowned down at the book. "How did the other guides appear here?"

The librarian tucked a curl of gray hair behind her ear. "Well, dear, sometimes we receive donations of books, and a dark guide might be hidden among the other innocuous texts. Or a patron will wander in asking about a spell in one of them."

"Do you have the contact information of any of them?"

Behind Sunny, another visitor to the library cleared his throat impatiently. Sunny jumped a little. "Oh, I'm sorry! I'm almost done."


Well this is quite the scene there. I love how very normal you manage to make the library even as it is revealed that dark coding magic books get sent here all of the time and they've got a special procedure to destroy them unlike most normal libraries. Its a lovely effect there where we're both intrigued and also laughing uncontrollably at the the moment there.

The librarian glanced behind Sunny at the short line that had formed, then looked at the main area of the library and waved a young woman over. "If you've got your heart set on investigating that book, Elsie here can help you out. But we do have to ask that you allow us to burn the book before leaving the library."

Sunny bit her lip uncertainly, but nodded. She didn't like getting rid of evidence, but for now, she'd go along with what they said and gather more information. Sunny smiled at Elsie and stepped to the side.


Well that seems to be quite nice of the librarian. Having to burn the book certainly does not seem like its going to end too too terribly well but at the very least entertaining the idea of doing some research from it and showing Sunny the way she can get the book researched properly there is a pretty nice gesture.

As the librarian at the front desk talked to the other patrons, Sunny introduced herself to Elsie. "I'm Sunny, fantasy enthusiast and aspiring hero." She stuck her hand out for Elsie to shake.

Elsie fingered a streak of rhubarb red in her hair and reluctantly shook Sunny's hand. "Elsie. Assistant librarian. Now then, how can I help you?" She shifted a stack of books in her arms impatiently.

"I was looking for more information on the source of this book." Sunny held out the guide to Elsie.

"Have you checked all its attributes yet?"


Ooooh Elsie already seems like a wonderful character here and it seems that we also are about to run into perhaps the first little coding lesson of this book. I'm honestly just as excited for all the coding information as much as the plot, or really how you manage to integrate the two together..

"Attributes?" Sunny stared at her blankly. "Uh. What do you mean? Could I have some examples?"

Elsie blinked at Sunny, then coughed. Sunny had a faint suspicion that the cough had been used to cover an incredulous laugh. "Sorry, I forget that not everyone is educated on objects and classes in school. I thought even schools in the country taught that now…" Elsie shook her head. "Never mind. Come on, I'll give you a crash course as I shelve these books."

Elsie stalked confidently through the aisles of the library and Sunny trailed behind her in confusion.


Okay, okay. This is an interesting one. It seems to be the first person who has been a bit more sort of strict with Sunny when it comes to explaining something and I honestly can't tell if Elsie is referring to schools in Javalandia or Earth. Given there was no snarky comment at the aspiring hero part it makes me think Elsie is talking about Earth but somehow it feels ambiguous when it probably shouldn't.

Elsie stopped in front of a shelf that held thick books organized by color. On the left were crimson red books, and the color of the books' spines shifted from orange to yellow as Sunny looked towards the right. Finally, there was a deep violet book at the far right.

"We call this Rainbow Row." Elsie rolled her eyes. "I know, I know. So original. Anyways, each of these books are objects."

Well… duh? Sunny could see plainly that they were solid things.


Ahhh gotta love a good name that's just a description of the thing. It really is the most efficient way to explain exactly what the object happens to be. And the way poor Sunny is reacting to this one is definitely relatable. It really is a slightly fiddly part of code.

Elsie noticed the look on Sunny's face and shook a finger at her. "Not normal objects like a vase or a table. These objects are related to classes, which are also not math class or history class or whatever kind of class you're thinking about." Elsie set down her stack of books and turned to face Sunny.

"Think of it like this. The Book class is the template, and each of these books are objects made from that template." Elsie produced a page of paper from a pocket in her skirt and scribbled on it.

Sunny looked over her shoulder and read, "String title, author, color. int numberOfPages."


OOoh well this is a pretty interesting way to map that out. Definitely makes for a very interesting style of library. I wonder how that's going to now be implemented for this research here. I feel like this dark code magic book isn't going to fit into the right class here judging by what its trying to do.

Elsie capped her pen and pointed to the paper. "This is a class. A class can have attributes, which are basically variables that describe various aspects of the class."

Then she picked up the piece of paper and waved it in the air. "But this is just a class, not an object. So this piece of paper doesn't actually have a title or an author. It just describes what a Book object would be like and what attributes it would have. In essence, it's a template. Got that?"

Sunny frowned. "Why do these things have to be named in such confusing ways all the time? Like, who came up with 'class' and 'object?'"


I'm sure whoever came up with that thought it was a brilliant way to remember it all instead of being confusing, but well you never know when it comes to these things. In any case loving this explanation by Elsie here and somehow I love the point that Sunny choses to react to even more real and relatable..

Elsie shrugged. "Don't know, don't care. But if you need a way to remember it, think of classes as more intangible things– like, you can't pick up a math class– and objects as more tangible things– you can pick up a book object." She slid out an orange book from the shelf and hefted it to demonstrate. "Likewise, you can't actually get the attributes of a class, but you can get the attributes of an object."

"But… but… How is any of this useful?" Sunny burst out. Variables made sense; they could store information. Methods too; they could store instructions. But who needed classes or objects, unless that person was some kind of masochist who loved complexity in programming?

Elsie pinched the bridge of her nose. "I was just getting to that."


Oh the commentary by Sunny here is just making me want to shout "YES" while I stand up but given I'm in the middle of class I will settle for writing that down. In any case it does look like judging from this entire explanation we're actually going to end up not able to find out much about dark code magic book.

She held up the piece of paper again and slapped it against the orange book. "This book, an object, is an instance of the Book class. That means I know it'll have the attributes of title, author, etc." Elsie turned around and waved at all the books in Rainbow Row. "In fact, all of these Book objects have those attributes."

"That means I can do cool things like this." Elsie checked the inside cover of the book she was holding, then took a deep breath and said,

System.out.println(datatypesRefManual.getAuthor());

Once she'd said the final "semicolon," a little window popped up in front of the book and displayed the text: "Mr. Ian Bool."


That is indeed an incredibly cool way to work with that particular code there. Makes a library have a seriously powerful little system just built into the world itself instead of being on a program in a computer.

Sunny's eyes popped open. "You can do that for any book?"

Elsie nodded proudly. "As long as I know its name. All the books in our library have the name on the inside cover."

Sunny immediately cracked open A Guide to Dark Coding Magicks and checked its inside cover. It was blank. Sunny groaned. She checked the back cover and flipped through the rest of the book, but she didn't spot any text other than the text of the spells. And reading that text made her queasy.


Aaand that's what I was afraid of. Unless Elsie has any more magic, I mean code that she can throw at this, it seems we're going to be at a bit of a loss when it comes to trying to actually learn more about this.

"Ah…" Sunny sighed. "Thanks for your help, Elsie, but I don't think that'll work on this book."

Sunny glanced around. How long had she been talking to Elsie? "Sorry, you're probably busy. I'd better find Robert and get out of your way."

"Where do you think you're going?" Elsie hooked a finger into Sunny's collar and dragged her back. "If I had to spend all that valuable time lecturing you on basic things like objects and classes, you'd better help me make up for it by shelving some books."


Well...this is a lovely little predicament and honestly I am loving the attitude Elsie has here so I am absolutely for seeing some more of her. I also wonder exactly how much fun this shelving process is going to be. I can't imagine its going to be just mundane actually normal shelving going on here.

Aaaaand that's it for this one.

Overall: Overall, I think we've got ourselves a nice little start to the part where Sunny gets properly down to work in this sequel. It seems we're going to be jumping over more than just a single hurdle here to try and learn more about this book and I'm looking forward to seeing how that goes.

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

Stay Safe
Kate





Outside of a dog, a book is a man's best friend. Inside a dog, it's too dark to read.
— Groucho Marx