Thuta Learning
ရှာဖွေရန်
IntermediateAIbeginner

Code Prompt ကောင်းအောင် ရေးနည်း

စိတ်လျှော့ပါ။ ဒီခန်းကို စာအုပ်လိုမဟုတ်ဘဲ စကားပြောသလိုပဲ၊ နားလည်လွယ်အောင် ရှင်းပါမယ်။

ဒီခန်းပြီးရင် ဘာတတ်သွားမလဲ

  • Code Prompt ကောင်းအောင် ရေးနည်း ကို ကြောက်စရာမလိုအောင် နားလည်မယ်
  • ကိုယ်တိုင် စမ်းသုံးတတ်အောင် လုပ်မယ်
  • မှားလွယ်တဲ့နေရာကို ပြုံးပြီး ရှောင်တတ်မယ်

Goal၊ Context၊ Constraints နဲ့ Output format ပါသော coding prompt တစ်ခု တည်ဆောက်မည်။

ခဏလေး ဒီလိုပဲ စဉ်းစားကြည့်

ကောင်းတဲ့ coding prompt မှာ အပိုင်းလေးခုရှိပါတယ်။ Goal — ဘာဖြစ်ရမလဲ။ Context — ဘယ် stack၊ ဘယ် file၊ ဘယ်ပုံစံလိုက်ရမလဲ။ Constraints — မသုံးရတဲ့ library၊ မဖျက်ရတဲ့ API၊ accessibility။ Output — ဘယ် file ပြင်၊ ဘာပြန်ရှင်းပြ။ “ရေးပေး” တစ်လုံးတည်းက AI ကို မှန်းခိုင်းပါတယ်။ မှန်းတာများလေ ပြင်ရတာများလေပါ။

နေ့စဉ်ဘဝနဲ့ ချိတ်ကြည့်မယ်

မကောင်းတဲ့ prompt: “Navbar လုပ်ပါ”။ ကောင်းတဲ့ prompt: “Next.js App Router၊ Tailwind၊ mobile မှာ hamburger၊ desktop မှာ Tutorials/Search links၊ 44px touch target၊ existing Header.tsx ကိုသာပြင်၊ အသစ် library မထည့်။ ပြီးရင် ဘာပြင်သလဲ စာကြောင်း ၃ ကြောင်းရှင်းပြ။” ဒီလိုရေးရင် AI က ဖိုင်မှားမဖွင့်တတ်၊ design system ကို မချိုးတတ်အောင် ပိုနီးစပ်ပါတယ်။

အတူတူ လက်တွေ့စမ်းမယ်

text
Goal: Add a lesson complete checkbox that persists in localStorage.
Context: React client component, key = tutorialSlug/lessonSlug.
Constraints: no new dependencies, 44px target, no cookies.
Output: edit LessonCompleteToggle.tsx only + say how to test it.
You should see
ကူးယူအသုံးပြုနိုင်သော coding prompt ပုံစံတစ်ခု ရေးနိုင်မည်။

၅ မိနစ် စမ်းကြည့်

ကိုယ်လုပ်မည့် feature တစ်ခုအတွက် Goal / Context / Constraints / Output ပါအောင် prompt ရေးပါ။ မကောင်းတဲ့ဗားရှင်းနဲ့ ယှဉ်ပြပါ။

သတိလေးတစ်ချက်

AI output ကို အပြီးသတ်အမှန်လို့မယူပါနှင့်။ Code၊ secret နှင့် user data ကို လူကပြန်ဖတ်၊ စမ်းပြီးမှ သုံးပါ။

ဒီနေရာမှာ လူအများမှားတတ်တယ်

  • “လှအောင်လုပ်” လိုမျိုး တိုင်းတာမရတဲ့စကားသုံးခြင်း
  • ရှိပြီးသား file နာမည်မပေးဘဲ အသစ်ဆောက်ခိုင်းခြင်း

အခု ကိုယ်တိုင် စမ်းကြည့်

ကိုယ်လုပ်မည့် feature တစ်ခုအတွက် Goal / Context / Constraints / Output ပါအောင် prompt ရေးပါ။ မကောင်းတဲ့ဗားရှင်းနဲ့ ယှဉ်ပြပါ။

You'll know it worked when: ကူးယူအသုံးပြုနိုင်သော coding prompt ပုံစံတစ်ခု ရေးနိုင်မည်။

Code Prompt ကောင်းအောင် ရေးနည်း | Thuta Learning