Node.js: Testing and Code Quality Flashcards

1
Q

What does code quality consist of?

A

Quality consists of those product features that meet the needs of customers and thereby provide product satisfaction.

Quality consists of freedom from deficiencies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does “functionality” mean in the context of code quality?

A

It means that the code does what it’s supposed to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does “deficiency-free” mean in the context of code quality?

A

It means that the code has no failings or shortcomings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the two ways that the concept of freedom from deficiency can be generalized?

A

Usefulness and maintainability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is “useful” code?

A

The more flexible and reusable the code is, the more useful it is.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the three questions that can determine if code is maintainable or not?

A
  1. Can you maintain the code?
  2. Can someone else maintain it without help?
  3. Can someone else read and understand design and intent?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the most certain way to determine whether code is maintainable?

A
  1. Peer review – can the reviewer understand design and intent?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you improve the maintainability of your code?

A
  1. Consistent formatting and logical naming – helps reading
  2. Clear comments and functional docs – describes intent
  3. Modular components – reusable code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly