Welcome to my Open Notebook

This is an Open Notebook with Selected Content - Delayed. All content is licenced with CC-BY. Find out more Here.

ONS-SCD.png

Open Notebook Science, Jekyll Blogs, Github and Jerry Seinfeld's Secret to Productivity

The other day I reported that I’ve implemented a new open science task management regime http://ivanhanigan.github.io/2015/09/task-management-like-an-open-science-hacker/.

This was instigated by my renewed enthusiasm for open science after a few high profile papers have come out in the last few months imploring scientists to take action on shonky statistics and the “morass of poorly conducted data analyses, with errors ranging from trivial and strange to devastating” (Peng 2015) http://dx.doi.org/10.1111/j.1740-9713.2015.00827.x.

I believe that making ones electronic notebook open is one of the most obvious and easily achieved things to do toward that ambition. I also think that keeping the TODO-list in the forefront of ones mind and continuously checking things off the list is a great boost for productivity and keeping on track. This culminates in the advice to keep momentum by doing something toward the plan on a daily basis, no matter how trivial. This is sometimes called Jerry Seinfeld’s secret to productivity: Just keep at it. Don’t break the streak. http://dirk.eddelbuettel.com/blog/2014/10/12/.

So what was holding me back from a really useful daily publication of my open notebook? I showed last post how I manage tasks in Emac Orgmode (a task organiser and calendar/agenda rolled up with code execution for running R scripts etc). I also write my blog posts in orgmode.

The only problem with that set up was that I was still using the code from Charlie Park http://charliepark.org/jekyll-with-plugins/ which adds the inadequate commit description ‘Latest build’ every time. What I needed was a way to actually log a summary of work each day, so I can look back over the history and know I actually did something everyday and was not just gaming the system by committing random little non-work additions (I want to balance this by doing some work every day, but also take time off to read, exercise, socialize, and generally have fun).

So anyway, the point of this post is to describe my revision to Charlie Park’s code for building a jekyll blog:

Code: put in ~/.bash_profile

function bb() {
  cd ~/projects/ivanhanigan.github.com.raw && jekyll b && cp -r    
  ~/projects/ivanhanigan.github.com.raw/_site/* ~/projects/ivanhanigan.github.com && 
  cd ~/projects/ivanhanigan.github.com && git add . -A  && 
  git commit -m "$*" && 
  git push
}

  • That bit about $* was a bit difficult for me to get working as this is the first time I have written a bash script in anger. The alternative was to use $1 and require the git commit message to be passed within quotes, which also makes sense but I did not do that.
  • I also needed to change the terminal settings so that it always loads the bash_profile

Bash terminal

Edit > Profile preferences
Title and Command > Run command as a login shell 

  • And so now I just have to deposit a markdown blog post into the jekyll _posts folder and then

Bash

bb Add a meaningful commit message about todays progress

There you have it, a meaningful message regarding what I have been doing towards my scientific output every day.

/images/seinfeld-streak-day9.png

/images/seinfeld-streak-day9.png

References

Peng, R. (2015). The reproducibility crisis in science: 
A statistical counterattack. Significance, 12(3), 30–32. 
doi:10.1111/j.1740-9713.2015.00827.x

Posted in  disentangle


blog comments powered by Disqus