I just started a diploma in software development. Right now we're starting out with basic Java and such (so right from the bottom you might say) - which is fine, I have no programming experience apart from knowing how to do "Hello World" in Java.

I keep hearing that mathematics is pertinent to coding, but how is it so? What general examples would show how mathematics and programming go together, or are reliant on one another?

I apologize of my question is vague, I'm barely starting to get a rough idea of the kind of world I'm stepping into as a code monkey student...


Question: Driving 3 LEDs at 1000mA. Is this circuit / driver ok?
Answer: You don't need the zener diode because Q1 will limit the gate drive if too much current is about to be drawn. I think this circuit is intended for a 12V dc supply

This looks like it should run from a 12V dc supply just fine. With 1A flowing through the 0.47 ohm source resistor this should just about start to turn on the BJT transistor which will hold the gate voltage at the right amount to maintain the 1A thru the LEDs.

Overall volt drop across the MOSFET will be about 0.9V (from a 12V dc supply) so it'll dissipate about 1W in heat - maybe consider a small heatsink.

If the dc supply is more like 15V dc then the MOSFET will get considerably warmer and maybe you should consider using a buck type constant current regulator.

EDIT - check also the maximum current that the LEDs can take - you might be running them too close if the max current is only a bit above 1 A. If this is the case, increase the 0.47 ohm resistor to maybe 0.68 ohm. A little bit of careful testing might be needed.