SciRubyInterviews/StevenJenkins

SciRuby authors Ara Howard and Justin Crawford interview StevenJenkins

Name

StevenJenkins

Title

Principal Engineer

Institution

Jet Propulsion Laboratory
California Institute of Technology

Academic Background

B.S., Mathematics, Millsaps College
M.S., Applied Mathematics, Southern Methodist University
Ph.D., Electrical Engineering, University of California, Los Angeles

Interview

[SciRuby] Can you briefly describe (a few paragraphs) your research project(s)? What are you trying to learn?

In my real job, I'm a system engineer in the US space program. I use Ruby for a lot of things, but it's engineering, not science. As a graduate student, however, I worked with a team of physicians and engineers at UCLA studying the physiology of breathing. In addition to basic science research on respiratory control mechanisms, we studied the effects of various drugs on the cardiopulmonary system. I no longer conduct my own research in the field, but I continue to support a number of investigators who use software I wrote. I do it mostly for fun now, but many of the things I"ve learned developing TIDAL (yacc, autoconf/automake, Ruby, SWIG, etc.) have ended up being useful in my work at JPL.

[SciRuby] Can you briefly describe (a few paragraphs) how computers are helping you learn that?

The typical data collected in respiratory physiology experiments are gas flows and/or volumes, gas concentrations, other ancillary physiological measurements such as heart rate, and external measurements of stimulus or experimental conditions such as exercise rate. These are sampled by analog-to-digital converters (at around 50 Hz) and processed by computer into breath phase durations, tidal volumes, respiratory rates, uptake or excretion volumes for specific gases (e.g., oxygen, carbon dioxide), etc.

In about 1985, I began work on a software package called [WWW] TIDAL that made it easier for researchers to design specific experiments, specify the data to be collected, and analyze the data. TIDAL performed data collection on MS-DOS and data analysis on MS-DOS, Windows, and Unix. TIDAL is written in C, and grew eventually to about 11,000 lines. In 2002, I ported TIDAL to Linux, using the [WWW] Comedi framework for data acquisition and control. Comedi defines a common API for interacting with A/D and D/A converter hardware, making it easier to write code that runs on subsystems from multiple vendors.

[SciRuby] What effect would you hope your research would have on the world?

Better understanding of the mechanisms of respiration and gas transport, safer and more effective drugs.

[SciRuby] How many people are working on your project(s)?

I'm the only programmer, but I collaborate closely with my users.

[SciRuby] Are any of your team members computer scientists?

No.

[SciRuby] What's your computing setup, i.e., what OS, hardware, and language are you using?

We use various Linux distros on commodity x86 hardware for data acquisition and analysis. The data acquisition core is written in C (transitioning to Ruby). I develop TIDAL on Gentoo Linux.

[SciRuby] What's your favourite software tool?

RCS. I've used RCS and its successors continuously since 1984.

[SciRuby] Did you learn to program in school or on your own?

I took a class in BASIC in 1973 and PDP-8 assembler in 1974. Since then I've learned on my own. I've been a disciple of Brian Kernighan for a long time. The Elements of Programming Style, even the PL/I version, is still a gold mine of good pracice. In the mid-1980s, comp.lang.c and comp.os.unix were tremendous resources for learning. I doubt the signal-to-noise ratio is nearly as good now.

I took several numerical analysis courses in graduate school. I enjoyed it, but it was scary. Getting floating-point calculations to yield reliable results, even on simple problems, is very much harder than most programmers realize.

[SciRuby] How much of your work is programming?

In my real job, I do a lot of programming, but the code is not a deliverable. I write code to make products like specification documents, risk trees, schedules, statistical estimates, etc. My work on TIDAL is mostly programming, but on a small research team everyone does a little physics, a little physiology, a little programming.

[SciRuby] Do you enjoy programming?

Yes, very much.

[SciRuby] What languages have you used?

Over the years, BASIC, BASIC-PLUS, FOCAL, PDP-8 assembler, PDP-11 assembler, Fortran, Ratfor, C, sh, Awk, Perl, Ruby.

[SciRuby] What is your favorite?

Currently, Ruby. But I thought I'd gone to heaven when I got my first Ratfor preprocessor. If you've written much Fortran IV, you know why.

[SciRuby] Can you briefly describe (a few paragraphs) how Ruby is helping with your work?

In 2003, I began porting TIDAL to Ruby. Most of the new features added to TIDAL in the last few years had been changes to the parser and interpreter that run user-specified code in a domain-specific language called EDL (Experiment Description Language). My intent was to invert the software design, wrapping physiology-specific code in libraries and using the Ruby interpreter as the scripting engine. So far, the port has worked out well, and Ruby TIDAL, while not complete, should come in at well under 2000 lines of code.

One key part of implementing TIDAL in Ruby was building a Ruby API for Comedi. I added some Ruby-specific code to the Python SWIG interface file Bryan Cole had created for Comedi, and helped Frank Mori Hess integrate and test it. This code is now part of the SWIG distribution. It's available for anyone who wants to do data acquisition and control in Ruby. (Bear in mind that Comedi is for Linux only.)

[SciRuby] How would you define "scientific programming?"

I'm not sure it needs a definition. TIDAL is mostly about specifying and calculating physical quantities, but the system engineering programming I do at work is graph theory and databases. I think it's scientific if it's for scientific purposes.

[SciRuby] Which kinds of coding problems do you end up spending the most time and effort on?

I find building user interfaces difficult. I like to say I build engines and transmissions. Body work and painting is a different set of skills entirely.

[SciRuby] Which kinds of coding problems form the largest obstacles for your field?

There aren't any real coding problems in my field. The real obstacles involve putting well-established principles and techniques from computer science into practice.

[SciRuby] How would you compare your software development practices to those of colleagues in your field?

Not many of my colleagues develop software at all. Of those that do, I'd say I'm in the top half. I'm pretty disciplined.

[SciRuby] What scientific achievement are you most proud of?

We did some technically challenging experiments in our lab at UCLA. None of the results were earth-shattering, but most science isn't. We just added our unique contribution. But there was a lot of good engineering in the experimental setup and data analysis.

[SciRuby] What programming accomplishment are you most proud of?

I wrote some code back in the early 1990s that ended up being used, at least as a design concept, in the engineering effort to save the Galileo mission to Jupiter after the spacecraft's high-gain antenna failed to deploy. It wasn't particularly advanced programming, but it was in the right place at the right time. Solving that problem is part of the reason the Deep Space Network converted to a TCP/IP network infrastructure when they did.

[SciRuby] Tea or Coffee?

Coffee, black.

[SciRuby] How do you test your code?

I have a battery of unit tests. The coverage is not a broad or deep as I'd like, but I try to add them as I go. For system tests, we have some artifically-generated test data for which we know the answers, and years of actual data to compare with. It's not a formal testing program.

[SciRuby] How much time do you spend debugging code?

Not much. TIDAL is very stable. What little time I put into it nowadays is building a prototype GUI for the Ruby version. I wish Gnome had better support for scientific graphics. The big thing I'm missing is a strip chart widget for real-time data display. I keep hoping someone will write one so I don't have to.

[SciRuby] What do you do when you're not in the office/lab?

Being a husband and father keeps me pretty well entertained. I enjoy cycling but I don't get out more than once a week.

[SciRuby] Any thing else you'd like to share?

Thanks, Ara and Justin, for putting SciRuby together.

That's all! (for now...)