Stefan Countryman

I am a physics Ph.D. student at Columbia University. I work with Szabolcs and Zsuzsa Marka on gravitational wave astronomy (with a particular focus on multimessenger astronomy) for LIGO. You can see the full list of LIGO publications here as well as our detection papers (organized by event) here. My GitHub profile page contains some of my programming work (a lot of it is in private repos; sorry 😔).

I enjoy programming in python, bash (Bourne Again SHell) and julia.

Useful Links, Tips, and Tricks

This and this are wonderful resources for learning bash. This is a good guide to `bash` built-in string manipulation.

Go here to learn how to use sed.

If you are using a Mac, you should give iTerm a try, not because Mac's default terminal is unacceptable, but because iTerm has a couple of nice features (like split panes and excellent tmux integration) that are inexplicably lacking from terminal.

On the topic of terminal tools, you should use tmux for managing remote sessions that you want to resume later. It's great for working on long-running remote projects across multiple devices or when worrying about spotty connection quality. It even has mouse support in Windows 10, making iTerm2 less of a killer app for Mac remote work. (On that topic, you should use Windows Subsystem for Linux if you are running Windows 10 in order to get a fairly uniform UNIX environment across your computing environments. LIGO is UNIX geared, so even if you prefer Windows, it is worth immersing yourself in UNIX-style environments to avoid headaches). Here is a good guide to configuring tmux.

c2 is a treasure.

vim is a great, lightweight, ubiquitous text editor. You can go through a quick and very informative tutorial on any system that has it installed by running vimtutor at the command line.

This is a great guide to using tar and gzip for common tasks .

Some useful advice for writing robust shell scripts

DigitalOcean provides great, cheap, fast, modular server hosting. And they have great beginner-friendly tutorials on subjects like setting up passwordless login using SSH keys and using rsync to keep files synced between computers , or setting up a Flask webapp on top of an Apache server .

Does XQuartz launch whenever you fire up vim, causing slow startup? Turns out vim feels out its environment on startup by checking variables, including $DISPLAY, whose value is something like

        
          /private/tmp/com.apple.launchd.muoEIdGNPd/org.macosforge.xquartz:0
        
      
Somehow that check causes XQuartz to launch (even though vim won't use it). My solution is to set $DISPLAY to null only for vim-related commands by aliasing them in ~/.bash_profile (which Mac uses instead of ~/.bashrc):
        
          # prevent xquartz from opening
          alias view='DISPLAY="" view'
          alias vi='DISPLAY="" vi'
          alias vim='DISPLAY="" vim'
          alias vimdiff='DISPLAY="" vimdiff'
          alias vimtutor='DISPLAY="" vimtutor'
        
      
You can take a similar approach to avoid the
        
          crontab: temp file must be edited in place
        
      
error when editing your crontab with vim. Just add:
        
          alias crontab="VIM_CRONTAB=true crontab"
        
      
to your bash dotfile, then edit your .vimrc file to include:
        
          :if $VIM_CRONTAB == "true"
          :set nobackup
          :set nowritebackup
          :endif
        
      
(copied wholesale from here .

If you are on Columbia's campus and need to print a poster, go with Copy Experts. They are the cheapest and best printers with fast turnaround, and they do materials other than paper (i.e. vinyl and fabric). If you have more time on your hands, try PhD Posters; their prices are the best.

Useful LIGO Links

Getting started with LIGO is somewhat difficult due to the scattered nature of documentation. Below are some useful links that are very easy to forget. They all require LIGO credentials.

It is also worth knowing that there is a new type of frame in addition to the standard ones, which I believe is dedicated to h(t): L1_HOFT_C01 and H1_HOFT_C01.

My Pup

This is my pup, Battle, shortly before we got him:

He is an excellent pup with a rapid growth rate, indicating good parenting. Battle shortly after we got him:

He is growing very quickly, at a rate of approx. 70%/3 weeks. Following his second vet checkup:

UPDATE: Battle has grown much larger.

Dope Snippets

Controversial Opinions, or, an Invective Against Pythonistas

bash has idiosyncracies but, unlike python and other more popular scripting languages, it has poetry and humor. Many people are quite confused by this and mistake e.g. their own fear of regular expressions for a sign that sed is hard to use. The UNIX philosophy is similarly all-right with me. Simple but powerful is good.

Many people think they need IDEs; this is false. The command line is an IDE. vi, sed, grep et al. are the best editing tools around. And the command line is extensible.

At the other end of the self-consistency spectrum is julia, whose creators' relentless persuit of perfection has wrought a terse, fast, clean, and—like bash— flexible language. In julia, everything makes sense. Everything is beautiful. There is more than one way to do things because we are all adults.

I have not learned perl, but the fact that "pythonistas" seem to dislike it suggests that it is a very good language.

python is a good language. For many tasks it is the most reasonable choice. Trying to argue that it is always the only scripting language to use, or that other scripting languages are foul-smelling, is like insisting that you are only capable of eating chicken nuggets.

Compare The Tao of Programming:

"Technique?" said the programmer, turning from his terminal, "What I follow is Tao -- beyond all techniques! When I first began to program, I would see before me the whole problem in one mass. After three years, I no longer saw this mass. Instead, I used subroutines. But now I see nothing. My whole being exists in a formless void. My senses are idle. My spirit, free to work without a plan, follows its own instinct. In short, my program writes itself. True, sometimes there are difficult problems. I see them coming, I slow down, I watch silently. Then I change a single line of code and the difficulties vanish like puffs of idle smoke. I then compile the program. I sit still and let the joy of the work fill my being. I close my eyes for a moment and then log off."

to The Zen of Python:

There should be one-- and preferably only one --obvious way to do it.

What a sad way to see the world!

Disclaimer: I enjoy python itself. I am only complaining about python-novice fanboyism.

UPDATE: I almost exclusively code in Python now.

This image is original content made to express my feelings on this matter. As the copyright holder, I do NOT grant you the right to print this image UNLESS you pay me $5 in cash. Ken Rockwell takes this approach and that man has really made something for himself.

In my defense, I would be writing more bash scripts if not for the fact that all of my colleagues hate it.

Of course, Java is truly the worst...

Someone else has already done a great job enumerating some of the many inherent pitfalls of Java as a language, implementation, and set of conventions. Steve Yegge also had a great piece about object obsession (at the expense of functions), which of course is a big part of why "good" java code often makes the language look like a spiritual successor to INTERCAL .

PLZ START 😍

😬

🐩

😇

💁

😘