Practices for programming in a scientific environment? [closed]

What languages/environments have you used for developing scientific software, esp. data analysis? What libraries? (E.g., what do you use for plotting?) I used to work for Enthought, the primary corporate sponsor of SciPy. We collaborated with scientists from the companies that contracted Enthought for custom software development. Python/SciPy seemed to be a comfortable environment for … Read more

Unity 2d jumping script

Usually for jumping people use Rigidbody2D.AddForce with Forcemode.Impulse. It may seem like your object is pushed once in Y axis and it will fall down automatically due to gravity. Example: rigidbody2D.AddForce(new Vector2(0, 10), ForceMode2D.Impulse);

Heap space out of memory

There is no way to dynamically increase the heap programatically since the heap is allocated when the Java Virtual Machine is started. However, you can use this command java -Xmx1024M YourClass to set the memory to 1024 or, you can set a min max java -Xms256m -Xmx1024m YourClassNameHere

How to calculate bounce angle?

You might think that because your walls are aligned with the coordinate axes that it makes sense to write special case code (for a vertical wall, negate the x-coordinate of the velocity; for a horizontal wall, negate the y-coordinate of the velocity). However, once you’ve got the game working well with vertical and horizontal walls, … Read more

Cosmic Rays: what is the probability they will affect a program?

From Wikipedia: Studies by IBM in the 1990s suggest that computers typically experience about one cosmic-ray-induced error per 256 megabytes of RAM per month.[15] This means a probability of 3.7 × 10-9 per byte per month, or 1.4 × 10-15 per byte per second. If your program runs for 1 minute and occupies 20 MB … Read more