Flashcardsfor IT Certifications

D2: Refactoring, Optimizing & Patching with Coding Agents

Google Cloud Professional Agentic Architect exam practice questions · 10 flashcards

Question
How should coding agents refactor code safely?
1 / 10

Tip: Space flips the card, ← / → navigate.

Last updated: · Report an error on this page

Show all 10 Refactoring, Optimizing & Patching with Coding Agents practice questions and answers
  1. How should coding agents refactor code safely?
    Plan first, make incremental changes, run tests after each step, review diffs.
  2. Why have tests before refactoring?
    They verify behavior is unchanged.
  3. How can agents optimize execution runtimes?
    Profile hotspots, suggest algorithmic improvements, caching, concurrency or right-sized runtimes.
  4. Why measure before and after optimization?
    Confirms actual performance gains.
  5. How can agents patch application-layer vulnerabilities?
    Analyze scanner findings, update dependencies, fix insecure code (e.g. injection), and add tests.
  6. Which inputs help vulnerability patching?
    Security scan results (e.g. Artifact Analysis), CVE details and stack traces.
  7. Why review agent-generated patches?
    Fixes may be incomplete or introduce new bugs.
  8. Example application-layer vulnerability?
    SQL injection, XSS or insecure deserialization.
  9. How do you verify a patch?
    Re-run scanners and tests, and add regression tests.
  10. Why keep changes small and committed often?
    Easy to review and roll back.