Back to Entry Chatlog Vibe Code Results  •  Tool Time #6  •  11/03/2026
TNT Tool Time — Entry #6 — Vibe Code Session

Three Stooges — Vibe Code Results

Four prompts • Four responses • Four critiques & grades
TechToolsGuru vibe-coding the Stooges driver with Raina in Magic School’s Code Craft Studio. Prompt by prompt, from a crash to a clean ArrayList with case-insensitive duplicate guarding — then a post-session analysis with Stage 4 improvements.

About This Page

This page documents TechToolsGuru’s complete vibe-coding session using Raina in Magic School’s Code Craft Studio. The goal: take the original Three Stooges Java driver — which crashes with an ArrayIndexOutOfBoundsException if no command-line arguments are supplied — and iteratively improve it through four prompts into a fully defensive, ArrayList-backed, Scanner-driven program with case-insensitive duplicate guarding.

Each prompt below includes: the original text as sent to the AI, a C.R.A.F.T. critique with a grade, and the complete Java code Raina produced in response. After all four prompts, a post-session analysis offers TTG’s perspective on the process and a set of concrete improvements to the final Stage 4 code.

This page is accessible only via the link in the Entry Chatlog. It is intentionally not indexed or linked from the main site.

🤖
S — Set Goal Vibe-code the Three Stooges driver from a crashing 8-liner to a clean, interactive Java program with ArrayLists, Scanner input, and case-insensitive duplicate prevention — using iterative prompts in Magic School’s Code Craft Studio.
Prompt 1 — Default Fallback When Args Are Missing
klp (TTG) → Raina / Magic School

I am a student in an APCS-A Java course with about 3 months of training. You are a patient APCS-A teacher and professional programmer. I have received some code that works when a user provides command line input in JDoodle but fails if they forget to do so. I’d like the code to work regardless. The code’s purpose is to list the various characters that appeared in the series ‘The Three Stooges.’ There are 3 primary stooges (Moe, Larry and Curly) and some stooges that came into the team later, Shemp and Joe. The default values should be Moe, Larry and Curly. Regardless, the first phase of the program should print out their names. Future versions will allow us to add additional stooges to the ‘cast’ disallowing duplicates. I should be able to copy and paste this code into JDoodle and have it work.

Here is the code snippet: [original ThreeStoogesDriver.java attached]

C.R.A.F.T. Prompt Critique — Prompt 1
Prompt Critique — Vibe Code Session, Prompt 1
B+

A textbook opening vibe-code prompt. The role framing is creative and specific: a student assigns both their own experience level and the AI’s teaching persona in a single sentence. The domain context (Three Stooges, Moe/Larry/Curly defaults, future stages) is well-placed and gives the AI meaningful constraints to scaffold toward. The code is attached. The JDoodle target platform is named. This is a strong first move.

✅ Strengths

✅Dual role in one sentence. “I am a student… You are a patient teacher and professional programmer.” Most students only assign the AI’s role. Naming your own skill level (“3 months of training”) tells the AI how to calibrate its explanation depth — this is the move that separates a B prompt from an A.
✅Failure mode described precisely. “works when a user provides command line input in JDoodle but fails if they forget to do so” — this is the bug report in plain English. The AI knows exactly what to fix and why.
✅Defaults specified by name. Moe, Larry, Curly named explicitly. No guessing; no default=null surprises.
✅Future roadmap mentioned. “Future versions will allow us to add additional stooges… disallowing duplicates.” This seeds the subsequent prompts conceptually and likely influenced the AI to keep the design extensible.
✅Target venue named. “copy and paste this code into JDoodle and have it work” — clear deliverable test: does it compile and run in JDoodle without arguments? Yes or no.

⚠️ Growth Areas

