Version Control

Version Control: the Missing Link

Version Control is an integral part of software development. Allowing developers to track changes to software, version control systems give programmers the power to collaborate, discover erroneous changes, and compare versions of software. When rightly used, version control (also called source control) empowers developers to make and share complex changes without fear of losing previous implementations. Developers who use revision control can always look back on and—if necessary—revert to previous versions of the software. Unfortunately, I received two-and-a-half years of Computer Science education without hearing about version control once.

Encapsulating Functionality

Computer science authors and professors often discuss the concepts of encapsulation, abstraction, and information hiding. These concepts are fundamental to programming, and they are required in order to manage complex systems. By encapsulating information into separate components, programmers can reason about those subsystems alone. Instead of understanding and mentally grasping the whole system at once, coders can partition systems into coherent sections. Unfortunately, encapsulation, abstraction, and information hiding are usually discussed with respect to objects and object-oriented programming (as you can see in the links above). But encapsulation is equally important in the lower-level tools of functions and methods.

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.