Can Java be faster than C?

Every now and then people get into silly arguments about which programming language is “faster.” I always ask, faster for what? Faster compile-run-test cycle, faster to write correct programs, faster to run…? Besides, each language is tuned for certain usage patterns, making like to like comparisons impossible.

Let’s draw the Mandelbrot set!

When I was 12 or 13 I saw a science program about fractals and chaos theory. I was intrigued by the intricate organic shapes and bright colors, especially of the Mandelbrot set, and decided I wanted to learn how to make them. This is how I got interested in mathematics and programming in the first …

Welford’s method for computing variance

The standard deviation is a measure of how much a dataset differs from its mean; it tells us how dispersed the data are. A dataset that’s pretty much clumped around a single point would have a small standard deviation, while a dataset that’s all over the map would have a large standard deviation. Given a …