GH-300 - Improve developer productivity with GitHub Copilot (14% of the exam) - Section 5.3

Accelerate learning and reduce context switching, and use Copilot to suggest security and performance improvements.

Use GitHub Copilot to accelerate learning a new language or codebase, reduce context switching by keeping the developer in the editor, and surface security and performance improvements. Treat security suggestions as prompts for review, not guarantees.

Reduce context switchingSecurity improvementsPerformance optimisationAccelerated learning

Practice question for this objective

Free sampleImprove developer productivity with GitHub Copilotmedium

A developer keeps breaking flow to switch from the editor to a browser and search the project's framework documentation for the right API call. They want to keep that lookup inside their current file without leaving the editor. Which Copilot surface most directly reduces this context switching?

  • AOpen the GitHub web interface in a browser tab and read the repository wiki there, so the answer sits beside the code that the developer is currently editing in the IDE.
  • BAsk Copilot Chat about the API inside the editor, since it answers from the editor and keeps the developer in their current file rather than sending them to a browser. Correct
  • CRun GitHub Copilot CLI in a separate terminal pane to ask about the API, then copy the explanation back into the file the developer is working in.
  • DWait for inline ghost-text completions to surface the API call while typing, on the basis that completions remove any need to ask a question about the framework at all.
Use Copilot Chat in the IDE to answer code questions in context and reduce browser-based context switching. Copilot Chat runs inside the editor and can answer questions about the code in front of the developer, so it keeps the lookup in the current file and removes the editor-to-browser round trip, which inline completions, the CLI in a separate pane, or a browser wiki do not.

Why A is wrong: A browser wiki keeps a reference handy but is still a separate window, so it does not remove the editor-to-browser switch that the developer is trying to avoid.

Why B is correct: Copilot Chat runs inside the IDE and answers questions about code in context, so the developer gets the lookup without leaving the editor, directly cutting context switching.

Why C is wrong: GitHub Copilot CLI helps with shell tasks but lives in the terminal, so copying answers back into the editor reintroduces the switching the developer wants to stop.

Why D is wrong: Inline completions suggest code as you type but cannot answer a what-does-this-do question, so they do not provide the explanation the developer is looking for.

See more GH-300 practice questions, answers explained.

Exam traps in Improve developer productivity with GitHub Copilot

Answers that look right on this material and are not. Each one is a distractor from a different question in the GH-300 bank for this domain.

  • Merge the rewrite straight away, because Copilot only raised the security issue after it had confirmed the proposed fix removes the injection risk completely.

    Why it is wrong: It is tempting to assume Copilot verified its own fix, but Chat suggests likely code without proving the weakness is gone, so merging unverified is unsafe.

  • Add the repository file to content exclusions so Copilot rewrites the loop into a single batched query and removes the per-item lookups automatically.

    Why it is wrong: Content exclusions only stop a path being used as context; they do not analyse loops or rewrite queries, so they cannot surface the optimisation.

  • Add the function to content exclusions, expecting that removing it from Copilot's context will prompt Copilot to regenerate a faster version of the same loop.

    Why it is wrong: Content exclusions stop a file being used as context rather than optimising code, so excluding the function does not produce a more efficient version of it.

Examworthy is not affiliated with or endorsed by GitHub. Original, blueprint-aligned practice material only.