These ten software innovations transformed scientific research

When I was a mechanical engineer in 1990, I faced a stubborn problem with the design of a disk drive baseplate (an aluminum base that the disk motor and actuator motor were mounted on). When the prototype drive spun up, the baseplate vibrated so much that the read/write heads couldn't stay on track.

The first step in solving the problem was finding the resonance frequency of the baseplate. I attached a small accelerometer to the baseplate (using a dab of beeswax, which was supplied in a little jar that came with the accelerometer). I suspended the baseplate on a thin wire and tapped it with a small mallet, so it rang like a bell. The accelerometer was connected to instrumentation that recorded the electrical signal generated by the accelerometer and digitized it at a high enough sample rate to avoid aliasing at the frequency spectrum I was interested in looking at.

I sent data over a serial port to a PC running a compiled BASIC program I wrote that used the Fast Fourier Transform (FFT) to extract the signal that the struck baseplate made into its component frequencies and reported the amplitude of each frequency on an X-Y chart (X = frequency, Y = amplitude).

Right away it was clear what the troublesome resonance frequency was. (I can't remember the value, but it might have been 3.1 kHz.) My next step was to tweak the design of the baseplate to prevent it from ringing at that frequency. That was a trial-and-error process of making changes to the geometry of the baseplate and getting a new prototype milled out of aluminum (which took at least a few days per iteration).

Before I figured out how to solve the problem, though, I quit and Carla and I moved to California to work on bOING bOING (the zine) full-time.

The FFT program I wrote was based on pseudocode from a book I came across (can't remember the name of it). FFT seemed like magic to me back then, and it still does. I learned more about FFT in this Nature article, "Ten computer codes that transformed science."

Here's an excerpt:

When radioastronomers scan the sky, they capture a cacophony of complex signals changing with time. To understand the nature of those radio waves, they need to see what those signals look like as a function of frequency. A mathematical process called a Fourier transform allows researchers to do that. The problem is that it's inefficient, requiring N2 calculations for a data set of size N.

In 1965, US mathematicians James Cooley and John Tukey worked out a way to accelerate the process. Using recursion, a 'divide and conquer' programming approach in which an algorithm repeatedly reapplies itself, the fast Fourier transform (FFT) simplifies the problem of computing a Fourier transform to just N log2(N) steps. The speed improves as N grows. For 1,000 points, the speed boost is about 100-fold; for 1 million points, it's 50,000-fold.

3Blue 1Brown has a good intro to FFT:

[Image: By William Warby from London, England – Hard Drive, CC BY 2.0]