Prompt Engineering for Coders — Developer-দের জন্য বাংলা Master Guide
ভূমিকা
AI coding tools (Cursor, Claude Code, ChatGPT) productivity ১০x করছে — কিন্তু প্রভাব আপনার prompt quality-এর উপর। এই গাইডে developer-দের জন্য specialized prompt techniques।
মৌলিক structure — coding prompt
- Context: Project type, tech stack, existing code
- Task: Specific outcome
- Constraints: Style guide, library, version
- Examples: Reference code
- Output format: Comments, tests included?
Master prompt template
- "You are a senior [language] developer working on [project type] using [tech stack]. Coding style: [conventions]. Task: [specific requirement]. Constraints:
- [Constraint 1]
- [Constraint 2]
Output: code with inline comments + brief explanation. Include error handling. Suggest unit tests separately."
Pattern 1: Function generation
- "Write a TypeScript function that takes [input type] and returns [output type]. Handle edge cases: [list]. Performance: O(n) preferable. Include JSDoc."
Pattern 2: Bug debugging
- "This code throws [error]: [paste code + error]. Walk through what's happening, identify the root cause, suggest 2-3 fixes ranked by simplicity vs. correctness."
Pattern 3: Code review
- "Review this code for: 1) Bugs 2) Security issues 3) Performance 4) Code smells 5) Test coverage gaps. Be brutal — assume PR-time critic. [paste code]"
Pattern 4: Refactoring
- "Refactor this code to: 1) Improve readability 2) Reduce coupling 3) Add proper error handling. Keep functionality identical. Show before/after diff. [paste]"
Pattern 5: Architecture decision
- "Compare [Option A] vs [Option B] for [use case] in [context]. Output:
- Decision matrix (5 criteria)
- Trade-offs
- Recommendation with reasoning
- Implementation sketch for chosen option"
Pattern 6: Test generation
- "Generate Jest tests for this function. Include:
- Happy path
- Edge cases (empty input, null, max value)
- Error scenarios
- Mocks for [external dependency]
Coverage target: 90%+. [paste function]"
Pattern 7: Documentation
- "Write README for this repository:
- 1-line elevator pitch
- Quick start (3 commands)
- Features bullet list
- API reference (each method)
- Examples
- Troubleshooting common issues
[paste codebase structure]"
Anti-patterns (avoid)
- "Fix this code" (too vague)
- "Make it faster" (no metric)
- Pasting 500 lines without context
- Asking for "best" code (subjective)
- No expected behavior described
- Mixing 5 tasks in 1 prompt
Cursor/Claude Code specific
- Use codebase context: "@file:utils.ts" reference
- Iterative: small change → review → next
- Agent mode: "Plan and execute"
- Chat then apply: review diff before merge
- Custom instructions: project-level conventions
BD-specific developer prompts
- "Build Bangla input validation regex"
- "BDT currency formatting function"
- "bKash API integration sample"
- "Daraz product scraper (rate-limited)"
- "NID number validator"
- "Bangladesh phone +880 validator"
উপসংহার
Prompt engineering — developer-এর new most-valuable skill। আজকের আপনার next code task-এ এই template apply করুন। প্রতি ভালো prompt = ১০ মিনিট save।
প্রাসঙ্গিক টুলস ও গাইড
AI আপডেট পেতে চান?
প্রতি সপ্তাহে নতুন AI টুলস ও টিউটোরিয়াল বাংলায় পান।
ফ্রি নিউজলেটার। যেকোনো সময় আনসাবস্ক্রাইব করতে পারবেন।