FREE CAD Code Refactoring and Quality Questions and Answers Flashcards
6 cards from real CAD practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 FREE CAD Code Refactoring and Quality Questions and Answers flashcards as text
Which Agile practice involves the entire team reviewing the codebase together to identify quality improvements?
Answer: Mob programming or group code review
Mob programming and group code reviews bring the whole team together to examine code, share knowledge, and collaboratively identify quality improvements.
What does the 'Boy Scout Rule' recommend regarding code quality?
Answer: Always leave the code cleaner than you found it
The Boy Scout Rule encourages developers to make small improvements to code quality whenever they work in an area, gradually improving the overall codebase.
Which refactoring technique is most appropriate when a method has grown too long and contains multiple distinct responsibilities?
Answer: Extract Method
Extract Method pulls out cohesive blocks of code into separate, well-named methods, reducing the length and complexity of the original method.
What is the main risk of refactoring without adequate test coverage?
Answer: Introducing regressions that go undetected because there are no tests to catch behavioral changes
Without sufficient tests, refactoring changes may alter the system's behavior in unintended ways that remain undetected until they cause problems in production.
In continuous integration, how does automated static code analysis contribute to code quality?
Answer: It detects potential bugs, code smells, and style violations early in the development cycle before code is merged
Static analysis tools scan code for potential issues during the CI pipeline, catching problems before they reach production.
What is 'code smell' in the context of Agile software quality?
Answer: A surface indication in the code that usually corresponds to a deeper design problem
Code smells are patterns in code that suggest the presence of deeper structural or design issues, even though the code may function correctly.