# Writing like a programmer

I’m a programmer.  It’s what I do for a living.  But I’m also (apparently) a writer.  It’s what I do for fun.

What I don’t do for fun is use Microsoft Word.  Fuck that shit.  Instead, I use $\LaTeX$ (I’m sure I’ve mentioned it before).  It’s a typesetting software suite (available in many different flavors) that I used to write (scientific) research papers back when I was in school.  It’s incredibly flexible and, since the files it needs to compile a manuscript are really just text files, easy to manage using programming tools.

One tool I used to track my word count was TeXcount, downloaded on my computer.  I run it against the .tex files comprising Birdland, and I get output like this:

That’s total word count as well as a chapter-by-chapter breakdown.  It’s a super easy way to see where the meat of the story is.  (Boy, that last chapter is a doozy!)

Another programmer’s tool I use is Git.

Birdland was stored in a git repository from the very first paragraph.  As I made changes, I’d “commit” those changes to the repository.  Since the repository is hosted (privately) on bitbucket, I can get to it from any computer and, thus, work on Birdland from anywhere in the world.  (Github is a more popular alternative, but you have to pay to get private repositories, and I haven’t sold Birdland yet, so I’m not using it.)  You can use the command line or a gui git client to manage the repository.  Here’s a screenshot of the Birdland repository in SourceTree.

A lot of stuff going on in here, but what’s important is that I can see the line-by-line changes I’ve made to any file in the repository.  I can track how the story (and the files that make up the story) change over time.  For example, look at the bottom right: I replaced the $\LaTeX$ command for ellipses (\ldots) with commas (because my thesis advisor in my writing program hates ellipses).  And that’s just that one file in that one commit.  I can see these changes for any commit I’ve made, from the initial commit back in August 2015 all the way up to the most recent.  (If universities and libraries ever fight to host my writing papers after I die, they’ll be fighting even harder for copies of my git repositories since that’s where all the changes and notes are kept.)

There are also tools available to help visualize how a git repository evolves over time.  One that I like using is git-stats.  One of the things it can do is spit out a little calendar from the past 12 months that shows the rate of commits.  My commit calendar from the past year:

Wha-ho, what happened there at the end of July?  I was pretty active, committing (i.e. writing) regularly, and then all of a sudden–boom!–I stopped.  Hmm. Also, check it out: I almost never write on Saturdays or Sundays.  Interesting.

Anyway, these are my primary writing tools that also double as programming tools: $\LaTeX$, TeXcount, git, and git-stats.

## 1 Comment

1. Luigus

Stop bragging.