All the code ...15 May 2015
I’ve written a lot of R code over the course of my two years as a postdoc here at UConn. Or at least, I feel like I’ve written a lot of R code. This is not surprising - after all, I think of myself as a quantitative ecologist of sorts. I got curious about just how much I’ve written a few days ago, so mostly as a way of “productive procrastination” I used a few command line tools to figure out how many lines of code I have currently in my project directories. (For the curious, I mostly just used
wc `find [directory name] -name "*.R"`, with
*.Rmd.) In total I have 23,779 lines of R or Rmd code. Assuming I’ve written this code over the course of 520 to 730 days, that’s about 46 to 33 lines per day. To be fair, the Rmd files contain a lot of lines of text as well. However, this is only what my current directory structure contains, and doesn’t include all of the delations, edits, etc..
I really don’t know if this is a lot or a little. I know it’s about on par with my dissertation work. But I imagine that software engineers blow these numbers out of the water. Actually, I’m sure there are plenty of other ecologists who blow these numbers out of the water. Ultimately, I take two things away from this little diversion. First, personally, I’m happy with the amount of code I’m producing, but there’s a nagging sense that I wish I had more to show for it in terms of publications or R packages. I feel like that’s coming though. Second, you can get a lot done if you think about it from a daily perspective. 30 to 40 lines of good code is pretty tractable to do in a few hours or less. I imagine that if I took the same attitude toward writing 200 - 300 words a day, I’d have a 6000 word manuscript in under a month. Yes, I’m aware this is not at all a novel thought, but it did drive the point home for me.