Maëlle's R blog

Showcase of my (mostly R) work/fun

Load different R package versions at once with git worktree

This post was featured on the R Weekly highlights podcast hosted by Eric Nantz and Mike Thomas. Do you ever see GitHub issue comments where someone posts the results of a reprex with a current package version, and then with an older one, to prove a regression? How would you go about preparing such a report? Today I learnt there is a clean way to have different versions of a codebase at once on your computer, thanks to the ever powerful Git.

Reading notes on Pro Git by Scott Chacon

As mentioned about a million times on this blog, last year I read Git in practice by Mike McQuaid and it changed my life – not only giving me bragging rights about the reading itself. 😅 I decided to give Pro Git by Scott Chacon a go too. It is listed in the resources section of the excellent “Happy Git with R” by Jenny Bryan, Jim Hester and others. For unclear reasons I bought the first edition instead of the second one.

Introducing saperlipopette, a package to practice Git!

I got more confident with Git since reading Git in practice. This has resulted in a more enjoyable Git practice! I’m also more keen to sharing Git “tips” with others, but felt it was challenging to quickly come up with examples to demo some Git workflows. This is what motivated my creating saperlipopette, an R package containing small Git playgrounds to practice various Git commands and strategies! What is saperlipopette? The saperlipopette package creates Git messes, or playgrounds, that users need to solve.

Reading notes on The Pragmatic Programmer by David Thomas and Andrew Hunt

In my quest to having reading notes on the tech books I read, and while waiting for code to run, I recently re-read The Pragmatic Programmer by David Thomas and Andrew Hunt. That book, whose second edition was published in 2019, offers an overview of many topics useful to programmers, from the idea of taking responsability, to testing, tooling, etc. Not my favorite tone I’m not the biggest fan of the tone used in the book, that feels a bit patronizing to me.

The two phases of commits in a Git branch

I seem to have at last entered my Git era. 🎉 Reading and applying Git in practice was probably the best thing I did for my upskilling this year. One Git workflow aspect I’ve finally realized is that it’s fine to have two phases of work in a Git branch. I’ll explain it in this post. Set up: create a branch for your work! Ideally, in most cases, when adding a feature or fixing a bug or whatever, I’ll work in a branch.