Node.js: Testing and Code Quality Flashcards
What does code quality consist of?
Quality consists of those product features that meet the needs of customers and thereby provide product satisfaction.
Quality consists of freedom from deficiencies.
What does “functionality” mean in the context of code quality?
It means that the code does what it’s supposed to.
What does “deficiency-free” mean in the context of code quality?
It means that the code has no failings or shortcomings.
What are the two ways that the concept of freedom from deficiency can be generalized?
Usefulness and maintainability.
What is “useful” code?
The more flexible and reusable the code is, the more useful it is.
What are the three questions that can determine if code is maintainable or not?
- Can you maintain the code?
- Can someone else maintain it without help?
- Can someone else read and understand design and intent?
What is the most certain way to determine whether code is maintainable?
- Peer review – can the reviewer understand design and intent?
How do you improve the maintainability of your code?
- Consistent formatting and logical naming – helps reading
- Clear comments and functional docs – describes intent
- Modular components – reusable code