Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback on Day 2, Unit 2 #14

Open
apreshill opened this issue Oct 24, 2018 · 0 comments
Open

Feedback on Day 2, Unit 2 #14

apreshill opened this issue Oct 24, 2018 · 0 comments
Assignees

Comments

@apreshill
Copy link
Collaborator

Hi @jennybc and @jimhester,

This feedback relates to the following set of materials:

Again, I think use_course is better than links, if at all possible. Also to see the solutions you had to know to go to https://github.com/jennybc/whattheyforgot/tree/master/activities, and a lot of folks liked seeing those as they worked. There were no solutions though for 21_debugging-r-01.R. Also the naming of these were a little confusing- I think it is day 2, unit 1, activity 01, but some kind of consistent naming strategy across the full workshop would make local project file organization easier. I got lost at this point in my files trying to figure out which activity we were on sometimes.

Debugging

For me, this unit was the most unfamiliar so I learned a lot, but as a result I have more comments. I think the activities/slides could split further and shortened to better map onto the WTF bookdown sections. Some suggestions:

  1. First slide section introducing debugging (as you have it)
  2. Live coding demo with slide examples: using traceback() and print() and str(). Be sure to show how you figure out where to place the function calls within the code. Hearing your live problem-solving process would have been really helpful here. Also more narrative around interpreting the output of those functions would have been appreciated here. (good time to discuss downsides of these approaches, why/when other methods might come in handy...)
    • You have some specific options set-up in your .Rprofile to show you line numbers when you call traceback() that I didn't have. I am guessing most people didn't. Maybe disable your custom printing for this section so your screen looks like our screen (although the line numbers here seemed very helpful! If it is, perhaps cover in Day 2, Unit 1?)
  3. Next slide deck section cover browser() only
  4. First on-your-own activity: do the get_climates() debugging (21_debugging-r-01.R), using tools covered so far.
    • in my script here I also have notes: options(error = utils::recover); options(error = NULL) # to get rid of this- may want to include more narrative around this bit
    • they are now here in the WTF book
  5. Next slide section cover debugging only in RStudio
    • in my script at this point I made notes about sourcing- this wasn't in the slides and when you interactively demo-ed, this went so fast it was hard to see what you were clicking on. Definitely highlight the button in RStudio for this, and how the breakpoints change when you do that. In general for this section, go slower than your brain works 😄
    • they are now here in the WTF book
    • at this point I was heavily using this blog post: https://support.rstudio.com/hc/en-us/articles/205612627-Debugging-with-RStudio
  6. Second on-your-own activity: I didn't understand the purpose of 21_debugging-r-02.R, so perhaps keep or revise this activity, but motivate it more (why would you need to do this?).
    • A totally personal example, but I'd be curious if folks could use these tools to debug why dplyr::na_if() works on a data frame without dates, but fails when used on a data frame with a single (non-missing) date variable (I know the function is meant to be used within a mutate on vectors not data frames, but it does "work" on a data frame if no date variables are present- this one took me awhile to figure out 😭 )

Honestly, I think that you could stop there with debugging and let them read further in the book. I think the next activities/materials shouldn't be cut, so I would vote to cut down time on the final slide section there.

Read the source

These were both nice activities, if a little long. I think you could get by with one set of activities here rather than two, so pick your favorites and simplify- this is right before their lunch break on Day 2 so "All is fail" --> "All is tired". You can always leave the other activities as a stretch exercise for people who find the others easy.

@jimhester jimhester self-assigned this Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants