You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
First slide section introducing debugging (as you have it)
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?)
Next slide deck section cover browser()only
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
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 😄
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.
The text was updated successfully, but these errors were encountered:
Hi @jennybc and @jimhester,
This feedback relates to the following set of materials:
21_debugging-r-01
: https://github.com/jennybc/whattheyforgot/blob/master/activities/21_debugging-r-01.R21_debugging-r-02
: https://github.com/jennybc/whattheyforgot/blob/master/activities/21_debugging-r-02.R22_read-source-01
: https://github.com/jennybc/whattheyforgot/blob/master/activities/22_read-source-01.R22_read-source-02
: https://github.com/jennybc/whattheyforgot/blob/master/activities/22_read-source-02.RAgain, 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 for21_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:
traceback()
andprint()
andstr()
. 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...).Rprofile
to show you line numbers when you calltraceback()
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?)browser()
onlyget_climates()
debugging (21_debugging-r-01.R
), using tools covered so far.options(error = utils::recover); options(error = NULL) # to get rid of this
- may want to include more narrative around this bit21_debugging-r-02.R
, so perhaps keep or revise this activity, but motivate it more (why would you need to do this?).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 amutate
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.
The text was updated successfully, but these errors were encountered: