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

A list of problems with the code in this repository - for teaching #2

Open
anenadic opened this issue Apr 15, 2024 · 0 comments
Open

Comments

@anenadic
Copy link
Collaborator

anenadic commented Apr 15, 2024

Please keep this issue open - this is used for teaching.

This list contains a number of things that can be fixed/improved with the code and data in this repository:

  • data file data.json could have a more descriptive file name
  • my code v2.py Python script should not contain blank spaces as it may cause problems when running from a command line
  • import statements should be grouped at the top
  • fixing the loop to 374 data entries is not reusable on other data files and would likely break if the data file changed
  • should use more descriptive variable names, and not e.g.w
  • commenting and uncommenting code to direct the flow of execution / type of analysis being done
  • running the code twice causes the program to fail as a previous result will exist
  • there is no LICENSE file to say how this code can be reused (which then means it cannot be reused at all)
  • the code lacks comments, documentation and explanations
  • missing requirements.txt file to denote dependencies
  • missing installation and running instructions
  • code structure could be improved - no functions and everything in one monolithic piece of code
  • folder structure could be improved, e.g. see https://coderefinery.github.io/reproducible-research/organizing-projects/#directory-structure-for-projects
  • variable fieldnames (meant to be used when saving data to CSV file) not used at all and also contains spaces in column names
  • our data contains some unicode characters but do not specify the encoding when reading the data in (and we do not know what the encoding that original data used but could try with UTF-8)
  • missing README (even though the repo itself has a README) explaining the software, dependencies and usage
  • duration_hours = int(hours) + int(minutes)/6 # there is an intentional bug on this line (should be dividing by 60)
@anenadic anenadic mentioned this issue Apr 15, 2024
@anenadic anenadic changed the title A list of problems with the code in this repository A list of problems with the code in this repository - for teaching May 21, 2024
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