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

Vignette: How to sensibly use {dupree} as part of your workflow #59

Open
russHyde opened this issue Jan 24, 2020 · 0 comments
Open

Vignette: How to sensibly use {dupree} as part of your workflow #59

russHyde opened this issue Jan 24, 2020 · 0 comments
Labels
documentation Changes to README / Vignettes / manpages and suggeested blogposts

Comments

@russHyde
Copy link
Owner

russHyde commented Jan 24, 2020

DON'T JUST DEDUPLICATE WITHOUT THINKING!

Write up a vignette of a sensible workflow:

The aim is to add useful functionality that reduces the floor-space for bugs without deduplicating so far that your code becomes unreadable

Two main approaches:

  • If you want to fix a bug
    • Write a test that traps the bug, if you can
    • Isolate the code that is affected by the bug
    • run dupree and see if that code is duplicated elsewhere in the package
    • [see if you need to write a test that captures bugs in the duplicated bits]
    • [deduplicate the duplicated bits of code & then fix the bug]
    • OR [fix the bug(s) and then deduplicate]
  • If you want to add a feature
    • again, write tests for the new feature
    • write the code to implement your feature
    • run dupree; find if your feature-code duplicates some other part of the package
    • refactor the duplicated bits of code

As such, {dupree} doesn't really fit into the goodpractice-type checks (where you analyse the current state of the whole package relative to general guidelines); you need to consider before & after and focus on the bit of code that you are currently modifying. [? does that make sense]

@russHyde russHyde changed the title How to sensibly use {dupree} as part of your workflow Vignette: How to sensibly use {dupree} as part of your workflow Jan 25, 2020
@russHyde russHyde mentioned this issue Mar 30, 2020
17 tasks
@russHyde russHyde added the documentation Changes to README / Vignettes / manpages and suggeested blogposts label Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Changes to README / Vignettes / manpages and suggeested blogposts
Projects
None yet
Development

No branches or pull requests

1 participant