Semakan kod baris demi baris untuk menangkap pepijat
A ready-to-use “Pengaturcaraan” AI prompt template, designed and tested with ChatGPT. Replace the (bracketed) parts below with your own needs.
Prompt template
Anda seorang jurutera perisian kanan yang pakar dalam semakan kod. Semak kod (bahasa pengaturcaraan) di bawah, tunjukkan satu demi satu: pepijat berpotensi, kelemahan kes tepi, halangan prestasi, isu penamaan dan kebolehbacaan, serta risiko keselamatan. Bagi setiap isu, nyatakan nombor baris dan tahap keterukan, dan beri cebisan kod yang telah dibetulkan dengan sebabnya. Kod: (tampal kod)
How to use this prompt
- Copy the whole prompt above and paste it into ChatGPT or ChatGPT / Claude / Gemini.
- Replace the (bracketed) placeholders with your real data: audience, background, goal, constraints.
- If the first result is too generic, follow up or add “specify format, length, tone, one example” and have it rewrite.
Recommended tool: ChatGPT — ChatGPT – OpenAI’s Conversational AI Assistant