But just in general... should the resistor go before or after the LED, in the above circuits? i.e. which is best practice and why
My take on this is 1 or 3 - here's why:
It is common "sense" to envision current as flowing from high potential (voltage) to ground (ie, from positive to negative). In reality, this isn't true at all (and nothing really "flows" anyhow), but the visualization is easy to see.
Resistors are used to decrease current in a circuit (thus lowering the current through the LED in this case), so from the "flow" perspective above, it makes more sense that the current flows out the pin, goes thru the resistor (and lowering current), then thru the LED, then to ground.
Once again, in reality this isn't how it actually works, and it ultimately doesn't matter which side the resistor is on, as RuggedCircuits has already noted...
![]()