basic #185223
-
Select Topic AreaQuestion Bodybasic need of code quality |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
|
to make sure code should easy to understand |
Beta Was this translation helpful? Give feedback.
-
|
it can be maintainable |
Beta Was this translation helpful? Give feedback.
-
|
The need of security is that it that the data does not gets hacked and ensures that users data remains safe and secure . |
Beta Was this translation helpful? Give feedback.
-
|
Look, "Code Quality" sounds like one of those corporate buzzwords, but in reality, it’s just the difference between a project that’s a joy to work on and one that makes you want to quit your job. If you want a "cheat sheet" you can copy and use as a checklist for your projects, here is the breakdown of the absolute basics. 1. Readability (The "Junior" Test)Code is read much more often than it is written. If a junior developer can't understand what your function does in 10 seconds, the quality is low.
2. Consistency (The "Style" Test)A codebase should look like it was written by a single person, even if a team of 50 worked on it.
3. Maintainability (The "Change" Test)Quality code is easy to change without breaking everything else.
4. Reliability (The "Safety" Test)
The "Quick Copy" Quality ChecklistRequirement | Action Item -- | -- Naming | Are variables descriptive? (No a, b, temp) Size | Are functions under 20-30 lines? Safety | Is there a try/catch or error check for external inputs? Testing | Is there at least one test covering the "happy path"? Documentation | Is there a README.md explaining how to run the code?Want to see an example?I can show you a "Before vs. After" of a messy piece of code transformed into "High Quality" code so you can see the difference. Should I do that for a specific language like Python, JavaScript, or Java? |
Beta Was this translation helpful? Give feedback.
to make sure code should easy to understand