Thursday, July 23, 2009

Nerdy Addictions

I learned something about myself: programming is like mainlining heroin. Okay, I've never actually mainlined heroin, but I have seen the movie "Trainspotting," which is a sad but excellent portrayal of heroin addiction (in my very amateur opinion). I just got into a small programming task, and every day for the last 2 weeks I would blow off other work in order to get back to debugging. I had to find this error and make this work, and nothing was going to stop me. Okay, perhaps it’s not quite as bad as heroin, as I did remember to prepare and give a presentation to the summer undergrad students last week. But it is a short-term addiction in that I felt physically drawn to the code and the output files, studying them to find the clue that would solve my puzzle. I am glad the task was manageably small, so that closure could be reached without too much time consumed.

You see, I have not had a good chance to make modifications to my main computer code, myself, in a few years. My students (grad and undergrad) have been working on it, doing the things I used to do myself. Helping them learn how to make these changes usually takes more time than if I just did it myself, but that is no longer my job. I am supposed to educate others, and so hiring these people and spending time with them, to slowly do what I could do faster, is what I do.

Except this month. I laid out a long list of things to do this summer, and programming a new feature into the code wasn’t on the list. As I was cleaning off my desk recently, I came across a printout of an email from a coworker here. It was a mid-cycle review of one of his larger grants, on which I have a very small role. Within the review was a recommendation for a specific code modification, and it even suggested the reference for easily making this change. I had printed it out thinking that I (well, actually, one of my students) should incorporate this change, because it is a change directed at my part of the big project. I sat there staring at this sheet of paper and finally I decided: I would do it. Myself. Right now. Nothing else was that urgent that I couldn’t push it off for a few days, which is a how long I figured this would take, even with the times two factor on my estimate.

It is now 2 weeks later, and I am done. Success! This programming task I undertook so completely absorbed my attention that I didn't do much else and ignored many things until I reached the end. I feel like 2 weeks of my life have disappeared, and all of those things I was supposed to be doing are still waiting for me to do, only now I have 2 weeks less to work on them. I can't afford to do that very often, or I will get into serious trouble.

But I succeeded at a programming task. I’m pretty pumped up right now. I need another hit. No, I can’t go there! I have proposal deadlines approaching!

Tuesday, July 21, 2009

Crank-Nicolson Scheme

I’m pissed off. The f*ing Crank-Nicolson scheme for numerically solving diffusion equations isn’t stable. All of the textbooks state that it’s unconditionally stable. Liars. The fine print on this stability claim is that this unconditionality is for a constant diffusion coefficient. Large gradients in the diffusion coefficient can cause oscillations in the solution. Another issue is that there is a time and space step criterion on its stability. If the time step is too large relative to the spatial step, then oscillations appear. Another problem is that if the diffusion coefficient is too big, then the scheme tries to rearrange the result too much and again introduces oscillations. The net result is that the solution gives negative and/or very large values and the code crashes. I am now in search of another numerical scheme that can handle my large, spatially varying diffusion coefficients and nonuniform spatial grid. I have wasted nearly a week only to discover that my code was working perfectly and doing exactly what I was telling it to do: oscillate until it blows up.

Argh!

Monday, July 20, 2009

Bible Study

Over the last 2-1/2 years, I took a rather long and in-depth weekly Bible study class from my church. [For those of you that need to know, it was the 34-week Disciple course. The first one. The “red” one.] Okay, it didn’t take me over 2 years; I went through it twice: once as a student, and then again as a teacher/facilitator. I learned many new things during these years, about the Bible, God, Jesus, myself, and other people (in my church and elsewhere). I highly recommend it to everyone. Here are a few of the highlights of the things that I learned:

(1) The Bible is not inerrantly, word-for-word dictated by the Hand of God. I believe that it is inspired by God but written by people. I already knew this, but taking this course, listening to both experts (my pastor, and those on the videos) and classmates talk about it, and spending some time reading vast chunks of the text (twice!) greatly reinforced this belief. The argument can really be distilled into a single question: which translation is the inerrant truth?

(2) Some parts of the Bible are made up whole cloth. This goes along with the first one, but I am not just saying that the Bible contains a distorted or selectively-picked version of the truth, but that parts of it are pure fiction. I believe that the books of Daniel, Jonah, Job, and Revelation are novels. This doesn’t mean that they should be removed from the Bible, though. On the contrary, fiction is sometimes needed to poignantly yet concisely express a particular truth.

