News for hackers. Stuff that matters.
Re:Objects vs closures by jaekwon on Wednesday December 08, 2010 @05:20AM (#1982432)
I like the koan in the end. Now if only one can hit me in the head such that I understand the duality of electricity and magnetism...
Re:Objects vs closures by IgorPartola on Wednesday December 08, 2010 @07:58AM (#1982748)
Practically, electromagnetism is straightforward. Imagine a straight wire with electrons flowing through it at constant rate. This way, the moving electrons produce a magnetic field that is always perpendicular to the electric current (which is along the wire). What is perpendicular to a line in three dimensions though? It looks something like this: http://en.wikipedia.org/wiki/File:Electromagnetism.svg. This phenomenon is governed by Ampère's law (http://en.wikipedia.org/wiki/Amp%C3%A8re%27s_circuital_law). A handy trick for figuring this out is using the right-hand rule: http://en.wikipedia.org/wiki/Right-hand_rule.

Now, you can arrange your wire in any number of ways to produce a more interesting field. For example you can arrange it in a loop (or several loops). Since, once again the magnetic field is perpendicular to the wire, at the center of the loop it will be perpendicular to the plane of the loop. This way you can make an approximation of a constant field along an axis (just in that small space at the center of the loop/coil).

The fun part is that the inverse relationship also works: a changing magnetic field produces an electric field. Thus, taking a coil and moving a magnet inside of it sufficiently fast produces an electric field, which compels the electric charges in the coil to move producing an AC current. The change in the magnetic field is called the magnetic flux. This process is described by Faraday's law: http://en.wikipedia.org/wiki/Faraday%27s_law_of_induction#Th...

Lastly, Maxwell combined these two equations with two other fundamental equations of electrodynamics (namely, Gauss's law and Gauss's law for magnetism) with some minor corrections for some special cases: http://en.wikipedia.org/wiki/Maxwell%27s_equations. In physics laws and such are very often named not after the first person to discover something, but after the last. From these equations you can derive that light is nothing more than an electromagnetic wave (which of course then goes into the whole duality of light).

Re:Objects vs closures by eru on Wednesday December 08, 2010 @07:40AM (#1982707)
Feynman explains it nicely in his lectures on physics. The key is relativity. (Magnetism is a relativistic effect of electricity.)

http://en.wikipedia.org/wiki/Classical_electromagnetism_and_... may be interesting. Especially the section "Relationship between electricity and magnetism".

Re:Objects vs closures by J3L2404 on Wednesday December 08, 2010 @04:13PM (#1984634)
Can someone summarize how magnetism is a relativistic effect?
Re:Objects vs closures by weber88 on Thursday December 09, 2010 @12:24AM (#1986181)
The explanation given here is pretty decent:

http://en.wikipedia.org/wiki/Classical_electromagnetism_and_...

The main thing is to consider how charge densities change as we switch reference frames. Because the lengths contract when we switch to a reference frame where things are in motion, we see higher charge densities (same charge per less length).

A simple demonstration: Say we have a charge neutral, current carrying wire. We model it as a bunch of positive charges staying still, and some negative ones moving. The positive and neutral balance, but there is still a current because only the negatives are moving. Now imagine we switch to a different reference frame, one where the negative charges aren't moving, but the positive one's are, we are flying along parallel to the current. Now the positive charges contract relativisticly, so the density of positive charges is now greater than the negatives, and hence the wire appears to be carrying a net charge.