levibostian / ExpressjsBlanky

Blank Express.js project to get up and running FAST.
MIT License
7 stars 0 forks source link

Increase transparency behind code quality and maintainability #45

Open levibostian opened 3 years ago

levibostian commented 3 years ago

I pride myself in my craft. I talk about each project I build is a good investment because you are getting a project that is high quality code and documentation. I am trying to find ways to hold myself accountable to this. Have something tangible I can point to that proves this.

To help me accomplish this, I have some ideas on how to prove this:

  1. Test coverage. A number (tangible) that indicates code stability.
  2. Linter warnings. A number (tangible) that indicates that if I have little warnings or errors, you can trust that this code is well written.
  3. Documentation/reference documentation - This might be a stretch and might not be needed, but with tools that generate code reference like JSDoc, javadoc, jazzy it throws errors when you have not written documentation for some code. Maybe by forcing myself to write documentation on my code it will help with code quality?
  4. Code smells project - I have had this idea for a while where I have a set of rules written down that I follow. Things like "no magic numbers" or making sure that a switch statement has a compile time check for cases you're not checking. These are things that linters do not catch that are manually checked by humans. This is a nice thing, but requires learning a new tool and learning the "code smells". The idea for this project is still early on and may not be worth it.

Along with this, I have considered writing blog posts about code. Things that I do to make my code more reliable. This is a form of that. Me writing about code smells.

  1. Using an automated tool like code climate to rate the quality of the code base. I don't like this idea as much because it could imply a cost and is proprietary but it might be worth it especially for some langs like Kotlin that currently do not have as good of linting tools as javascript does.

I can make eslint more powerful. There are some rules like complexity that I do not have enabled at this time. I can include more rules to increase the accountability of the code.

I can also use tools like this to help me find duplicate code.