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

Testing and debugging tips #5

Open
oharac opened this issue Jun 27, 2018 · 0 comments
Open

Testing and debugging tips #5

oharac opened this issue Jun 27, 2018 · 0 comments

Comments

@oharac
Copy link
Contributor

oharac commented Jun 27, 2018

hey all, let's use this issue to keep track of debugging and testing tips and tricks. Add new comments to the thread or just edit this comment and add your ideas.

  • have your code print out the values of variables as it works through loops or whatever, so you can make sure the variables are changing as you'd like them to.
    • e.g. cat('x =', x, ' y =', y)
  • use functions to chunk out smaller pieces of code to do a single specific thing well. I think we were all already doing that!
    • functions are great for attaching a name to a chunk of code, which makes your code easier to read and troubleshoot
    • it's generally easier to troubleshoot a small function and get it working properly, than to troubleshoot a big chunk of code.
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

1 participant