Skip to content

Instantly share code, notes, and snippets.

@ascherj
Last active November 3, 2025 02:27
Show Gist options
  • Select an option

  • Save ascherj/9f76e9d92aaf491adf3a463d81de20b2 to your computer and use it in GitHub Desktop.

Select an option

Save ascherj/9f76e9d92aaf491adf3a463d81de20b2 to your computer and use it in GitHub Desktop.
UMPIRE Walkthrough w/ ChatGPT

🧠 UMPIRE Walkthrough w/ ChatGPT

The way you approach solving a coding problem—how you think, communicate, and refine—is often more valuable than simply arriving at the right answer. Use ChatGPT as a supportive partner as you work incrementally through the six steps of the UMPIRE framework:

Understand → Match → Plan → Implement → Review → Evaluate


🎬 Setting the Stage

Before you begin, set expectations with ChatGPT:

Prompt:

"I’m using the UMPIRE method to practice problem-solving. I want to work step-by-step and avoid seeing code unless I explicitly ask for it. Please help guide my process by asking clarifying questions, suggesting concepts, and encouraging test cases and discussion—not giving me answers directly."


1️⃣ Understand

Use test cases and questions to make sure you know what the problem is really asking.

Prompt:

"Can you help me understand what this problem is asking for? Here’s the prompt:" (Paste the prompt.)

Follow-up Prompts:

  • "What are the key inputs and expected outputs?"
  • "Let’s come up with 2-3 test cases, including edge cases."
  • "Are there any hidden assumptions or constraints I should clarify?"

What This Builds:

  • Careful reading and paraphrasing skills
  • Skill in generating helpful test cases
  • Comfort asking clarifying questions in interviews

2️⃣ Match

Match the problem to known patterns or categories to activate relevant strategies.

Prompt:

"What category of problems does this look like? (e.g., Tree, Greedy, Sliding Window)"

Follow-up Prompts:

  • "Are there specific strategies or tools that are commonly used for this type of problem?"
  • "Which data structures might be appropriate here and why?"
  • "Can we assess the likelihood of each possible match?"

What This Builds:

  • Pattern recognition across problem types
  • Awareness of the “DSA toolbox”
  • Early assessment of strategy fit

3️⃣ Plan

Use visualization, diagrams, and pseudocode to plan a complete solution without jumping into syntax.

Prompt:

"Can we create a high-level plan or pseudocode for how to solve this problem?"

Follow-up Prompts:

  • "Can we sketch a step-by-step approach based on our chosen strategy?"
  • "Can we talk through what the state of the program looks like at each stage?"
  • "Can we draw or describe a visualization of how the algorithm works?"

What This Builds:

  • Algorithmic clarity before coding
  • Confidence in logical sequencing
  • Ability to communicate ideas visually or verbally

4️⃣ Implement (Only When Ready)

Only now do you start coding—after building confidence in your plan.

Prompt:

"Can you help me implement just the setup or first part of the code, based on our plan?"

Follow-up Prompts:

  • "How do I translate this piece of pseudocode into real code?"
  • "What assumptions should I handle first (e.g., empty input)?"
  • "Can we start by writing a few helper functions or base cases?"

What This Builds:

  • Incremental coding skills
  • Confidence mapping from plan to syntax
  • Test-driven approach from the beginning

5️⃣ Review

Use a watchlist and step-by-step walkthrough to validate your code.

Prompt:

"Let’s walk through this code line by line using a specific test case. What’s in memory at each step?"

Follow-up Prompts:

  • "Can we track the values of key variables as we go?"
  • "Let’s check edge cases like empty inputs or duplicates."
  • "What would go wrong in this example if there were a bug?"

What This Builds:

  • Careful, defensive thinking
  • Concrete debugging practice
  • Deep understanding of how the code executes

6️⃣ Evaluate

Assess your solution's performance and discuss its trade-offs and extensions.

Prompt:

"Let’s analyze the time and space complexity of the solution."

Follow-up Prompts:

  • "Is this optimal? Could we make it more efficient?"
  • "What trade-offs exist between readability and performance?"
  • "What are some follow-up problems or variations we could explore?"

What This Builds:

  • Confidence discussing Big-O analysis
  • Perspective on software design decisions
  • Readiness to handle “what-if” follow-up questions in interviews

✅ Recap

Use UMPIRE to turn ChatGPT into a smart, collaborative problem-solving partner:

Step Goal
Understand Clarify requirements through examples
Match Identify familiar problem patterns
Plan Use pseudocode or diagrams to strategize
Implement Carefully translate plan into code
Review Debug and trace behavior with examples
Evaluate Analyze performance and reflect on trade-offs
@wd021
Copy link

wd021 commented Jul 9, 2025

the 🧠🧠 prompts belong on God Tier Prompts!

@leodvincci
Copy link

Nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment