Discover
/
Article

My computational education

OCT 03, 2012
It might be better to use other techniques, like puzzles, to teach computer science to those outside the field.

DOI: 10.1063/PT.5.010194

18771/pt5010194_athenschasdayside3.jpg

I peaked as a computational scientist in 1986. At that time, two years from finishing my PhD, I was trying to account for an aspect of the x-ray emission from a pulsar known as Hercules X-1, the first x-ray source discovered in the constellation Hercules. Hercules X-1 consists of a normal star and a rapidly spinning neutron star. So close are the two stars to each other that the neutron star’s gravity grabs material from the normal star’s outer atmosphere. By the time the purloined material reaches the neutron star, it’s a million-degree, x-ray-emitting plasma.

Every 1.7 days—a number I can’t forget!—the two stars orbit their mutual center of mass, and, if you’re watching from Earth, the neutron star is eclipsed by its companion. But just before and just after total eclipse, the neutron star’s x rays pass through the companion’s atmosphere. From a plot of x-ray emission versus time, you can probe and explain the atmosphere’s vertical structure—with the help of a computer model, that is.

18771/pt5010194_image_003.jpg

Artist’s impression of an x-ray binary system from NASA’s Imagine the Universe!

Artist’s impression of an x-ray binary system from NASA’s Imagine the Universe! [/caption]

And so, over several months, I created my longest-ever computer program. Excluding comments, it ran to more than 120 lines of Digital Equipment’s proprietary flavor of Fortran 77. Fortunately, I didn’t have to create a data analysis program from scratch—a postdoc had done that before me—but I did have to incorporate my model into his code. (See Dianne O’Leary’s “Computational software: Writing your legacy,” Computing in Science & Engineering, January/February 2006, page 78 , to learn why that exercise builds character.)

How did I become a programmer? When I started graduate school I had no programming—or even computer—experience. To me, computers were toys for the uncool boys. But then my university offered its graduate students a course in scientific programming. And I took it.

The teacher, whose research was in the field of artificial intelligence, displayed impressive loyalty to a single ancient T-shirt. In class and around town, he’d pad about without shoes or socks like a hobbit. His course briefly touched on programming techniques, but only in the abstract. My real teachers were the postdocs in my group. They taught me a sprinkling of practical tricks and, perhaps more useful, some sound principles of programming practice.

Those learning experiences popped into my head when I read Francis Sullivan’s column about Sudoku (“Born to compute,” Computing in Science & Engineering, July/August 2006, page 88 ). Lacking Francis’s “compute gene,” I have no attraction whatsoever for Sudoku or any other mathematical puzzle. But I do have the physics gene, and its expression, in graduate school, was what compelled me to program.

Having solved the physics for my model, I had to implement it on a computer—which meant I had to read arcane computing manuals, swat the bugs I’d introduced into my program, and struggle with fussy compilers. Every now and again, amid the toil and frustration, would come flashes of inspiration and progress. In the end, I grew to like programming.

So if you teach computational science and your class includes compute-free students like me, give them an interesting science or engineering problem to solve. The poor things might be driven to program despite their genetic inheritance.

This essay by Charles Day first appeared on page 104 of the September/October 2006 issue of Computing in Science & Engineering , a bimonthly magazine published jointly by the American Institute of Physics and IEEE Computer Society.

Related content
/
Article
The scientific enterprise is under attack. Being a physicist means speaking out for it.
/
Article
Clogging can take place whenever a suspension of discrete objects flows through a confined space.
/
Article
A listing of newly published books spanning several genres of the physical sciences.
/
Article
Unusual Arctic fire activity in 2019–21 was driven by, among other factors, earlier snowmelt and varying atmospheric conditions brought about by rising temperatures.

Get PT in your inbox

Physics Today - The Week in Physics

The Week in Physics" is likely a reference to the regular updates or summaries of new physics research, such as those found in publications like Physics Today from AIP Publishing or on news aggregators like Phys.org.

Physics Today - Table of Contents
Physics Today - Whitepapers & Webinars
By signing up you agree to allow AIP to send you email newsletters. You further agree to our privacy policy and terms of service.