Perhaps the greatest hardship for new programmers is the ability to quickly grasp how to represent information to describe a "phenomenon" in a computer. In reality the choices are very limited (numbers, strings, booleans, arrays, and objects/structures). In practice choosing the right representation is key to making working programs. One of the key attributes of a "Good" representation, is the ease in which it is transformed into other valid information the computer can process.
Lets start with an example. Is the representation for my age better as:
a String
"twenty five"
a whole number (25)
a floating point number (25.62)
or even as a birthdate:
(born.month = "January", born.day = 25, born.year = 1990)
The answer lies in two questions:
What are you (the programmer) going to do with the information?
How easy is it for you (actually for the computer) to transform this information into something else?
For the above example, if you are just going to print the information for the user to read, then example 1 is probably fine. But, if you are going to determine, for example, how many birthday's I have had (the number 25) then turning the string "twenty five" into the number 25 is non trivial... and in fact option 2 would be better. On the third hand, if you want to know how many days I've been alive, option 3 or 4 are probably much better. Finally, if you need to know when to celebrate my birthday, as well as how old I am, option 4 is the best.
Remember, computers can do math really well, but don't do very well with human readable information (strings).
Often as a programmer, you will have the option of storing or computing the same piece of information.
Consider the idea that you need to turn 90 degrees to your right. 90 degrees is how most of us think about degrees, but computers and mathematicians think about angles in radians.
In the big schemed of thing THEY ARE THE SAME THING! Radians mean degrees, degrees mean radians... It's just like saying "hello" in English and "Bonjour" in French. THEY ARE THE SAME THING.
So, if we need to use some math routine with radians, but ask the user for a number in degrees, what should we do? The answer comes down to two options:
The correct answer is almost always the latter (compute one from the other).
Computer programs are all about modifying current values of data and transforming this data from one form to another.