(3) We should ask “why” not “how” when reading the Bible. When we approach the Bible, we should not ask “how did that happen?” but instead “why does God want us to know this story?” Changing this mindset from trying to prove that the story is factually correct and piece together a plausible reconstruction is a huge relief to me. I used to need to find the explanation for how a certain story played out. I no longer have to do this. Instead, I read a passage and think about what that story means as far as my relationship with God and with other people.

(4) My relationship with God is equivalent to my relationship with other people. I do not mean that the two relationships are similar. I mean that they are the same relationship. I was always very frustrated by pastors or pious Christians would blithely state that we are to love God with our whole heart. I had no idea what that meant. Now, I have an answer: it means to love other people, to care for them, to be considerate to them, and to listen to them and try to understand their viewpoint and opinion. Interestingly, this is captured succinctly in one of the most famous verses of the Bible.

(5) The Golden Rule is what life is all about. That verse I just referred to is the one in which Jesus is asked about the greatest commandment from the Law. His reply is to love God with all of your heart, mind, body and soul, but he doesn’t stop there. He continues: and the second commandment is like it: to love your neighbor as yourself. The Bible quotes him several times giving this answer, in slight variations, the other common way is this: do to others as you want them to do to you. The kicker is the phrase in the middle, linking the two. Jesus gives an obscure answer that no one really knows how to do (love God, this invisible supreme entity) with a very specific answer on how to actually accomplish it.

(6) We should help those that ask for help. Again, this is how Jesus explains our relationship with God: when you help the least among you, you help God. This is one of the things I love about my church: it has many social mission activities at the local, national, and international levels for both youth and adults. We’re not a big congregation...we have maybe 300 official members, and far less than that on summer Sundays when we drop down to one service. Even still, we find a way to reach out and help other people: volunteering at the local family homeless shelter, collecting food and clothing for the local social service organizations, and going on work “mission” trips to far-off places. There is essentially no evangelism in these activities, just the example of helping others.

(7) God helps us through other people. This is the flip side of the above 2 points. You know the story of the guy who drowned on his rooftop during a massive flood because he was waiting for God to save him. Over the course of the day, several rescuers come to him, but he refuses their help. When he dies and goes to heaven, he asks God why he didn’t save him. God replies, “I sent you a truck, a boat, and a helicopter!” I think this joke is actually a fairly true description of how God provides help to us.

(8) God wants us to be in a community. Religion is a private affair, but it is also a very public and social one. God wants his followers to be in a community together, to support each other and help each other learn how to become better Christians. I think that such a community is necessary to develop or maintain a healthy relationship with God, and that those who think their Christianity is a solely private endeavor are severely hampering their spiritual growth.

(9) Jesus stayed out of politics and economics. He did not try to reinvent the local business practices nor try to instill a new governmental regime. The Bible barely mentions either of these major realms of human activity. Therefore, I don’t think it is appropriate to use Christianity to formulate an economic or political philosophy.

(10) Jesus directly challenged religious hypocrisy and continuously fought for social justice. While he didn’t try to shake up the political or economic structure of Judea, he did, at every opportunity, confront religious hypocrisy and injustice. Our spirituality is not defined by how many religious practices we follow, but by what we do for those in need around us.

I’ll probably think of more lessons I learned from this Bible study, but this is a good starting list for now. I will go into each of these in more detail in later posts, but it’s good to finally sit down and write out such a list. It’s been hanging around in my head for a while, and this blog is giving me a chance to finally write it down. Let me end this post by saying that I am profoundly thankful that I took the Disciple class and that I then got the chance to teach it. It is an excellent Bible study that has changed my outlook on life.

Sunday, July 19, 2009

Moon Landing

I am Space Prof, so I should have a comment about the 40th anniversary of the first human moon landing. My comment is that we should not go back.

There is no point to simply returning to the moon just to do it again. The only reason that I can see might be worthwhile is to establish a permanent base there, to prove that we can live somewhere besides the Earth. Even this isn’t that big of a step forward, because we already have shown this with space stations. These are not permanent dwellings on another solid surface celestial body, though, which would be a notable accomplishment. However, just getting there is going to be expensive. It will cost many billions of dollars just to rebuild the Saturn V launch capability again, not to mention the cost of shipping building materials to the moon for the astronauts to assemble and then use. This will not be a cheap endeavor.

So, I think that we should go straight to Mars. We would still have to rebuild a launch capability for getting people safely out of Earth orbit, but I think that humanity would be better served with a trip to an actual planet rather than the lump of rock orbiting the planet we are already on. This would be truly new and would represent a significant advancement.

People will probably die on the commute. We can’t get to Mars without months of travel time each way. Plus, Mars doesn’t have the strong magnetic field shielding it like Earth does. Astronauts in a spacecraft or on the surface will be subjected to much stronger doses of energetic particles than astronauts in low-Earth orbit, or even on a few-day trip to the moon and back. They will be exposed to some serious cancer-causing radiation, and they will get sick. Some might die. It will not be a pretty site. But we will have done it. We will have sent people to Mars and brought them back. We will have shown that people can go beyond our planet and off to another.

Why? Just to do it, is the main reason. The far-off utilitarian reason is because we might someday need another planet on which to live. Another motherhood and apple pie reason is to spur the imagination of humanity and inspire the next generation of explorers. These don’t really justify the cost of human spaceflight, especially the staggering cost of spaceflight to another planet. But I still think that we should go.

Many in my field will disagree with the above paragraphs, arguing instead to cancel all human spaceflight and just send robotic space probes to these places. The Voyager satellites are at the edge of the solar system right now. They argue that human spaceflight saps away resources from robotic exploration and that the two are in competition. Yes, to some degree, they are. I think, though, that they are tightly linked (certainly politically, and often budgetarily) and that such criticisms are self-defeating. If human spaceflight disappeared, then I think robotic spaceflight would greatly suffer. The civilian robotic spaceflight program would dwindle, and all that would be left is the military spaceflight needs. If that happened, then our view of outer space would change drastically, and probably not for the better.

Thursday, July 16, 2009

Whoring

I’m going after the DOD money.

My field of space physics is related to national security because the things that humans do and the technology we rely on is influenced by the “weather” of outer space. Specifically, we are influenced by the electric currents that flow through near-Earth space and by relativistic particles that get close to Earth. Up until now, I have only used this connection as a “relevance” argument in proposals to science-oriented funding agencies like NASA and NSF. This helps to get me funding to do research on the natural space environment.

Occasionally, however, there is a military agency that solicits proposals from academics to study something about the space environment that is related to national security. The Department of Defense is different than NASA in that most of their funding agencies ask for short white papers first, and they make the big down-select at this stage. The proposers are told yes or no on submitting a full proposal (usually without much feedback), and those lucky enough to hear “yes” usually then have a better than 50% chance of getting selected for funding. I have made it past the white paper stage once. No funding from DOD yet.

In May I submitted another white paper to a DOD agency, and I just heard that it was selected for full proposal submission. I now get to spend the next month learning about high-altitude nuclear explosions and how they create artificial radiation belts in near-Earth outer space. I know a bit about the natural radiation belt environment, but this will be a new direction for me.

I am still trying to convince myself that I want to do this work. The proposal solicitation is written from a counterterrorism standpoint, and in fact it comes from the Defense Threat Reduction Agency. However, I could easily see how it could be used from an offensive standpoint. If the US has accurate simulation tools describing the resulting radiation belts from a high-altitude nuclear explosion (and therefore the threat to space-based assets), then we can perhaps plan how to use such explosions to our strategic advantage. It is nowhere near the dilemma that scientists faced in the 1940s during the development of nuclear weapons, but it is an indirect usage of peaceful scientific advancements for potential destruction. I tell myself that writing this proposal and going after this money is patriotic and good for America. Something keeps nagging me in the back of my mind, though, that I am whoring my expertise for a few extra dollars of research funding, and there will be unintended negative consequences down the line.

Tuesday, July 14, 2009

The New Mac

Where have you been all of this time, Intel processor for the Mac? I love you!

I have a computer code that I use as a big part of my research. It solves how electrically charged particle move through a region of near-Earth space. It’s a code that others began almost 2 decades ago and I am now the keeper of this code (let me clarify: I am the keeper of the version of this code at my university, as there are other versions out there as well, with different keepers).

It’s solving a time-dependent set of equations, so a typical simulation requires initial conditions for the start-up and then boundary conditions for the time interval of interest. I like to look at storm conditions in near-Earth space, so a typical simulation is usually a day-long interval, and often times I would run a 4-day interval, to capture the quiet time ahead and behind the storm interval.

