The Artists | Think Like A Coder, Ep 5

Alphabets Sounds Video

share us on:

In Episode 5 of “Think Like A Coder,” Ethic and Hedge embark on a quest to retrieve the Node of Power from a tower guarded by robots, with the help of Octavia, the director of a treehouse community. To create a distraction, they devise a plan where Hedge marks the residents’ paintings with an X, using two programming methods: the Typewriter Method, which involves painting row by row, and the Spiral Method, which paints in nested squares. Both methods successfully divert the guards, allowing Ethic and Hedge to advance toward the tower while highlighting the importance of strategic thinking in problem-solving.

The Artists | Think Like A Coder, Episode 5

In a world where robots have taken over the hard work, people are free to explore their passions. Ethic and Hedge, our adventurous duo, are on a mission to find the second artifact, the Node of Power. Their journey brings them to a forest where they meet Octavia, the director of a unique treehouse community.

A Creative Haven

Octavia’s community was created as a place for people to enjoy arts and crafts. However, over time, the residents lost their creative spark and began painting only self-portraits. The second artifact is hidden in a tower, heavily guarded by robots and traps. When the tower was built, communication across the land mysteriously stopped. Octavia has tried to retrieve the artifact but has been unsuccessful.

The Plan

To reach the tower, Ethic and Hedge need a distraction. Octavia suggests a clever plan: Hedge will mark the residents’ paintings with an X, causing them to blame the helper-bots. This chaos will draw the guards away from the tower, giving Ethic and Hedge a chance to sneak in.

Programming the X

Hedge can only paint one pixel at a time and move in straight lines, so Ethic must program him carefully. Imagine a square grid where Hedge needs to paint an X. How can he do it efficiently? Let’s explore two methods.

The Typewriter Method

In this approach, Hedge paints row by row. For example, in a 9×9 grid, Hedge paints the first pixel, skips seven, and paints the last pixel in the first row. In the second row, he skips one, paints, skips five, and paints again. This pattern continues until the center, where only one pixel is painted. Then, the process reverses. This method requires careful logic to know when to change directions.

The Spiral Method

The spiral method views the grid as a series of nested squares. Hedge starts at a corner, paints a pixel, moves forward, and turns right. He repeats this process, moving inward with each loop. Each square is smaller than the last, and Hedge continues until he reaches the center. This method is simpler because it uses the same pattern throughout.

The Outcome

Hedge successfully marks all the paintings, causing an uproar in the forest. The guards rush to calm the residents, leaving the tower unprotected. Ethic, Hedge, and Octavia seize the opportunity to advance toward the tower, carefully avoiding the traps and the deep gorge that lies ahead.

Both methods of painting the X have their strengths. The typewriter method is adaptable for different patterns, while the spiral method is straightforward and consistent. In the end, either approach helps Ethic and Hedge achieve their goal.

  1. How did the concept of a world where robots handle all hard work influence your perspective on creativity and human potential?
  2. What do you think caused the residents of Octavia’s community to lose their creative spark, and how might this reflect real-world scenarios?
  3. Reflect on the role of communication in the story. How did the lack of communication impact the community and the mission?
  4. Discuss the ethical implications of using deception as a strategy, as seen in the plan to mark the paintings with an X. Do you agree with this approach?
  5. Which method of painting the X—typewriter or spiral—do you find more effective, and why? How does this relate to problem-solving in your own life?
  6. Consider the character of Octavia. What leadership qualities does she exhibit, and how do they contribute to the mission’s success?
  7. How does the story illustrate the importance of teamwork and collaboration in overcoming challenges?
  8. What lessons about adaptability and strategic thinking can be drawn from Ethic and Hedge’s journey to retrieve the Node of Power?
  1. Design Your Own Treehouse Community

    Imagine you are part of Octavia’s community. Create a blueprint for your own treehouse, focusing on how it can inspire creativity. Think about the materials, layout, and activities that would encourage artistic expression. Share your design with the class and explain your choices.

  2. Program a Virtual X

    Using a simple coding platform like Scratch, try to program a virtual character to draw an X on a grid. Experiment with both the Typewriter and Spiral methods described in the article. Compare the efficiency and complexity of each method and discuss which one you found easier to implement.

  3. Role-Play the Distraction Plan

    In groups, act out the plan to distract the guards. Assign roles such as Ethic, Hedge, Octavia, and the residents. Use props or drawings to represent the paintings and the X marks. Reflect on how teamwork and strategy play a role in problem-solving.

  4. Create a Storyboard

    Develop a storyboard that illustrates the key events of Ethic and Hedge’s adventure in the forest. Focus on the sequence of events, including the planning, execution, and outcome of their mission. Use drawings and captions to convey the story visually.

  5. Explore the Art of Communication

    Discuss how communication plays a crucial role in the story, especially when it mysteriously stops. Create a project that explores different forms of communication, such as visual art, music, or digital media. Present your project to the class and explain its significance in fostering creativity and collaboration.

Here’s a sanitized version of the provided YouTube transcript:

Dawn and the train are both breaking as Ethic and Hedge arrive in the woods. The adventurers have recovered the first artifact—the Node of Power—and have come to the forest in search of the second. Here, they’re welcomed by the director of the colony, Octavia. She established this treehouse sanctuary after the robots freed everyone from having to work. It was meant to be a haven where people could follow their passions, take up crafts, and find fulfillment. However, some years ago, everyone lost sight of that purpose. They abandoned arts and crafts and instead just painted and exhibited pictures of themselves repeatedly.

The location of the second artifact is no secret; it’s in a tower, guarded by a garrison of bots, a bottomless ravine, and various traps. As soon as the tower was built with the node inside, human communication across the land went dark. Octavia has been pursuing it for years, but despite her efforts, the defenses thwart her. To even reach the tower, the team will need a distraction. Octavia has an idea: stir up the people through some well-intentioned vandalism.

The residents’ paintings are all squares of different sizes, all with an odd number of pixels across. Helper-bots pick up the finished portraits and hang them in public places for everyone to admire. There’s a limited window of time when Hedge can access the paintings. If he were to mark each one with an X, the people would blame the helper-bots, creating the distraction the team needs. However, Hedge can’t just paint an X—his painting processor requires very specific instructions. He can fill in one pixel at a time and can move forward and make 90-degree turns over the canvas, but can’t move diagonally.

How does Ethic program Hedge to paint an X over each portrait? Take a moment to think about it. Here’s a hint: Try drawing a square grid and simulating Hedge’s path over it. What patterns can you find to guide him? The challenge is to craft a set of instructions that will work for any square grid. Fortunately, one of the strengths of programming is the flexibility to solve not just one problem, but a whole class of them.

Let’s consider a square. Hedge can measure the length of its sides and store that number as a variable. Now, we need a plan for how Hedge will paint an X, pixel by pixel. There’s more than one way to do this; let’s look at two approaches. First, what if Hedge went row by row, like a typewriter? If it’s a 9-pixel by 9-pixel painting, in the first row he’d paint, skip 7, and then paint again. In the second row, he’d skip the first, paint, skip 5, and paint. The pattern here is that for each row, the pixels skipped at the beginning increase by one, while the pixels skipped in the middle decrease by two.

Things become more complicated when Hedge reaches the center. Here, there’s a row with just one pixel painted. Then the whole process reverses—the number of pixels skipped decreases by one on the left and increases by two in the middle. Instructing Hedge to do this with a series of loops will work and is a valid solution. The main drawback is that it requires quite a bit of logic—knowing what to do in the middle, when to reverse the process, and how to do it.

So how might we approach this so that the logic remains consistent from start to finish? The key insight is to view the grid as a series of concentric squares. Each square follows the same pattern—painted pixels in the corners and unaltered pixels in between. If we can figure out how to paint one nested square, transition to the next, and repeat, we can paint them all.

Painting the outermost square is straightforward. Start in a corner and paint that pixel. If we call the length of the painting n, move forward n minus 1 spaces, paint another pixel, and turn right. Repeat this process, moving forward one less space each time, and Hedge will be in the next concentric square, ready to repeat the whole process. Each square is n minus 2 pixels smaller than the last in length and width, and we can follow this spiral pattern all the way to the center with a loop and a variable that tracks how far Hedge should move.

Is one of these methods better than the other? It depends on what you value. The strength of the spiral method is the simplicity of finding a pattern and reusing the same logic throughout. The advantage of the typewriter approach is that it’s a more generalized solution, meaning it can be adapted more easily to fill in any pattern. For Ethic’s sake, either will work just fine.

So here’s what happens: Hedge quickly defaces all of the portraits. Within moments, cries of anguish break out all over the forest. The garrison guarding the tower abandons their posts to calm the agitated people, allowing Ethic, Hedge, and Octavia to slip through—and nearly slip into the depths of the gorge standing between them and the tower.

This version maintains the core narrative while removing any potentially sensitive or inappropriate content.

RobotsMachines capable of carrying out a series of actions automatically, often programmed by a computer. – In our coding class, we learned how to program robots to follow a path using sensors.

ArtifactA piece of code or software that is a result of a development process. – The final artifact of our group project was a simple video game that we could play on our computers.

CommunityA group of people who share a common interest, often collaborating and sharing knowledge online. – The online coding community helped me fix a bug in my program by suggesting different solutions.

PaintingsDigital images or graphics created using computer software. – We used a graphics program to create digital paintings that we could print and display.

GridA network of lines that cross each other to form a series of squares or rectangles, often used in design and layout. – In our web design class, we used a grid to align elements on the webpage neatly.

MethodA function or procedure in programming that performs a specific task. – We wrote a method in our code to calculate the average score of the students automatically.

LogicThe reasoning conducted or assessed according to strict principles of validity, often used in programming to make decisions. – The logic in our program checks if the user input is correct before proceeding to the next step.

ProgramA set of instructions that a computer follows to perform a task. – We wrote a program to sort a list of names alphabetically using Python.

TowerA structure or system that is built up in layers, often used metaphorically in coding to describe complex systems. – The software architecture resembled a tower, with each layer handling different tasks.

ChaosA state of disorder or confusion, often used to describe a program or system that is not functioning correctly. – When the server crashed, it caused chaos as none of the users could access their accounts.

All Video Lessons

Login your account

Please login your account to get started.

Don't have an account?

Register your account

Please sign up your account to get started.

Already have an account?