⚠️No format constraint (F in C.R.A.F.T.). No instruction like “show the complete class with comments, under 30 lines.” The AI chose to add a comment; that was a bonus, not a requirement. Adding a tight constraint would have locked in that behavior reliably across AI tools.
⚠️The style issue on line 6 is not mentioned. System. out.println has a space that’s technically legal in Java but poor style. A deliberate prompt would note: “preserve the spacing as written” or “fix the style on line 6.” Raina fixed it silently, which was correct — but the student didn’t control that decision.
⚠️Typo in the original code is not flagged. The original has "Insufficent" (misspelled). Raina corrected it in the response — which is helpful but again uncontrolled. Explicitly noting known issues gives you authority over which ones get fixed.

Grade rationale: B+ — Excellent dual-role framing and precise failure description. The missing F (format constraint) and unaddressed style issue keep it off the A tier, but this is a strong first prompt for a three-month student. Raina’s response was clean and directly targeted the problem.

Raina’s Response — Prompt 1

ThreeStoogesDriver.java Vibe Code Response 1 · defaults fallback · 25 lines
    Generated by Raina / Magic School — Code Craft Studio •  Response to Prompt 1 •  25 lines
    Prompt 2 — ArrayList & Scanner for Open-Ended Input
    klp (TTG) → Raina / Magic School

    The code you supplied worked well: I wanted to alert a user if default values were used. Here is my modified code:

    [Prompt 1 response code, unmodified, attached]

    There were additional stooges through the years that were part of the team. I’d like to be able to add them via keyboard input into the program and have them printed out. I’ll need to use an ArrayList to host the final collections of players. Refactor this code for user input and create an ArrayList to hold the final data. Assume I can enter as many stooges as I want until I indicate I want to stop.

    C.R.A.F.T. Prompt Critique — Prompt 2
    Prompt Critique — Vibe Code Session, Prompt 2
    B

    A good iterative prompt that does the most important thing correctly: it provides the working code as the new baseline before asking for changes. The three goals are clear — keyboard input, ArrayList, open-ended entry. The acknowledgment that the prior response “worked well” is a natural conversation signal that helps the AI understand it’s building on a solid foundation rather than correcting a failure.

    ✅ Strengths

    ✅Working code as the new starting point. “Here is my modified code” + the code attached. This is the gold standard for iterative vibe-coding: you always hand the AI the current working state, not just a description of it. No ambiguity about what exists vs. what’s desired.
    ✅Three concrete asks in sequence. (1) keyboard input, (2) ArrayList for the final data, (3) unlimited entries until stopped. Each is independently testable.
    ✅Technology named explicitly. ArrayList is named, not just “a collection.” This prevents the AI from choosing a LinkedList or array.
    ✅Positive acknowledgment of what worked. “The code you supplied worked well” confirms the session context without re-explaining the whole problem.

    ⚠️ Growth Areas

    ⚠️Role context dropped. Prompt 1 established the student/teacher frame. Prompt 2 does not re-state it. For a single session this is fine — the AI carries context — but if you share this prompt standalone, it loses its pedagogical tone. The C in C.R.A.F.T. (Context → Role) is implicit, not stated.
    ⚠️Sentinel value left unspecified. “Until I indicate I want to stop” is vague. What should the stop word be? Raina chose 'x' — a programmer convention, not a user-friendly one. Specifying 'done' or 'quit' would have produced a more student-friendly interface.
    ⚠️Duplicate guard not yet requested (intentionally left for Prompt 3). This is actually good prompt discipline — don’t pile on all requirements at once. Just noting it here so students understand why duplicates still work at this stage.
    ⚠️No format/tight constraint (F, T). Still no line-count request or “show the complete class with comments.” Raina provided a complete class anyway, but a good habit is to request it explicitly.

    Grade rationale: B — Solid iterative move; providing the working code is the right call. The dropped role, unspecified sentinel, and missing F/T constraints cost it the B+. The duplicate-guard omission is intentional iterative discipline, not a flaw.

    Raina’s Response — Prompt 2

    ThreeStoogesDriver.java Vibe Code Response 2 · ArrayList + Scanner · 58 lines
      Generated by Raina / Magic School — Code Craft Studio •  Response to Prompt 2 •  58 lines
      Prompt 3 — Case-Insensitive Duplicate Detection
      klp (TTG) → Raina / Magic School

      The code you supplied worked well. I like how you disallowed duplicates, but there was a flaw: If ‘Moe’ is in the ArrayList, the software allowed ‘moe’ to be entered since casing was not checked. We should ensure entries are disallowed if their only differences are in casing. It was very good that you trimmed the user input to disallow trailing spaces.

      C.R.A.F.T. Prompt Critique — Prompt 3
      Prompt Critique — Vibe Code Session, Prompt 3
      A−

      The most surgical prompt in this set. Three sentences, one precise bug, one specific fix requested, one positive acknowledgment. This is textbook iterative prompting: say what worked, name the single thing that didn’t, be exact about the failure mode, then stop. Raina had everything she needed and produced a focused, clean response with two new helper methods.

      ✅ Strengths

      ✅The bug is described with a concrete example. “If ‘Moe’ is in the ArrayList, the software allowed ‘moe’ to be entered.” This is not abstract; it’s a specific test case that demonstrates exactly how the duplicate guard fails. Any AI can understand “Moe” vs. “moe” immediately.
      ✅Acknowledgment of what worked is strategically placed. Noting the .trim() behavior at the end reinforces the prior response’s quality before pointing out the flaw. This keeps the conversation constructive and signals “don’t remove the trim logic.”
      ✅Single-issue focus. One bug, one fix. No scope creep. The discipline to fix one thing at a time is what makes iterative vibe-coding predictable and teachable.
      ✅No code provided (intentional). At this point in the session, the context window holds the prior response. Re-providing code would be redundant. This is correct judgment for an active session.

      ⚠️ Growth Areas

      ⚠️Roles not re-stated; fully session-dependent. This prompt is not self-contained. If extracted and sent fresh to a different AI, the student/teacher frame and the full code context are gone. For a shareable or replayable prompt, it would need a brief re-establishment: “Given the code from my last response, fix the following…”
      ⚠️Normalization strategy not specified. “Disallowed if their only differences are in casing” says what to achieve but not how to store the names. Should entries be lowercased, uppercased, or title-cased in the ArrayList? Raina chose title-case (smart: capitalizeName()), but the prompt left that open. Specifying “normalize to title case before storing” would have been tighter.

      Grade rationale: A− — The most precise prompt in the session. Short, specific, example-driven, and respectful of what already works. The session-dependency and under-specified normalization strategy prevent a full A. This is the model for all single-issue follow-up prompts.

      Raina’s Response — Prompt 3

      ThreeStoogesDriver.java Vibe Code Response 3 · case-insensitive guards · 79 lines
        Generated by Raina / Magic School — Code Craft Studio •  Response to Prompt 3 •  79 lines
        Session Break — Magic School Timeout

        Danger Will Robinson! Magic School times you out if you leave it unattended. The active session was lost before Prompt 4 could be sent. Context had to be re-established from scratch.

        Lesson: AI session context does not persist indefinitely. When picking back up after a timeout, treat it as a cold start — re-establish role, re-provide the current code, and describe the problem as if the AI has never seen it. Prompt 4 demonstrates exactly how to do this well. Notice how it re-introduces "I am a Java student" and "you are a professional Java programmer and APCS-A teacher", and includes the full code. This is the correct recovery pattern.

        Prompt 4 — Session Restart & hasDuplicates() Utility
        klp (TTG) → Raina / Magic School (new session)

        I am a Java student and you are a professional Java programmer and APCS-A teacher. I have some code that requests information at a command line level about the cast of characters in ‘The Three Stooges.’ It works well except if a user provides duplicate entries during the input phase, those duplicates stay in the final ArrayList and we shouldn’t have duplicates. We need a utility method that sends a true or false signal as to whether there are duplicates in the args array. We can wire it as a compound conditional in the check for the array size.

        Here is the code: [Prompt 3 response code attached]

        C.R.A.F.T. Prompt Critique — Prompt 4
        Prompt Critique — Vibe Code Session, Prompt 4 (Session Restart)
        B+

        A strong cold-start recovery prompt. The two most important things are done correctly: the role frame is re-established immediately, and the full current code is provided. The problem statement is clear and the proposed solution architecture — a boolean utility method wired as a compound conditional — demonstrates genuine APCS design thinking. This is not just “fix it for me”; it’s “I know the shape of the solution, execute this design.”

        ✅ Strengths

        ✅Roles re-established immediately after session loss. “I am a Java student and you are a professional Java programmer and APCS-A teacher” — the very first sentence restores the pedagogical frame. This is exactly the right recovery behavior.
        ✅Full code provided. The complete Prompt 3 response is attached. No ambiguity about what version of the code is the current baseline.
        ✅Problem stated clearly. “Duplicates stay in the final ArrayList” — specific, testable.
        ✅Solution architecture specified. boolean utility method + compound conditional. The student is not just asking for a fix — they’re demonstrating understanding of the design pattern. This shows APCS-level thinking about method decomposition.
        ✅Target structure named. “Wire it as a compound conditional in the check for the array size” tells Raina exactly where in the existing if statement the new method belongs.

        ⚠️ Growth Areas

        ⚠️Over-prescribing the HOW vs. the WHAT. “Wire it as a compound conditional” is implementation prescription, not just a goal. This is a C.R.A.F.T. double-edge: specifying HOW to implement can constrain the AI from offering a cleaner pattern (e.g., a helper that also handles args < 3 in one method). For novice teaching it’s intentional — students should know what they want — but in professional vibe-coding it can prevent better solutions.
        ⚠️The actual bug is subtle. The duplicate check at Stage 3 already handles keyboard input. The remaining gap is command-line args duplicates (e.g., running with Moe Moe Curly). The prompt says “during the input phase” which could be interpreted as either context. Raina correctly understood it to mean args, but the phrasing could have been more precise: “if someone passes duplicate names via command-line args.”
        ⚠️No format constraint. Still no explicit request for “complete class with comments.” Raina delivered it anyway.

        Grade rationale: B+ — Excellent session recovery. The role re-establishment + full code provision is the right model. The HOW-prescription is intentional APCS pedagogy but limits flexibility; the “input phase” ambiguity is a small clarity gap. Overall a strong, purposeful prompt from someone who clearly understands what they want the program to do.

        Raina’s Response — Prompt 4

        ThreeStoogesDriver.java Vibe Code Response 4 · hasDuplicates() + compound conditional · 91 lines
          Generated by Raina / Magic School — Code Craft Studio •  Response to Prompt 4 •  91 lines
          Post-Session Analysis & Stage 4 Improvements
          🧐
          K — Know TTG’s analysis of the four-prompt vibe-code session — what worked, what the prompts reveal about good iterative practice, and concrete improvements to the final Stage 4 code.

          Session Analysis

          📈 The Arc: From Crash to Clean

          The four-prompt sequence traces a clean learning arc. Prompt 1 solved the critical ArrayIndexOutOfBoundsException and added the default fallback. Prompt 2 introduced the ArrayList pattern and Scanner-driven input — the architectural leap of the session. Prompt 3 tightened the duplicate guard with case normalization, the most sophisticated code change for the fewest words of prompt. Prompt 4 hardened the command-line input path against duplicates at the source. Each stage produced genuinely better software; nothing was thrown away.

          🎯 Prompt Quality Summary

          The session improves as it goes. Prompt 3 is the standout: three sentences, one bug, one test case, one fix, done. Prompt 1 is the strongest structurally (full C.R.A.F.T. with dual role), Prompt 2 is the weakest (drops the role, leaves the sentinel vague), and Prompt 4 is the best cold-start recovery in the set. The consistent strength across all four is the practice of providing working code as the baseline before describing the next change — this is the single most important iterative prompting discipline.

          ⚠️ The Session Timeout: A Real-World Lesson

          The Magic School timeout between Prompts 3 and 4 is not a failure — it’s a lesson embedded in the process. AI sessions are stateful but mortal. When context is lost, the correct move is exactly what was done here: re-establish roles, re-provide the code, state the problem fresh. Students who learn this recovery pattern early will spend less time confused about why the AI “forgot” what they were working on.

          ✨ What Raina Did Well

          Raina’s responses were consistently complete (full class, never fragments), added helpful comments without being asked, chose sensible defaults (title-case normalization, 'x' as sentinel), and preserved prior logic through each iteration. The capitalizeName() and containsIgnoreCase() helper methods in Response 3 were creative additions beyond what the prompt explicitly required.

          TTG’s Improvements to the Stage 4 Code

          The Stage 4 code is solid and correct. These are not bugs — they are the next layer of craftsmanship. Here are four targeted improvements a co-creator would make:

          1 — try-with-resources 2 — consolidated error message 3 — "done" sentinel 4 — String.join() for printing

          Improvement 1 — try-with-resources for Scanner

          The current code calls input.close() at the end of main. This works in the happy path but leaves the Scanner open if an exception is thrown before that line. Java 7+ introduced try-with-resources specifically for this:

          // Before — closes only in the happy path:
          Scanner input = new Scanner(System.in);
          // ... all the code ...
          input.close();
          
          // After — auto-closed even on exception:
          try (Scanner input = new Scanner(System.in)) {
              // ... all the code ...
          } // Scanner auto-closed here

          Improvement 2 — Consolidated error message

          The inner if / else inside the outer else block produces two different messages for two sub-cases. For an APCS program, a single message is cleaner and easier to read:

          // Before — two branches, two messages:
          } else {
              if (args.length < 3) {
                  System.out.println("Insufficient command-line argument data! Defaults used!");
              } else {
                  System.out.println("Duplicate names in command-line arguments! Defaults used!");
              }
              // ...
          }
          
          // After — one message, one branch:
          } else {
              System.out.println("Invalid command-line input. Defaults used!");
              // ...
          }

          Improvement 3 — "done" as the sentinel value

          The sentinel 'x' is a programmer shorthand. For a program students or real users will interact with, "done" is more self-explanatory and feels natural as an exit command. The change is a one-line swap in the while condition and two println calls.

          Improvement 4 — String.join() in printStooges()

          The manual comma loop in printStooges() is a classic APCS pattern worth knowing — but once students are familiar with it, String.join() is more idiomatic and eliminates the index-boundary check entirely:

          // Before — manual comma with boundary check:
          public static void printStooges(ArrayList<String> stoogeList) {
              for (int i = 0; i < stoogeList.size(); i++) {
                  System.out.print(stoogeList.get(i));
                  if (i < stoogeList.size() - 1) {
                      System.out.print(", ");
                  }
              }
              System.out.println();
          }
          
          // After — String.join() does the comma logic:
          public static void printStooges(ArrayList<String> stoogeList) {
              System.out.println(String.join(", ", stoogeList));
          }

          Bonus — The capitalizeName() limitation

          Worth noting but not changing at this stage: capitalizeName() lowercases everything after the first character, so "McHugh" becomes "Mchugh" and "O'Brien" becomes "O'brien". For a Stooges roster this is fine. For a real-world program, a more robust name-normalization strategy would be needed. This is a good “Stage 6” discussion prompt.

          Improved Stage 4 — All Four Changes Applied

          ThreeStoogesDriver.java TTG’s improved Stage 4 · try-resources · joined print · "done" sentinel
            By TechToolsGuru (KLP) — improved Stage 4 •  Improvements 1–4 applied •  Code Craft Studio base Comments mark each change — copy & compare with Response 4