How to develop your R skills without getting hangry.

Its 9am and my daughter, Genevieve, is down for her morning nap right on schedule, allowing me to write my first blog post. Little does she know, I’m writing about her. Right now she is just over a year old, which means that she is working on walking without bumping into things and tripping over her feet, but soon she will be much more focused on developing her language skills. Coincidentally, I’m also working on my language skills, but instead of learning how to communicate verbally with other people, I’m learning how to talk to a computer using R. While the languages we’re learning are very different, the way we are learning them is very much the same. For instance, when I learn a new function in R, lets say “seq(),” I get really excited and end up using it whenever I can. I’ll even use it when it may not be the most suitable tool for my purposes. Meanwhile, when Genevieve spoke her first word, “Dog,” while looking at our dog, I again got very excited, which made her smile and realize she had done something right. Soon, she was claiming that anything with four legs was a dog, just so she could practice her newly discovered language tool.

This leads me to the first message I’m trying to get at. Don’t get stuck using the same functions for everything just because you are comfortable with them. To communicate more effectively with your computer, you need to branch out and explore some new R vocabulary once in a while. Oftentimes I find myself slaving over a workaround to a problem that could be solved in 2 lines if I had only queried the help menu sooner. There is almost always a simpler, more elegant way to write your code. You just have to look it up.

Another parallel that I can draw in our (mine and my daughter’s) language development can be summed up in one word: frustration. There are few things more maddening to me than trying to get one stubborn line of code to work the way I want it to, without succeeding. Probably 90% of the handful of times that my laptop has actually seen its short, binary life flash before its web cam as I threatened to throw it out a window, have occurred while I was programming. There’s a good reason for this trend. It is incredibly frustrating to lose the ability to communicate, whether it be with a friend, your dog, or your computer. I see this same frustration all the time with Genevieve. When she gets hungry, and she doesn’t have the use of language to express her needs, the first place she goes is anger, and the anger that we are feeling is one and the same.

When you get frustrated because you can’t figure out how to express what you need to your computer, you are basically being a hangry toddler. I’ve found that the best remedy for this situation is to first take a ten minute ice cream break. Then when you sit back down to try your code again, either study up on debugging (it will be your best friend) or simply wipe the slate clean and begin a new script with a different approach. After all, there’s more than one way to skin a data set.


Genevieve’s vocabulary started with a single word and over the past few months, it has slowly grown to maybe five, but I can already tell that the frequency with which new words are being discovered is steadily getting faster. I hear that there is a language explosion at around 18 months and I can’t wait to hear what she has to say. It also makes me wonder if the learning curve for my R programming will follow a similar trend. If our programming language development is as similar to my daughter’s as I think it is, then we can all look forward to an exponential increase in our understanding of this sometimes frustrating interface between man and machine that we call R.

This entry was posted in Uncategorized. Bookmark the permalink.

1 Response to How to develop your R skills without getting hangry.

  1. abmckim says:

    Great post, I completely agree with the idea of taking a step back (and DEFINITELY agree with the ice cream break!) This reminds me of a book I’m reading right now by Barbara Oakley, where she discusses the “Einstellung effect.” This is when you already have an idea or solution to a problem, which prevents you from exploring other potential options (kind of like a road block). I guess this is kind of analogous to your point about using the same function, over and over again. Even though it was part of initial thought, it might not be the best or most efficient starting point.

    Oakley also emphasizes that if you are trying to figure out something new – a new concept or a homework problem perhaps – that your best bet might be to turn off your “precision-based” thinking and to instead turn on your “big picture” mode. In other words, understand what problem you are trying to solve BEFORE you try to get there. And leave yourself enough time so that you can take those ice cream breaks, and allow your mind to de-stress. In many cases, these incubation moments allow you to create a new potential solution you may have been blocking out before!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s