Guide-linked quiz · Medium Level

AI Pair Programming Best Practices Quiz

Use AI pair programming with bounded tasks, reviewable diffs, focused tests, least-privilege tools and human understanding.

Question 1 of 8

A developer asks an assistant to change an unclear feature across many files. What is a safer first step?

Preview every question8 questions

Answers and explanations appear as you take the quiz.

  1. A developer asks an assistant to change an unclear feature across many files. What is a safer first step?
    • Ask it to rewrite the repository in one pass
    • Clarify behavior and constraints, then request one bounded change
    • Grant every available permission
    • Skip tests until the full rewrite is complete
  2. A generated patch passes the current test suite. What remains true?
    • The tests check only covered behavior, so review requirements and edge cases too
    • The code is proven secure
    • The assistant’s explanation is now authoritative
    • No human review is needed
  3. Why should an AI agent receive only the permissions a task needs?
    • It makes generated code automatically correct
    • It removes the need to inspect commands
    • It guarantees that no external content is retrieved
    • It limits the impact of mistaken or unexpected actions
  4. A developer asks the assistant to explain a module. What should they do before relying on the explanation?
    • Assume a confident summary reflects design intent
    • Delete the source comments
    • Compare it with the implementation and project documentation
    • Use the explanation as a replacement for tests
  5. A tool proposes a test that passes only when the new implementation’s current behavior occurs. What should the developer check?
    • Whether the test has the longest name
    • Whether the test independently represents the requirement rather than repeating the implementation’s assumption
    • Whether the assistant prefers unit tests
    • Whether the code uses the same variable names
  6. Which workflow is most suitable for a security-sensitive code change?
    • Review with an experienced developer and use established security checks
    • Accept a fluent patch without reading it
    • Rely on the assistant’s confidence statement
    • Skip permission and error-path tests
  7. A new pair-programming tool can run terminal commands. What should the developer do?
    • Allow all commands because the tool is part of the editor
    • Hide command output to reduce distraction
    • Paste production secrets so tests can run
    • Review commands and approve consequential actions before execution
  8. A developer accepts a suggested helper function. Which action shows they can maintain it?
    • Count the lines generated
    • Ask for a more confident explanation
    • Explain the change and its tradeoffs in your own words
    • Assume generated code requires no maintenance

Keep testing yourself

More quizzes picked for your level.

View all quizzes