In Computer Science, the writing of a program involves two basic steps: deciding what the program is supposed to do and preventing misinterpretation by the computer, the harder of the two being the latter. In terms of the Maze... [ view full abstract ]
In Computer Science, the writing of a program involves two basic steps: deciding what the program is supposed to do and preventing misinterpretation by the computer, the harder of the two being the latter. In terms of the Maze Implementation, referred to as the MazeMaker, the hardest challenge is making sure the text files are decoded properly. This is due to the MazeMaker being designed to read instructions from a file then create the maze described. For example, in a simple occurrence, the user could want four steps left and three steps up. To a human, this is means walk four steps left, pivot then walk three more. However, computer can interpret those instructions as: four squares left, and three steps upwards or seven steps left if a relative up is used or any number of ways. The problem: design wise, the computer could create completely different mazes; coding wise an error message could result because the taken paths are outside of the given range. In terms of the design issue, the client might not even notice if it is subtle. However, a coding error means nothing will be created, and the program will look broken. So instead, this program was designed to take four cardinal directions as instruction, without being relative to the instruction before. Therefore, if I type four steps west and three steps north the program will always create the maze I intend because north, east, south, and west are coded to always be the same directions. Thus, coding sometimes has to be intentionally verbose in order to avoid errors and to make it easier for the user to manipulate. With constructing the MazeMaker, I created two separate programs: one that color coded each direction and one that created a generic looking maze. Both mazes are the same, but the color-coded version allows a step-by-step look into how the computer interprets my requests, which is useful in error-checking. The next steps involve checking spelling and capitalization throughout the external files and the program itself. This results in a program that will flawlessly, unless a user error occurs.