Ten Months of Programming – Month 7

July 22, 2013

I’m about to submit my Hacker School application for the fall 2013 cohort. This, of course, is a good reason to bring this blog up to date and report on what I have been up to in Month 7 – June.

How I Spent my Time

I spent a total of 57 hours programming in June. This is a new record, topping the 54.5 hours of March just barely. As one can (sort of) see from the Beeminder chart, my programming work has been very consistent. There have been neither big gaps nor crazy binges.

June was very much shaped by my dissertation. After running the first experiment for my dissertation with Yoni Donner and my supervisor Anne Hsu using Yoni’s Quantified Mind site in May, data analysis was on the agenda. I spent a total of 32.5 hours doing R and another 8 hours on doing R revisions with Anki. Besides data analysis I also spent 12.5 hours building a command line version of the Turkish card game Pisti using Python. I plan to submit that as my ‘program from scratch’ for the Hacker School application. Finally, I spent about 4 hours doing Python revisions using Anki.

June Programming



Dissertation and R

Focusing almost exclusively on R in the past month has been really interesting and rewarding. I have come to enjoy R tremendously and it has also been very interesting to program in a language that is so different from Python.

Interestingly, the most significant difference between R and Python is not even language based. R, for the most part, is used interactively. People import a data set into the R console or RStudio (R’s IDE) and then for the most part do direct data manipulation and analysis. In the end the code often is discarded. This approach is great fun as you get much more immediate feedback than if you’re writing a script. At the same time, it gets a bit confusing when the analysis gets more complex.

The other main difference is R’s functional nature. For example, loops are almost never used. This tends to result in code that is very concise and often quite readable, although somewhat less intuitive than the very procedural style one finds in Python.

Apart from learning the R basics, I also spent a lot of time with two different R libraries. The first on is Plyr and is extremely useful for data manipulation and for doing operations on parts of a data set. The second package is ggplot and is used to make really beautiful and powerful plots. They are both written by Hadley Wickham.

Pisti Game

My second, medium-sized project is to build a Python command line version of the card game Pisti. Pisti is a fairly simple game but it nonetheless has resulted in a decent-sized and fairly complex project. You can check out the code on Github.

Anki Revisions

Finally, I spent a lot of time using Anki. I have by now written a pretty decent-sized R deck with over 200 cards and have spent a lot of time learning different functions and operations. While this slows me down in the short-term, I can already feel a very considerable payoff in being able to do lots of things very fast. The more I use Anki, the more excited I’m getting about it!


Overall, June was a very good month and I’m super happy with my progress. I think I’ll be using R for many years to come, even if it is just to analyze some of my own Quantified Self data and having the ability to do data analysis fast and produce nice plots is amazingly valuable. It is also a great deal of fun to be able to do a lot of things myself after I have spent so much time studying statistics on a theoretical level of the last years.

What Projects Lie Ahead

My focus at this point is 100% on finishing my dissertation. This also means that all my programming time will be used for data analysis and thus R.

Previous post:

Next post: