Skip to main content
All Posts

Prompting 101: Shug Upgrade Brain

2 min read
AIPromptingProductivity

Shug Discover Prompting

First time Shug use ChatGPT, Shug type: "make me a website." ChatGPT give Shug a 1990s HTML page with Comic Sans. Shug deserve that.

Then Shug learn: how you ask is more important than what you ask. This called "prompt engineering." Fancy name for "talk to robot properly."

The Bad Prompt Hall of Shame

Shug's real prompts that went wrong:

PromptWhat Shug ExpectedWhat Shug Got
"Fix my code"Working code"I'd be happy to help! Please share your code."
"Make it better"Optimized codeCompletely rewritten file
"Explain like I'm 5"Simple explanationCondescending explanation about cookies and milk

Shug's Prompting Framework

After many chai-fueled experiments, Shug develop system:

1. Role Setting

You are a senior React developer who values clean code
and TypeScript best practices.

2. Context Dump

I'm building a data visualization dashboard using Next.js 14,
React 19, and D3.js. The app processes CSV files client-side.

3. Specific Ask

Write a custom hook that handles CSV parsing with Web Workers,
returns loading state, and supports cancellation.

4. Constraints

- Use TypeScript strict mode
- No external CSV parsing libraries
- Handle files up to 100MB
- Include error boundaries

The Secret Sauce

Chain of thought prompting changed everything for Shug:

"Think step by step. First analyze the problem, then outline your approach, then implement."

This one line made GPT go from "here's some code" to "here's why this approach works, here's the tradeoff, and here's the implementation."

What Shug Learned

  1. Be specific — "Fix the bug" vs "The useEffect on line 42 runs infinitely because the dependency array includes an object reference that changes every render"
  2. Give examples — Show input/output pairs
  3. Iterate — First response is a draft, not the answer
  4. Know when to stop — Sometimes Shug brain faster than prompt-debug cycle

Shug Wisdom

"Good prompt is like good function name. If you need to explain it, it's probably not good enough."

Shug brain now upgraded from 2GB to 4GB RAM. Still not enough, but better.