SciRuby authors Ara Howard and Justin Crawford interview Bil Kleb and Bill Wood
Name
Title
Research Scientists
Institution
NASA Langley Research Center
Academic Background
Kleb
Ph.D. Aerospace Engineering, University of Michigan
MBA, College of William & Mary
B.S and M.S. Aeronautical and Astronatical Engineering, Purdue University
Commercial Pilot, SMEL, glider and instrument rated
Wood
Ph.D. Aerospace Engineering, Virginia Tech
Questions
[SciRuby] Can you briefly describe (a few paragraphs) your research project(s)? What are you trying to learn?
Bill is primarily working Space Shuttle Reentry while Bil is supporting the new Crew Exploration Vehicle, FUN3D, and the Hypersonics portion of the new Fundamental Aeronautics Program.
In general, we are trying to learn about hypersonic flowfields, i.e., flows at least 5 times the speed of sound.
[SciRuby] Can you briefly describe (a few paragraphs) how computers are helping you learn that?
Simulation of hypersonic flow is done on clusters of computers. Currently, we have about 1,100 processors in our computer room, and access to two of NAS's Columbia machines (500-processor clusters).
We predominately use Computational Fluid Dynamics (CFD) to simulate the flowfields around vehicles. These codes are written in Fortran, but workflow and other munging is done with Ruby.
[SciRuby] What effect do you hope your research will have on the world?
We're helping to spread the human virus to other planets.
[SciRuby] How many people are working on your project(s)?
Who knows? NASA is large. It has 10 centers scattered throughout the country.
In our little world, we each work with teams on the order of 10 people.
[SciRuby] Are any of your team members computer scientists?
One, not counting the three Langley Research Summer Scholars that we had during the summer of 2005.
[SciRuby] What's your computing setup, i.e., what OS, hardware, and language are you using?
Before Aug 2005: maxed-out Dell C600 Laptop with a CDock that drove two 21" 1600x1200 DPI LCDs.
After Aug 2005: maxed-out 15" Apple G4 Powerbooks with a 30" Cinema Display (2560x1600).
[SciRuby] What's your favorite software tool?
Emacs
[SciRuby] Did you learn to program in school or on your own?
Bil: Mostly on my own with an Apple II and a TRS-80.
Bill: A Vic 20 at home.
[SciRuby] How much of your work is programming?
Bil: 80-90% if "work" does not include overhead activities.
Bill: 10% if "work" includes overhead activities.
[SciRuby] Do you enjoy programming?
Yes, if it is Ruby.
[SciRuby] What's your favorite beer?
Bil: Milwaukee's Best (seriously)
Bill: Cheapest available at Costco
[SciRuby] What languages have you used?
Ruby, Perl, Basic, Assembly, Fortran 4/66/77/90/95, C++, C, lisp, and markups like HTML, CSS, XHTML, Troff, Textile, Markdown, XML, YAML, and LaTeX.
Dabbled in Java, Pascal, Haskell, and OCaml.
[SciRuby] What is your favorite?
Ruby
[SciRuby] Can you briefly describe (a few paragraphs) how Ruby is helping with your work?
Although the legacy codes we use are written in Fortran, and we need to dabble in Fortran for compatibility with other researchers who speak no other language, Ruby is our preferred language. Ruby is better than shell scripts for workflow control. Ruby is better than C++ or Java for data manipulation. We also use Ruby for wrappers on third-party software, as glue instead of applescript, and for build control.
[SciRuby] How would you define "scientific programming?"
Two ways: (1) programming in a scientific context and (2) following the scientific method while you program (test-driven development).
[SciRuby] Which kinds of coding problems do you end up spending the most effort on?
Wrestling with Fortran 95, buggy compilers, and dealing with poorly written legacy code.
Design complexity, especially with legacy code.
[SciRuby] Which kinds of coding problems do you end up spending the most time on?
Tool development and the automation of various tasks.
[SciRuby] Which kinds of coding problems form the largest obstacles for your field?
Verification and validation of computation simulations.
[SciRuby] How would you compare your software development practices to those of colleagues in your field?
The vast majority of colleagues in our field do not realize that they are software developers. As a result, their skills are often quite lacking. For example, several can't touch type and one "rock star" in our field only uses a *single* finger to type (quite slowly).
[SciRuby] What scientific achievement are you most proud of?
Bil:
http://hdl.handle.net/2002/16096
Bill:
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1196317
[SciRuby] What programming accomplishment are you most proud of?
Bil: Using Ruby to automatically convert a bunch of hairy Fortran 95 from real to complex variables. This resulted in the paper, "Efficient Construction of Discrete Adjoint Operators on Unstructured Grids by Using Complex Variables", which upon submission to a journal, a reviewer remarked, "This paper represents an amazing advance to the state of the art in design oriented sensitivity analysis. The innovation of combining the complex variable method with a discrete adjoint cannot be praised highly enough; this was previously thought not to be possible. The attention to detail in creating such an efficient implementation is also striking. The demonstrations are also very significant. Finally, the discussion of limitations and future research is also very insightful. No revisions are required! This paper is among the best I've ever reviewed.".
Bill: The "Advect" code,
http://www.nasatech.com/Briefs/Dec02/LAR16494.html. Dave Thomas came to visit in 2001 and he remarked that we had very clean code.
[SciRuby] Tea or Coffee?
Bil: Niether, I'm not much of a Caffiene person -- I find it just makes me tired in the long term. In fact, I don't even know how to make coffee; and when people come to visit it's rather embarrassing.
Bill: If I have money, good coffee. If not, cheap tea.
[SciRuby] We know you two are big on testing code and you've commented before that you feel that the "breakpoint" that necessitates formal testing is about 50 lines of code - can you justify that statement?
Bil: I'd like to revise that claim. I now find benefit from testing after only ~5 lines of code.
Bill: I now like to write a test before each line of code. One erroneous line is too much, 50 way too many.
[SciRuby] Do you make any parallels between software testing and the scientific method?
Oh yes, but only if the testing is done in a very tight cycle, i.e., test-driven development.
Also, publishing tests is particularly important so that others can independently repeat the work.
[SciRuby] It seems that little emphasis is put on software validation for research published for peer review -- this is in direct odds with the prevailing attitudes regarding, say, the statistics used, which are looked at quite critically by reviewers. Why do you think that is?
A prevailing attitude of "I won't blow down your house of cards if you won't blow down mine."
[SciRuby] In your opinions: how serious is the lack of formal software testing in science and is it impacting research quality?
Very serious, and the situation will only get worse as computational power enables more complex systems.
[SciRuby] How much time do you spend testing code?
We consider testing part of programming, and inseparable from requirements and design. So, we'd say that at least 60% of our time programming is spent testing/designing while maybe 20% is coding, and the rest refactoring.
[SciRuby] How much time do you spend debugging code?
Not much. For example, we never knew how to invoke Ruby's debugger until two years after we began using the language. And we only had to learn how to use it because we had stumbled across a bug in Ruby itself.
[SciRuby] If your project was going to be drawn by a famous comic book illustrator, what would it look like? (You don't have to answer this one; but if you do, your wish might come true)
Why's Least Surprised. Everytime I see that lectures stiff upper lip thang, I start rolling on the floor in laughter. (Thanks Why!)
In fact, we managed to get Why to do a cartoon on one of our technical papers:
http://hdl.handle.net/2002/16096.
[SciRuby] What do you do when you're not in the office/lab?
Bil: Most sports non-rectangular, e.g., windsurfing, kitesailing, swimming, and flying (Golf is classified as a rectangular sport in my book.)
Bill: Sleep.
[SciRuby] Any thing else you'd like to share?
If you haven't, try test-driven development for a couple weeks and we'll wager that you'll find a new best friend.
Note: you'll probably need to pair programming during those weeks, or you will find that you slip into writing production code before test code.
Test-Code-Refactor is now a way of life for us.
That's all!
Comments
see HowToBecomeAMemberOfThisWiki to become a member