Refactor kode ini agar lebih mudah dibaca
A ready-to-use “Pemrograman” AI prompt template, designed and tested with Cursor. Replace the (bracketed) parts below with your own needs.
Prompt template
Refactor kode di bawah agar lebih mudah dibaca dan dipelihara: 1) perbaiki penamaan; 2) pecah fungsi yang terlalu panjang; 3) hilangkan duplikasi; 4) jaga perilaku tetap sama. Setelahnya, jelaskan apa yang kamu ubah dan mengapa, dan sertakan kode hasil refactor lengkap. Kode: ``` tempel kodenya ```
How to use this prompt
- Copy the whole prompt above and paste it into Cursor 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: Cursor — A code editor built for AI.