I think all these sites (treehouse, code academy etc) are going to be hit with class action lawsuits for implying that their app/whatever will make you proficient at coding, and even land you a job. There are no shortcuts to becoming good at coding. It takes much longer and is much harder than these sites make it seem.
in case you missed why your comment didn't add to the conversation: Khan Academy and the article are both not about coding or learning to code. This article is about math.
yes, Khan Academy has lessons on a huge number of topics. no, nothing in the posted article has anything to do with "implying that [Khan Academy] will make you proficient at coding"
Can someone explain the math behind this? Which methods were used? I wasn't aware it was possible to run such a simulation on flash because each body results in 6x more calculation. Is this like plugging in the masses into a single equation? I want to learn more about how this is done .
> Personally I prefer to just throw a fourth order Runge–Kutta (RK4) at things and normally that's more than good enough.
In the context of gravity simulation, I must point out that while Runge-Kutta/RK4 is good enough for a lot of stuff but it has a tendency to dissipate energy. It's not very good in a simulation where the conservation of energy is important. Run a simulation long enough and the orbits will eventually shrink.
If scientific accuracy is required, gravity simulations are usually done with "symplectic" integrators (which don't "lose" energy) and the equations of motion are written using Hamiltonian mechanics. There are symplectic variants of Runge-Kutta too.
In an exercise work for a celestial mechanics course, I wrote an n-body simulator using a dissipative Runge-Kutta method (because it was good enough for that, and the exercise was about using RK methods). Simulating an exoplanet system (HR 8799), the orbits were stable and 100 year simulation gave near perfect orbits. After 1000 years, there orbits were a bit smaller and after 10000 years, they had lost a fourth of the initial energy. This was done using one day timesteps.
> Can someone explain the math behind this? Which methods were used?
I can't speak to the linked simulator, but gravitational calculations are relatively simple -- they represent the solution to a numerical differential equation that, in small slices of time, solves:
> I wasn't aware it was possible to run such a simulation on flash because each body results in 6x more calculation.
It's more accurate to say that the total computing time required changes as the square of the number of modeled bodies. That's worse than 6x, by the way, for a sufficient number of bodies. One solution is to use a large central mass and only compute the paths of some satellites with respect to the central mass, not with respect to each other.
The calculations that impress me (and I do a lot of this kind of math) are the cosmological modeling of galactic clusters of hundreds of thousands of stars, all interacting with each other, with no central mass to stabilize things. This requires a supercomputer and many hours of online time.
> Is this like plugging in the masses into a single equation?
No, because for more than two bodies, there's no closed-form solution (this is called the "three-body problem"). Solutions must be arrived at numerically. When NASA wants to compute where to land a spacecraft on Mars, they have to use numerical methods -- very good ones, but numerical methods.
There are a lot of challenging problem areas: rendezvous with small bodies (very irregular gravity fields), mission trajectory design, operations planning for flybys in the presence of, say, camera pointing constraints.
(@lutusp knows this already -- I'm putting it here just for interest.)