r/programming • u/ttsiodras • Dec 23 '12
Simulating a solar system with Python
http://users.softlab.ntua.gr/~ttsiod/gravityRK4.html
244
Upvotes
r/programming • u/ttsiodras • Dec 23 '12
View all comments
Show parent comment
6
u/jjo241 Dec 23 '12 edited Dec 23 '12
Equations are yucky with long variables names:
ke = 0.5*m*v*v;
vs
kinetic_energy = 0.5*mass*velocity*velocity;
For longer equations its harder to keep lines to 80 columns e.g:
p = n * R * T / V;
pressure = moles * gas_constant * temperature / volume;
Anyone who would write a code like this will instantly know what each symbol stands for. The biggest ambiguity is the units used (but that's a different issue).