Debugging & Refactoring (အမှားရှာခြင်းနှင့် Code ပြင်ခြင်း)
Debugging with AI
Section titled “Debugging with AI”Error တက်ရင် Stack Trace (အနီရောင် စာကြောင်းတွေ) ကို Copy ကူးပြီး AI ကို မေးလိုက်ပါ။
- Prompt: “I am getting this error in my Node.js app. Here is the error log and the relevant code. What is causing this?”
- Tip: Error Log တင်မကဘဲ၊ သက်ဆိုင်တဲ့ Code အပိုင်းအစကိုပါ ထည့်ပေးမှ AI က အဖြေမှန် ရှာပေးနိုင်မှာပါ။
Refactoring (Code ပြင်ခြင်း)
Section titled “Refactoring (Code ပြင်ခြင်း)”Code က အလုပ်လုပ်ပေမယ့် ရှုပ်ပွနေရင်၊ AI ကို သန့်ရှင်းအောင် ပြင်ခိုင်းလို့ ရပါတယ်။
- Prompt: “Refactor this function to be more readable and follow Clean Code principles. Split it into smaller functions if necessary.”
- Prompt: “Convert this Class Component to Functional Component with Hooks.”
Explaining Legacy Code
Section titled “Explaining Legacy Code”သူများရေးထားတဲ့ Code (သို့) ကိုယ်ရေးထားပြီး မေ့နေတဲ့ Code တွေကို နားမလည်ရင် AI ကို ရှင်းပြခိုင်းပါ။
- Prompt: “Explain what this code does line-by-line. What is the purpose of the
useEffecthere?”