Open czeildi opened 6 years ago
Is there an online version of this book anywhere? I'd be curious to see what it's all about!
@batpigandme afaik the book is not available for free but there's ebook version.
We just held a workshop on this topic with @paljenczy at eRum 2018 and we created a cheatsheet which could be a starting point for a more in-depth material.
@hadley I also thought about differences and similarities with your styleguide book http://style.tidyverse.org For one part the styleguide seems to be a subset of the clean code topic. I think style as a more local thing and clean code (like organizing functions) as a more global topic which makes sense at a somewhat larger scale. But you also touch these topics, like in the section on function design here.
Actually I think that at the unconf I'd like to work on a project more about actual coding but outside the unconf I'd love to think more and possibly collaborate around this topic.
@czeildi I think your cheatsheet is a little too prescriptive; we should chat about it in person.
Summary: discuss a book on clean code with examples in R focusing on analisys projects. Adapt principles from Robert C Martin's clean code book to R and functional programming. Possibly as an extension of tidyverse style guide (??)
Writing clean code is important for efficient work in every programming language. However, most of the resources available (at least what I encountered so far) contain examples in primarily object oriented languages making it less accessible for R programmers who are not software engineers.
Clean code makes it easier to collaborate, to avoid bugs and write working code faster. It also helps with understanding code written by others.
I envision a blog post series / bookdown with the relevant principles adopted from the Clean Code book with examples in R, focusing on every day R users and not necessarily those writing production R code. (i.e. do not mention error classes or R6 classes but focus on the most common use cases)
See: