โ† All CAD Flashcard Decks

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
  1. Which refactoring technique involves replacing a complex conditional expression with a method that returns a boolean value?

    Answer: Decompose Conditional

    Decompose Conditional extracts the condition and each branch into separate methods, making complex conditionals easier to understand.

  2. What is the primary purpose of establishing a 'Definition of Done' for code quality in an Agile team?

    Answer: To create a shared understanding of quality standards that must be met before work is considered complete

    A Definition of Done ensures the entire team agrees on the quality criteria every increment must satisfy before it can be released.

  3. In the context of Agile development, what does 'technical debt' most accurately describe?

    Answer: The implied cost of future rework caused by choosing an expedient solution over a better approach

    Technical debt represents the extra development work that arises when code that is easy to implement in the short run is used instead of applying the best overall solution.

  4. Which code quality metric measures the percentage of code executed during automated tests?

    Answer: Code coverage

    Code coverage measures the proportion of source code that is exercised by the test suite, typically expressed as a percentage.

  5. What is the 'Strangler Fig' pattern used for in Agile refactoring?

    Answer: Gradually replacing a legacy system by incrementally building new functionality around it

    The Strangler Fig pattern incrementally replaces parts of a legacy system with new implementations until the old system can be completely decommissioned.

  6. Why should refactoring be performed in small, incremental steps rather than large-scale rewrites?

    Answer: To maintain a working system at all times and reduce the risk of introducing defects

    Small incremental refactoring steps keep the system functional throughout the process, making it easier to identify and fix any issues that arise.