Step Through Your Code

Take a look at this code:

public interface ResourceHandler {
    public Resource createResource(String resourceName,
        String resourceLibraryName);
}

/* ... */

String resourceId = "resourceLibrary:resourceName";

/* ... */

String[] resourceInfo = resourceId.split(":");

/* ... */

resourceName = resourceInfo[0];
resourceLibrary = resourceInfo[1];

/* ... */

resource = resourceHandler.createResource(resourceLibrary, resourceName);

Although the code runs correctly, it would be problematic for future maintenance because there are two subtle errors in it. So, what is wrong with this code?

Mario 64's Flowing Level Design

Super Mario 64 is one of the earliest 3D platformers. Since the game utilizes the third dimension, the levels are designed to be less linear than Mario’s 2D entries. Many of the larger levels have multiple goals such as winning a race, getting all the red coins, or defeating a boss. The game rewards the player with a star for completing these challenges. Once the player obtains 60 (of 120) stars, they can face off against Bowser. Recently, I was replaying Mario 64 to attempt to get all 120 stars, and I started playing the level Tiny-Huge Island. Every time Mario slides down a pipe in Tiny-Huge Island, he changes size to either tiny or huge. While I was playing, I noticed some particularly clever game design when I got the fourth, fifth, and sixth stars of Tiny-Huge Island.

The Mediocre Dinosaur (Spoilers!)

The Good Dinosaur is a western-style film set in the prehistoric era. The film opens with an introduction to a family of long-necked Apatosauruses. The titular main character is Arlo, the easily-frightened runt of the family. Lovingly, Arlo’s father attempts to toughen Arlo up and tasks him with stopping whatever is stealing the family’s corn. Arlo successfully catches the human boy who is taking the corn, but he cannot bring himself to kill the cave-boy. Instead, Arlo releases the child. Berating Arlo for freeing the boy, Arlo’s father takes Arlo and sets out to recapture the child. Unfortunately, a flash flood occurs, and the raging waters drown Arlo’s father.

The Brilliance of Mario's Size and Shape

The Super Mario series is amazing—every game is a best-seller and a classic. Each entry, even the original Super Mario Bros., is still fun today. Much of Mario’s timelessness can be attributed to good design, especially the design of Mario himself.

About

Kyle

Kyle Stiemann (stiemannkj1)