Sentinel Values

“Halt!  Who goes there?”  The sentinel on duty at the castle was wide awake.  Our sentinel values don’t carry weapons or defend ramparts, but they perform useful guarding tasks in our programs.  In computer science, a sentinel value is a value that would not normally occur in input and serves as a marker of the end of input.  Occasionally they can also be in a location in an array, not at the end of the data, but representing when a condition has been met.  Two examples are discussed below.

Continue reading “Sentinel Values”

Debugging for Beginners

Ugh!  Bugs. They’re always crawling around and flying in your face when you least expect.  The same applied to computer science bugs. They’ve been around since 1947 with the early computers, and continue to annoy us today. The first recorded case of a bug was a moth that Grace Hopper found jamming a relay switch in September 1947 ( While not much could be done about moths flying into relay switches except climbing in and pulling them out, today we can debug without having to leave our chairs.

Continue reading “Debugging for Beginners”

Files that Make You Smile

Files.  Those floppy, large things full of paper that used to be the bane of office workers are now electronic.  No more lifting stacks of paper and having a couple of papers fall on the floor and get out of order!  Instead we have to keep even more files in order inside folders, inside other folders on our computers.  Not surprisingly, we have programs that can read and write files so we don’t have to do everything manually. Continue reading “Files that Make You Smile”