The next few hours flew by. Leila named our robot Zahira, which she said meant “shining light” in Arabic, and we all agreed it was perfect.
We set up our modules on Zahira’s motherboard and started entering the code we’d discussed into our computers. Everything seemed to be going seamlessly, but when we gave Zahira a test run on our table . . . she wouldn’t move.
We tried to change the code a few times, but nothing was working.
“Um, guys? I think we need help,” Erin said, pointing to the wall behind our table that said HELP ME. The judges had explained that students could post coding issues there with sticky notes so that teams could help one another out.
“I wish we could figure it out on our own,” Leila said, biting her lip. She was still tinkering with code on her computer. “Wait, I have an idea!” She leaned over my shoulder. “Try changing the number in the code from one to five. See what happens then.”
“Okay.” I made the change. But Zahira still wouldn’t move.
Mrs. Clark always said that a big part of coding was problem-solving when things didn’t work—fixing bugs. But the harder I stared at the issue, the more the coding started swimming in front of my eyes. And that was when I saw it.
“Guys, wait a minute.” I tapped the screen. “Look at this code.”
It read:
moveForward( )
“Anything missing?” I prompted, wanting my friends to see what I was seeing.
Maya nibbled on her lip. “Um . . .”
Leila stared intently at the computer. “I’m not seeing it, Sophia.”
“We’re missing a semicolon after we call the function!” I exclaimed.
It needed to be:
moveForward( );
Erin smacked her forehead with her palm. “You’re right, Sophia!” We’d learned in coding club that sometimes a semicolon let a computer know that it was the end of a line of code—without it, the computer wouldn’t know what instruction to follow. I couldn’t believe that a measly semicolon had almost ruined our project. I inserted the semicolon into the code, and miraculously, Zahira began to move.
“Wahoo!” Maya whooped. We all high-fived one another.
“That’s what I’m talking about,” Lucy said, nodding confidently.
Next we needed to make the arm work. We got the arm to swing the way we wanted, but the ball kept rolling away—the arm was pushing it too hard.
Leila put her elbows on the table. “We need the ball to stay closer to her, or she won’t get it through the maze.”
Erin lowered her voice. “It’s like Sammy and Sophia . . . he’s trying to stay closer to her and—”
“OMG, stop, that’s enough,” I said, clapping my hand over her mouth. “We need to stay focused.”
“I think we should try the help board,” Maya said, blowing her bangs off her forehead. “Maybe someone could give us a good idea.”
Lucy nodded. “Agreed.”
Erin had the neatest handwriting in our group. On a bright yellow sticky note she wrote:
“We’re having trouble not making the mechanical arm swing too much. Any ideas?”
She and Maya ran over to post it on the board. There were a lot of notes already on there.
When they got back, we heard an announcement for lunch. It felt a little weird to take a break when we’d been working so intensively, but I realized that my stomach was growling. There were tables set up on one side of the gym with big bowls of tossed salad and sandwich platters, drink dispensers filled with water and lemonade, and a dessert table with cake pops and cookies.
I saw Sammy just ahead of me in the food line, and as usual, I froze.
Maya was behind me. “Soph, you’ve gotta get over this. He’s just a boy. Go talk to him!” She gave me a little shove, and I had no choice but to pick up a plate.
I cleared my throat. “Hey, Sammy.”
Sammy turned around. “Oh, hey.”
I started putting salad on my plate. “So . . . how’s your robot going?”
“Pretty good. Yours?” he asked. We inched down the line.
“Still working on it.” My brain decided to function properly for a second, and I remembered what he’d said at the water fountain the other day. I forced myself to talk instead of just standing there. “So, how’s the secret part of your robot going?”
He smiled evasively at me as he took a chicken Caesar wrap. “Really well.”
I was starting to get suspicious about their secret part.
“You know it has to be a module they have here, right?”
“Oh, it is.” Sammy looked around, and then he lowered his voice. “I’ll tell you this: There’s no rule saying you have to use everything the way it was designed.”
I raised my eyebrows in surprise. What could that mean?
We got our food and drinks and went outside. It was a really nice day, and kids were sitting on the ground eating lunch with their groups. Fatima’s team was sprawled out on the lawn right next to mine, and Sammy’s group was pretty close by, too. First we talked about our robots, but then we started talking about school. Fatima said she was helping plan the winter school dance at her school, and that got her and Maya started on themes. I could have sworn I saw Sammy glance at me during the talk about the dance, but I decided to ignore it. Like Tyson had said, if he wanted to ask me, he would. And if he didn’t and I decided I wanted to go with him, I could always ask him myself, like Maya had mentioned.
After lunch, I thought about what Sammy had told me. Maybe he was right—not everything had to be used the way it was designed.
I had an idea about how to alter what Zahira’s arm did, since it still didn’t work. But it meant a pretty big change to our plan—the plan we’d spent all week working on—and I wasn’t even sure it could work. I decided not to bring it up—at least not yet. Still, I played around with my idea on my computer for a bit.
Eventually Zahira was moving forward, and the button was working. But we still needed to solve the arm-ball problem and get Erin’s dance music up and running, when we heard Mrs. Clark say, “Coding time’s up!” She was in the center of the room, holding a microphone, and asked everyone to gather around her. Lucy, Erin, Leila, Maya, and I gave one another panicked looks.
“You’ll have more time to code later, I promise,” Mrs. Clark said, talking over the excited room of coders. “Taking breaks is an important part of coding and being creative—it gives your brain a chance to rest and rejuvenate itself.” She looked around. “And we have something fun planned for you!”
We put our modules down and gathered around Mrs. Clark. “And now for our very special activity . . . ,” she said suspensefully. “I’d like to introduce you all to Ms. Ana Kamat, chief technology officer of TechTown!”
Everyone clapped as Ms. Kamat joined Mrs. Clark. I noticed that the tables behind Mrs. Clark were now filled with tablets and smartphones instead of the modules for our robots.
“Thank you for the warm welcome!” Ms. Kamat said. “I’m so glad to be here, talking to all of you coders. I help create computers and computer programs at TechTown. Our mission is to build socially responsible technology that helps communities.” She picked up a clipboard on a table next to her. “In fact, at TechTown, we have five new products coming out next year,” she said. “And you will be the first to see them!”
Everyone started talking excitedly. Erin and I stood on our tiptoes to try and get a better look.
“I’ve brought examples of a few programs and gadgets. I’d love for you to try them out and tell me what you think.” She looked over at Mrs. Clark. “As I’m sure you’ve learned in your coding clubs, a big part of developing programs, apps, and robots is getting feedback from users to figure out what works and what doesn’t.”
Ms. Kamat showed us a new system TechTown was releasing to help make sure water in small, rural areas was safe for animals and humans to drink, and a medical app that linked to the fitness tracker things we’d gotten in our TechTown backpacks.
Before we were allowed to explore, Ms. Kamat walked over to a three-foot-tall lump covered by a black cloth.
“And now, for the grand finale . . .”
Swoosh!
She pulled back the cloth dramatically, revealing a small robot. “Ta-da!” The robot had a white rounded plastic head and jointed arms and legs. My BFFs and I exchanged excited glances. It looked just like the robot Maya had designed for our Rockin’ Robots T-shirts!
“This is a personal assistant bot we’re testing at the local hospital. It can answer curious patients’ questions about their conditions, and it can also complete simple commands, like ‘Get me a glass of water.’ It hasn’t quite mastered things like open-heart surgery, but we’re working on that.”
Lucy leaned over to me and Leila and whispered, “This could totally be adapted to be the Babysitter 3000.”
Leila smiled. “We should suggest she make it toothpaste-resistant.”
“And don’t forget peanut butter!” I added, chuckling.
“Keep in mind that none of these projects is final yet,” Ms. Kamat explained as we went around the stations, checking everything out. “In fact, some of them, like our personal assistant bot, are still experimental. Sometimes you have to take a big risk to be innovative,” Ms. Kamat continued. “But it’s usually worth it. And if it still doesn’t work, iterating—which is trying again and again—is a big part of computer science.”
I smiled, but I was thinking about Zahira. Maybe it was worth telling my team about my idea to make her arm work better, even if it meant a big change. Like Ms. Kamat said, sometimes you have to take a big risk to make something better.
When we got back to our tables, I decided to go for it. “Listen, I have an idea for how we can fix Zahira’s arm.”
“Looks like Bradley did, too,” Erin grumbled, showing me the green sticky note she’d pulled from the help board.
I read it out loud. “Glue the ball to the arm. Use chewing gum to attach the ball. Use Lucy’s bracelet to tie the ball to the arm so it can’t go far. You’re welcome. B.”
Lucy held out her arm with the special bracelet her mom had given her. “He’s hilarious,” Lucy said wryly, rolling her eyes.
“Only in his own mind,” Maya scoffed. “The bracelet thing is not happening.” She paused. “Though we could use one of Erin’s hair ties to tie the ball closer to the arm so it can’t roll too far . . .”
“But that would mean taking off the speakers,” Leila countered. “We can still only have four things, and I’m pretty sure a hair tie would count. If we could even use one.”
“What was your idea, Soph?” Erin asked me, tightening her bun. “But know that I am down for giving you my hair tie if that’s what we want to do.”
I took a breath. “All the stuff Ms. Kamat showed us got me thinking—maybe we should change our plan,” I said, watching my friends carefully.
No one looked thrilled with this idea.
I put my hands on the table. “You know how Ms. Kamat said sometimes you need to take a risk and make a change?” They all nodded. “I think we should forget the ball and put in an LED light instead.”
“But I thought you liked the ball part,” Erin challenged, frowning.
“And we already programmed the arm,” Leila reminded me.
“I do like the ball part,” I said. “And we can leave the arm the way it is. I just don’t think the ball part is working, and Zahira won’t be able to get through the maze if she’s chasing the ball that far, right?”
They all nodded again.
“All I’m saying is, maybe we try something different.”
“But then what would the arm do?” Lucy asked. “It’s got to have a purpose.”
“Could it . . . dance?” I suggested, thinking out loud.
“Dance?” Maya repeated.
“I thought you didn’t like that idea,” Erin said.
“Well, I didn’t think it was possible,” I explained, lifting Zahira’s arm. “But maybe I underestimated Zahira.”
“If you’re thinking she can do the sprinkler, stop right now,” Lucy said.
Erin rubbed her chin thoughtfully. “I can’t really see her doing the shopping cart, either, but . . .”
I shook my head so hard, my hair brushed Erin and Lucy’s cheeks. “No, no, no!” They all gave me confused looks. “Instead of the arm pushing the ball through, we have lights blink, music play, and an arm that dances to the beat of Erin’s song!”
A hush fell over my friends. I could tell they were trying to picture my idea.
“That’s actually pretty funny,” Erin finally admitted. “This could work!”
I smiled. “Sammy said we don’t have to use everything the way it was originally supposed to be used.”
“Oooh, Sammy!” Maya nudged Lucy.
I gave her a stern look. “Don’t even start.”
I started typing on my keyboard and pointed to a spot on the screen. “We can change the coding here.” I pointed to another line. “And here.”
Maya and Lucy raced to the supply table to exchange the ball and came back with an LED light board.
After we’d made the changes and plugged in the LED light board to Zahira’s motherboard, I uploaded the music to the robot’s motherboard and set the coding in motion. Zahira’s arm wiggled in all directions to the music, which played in a loop. The lights flashed red, green, and blue, but not to the beat at all. She looked totally silly. But there was no doubt about it: She was dancing!
“OMG, I saw Bradley at a bar mitzvah last month, and that’s exactly how he moved on the dance floor!” Maya squealed, cracking us up.
“You’re terrible,” Leila said, shaking her head, but she was laughing.
“Looks like I’ve got some real competition,” Erin said. She began doing her silly robot dance.
“Excuse me!” A short kid with braces came running over to us. “I know we’re supposed to go to the board, but you guys look like you know what you’re doing, and we’re running out of time. Our robot keeps hitting the wall, and we can’t figure it out. Can you help us?”
“Um, sure,” Leila said as we all nodded. “Guys, I’ll be back.” She and the kid raced off.
“I love how helpful everyone is here,” Maya said as we watched the two teams next to us give each other advice.
“Yeah,” I said. It was a pretty cool atmosphere.
Before we knew it, it was time for Zahira to do a practice run through the maze.
“Where’s Leila?” Lucy asked, scanning the room. We had some time . . . but not much. We waited patiently, watching other teams send their robots through. There were some really cool ones: a robot that carried blocks in the bulldozer arm and dumped them at the finish line, one that unwound a ball of string behind it to show its path, and one that had a spinning propeller on top—though I couldn’t figure out why it was there or what it did.
“I’m back,” Leila gasped, running up to us. “They just needed to use sensors.”
“Phew,” Erin said, scooting over so Leila could squeeze in next to her.
I noticed that Bradley and Sammy’s team wasn’t coming over to practice. Maybe they thought they didn’t need to practice . . . or maybe they still wanted to keep what their robot did a secret. I realized that maybe that was a good idea—we didn’t want everyone to know what Zahira was going to do before the actual maze run.
“We should keep Zahira’s dancing a secret,” I whispered to my friends, glancing over my shoulder at Sammy. “Let’s just try the sensors and the movement through the maze,” I told them.
“Good idea,” Erin said. “That’s the hardest part, anyway.”
Maya had walked up to the maze and waved her hand at us, calling us over. “It’s our turn.”
I headed to the starting line and squatted down, setting Zahira on the green arrow at the start of the maze. “Time to see what you can do, Zahira . . . ,” I whispered to her.
Ms. Kamat was running the practices. “Go!” she said, and blew a whistle.
Erin dashed back to the computer and clicked “run” on our program.
Zahira crossed the starting line, just like she was supposed to. When she hit the first wall, she sensed it and turned left. We all looked at one another and grinned. Then she turned left again to an opening in the maze, where she moved forward one more time.
“Zahira! Zahira!” Lucy and Maya were whooping and yelling.
“It works!” Leila shouted over to where Erin sat. “She actually works!”
At the next wall, Zahira turned left. But then she went left again . . . and again . . . and again.
I gasped. “Oh no!”
“Looks like you girls have a problem,” Ms. Kamat said as Zahira continued to turn in circles. “Can you try to solve it?”
Erin looked over at us, a panicky look on her face. “I don’t know what to do!” she called to us.
I could tell Ms. Kamat wasn’t going to help—it was up to us. With a deep breath, I scooped up Zahira, cradled her in my arms, and joined my friends on the sidelines.
Erin took her hands off the keyboard and held her hands up in a shrug. “I have no idea how to fix this.”
“Let’s look at our plan again,” Maya said, already heading back to her computer.
“No, Maya, there’s not enough time,” I argued, stopping her. “And we already changed it once. I think we should try to fix the code until Zahira works.”
“And we’ve already worked on the plan so much,” Leila said. “I don’t think that’s where the problem is. Sophia’s right. We don’t want to make things worse. Let’s go through the code again.”
“Okay, fine,” Maya gave in. “I guess you’re right. I mean, I’d hate to fix the way she moves but then mess up the arm or lights.”
“True,” Lucy said. “Let’s go over it all, line by line. We’ll figure this out!”
We were about to rush back to our table when I noticed Ms. Kamat looking at us. She was close enough to have heard our entire conversation, but I couldn’t tell what she was thinking.
Was there any way we could get Zahira to finish the maze? We’d put so much work into her—and I didn’t want Sammy’s robot to beat us.
But we were running out of time.