When I got the code 10 years ago, it ran about 10 times slower than real time. Yes: to do a single storm simulation, I had to wait over a week for the result, sometimes a month. This slowly improved over the years as I kept upgrading my computer. I recently replaced a G5 Mac with a new Intel-based Mac. On my old Mac desktop computer, it used to run about 3 times as fast as real time. This was a big improvement over the previous machine, as it was the first time it passed real time speed barrier. On the Intel machine, it’s now 12 times faster than real time. Not only that, but my new Mac is a dual-quadcore machine, with 8 CPUs inside of it. The timing numbers above are for serial processing jobs. My old Mac was a dual processor machine, and I didn’t like to run it in parallel mode because then I couldn’t much else with the machine until the run was done. This is no longer a limitation. Spreading the run over 4 processors (leaving plenty of processing power for other things) means that the code is now 50 times faster than real time. I can do a 4-day simulation in 2 hours. Oof-da!

For a long while I had been hesitating with code development because it was so painful to wait for results. Not anymore. I can now dive back into it. Now, I just have to remember FORTRAN again. Oh yeah, and find time to actually program.

Friday, July 10, 2009

Peer Review Workload

I review a lot of papers and proposals. It’s part of my job. For those of you not in a scientific research field, here’s the deal: all of the papers I submit to obscure journals and all of the proposals I submit to funding agencies are then sent back out into the world to several other scientists in the field for “peer review.” The editor or program officer then takes these reviews into account when making their decisions. When there is a specific proposal deadline, this usually means that the agency will convene a one or more panels of peer reviewers (in addition to mail-in reviews), where 5-10 people will sit around a table for 2-3 days discussing and rating each of the proposals submitted on a particular topic. All of these people are anonymous to the submitters and are supposed to be unbiased and objective in their evaluations. Typically, journal paper manuscripts go to 2 reviewers and proposals go to up to 5 mail-in reviewers. If there is a panel, then each panelist is usually assigned to be lead on 3-4 and secondary on 3-4 more.

So, with this in mind, I should be peer reviewing several manuscripts and proposals for every paper I submit (as first author) and every proposal I submit (as PI). I submit at least 2 papers a year as first author. I used to submit 4 or 5 as a research scientist, but that another story. So I should do 4 manuscript reviews a year. But that’s not enough. I should also do 2 for every paper my students or postdocs submit (not the research scientists, though), because they will most likely not be asked to review anything yet. This adds another 3-4 papers a year. So, I should be reviewing at least 10 journal manuscripts a year. I submit probably 3-5 proposals a year as well. If the average mail-in review number is 3, then I should be doing at least 10 mail-in proposal reviews for various funding agencies. Also, I submit mostly to NASA (that always convenes panels) and NSF (that sometimes convenes panels), and, because each panelist is lead on 3 or 4 proposals, so I should also be serving on at least 1 panel per year as well (which means another 6-8 proposal reviews from those assigned as part of the panel).

A paper review takes me about half a day, and a proposal review a little less than that. So, this adds up to well over 100 work hours of time each year devoted to evaluating what other people are working on. This is a hidden time sink that no one told me about when I was considering becoming a scientist. Maybe I’m just too nice to editors and program officers and don’t say “no” enough, but I’ve worked out the stats and think I’m doing a reasonable number of reviews for the burden I place on others.

Scientists out there: does anyone else do this much peer review?

Thursday, July 9, 2009

Manager Mode

I just submitted a proposal to NASA, as did one of the research scientists that I support. They will be reviewed by the same subpanel of the same program, and will be ranked relative to each other when the final funding decisions are made by the NASA HQ discipline scientist. It’s kind of weird directly competing with another proposal not only from the same department but also from the same group.

This brings me to the concept of “manager mode.” Three years ago, when I was research faculty instead of instructional faculty, I had time to write my own code, do my own simulations, analyze my own data, compare my own model results with the data, and write my own papers. I cannot do this now. The teaching and service loads of an instructional faculty (now tenured, as of 2 months ago!) greatly limit the time I have to do any of those things. Plus, I am expected to maintain a research group. I think I have done pretty well creating one. Three years ago it was me and 2 grad students. Now it is me, 2 assistant research scientists, 4 grad students, and 1-3 undergrad students (2 this summer). Funding all of these people is a major priority in my life and so writing proposals is a constant activity. Proposals usually have hard deadlines, so these often take precedence over everything else for a week or two when such a deadline comes up. Meeting with all of these people is a major time commitment as well. The undergrads need a few minutes (perhaps an hour) every day, the grad students and research scientists a few hours once or twice a week. Between proposals and managing the people in my group, most of my time allocation for research activities is spent. Another chunk of time is spent in peer review. Whereas I used to say yes to every request, I often say no to paper reviews not, not doing more than one every month or two. Proposal reviews I do every time, though, and this takes some effort to do it right. Another chunk of my research time allocation is spent at conferences, which takes away a whole week every now and then.

