Click here to Skip to main content
15,119,410 members
Articles / All Topics
Posted 29 Feb 2012

Tagged as


6 bookmarked

A Coder Interview With John D. Cook

Rate me:
Please Sign up or sign in to vote.
4.94/5 (16 votes)
20 Nov 2014BSD5 min read
Welcome to our continuing series of Code Project interviews in which we talk to developers about their backgrounds, projects, interests and pet peeves. In this installment we talk to Code Project MVP, “math professor, programmer, consultant, manager, and statistician” John D. Cook.

Welcome to our continuing series of Code Project interviews in which we talk to developers about their backgrounds, projects, interests and pet peeves. In this installment we talk to Code Project MVP, “math professor, programmer, consultant, manager, and statistician” John D. Cook.

Who are you?

I’m John Cook. I use my middle initial “D” online because there are a million John Cooks in the world.

I work for MD Anderson Cancer Center in [Houston, Texas]). We’re looking for better ways to conduct clinical trials for evaluating new cancer treatments. We want to find safe doses of new drugs, determine whether new treatments are more effective, or determine who is most likely to benefit from a treatment. We use Bayesian statistics to do this, and that requires a lot of computation.

Much of the work is scientific computing. But because we use these new methods to treat patients, we also have to wrap all the number crunching in user-friendly software that lets researchers run clinical trials. In addition to software development, I do some research and teaching.

[Update: In January 2013 I left MD Anderson to be an independent consultant. The work I've done since then is similar to what is described here.]

What do you do?

My first professional programming job was developing Windows desktop software with C++ and MFC. I worked on user interfaces and DSP (digital signal processing). Later I did some web development with ASP.

I came to M. D. Anderson to manage software development for biostatistics. This was coming full circle for me in a way. I’d started out in math, then left academia to become a programmer. Now I was doing math again and software development. Most of the software projects that I’ve contributed to or managed since then have been for simulating and conducting clinical trials. Some of this software is available here. I concentrate on numerical algorithms and simulations. The people I work with are better at UI development and so I leave that up to them.

What is your development environment?

I’ve mostly written scientific software in C++ that is called from C#, either from ASP.NET or from a WinForms application. Lately I’ve been writing some numerical code in C#; it’s convenient when the whole application, from back-end to UI, is all in the same language. When I’m doing research, I use Python (SciPy, matplotlib, etc.), and sometimes Mathematica or R.

Our development hardware is nothing out of the ordinary, but our execution environment is a little more interesting. Sometimes our simulation software runs on a Linux cluster, sometimes on Windows servers, and sometimes on a Condor cluster that uses spare cycles from desktop PCs.

I use Visual Studio for C++ and C# development. I use Emacs for everything else.

What new tools, languages or frameworks interest you?

I used to use dozens of languages and tools. I bought into the best-tool-for-the-job philosophy and would do different tasks in different environments. It got to be too much. I was familiar with a lot of stuff, but didn’t know anything very well. Now I’m trying to learn a small set of tools well. I’m doing more with Python and Emacs. Lately I’ve been learning more about matplotlib for Python and org-mode for Emacs.

What is your coding pet peeve?

One pet peeve that comes to mind is overblown OOP, using a class when a simple function would do better.

Another pet peeve is GitHub projects that are just a pile of code without one sentence of description.

How did you get started programming?

My first computer was a TI–99 4a that my uncle bought me. I wrote little programs for it using BASIC and saved them using a cassette player.

At one point in college I decided I wanted nothing more to do with programming. It was too hard, and I wasn’t good at it. I came back to programming later when I needed to write some software for my own use. At some point I realized that programming is hard, but it’s hard for everyone, and I thought maybe I’m not so bad at it. So I sorta started programming twice. The second time around I wrote C and awk on Unix.

How has the developer community influenced your coding?

I’ve gotten a lot of helpful feedback from the developer community via comments on my blog. When I make a mistake there, someone lets me know quickly, but in a friendly way. Or they will point out alternatives I would never have known of otherwise. One thing I find annoying, however, is the small group of programmers who obsess on some pedantic detail and miss the point of a post.

As for Twitter, I have a dozen accounts that post little tips and facts related to math or programming: one for probability, one for regular expressions, etc. I’ve gotten a lot of good feedback from these. People correct my errors of course, but I also see what people find interesting or useful. Twitter is great when you have a question that you can’t form precisely enough to have good keywords to search on. Sometimes a simple reply telling you what buzzword to search on is extremely valuable.

Offline I’ve learned the most from the SciPy community. One reason is that these people are interested in math and programming, so I have more in common with the SciPy community than a more general community. I’ve been to Microsoft conferences, and although I use Microsoft products, the vast majority of people at these events are not writing the kind of software I write.

I like that the SciPy community is open-minded about their tools. They obviously like Python in general and SciPy in particular, but they also use other tools. They seem pretty objective about what Python does well and what it doesn’t. I haven’t seen as much objectivity in other communities.

What advice would you offer to an up-and-coming programmer?

Learn to express yourself clearly in writing. Buy a copy of Strunk and White and read it once a year.

If you’re a genius programmer but you cannot or will not write English prose, your influence will be limited.


This article, along with any associated source code and files, is licensed under The BSD License


About the Authors

Software Developer The Code Project
United States United States
No Biography provided
Group type: Organisation

4 members

John D. Cook
President John D. Cook Consulting
United States United States
I work in the areas of applied mathematics, data analysis, and data privacy.

Check out my blog or send me a note.


Comments and Discussions

GeneralMy vote of 5 Pin
Marc Clifton20-Nov-14 7:07
mvaMarc Clifton20-Nov-14 7:07 
Questiongreat article Pin
Erik Rude1-Mar-12 5:12
MemberErik Rude1-Mar-12 5:12 
AnswerRe: great article Pin
kmoorevs3-Mar-12 10:25
Memberkmoorevs3-Mar-12 10:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.