Hints for coding
- Unit tests will save time. Use also IDEs for debugging. If you insist on brute force debugging, print out intermediate values. It's almost impossible to debug a code by looking at it–the code will almost always win a `staring contest.'
- Validate code with SIMPLE CASES. Validate early and often. Unit tests!!
The number one mistake is using a too complex a system to test. For example ,
if you are computing particles in a potential in a box, try removing the potential–you should get
particles in a box. And start with one particle, then two, then three... Don't start with
eight particles.