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

some question about the project #12

Open
YaoAnthony opened this issue Jul 8, 2021 · 1 comment
Open

some question about the project #12

YaoAnthony opened this issue Jul 8, 2021 · 1 comment

Comments

@YaoAnthony
Copy link

Hi
I think your project is very well developed, so I am curious about what kind of Software Development Lifecycle Model you have adopted. The code my friend and I created was very messy, which made it very difficult for us to check each other's code

@paulvangentcom
Copy link
Owner

paulvangentcom commented Jul 20, 2021

Hi YaoAnthony,

Thanks for your message. I did not take a specific SDLM per se. The main things that ensure good coding hygiene I (try) to employ:

  • Don't start racing and coding right away!
    • sketch our the architecture first and really take the time to think about the problem you're trying to solve.
    • Iterate a few times on your architecture.
    • Data structures employed in your software deserve the same attention as the general architecture. It's fine to revise, but have a solid plan first.
  • Documentation is not optional. Write docstrings as you go. Leaving this for later will just result in a huge backlog without the will to fix this.
  • Tests are not optional. Write test cases for your functions as you go. Docstrings can include test cases under Examples, see for example my HeartPy repo here
  • When collaborating, always comment code segments and explain what you're doing why. Some would argue this is always a plus even for solo projects. Future you will have forgotten most details in a few months.
  • Coding conventions are there for a reason. For Python adhere to PEP-8 and use a tool such as PyLint to ensure adherence.
  • More separate files is better than one long file (although you could argue this is just a matter of preference)
  • Don't repeat code blocks, modularize.

I'm no saint and often break my own rules in some projects. This repository for example contains no test cases yet.

However I hope this helps you!

Cheers
Paul

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

2 participants