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

Clean code guidance #12

Open
SamHollings opened this issue May 25, 2022 · 2 comments
Open

Clean code guidance #12

SamHollings opened this issue May 25, 2022 · 2 comments
Labels
on jira workplan ticket on jira

Comments

@SamHollings
Copy link
Collaborator

some teams want to use clean code - we need guidance on the best way to approach this for analytical code, why you would want to do it, and what to watch out for.

@adam-carruthers
Copy link

Some topics that could come up with regard to this (specifically with a python focus)

# don't do this
if df_by_respondent["q23"] == 4:
    pass

# do do this
ANSWERED_NOT_APPLICABLE = 4
if df_by_respondent["q23"] == ANSWERED_NOT_APPLICABLE:
    pass
  • The principles of self documenting code
  • Type hints?
  • Don't repeat yourself
  • Using a params.py file
  • How long should a file be?
  • Test driven development

@SamHollings
Copy link
Collaborator Author

This is in our backlog (https://nhsd-jira.digital.nhs.uk/browse/NV-1305)

@helrich helrich added the on jira workplan ticket on jira label Nov 8, 2022
SamHollings pushed a commit that referenced this issue Jan 18, 2023
* Create CODE_OF_CONDUCT.md

* Create CONTRIBUTING.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on jira workplan ticket on jira
Projects
None yet
Development

No branches or pull requests

3 participants