A website about programming wouldn’t be very useful if I only showed snippets of code, and never a real-world example. In this post, I’m going to reveal code for an electricity calculator… and here’s how it works. The user starts up the program, types in some information, and the program tells the user some dollar Read More →

Share

No, I’m not referring to a common brand of mouthwash. In programming, “Scope” refers to the visibility of a variable, as seen from different locations of a program. Not all variables and objects are available for use by any procedure; that would be akin to a hotel room that leaves all of its doors unlocked, Read More →

Share

Suppose you’re reviewing a modest-sized geocaching program composed of 6,000 lines of Java Code. It’s late at night, and you’re trying to figure out how a certain subroutine works. You know it asks the user for information about Longitude, but you aren’t sure how it works under the hood. Which of the below samples is Read More →

Share