(Updated July 26, 2024) Overview When building a simple text game, we want the process to be smooth and elegant. There should be few places to trip up the user or make the play awkward. In this write-up, we look at how we can craft the building blocks of a valuable and user-friendly game. User … Read More “Building a Guessing Game” »
Category: Algorithms
(Updated November 19, 2024) Overview We often have data in a form that is not immediately useful. If we need to do mathematical calculations and all we have is a string, we must first take another step. Here, we explore some of the finer details of how this can be done by examining the algorithm … Read More “Converting Strings” »
(Updated November 21, 2024) Overview Hex dumps have been around for a very long time. Looking at binary is mind-numbing, and looking at decimal numbers is less than ideal. Using hexadecimal to show values is much easier on the eyes. With some experience, you can see the binary tucked inside, as each hex digit represents … Read More “The Hex Dump” »
(Updated November 19, 2024) Short-Circuit Evaluation – Advanced Example The Problem As we know, with the conditional operators && (and) and || (or), we can join multiple Boolean expressions together to form a more complex expression. You may also recall that these operators operate in a mode known as short-circuit. This means that once truth … Read More “Short-Circuit Evaluation – Advanced Example” »