Site icon R-bloggers

Programmer’s confidence

[This article was first published on Rbloggers on Personal Blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

It’s the middle of August now and the book (“Advanced R Solutions”) my friend Malte and I have been writing in our spare time is currently being printed. If you’re interested in obtaining a hardcopy, you may already (pre-)order – the book will be shipped in a few days: https://www.routledge.com/Advanced-R-Solutions/Grosser-Bumann-Wickham/p/book/9781032007496

We started the project a few years back shortly after the {bookdown}-package came out. We both had used R for a while, enjoyed data analysis, and wanted to develop our technical skills. Advanced R is a great resource and it introduced us to a lot of concepts that helped us understand R’s design and behavior more deeply.

Today, I’d like to take the chance to reflect a little on how I went about working through Advanced R and what I take away from the experience.

Figure 1: The cover shows all 284 exercises in in 20 chapters.

The writing process

When I was solving exercises I typically read the exercise carefully and re-read the related Advanced R chapter or section. Hadley did such a good job of presenting the content, that this step was usually quick and fun. I then started to write some code, look at R’s excellent documentation or do a web search for questions I had. Once I had a rough idea of the solution, I usually adding explanations. I often reworked the solution in a second session or the following day, which helped improve the quality, I hope. Whenever I got stuck I handed the question over to Malte so he could have a shot and we also paired on a couple of exercises. It continues to amaze me, how much easier it is to make progress on tougher challenges when you have someone to exchange ideas with directly!

But to me, the main challenge of the project was not solving the exercises. I found early on that given enough time and the possibility to consult Advanced R or discuss an exercise, I could solve most of the exercises. To me, the main challenges had more of an ‘organizational’ nature.

A big challenge was simply making enough time for the project. I do a lot of programming in my day job already and sitting down on the weekend to do some more is okay on some weekends, but it’s a burden on others. The kind of ‘relaxed concentration’ I like to have for studying and writing is a scarce resource and it also needs rest to be maintained. I think I learned a lot about how much time I like to spend in front of my computer and when I need to turn it off. As the project continued I started to work less on evenings and weekends and more during short holiday breaks and for me, this was a good choice! Having a four-day workweek for short while also helped a lot.

Another challenge was writing the book t o g e t h e r. In the end, the collaboration made it possible for us to succeed, but it also meant synchronizing approaches and schedules. Is it okay to commit a half-baked solution to the repo? Should the prose sound more formal or colloquially? Who will tackle which chapters? When is a solution good enough? It also meant accepting that life can change your priorities quickly and work on a side-project may not be that important for a while.

We also had to cope with a major setback. When we were more than halfway through the first edition of the book Hadley started a rewrite and updated a lot of the chapters of the book. Many of the questions stayed the same, but the solutions mostly needed to be rewritten anyway. We took a break, eventually recommitted, and slowly got back on track. Having clear assignments and a general sense of progress, which we achieved by plotting all exercises and marking them open/in progress/done, also helped to pick up and sustain momentum.

Celebration time!

And now it’s done! The book is already online (https://advanced-r-solutions.rbind.io/) and I look forward to holding a physical copy in my hands (and giving one to my parents ^^). When I look back, I tend to think of this adventure somewhat like a ‘coming-of-age project’ as a self-taught programmer. I’ve been exposed to useful technical concepts (such as R’s copy-on-modify rules, general error handling, function factories, metaprogramming, …), and even after a couple of months, these are still there in the back of my mind. But it’s easy to forget the more technical stuff when you don’t use it daily and that’s okay.

Most of all, I think, that going through the exercises has given me some kind of * programmer’s confidence*. I’m more optimistic now, that I can solve a more difficult technical problem and I’m more relaxed when I break it down and try to solve it one step at a time. I know, when to step away for a while and that it may take some time to find a good solution. A new error is already a step forward! 🙂

It also feels great to have the project off my mind and to have the freedom to move on. It’s been a lot of fun, a lot of work and a great ride overall. And if you enjoyed (some parts) of the book of the book or it has helped you, please let me know.

To leave a comment for the author, please follow the link and comment on their blog: Rbloggers on Personal Blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.