AJ3 – Chapter 18: Creatively Handicapped (Patreon)
Content
Chapter Eighteen
Creatively Handicapped
By the time the actual classes that I’d signed up for began, I had already more than finished reading the books required. Things made so much more sense now. Even with just the basic understandings I’d gleaned from the introductory books so far.
I was considering not joining the classes at all, but my loneliness was becoming a real problem. I was bored and missed talking to people. I didn’t want to go back to Tread the Sky. I shuddered, thinking about the King and what I’d done there. No. I wasn’t nearly ready to go back there yet. Instead, I decided to attend some of the classes just to see what I might learn, above and beyond what the books had already shown me.
Waiting for the class to start from the recording camera at the back of the hall had seemed to stretch on for ages. There were actually quite a few introductory classes on the first day of the term but I decided to only attend two of the early ones. It would make people suspicious if I joined ten of them at once and showed up for precisely none of them.
Introduction to Computer Science and Programming, and Fundamentals of Programming. I hadn’t chosen them at random though. The biggest reason I’d chosen these two classes was that their descriptions in the registrar had heavily suggested that there was a lot of open discussion online outside of the course.
I was idly reading a book two prerequisites ahead titled “C++, and Why We Stopped Using it!” when the teacher finally walked in and turned on the lights.
The college recorded all classes so the students could use them later, if they had to miss a class for one reason or another. I’d decided to happily abuse this feature by watching the class from the best seat in the house.
Students filed into the room from two doors on either end of a large auditorium with long desks that usually had enough space for two people. When about seventy five students had entered and found seats in the large auditorium, the teacher finally began.
“Good morning! My name is Dr. Einhouse. I’m the professor here for Introduction to Computer Science and Programming. If you are not signed up to attend Introduction to Computer Science and Programming, you are in the wrong room.”
I laughed, but the students seemed to stare at the man with a pregnant silence that would’ve disturbed if I were the one up there talking to so many people. He weathered it with seemingly no trouble at all and kept a smile across his face.
The man was older, with gray-black hair and wore a brown suit and tie. He was skinnier than many of his students and stood taller than most of them as well. His lips were hidden between a thick mustache and beard.
“Well, it seems we’re all in the right place,” he said jokingly, before leaning back against his desk. “This, as you all know, is the high level. By that, I don’t mean difficult, but it's looking at programming from a bird’s eye view. Someone from the audience, tell me in your own words, what is programming? You. Red Shirt, third row?”
I couldn’t see the person he pointed to but I could hear the answer easily enough. “It’s giving a computer instructions.”
“Kinda simplistic but essentially yes. You. Better answer?” Dr. Einhouse asked, pointing at someone in the front row who still had her hand raised.
“It’s designing code that computers can use to solve real world problems, or run machines that make our lives easier.”
“I sense an “artificial limbs” leaning in that answer. Dual Biology major?” He asked the student.
“Uh… y-yeah,” the girl replied, surprised.
I sat there watching the teacher, feeling somewhat annoyed. Wasn’t he there to teach his students what programming was and how to do it? What did anyone learn from questions like this?
Programming… was… a means to an end. It would never be the same thing for me that it was for these others. For them, programming was a tool they could use to make their world better, through entertainment or functionality. For me, it was… magic, that could allow me to control worlds.
Learning it was akin to leveling up. Each new function, a step closer to being able to master my world and prevent the damage that my own abilities might cause. Even better, I might be able to create a world where the people were as alive as me.
I sighed. The rest of the lesson only lightly touched on even the basics of programming. Everything he did cover on the subject, I’d already learned from the first thirty or so pages of the book. The actual majority of the lesson was spent painfully walking us through creating an online storage space and showing us how to submit assignments to it. Once I saw one of the students finish their own creation, I just made a copy in the same storage space on the network, except with my information as its variables. I didn’t even have to use a computer interface for it.
It felt almost laughably easy. I almost decided to leave the class entirely when at the end of the lesson Dr. Einhouse gave us homework.
“Okay. I’m going to leave you today with a simple assignment that will be due Friday, and an optional one that you’ll use lessons from this class to complete. For Friday, I need you to create a program that creates fifteen variables of at least eight different types, assigns values to those variables, comments for what each one is in the code, and at a simple operation to print out those variables when passed one.”
I rolled my eyes. He hadn’t been lying. It was a stupidly simple assignment for anyone who’d read the book, and the book actually contained plenty of examples of variables being created and assigned. There was even a direct figure that showed exactly how to do this assignment on the first few pages. Pulling up a text file in my mind, similar to how I’d edited my object in the database, I completed the assignment only a few seconds after the man was done giving it, storing it in the filespace he’d just shown me how to create.
“The second assignment is going to be much tougher. I want you to design a simple game of tic-tac-toe. This will probably be one of the early assignments in a later class, but for now it’s optional. You’re going to need more information than I’ve already given you, and some of you are probably already familiar enough with programming that you can do this in your sleep. For those of you who can please submit this privately. Comments included! Comment everything!”
He paused for a breath before continuing, drawing my interest even more for the first time since I’d seen him.
“If you’re not sure how, or how to get started, you can definitely make use of the discussion boards on the website to discuss and collaborate with your fellow students. Do not post your code there for anyone and everyone to copy, but feel free to pick your peers' brains for methods that might work. Pseudocode is okay. Programming is collaborative, after all.”
The class actually seemed to grow a little more animated at this. There was whispering and chatting among the students sitting there.
“Finally, there’s no one right way to do this, people. Plenty of valid methods of making this work, so be creative! Yes, I’m sure you can use the internet to find out a method of doing this. Don’t do that. This class isn’t about how well you can google information, it's about learning to do the tasks now so that when they’re more complicated you’ll be able to handle it when the internet can’t help you.”
Well, I couldn’t really avoid doing that to an extent since I didn’t know what tic-tac-toe was. I looked it up and found a surprisingly fun little game that became immediately boring when I realized the second player could only ever win if the first player made a mistake.
Still, I figured it should be easy.
It wasn’t.
There wasn’t a direct method to create this game in the book. None at all that I could recall. It didn’t even exist in the Foundation’s course or in the algorithms course that came after that.
I… froze. There was no method on how to do this in the book.
The game had to… had to accept input from two different people, one after the other. A large portion of the book had been dedicated to accepting user input. Most of it was actually about limiting the user to only being allowed to input certain things or throwing back errors.
There was no direct way to apply that to this particular game though.
I didn’t know what to do. Try as I might, I couldn’t figure out exactly how to use the little pieces of how the book explained it should be done together to create a cohesive whole.
“If there’s already a way to do it,” I thought irritated, “Then why doesn’t he just give us that so I can learn it?”
I declared the variables, the same as the book did. I named them PlayerOneInput and PlayerTwoInput because the book did that when it created an even more basic program, whose only function was to have the screen print out the player’s names after they’d been input.
I got that far. I set the variables to be of type string. But then I hit a wall. I couldn’t figure out any way to ask the player where on the game board they wanted to put their X or their O!
Worse still, as I worked my way through the problem, I realized that I didn’t even know how to prompt the user to fill the variable with JUST an X or an O. The method to do that wasn’t there in the book either!
“Gahhh!” I screamed inside, feeling my head swim.
I could prompt users to input their name, and there was also a method to re-prompt the user if they input special characters like exclamation points or question marks. No direct method to input just an X or an O though. How could I limit the user from putting in anything but either of those two characters?
The book had no answer. It… did have suggestions that implied that I should be able to glean how to do that with what they’d already told me, but I simply couldn’t figure out how.
I panicked as I thought back over my time in Dungeon Home and later Tread the Sky’s main world. When I’d gotten food and learned to eat it, I’d just done what Amy had told me to do. When Tyrone told me about variables, or when Francis gave me the book on Ethics in Programming. I’d just… consumed it all. Copied it all.
That was all I’d ever done. I’d never once created anything original. Without a method to show me the exact terminology, I couldn’t… I couldn’t create a method that would accomplish this goal.
Had I… Had I ever actually learned anything? Was there a difference between learning something and being told it?
Gods, I wished I could talk to Amy right now. Or Francis. Maybe he could understand and help me… but if he did, wouldn’t he just perpetuate the problem? He’d tell me the answer and then I’d know how to do that… but what about the next problem? And the next? Could I handle those, or would I need to be fed the answers each time? What if I got to the point where no one I knew had the answer?
The big question, the reason I’d come here, was to learn how to make my world sustainable even after I used Fae-Touch to bring it to life. Francis certainly didn’t know how to do that, otherwise I wouldn’t have had to delete the King. But if I couldn’t even figure out this, how could I hope to do something so much more complex?
Could I be crippled? It seemed like the problem should be simple. I had methods of doing similar things to what I needed to accomplish, but never the exact thing.
“I’m… I’m nothing but a copycat. Even now, all I can do is repeat what other people have done and that’s not enough. I…”
I paused with a sudden thought. I had. I had done one thing. I had used my own intuition on Amy. Not when I’d used Fae-Touch on her, but when I’d made the logical leap that using the word “Login” would bring her into Tread the Sky.
I flushed a little as another thought crossed my mind. It could also be argued that I’d created something original when I’d built those many legged chairs with the command line… but original and useful were two very different things. I did not want to remember creating an absolutely useless chair as the first original thing I had ever done.
That was enough though. I could do this. I just… didn’t have any idea where to begin. Part of me wanted to just try things over and over and over again until I got something right but that seemed like it would take an eternity.
An idea came to mind. If statements. Loads and loads of them. If the user placed an X in the upper left corner then the next user could place an O in any of the other nine positions. After that I could nest the if statements inside of each other like the book had shown. If the next user placed an O in the lower right then…
Pseudocode was a nifty little term described in one of the early books, that was a way of creating the framework of a program without actually… creating anything. Create this function. It does this.
The pseudocode for my program sprung to life in a document in my storage space and I immediately realized that this would work. Technically. I still had to define a way for the program to accept user input and then limit that users input to X’s and O’s only but after only a factorial of 9 if statements, I would have a fully functioning tic-tac-toe game.
That… seemed like a lot though. These people only had something like 350,000 cycles to live. It would take a significant portion of these just for them to write it out. I could do it much faster… but I thought they would probably catch on that I wasn’t human very quickly if I did.
I sighed, feeling a little depressed. I could finish the assignment. The tic-tac-toe game existed. Clearly a way to program it in a reasonable time frame did too, but the teacher had asked me not to use the internet to find out how.
There was one other option though.
The discussion boards. The teacher had said we could ask our peers if we had trouble with the assignments. He’d also said we could ask him directly but that we should utilize the other students and come to him only if the question still stumped us. He seemed to prefer that we ask him questions as a group, which made sense, I supposed. There were only so many cycles and it would be frustrating to have to answer the same questions over and over again from different people.
Discouraged but not beaten yet, I jumped into the discussion boards via my unused computer with my new username and password. I could have found the discussion board from inside the network, but that seemed needlessly complicated when I could just follow the link in my new email. Gmail? Ugh. That was always going to be confusing.
I found the boards pretty quickly. There were actually two of them, one for each class. Since the other class I’d joined didn’t actually start until the next day though, I left that one alone.
When I logged into the discussion board for the “Introduction to Computer Science and Programming” class, I found that some of the students had already started talking.
“Brenda Spivy: Hiya All! I was looking at this program and it’s actually a bit tougher than I expected. I’m already seeing a few ways to do it though. Maybe a three by three array variable? Anyone have any thoughts?”
“Daniel Brock: Could do it with objects, though I’m pretty sure that’s a bit beyond this course. Might be easier to just number each position, one through nine in a single array and display a map.”
“Lora Tollett: Ohh, I like that idea. Do you think he’d take points off for needing to re-display the board after every input though?”
“Brenda Spivy: Doubt it. It’s an intro course after all.”
“Erin Randall: Anyone know how to display the board with like an arrow pointing to the spot? The player could use the arrow keys and choose which spot they wanted to put their X or O in?”
“Daniel Brock: That is so much harder than you think it is. You have to make a function to display the board, a function to move the cursor around it. Considering we haven’t even discussed like variables and stuff yet, that shouldn’t even be on the table right now.”
“Erin Randall: Wouldn’t it be cool if we did it though? You seem to know a lot about this.”
“Daniel Brock: Eh, I don’t think we get extra points for doing a better job. Make a game that functions and that’ll probably be enough. You know how these things work anyway. As soon as everybody completes this one he’ll give us a harder one.”
I brightened a little at the conversation. At least I wasn’t the only person stumped by the problem. It made me feel a little better when I thought about the time limit he’d given. This wasn’t supposed to be something I could do easily or quickly.
I was interested by the suggestions though. An array that held the slots and then printed it out after each user input? That sounded like it would work, though doing it as a three by three array made more sense to me. Then when it was printed it would automatically put the x’s and o’s where they belonged.
At least I thought it would.
“Gell Thyst: So… you have an array called Board. Board zero zero holds the input in the upper left. Zero one for the upper middle, all the way down to board two two at the bottom right?”
It didn’t take all that long for one of the other students to respond.
“Daniel Brock: Yeah that would work. I get confused by the coordinates though. I’d just do a single array. Zero through two is the top row, three, four, and five for the middle, and six through eight for the bottom. Takes up less space. Doesn’t matter for little games like this but on down the line it can.”
Space. Memory. That was what I needed to concern myself with. Saving as much of it as possible.
“Single array it is,” I responded. “Saving space sounds useful.”
Saving space might save my entire world someday.