nerdexam
iSQI

CTAL-TTA_001 · Question #12

Part 3 "Bonus Program" To support code reviews a checklist will be developed. Which TWO questions from the list would you implement as part of the code review checklist? 3 credits [K3]

The correct answer is A. Are any magic numbers (numeric literals) used, other than 0 or 1? E. Is there any logic containing no statements and no explanation as to why it is empty? Options A and E are correct because both target source code quality issues that a reviewer can directly inspect in the code itself. Magic numbers (A) make code brittle and hard to maintain - a reviewer can spot if (x == 42) and flag it, whereas named constants are…

Reviews

Question

Part 3 "Bonus Program" To support code reviews a checklist will be developed. Which TWO questions from the list would you implement as part of the code review checklist? 3 credits [K3]

Options

  • AAre any magic numbers (numeric literals) used, other than 0 or 1?
  • BCan each item be implemented with the techniques, tools, and resources available?
  • CIs it possible during acceptance testing to verify whether the item has been satisfied?
  • DIs the item specified in an exact, unambiguous way?
  • EIs there any logic containing no statements and no explanation as to why it is empty?

How the community answered

(48 responses)
  • A
    83% (40)
  • B
    10% (5)
  • C
    4% (2)
  • D
    2% (1)

Explanation

Options A and E are correct because both target source code quality issues that a reviewer can directly inspect in the code itself. Magic numbers (A) make code brittle and hard to maintain - a reviewer can spot if (x == 42) and flag it, whereas named constants are self-documenting. Empty logic blocks without explanation (E) are a classic code smell: an empty catch {} or else {} may indicate a swallowed error or forgotten implementation, and a reviewer can immediately identify and question them.

Options B, C, and D are distractors because they belong to a requirements review checklist, not a code review checklist. B asks about implementation feasibility, C asks about testability during acceptance testing, and D asks whether an item is specified unambiguously - all of these evaluate a requirement specification, not source code.

Memory tip: Think "what can I see by reading the code?" - if the question is about the content of the code (numbers, empty blocks, naming), it belongs on a code review checklist. If it's about clarity or verifiability of a written requirement, it belongs on a requirements review checklist.

Topics

#code review checklist#magic numbers#empty logic blocks#review preparation

Community Discussion

No community discussion yet for this question.

Full CTAL-TTA_001 Practice