class: center, middle, inverse, title-slide # Workflow ## Reproducible Examples ### Ben Baumer ### SDS 192Jan 27, 2021(
http://beanumber.github.io/sds192/lectures/mdsr_workflow_03-reprex.html
) --- class: center, middle, inverse ![](https://github.com/tidyverse/reprex/raw/master/man/figures/help-me-help-you.png) --- ## Minimal working examples .footnote[https://en.wikipedia.org/wiki/Minimal_working_example] > a **minimal working example** (abbreviated MWE) is a collection of source code and other data files which allow a bug or problem to be demonstrated and reproduced. -- > The important feature of a minimal working example is that it is **as small and as simple as possible**, such that it is just sufficient to demonstrate the problem, but without any additional complexity or dependencies which will make resolution harder. -- - MWEs are a currency in software development -- - Learning how to create them will make you a better programmer -- - 📣: Most of the time, the act of creating the MWE will lead you to the solution --- ## My code doesn't work! Possible explanations: - You made a syntax error - Read the error message carefully - Ask a classmate, TA, or instructor - Typically easy to fix once you identify the problem -- - You have a misconception about how the software works - [RTFM](https://en.wikipedia.org/wiki/RTFM) -- - The software behaves counterintuitively - Documentation doesn't match the actual behavior - Read the source code (!) -- - 🐛: You found a [bug](https://en.wikipedia.org/wiki/Software_bug)! - **Post a MWE as an issue on GitHub** .footnote[Example: https://github.com/slowkow/ggrepel/issues/182] --- class: center, middle, inverse ![](https://github.com/tidyverse/reprex/raw/master/man/figures/logo.png) --- ## `reprex` .footnote[https://github.com/tidyverse/reprex] .pull-left[ RStudio Addin: - create **minimal working examples** - self-contained environment - GitHub-flavored markdown (!) - paste into GitHub Issues ] .pull-right[ ![](https://media.giphy.com/media/l49JWMZfuyqbikTDi/giphy.gif) ] --- class: center, middle, inverse [Live demo]