Introduction

My older brother Michael got me hooked on programming when I was about 12, and I've been doing it ever since.

Source control management

When I first learned about this amazing concept called revision control, I started using perhaps the most ancient revision control systems out there, CVS. CVS works, but only just. Merging branches in CVS is a catastrophe. You could do a comparable job with the adept use of diff, tar, and patch. To hear Linus Torvalds's splendid and often hilarious views on CVS and other source control management things, watch this Google Tech Talk from 2007.

Now I use git. What makes it nice is that 1.) it's fast, and 2.) it's distributed, which means "nobody's special", i.e., there is no central repository like in SVN or CVS.

Writing pointless code

Many computational physicists are guilty of reinventing the wheel when they write code. Among other things, they write their own integrators for solving differential equations, they write their own interpolators, and they write their own Makefiles. For small code bases, sometimes this is the easiest way to proceed, but often we write code in physics to solve large, complex problems, in which case this approach inevitably leads to buggy, incomprehensible code that future maintainers/graduate students will have to spend countless hours trying to decipher.

If you have the luxury of writing a new code (as opposed to inheriting an unwieldy existing one), there is no reason to write your own Runge-Kutta integrator or Newton-Krylov solver. The best computer scientists and numerical analysts on the planet have devoted their entire careers to writing software that does all of the things I just mentioned (any many more), and the code they write is generally both robust and efficient. And best of all, much of this software is freely available for anybody to use!

Software I use almost daily

C vs. C++ vs. Fortran (for physics)

The age-old question. Here is what I have learned in my experience with all three: