Very basic resistors question

DerekErb:
I am an old software guy who is trying to (re)learn all of this basic electronics and hardware with Arduino.

I have a pretty basic question, the answer to which will help me in all my future endeavours, it's about calculating which resistor(s) I need for any given sensor or output device I connect to my Arduino.

Let's say I'm plugging in to the 3.3V output on my Arduino...

I have a LED which says "Uf 2V lf 20mA" and another which says "Uf 3V lf 20mA"

It's Vf on Uf, for forward voltage drop value.

How do I figure out what size resistor I need to plug in? What's the magic formula I need to apply?
It's (voltage source minus Vf) / If = resistor ohms, so for you two leds:
(3.3 - 2) / .02 = 65 ohms
(3.3 - 3) / .02 = 15 ohms

And I always plug the resistor in to the GND connector of the LED (going back to the GND pin on the Arduino) right?

It's a series circuit (led/resistor) so it doesn't matter if the resistor or led wires to ground, same current flows in only one path. However the polarity of the LED does have to be correct or it won't conduct current
at all.
Lefty

Many thanks.