All of this leaves very little time for me to do my own research. That’s especially true during the school year, when the constant deadline of the next lecture or homework set posting is usually just a day away (and the various departmental committees are active). During the summer months, I now look forward to getting something done. Last summer I wrote 2 first-author papers. The summer before...2 papers. This summer...nothing so far. It’s July 9th; I have less than 2 months to get stuff done. Luckily, this week and next are now fairly open, and I hope to spend a lot of time making plots and writing text.

Do I like “manager mode”? Yes. I like teaching, and that is essentially what I am doing with both my students and my research scientists. My publication rate is actually higher now than before, counting all of the coauthorships on manuscripts. But, that said, yesterday afternoon was very satisfying: I spent it writing code, running the model, and making plots. Today...compare those results with data. Life is good.

Sunday, July 5, 2009

Anonymity or Not?

I just sent out several emails yesterday, revealing myself to dozens of people. As these posts are supposed to a replacement for the letters I used to write to them, I would rather have them know the site exists and that it is me than have the posts disappear into the etherworld and totally unfulfill their purpose. Okay, part of the purpose is for me to vent, but it's mostly to replace those letters from the past. For those who don’t know me, I am Space Prof. For those who do know me, please call me Space Prof on this site. All are welcome to comment. Thanks!

Saturday, July 4, 2009

Former Students and Code Usage

The steps:

1) I hire grad student to work on a project.

2) Grad student writes a program to do the work.

3) Grad student publishes some papers and the grant is completed.

4) Grad student defends dissertation gets PhD.

5) Grad student gets a job elsewhere.

6) I keep a version of the code.

7) I write a proposal to do something new with the code.

8) Grad student gets mad that I am using “his” code without permission from him or funding for him.

Has anyone else had a familiar experience?

My first response is to tell him to get over it. I paid for the code development and mentored him on the science behind the necessity of the code. My second response, because I want to help him out, is to offer to include him on whatever papers I/my new grad student writes with results from the code. My third response is to actually offer him a subcontract to pay him to help continue developing the code. My fourth response it to totally ignore his unhappiness and continue as if I had never received his email.

The Founding Fathers

It’s July 4th, so I thought I’d write about our country today. I’ve been off of blogging for a week or so, mainly because work was too busy and cut into my early mornings and evenings. Getting back from a long trip always takes a few days to recover and achieve normalcy in the office, but also having a proposal due (for which I had a lot of reading and writing to do) complicated the readjustment. Luckily, I don’t have to teach in the summer, so I don’t have worry about class notes and homework sets on top of it all.

A couple of years ago I read a book about the Founding Fathers by Brooke Allen called “Moral Minority.” She felt it necessary to rebut the claims of the conservative Christian Right that America is a Christian Nation founded on the principles of Jesus. She went through the religious-oriented writings of 6 of the big names in creating our country: Franklin, Washington, Adams, Jefferson, Hamilton, and Madison. I think that she makes a superb argument for her counter position that the Founding Fathers were, with only a few exceptions, deists of the Enlightenment era who accepted the notion of a supreme being but rejected the god-nature of Jesus. They were very afraid of a state-sponsored religion and very intentionally left out religion from the Declaration of Independence and the Constitution. The “separation of church and state” argument is not actually in the Constitution (only briefly in the First Amendment), but rather it is discussed in gory detail in the Federalist Papers, the lengthy and numerous persuasive essays on which the Constitution is based.

I think that the Founding Fathers were very perceptive in defining the country in this way. Forcing a religion on people is never a good idea, and history shows us that such enforcement often leads to the bloodiest times for humanity. Even though I am a Christian, I am very thankful that America is not a Christian Nation. I do not think Christianity (or any religion) is served well when politicians make it mandatory. To me, religion requires a deep, personal sincerity that cannot be imposed on anyone by others. You can offer your own religious experiences as an example to others, but only they can decide to truly believe. Enforced membership is counterproductive and, I think, ultimately damaging to the religion such a rule is trying to enhance.

Personal evangelism, though, is a different matter. I like to talk about religious topics, but I also don’t want to push my religious beliefs on others. That’s a delicate and undefined line that I usually don’t know that I’ve crossed until the other person is offended. Religion (like politics) is a tough thing to discuss with others unless they are of the same mindset as you (in which case you simply agree) or they are exceptionally open-minded (in which case they will agree that you have the right to that position). Either way the discussion is often short-lived. I have found that anything less than this leads to arguments or awkward silences. Again, this leads to another short-lived discussion.