Skip to main content

AI ASSISTANT
Insight of the Day! detail and precise guide (emphasizement in many example) in making prompt that is easy and friendly to be understood by AI Coding Assistant +STEERING the AI

🚀 The Core Philosophy: "Talk to the AI Like a Junior Developer"

Imagine a brilliant junior developer. They are fast and know a lot, but they lack context, make assumptions, and can't read your mind. Your goal is to provide clarity, context, and constraints.


🏗️ The 4 Pillars of an Effective Coding Prompt

  1. Context: What is the environment? (File, framework, language)
  2. Task: What do you want to achieve? (Create, fix, modify, explain)
  3. Requirements & Constraints: How should it be done? (Specifics, rules, edge cases)
  4. Format & Output: What should the final result look like? (Code, list, comment-only)

Pillar 1: Context - Set the Stage

The AI doesn't know what file you're in or what project you're working on unless you tell it.

How to provide context:

  • Start a comment with the language/framework.
  • Mention the file you are in.
  • Reference relevant parts of your codebase.
❌ Bad Example (No Context):
# Make a function to fetch users.

Why it's bad: The AI has to guess everything. Database? API? Return type?

✅ Good Examples (With Context):
# In a Django model file (models.py), create a function to fetch active users from the database.
// In this React component (UserProfile.js), using the existing 'api' library, write a function to update the user's email.

Pillar 2: Task - Be Specific and Action-Oriented

Use clear, imperative verbs: Create, Write, Fix, Refactor, Translate, Explain.

❌ Bad Example (Vague Task):
# Do something with this list.
✅ Good Examples (Specific Task):
# Write a function called `filter_even_numbers` that takes a list of integers and returns a new list containing only the even numbers.

Pillar 3: Requirements & Constraints

Types of Constraints:

  • Input/Output: Parameter types, return types.
  • Behavioral: Error handling, specific algorithms, performance.
  • Stylistic: Naming conventions, specific syntax.
  • Libraries: Specific tools to use or avoid.
✅ Good Example (Detailed Constraints):
# Write a Python function `safe_divide(a: float, b: float) -> float`.
# Requirements:
# 1. It should return the result of a / b.
# 2. If b is zero, return 0.0 instead of throwing an error.
# 3. Use type hints as shown.

Pillar 4: Format & Output - Define the Deliverable

  • Code Block: "Output only the code, no explanations."
  • Code with Comments: "Write the code and add detailed inline comments."
  • Step-by-Step Plan: "Give me a step-by-step plan before writing code."

🛠️ The "Perfect Prompt" Template

[CONTEXT] In [File/Language/Framework],
[TASK] I need to [Clear Action].
[REQUIREMENTS] The requirements are:
- Requirement 1...
- Constraint 1...
[OUTPUT FORMAT] Please provide [Desired Output Format].

💡 Advanced Pro-Tips

  • Iterative Prompting: Don't do everything at once. Ask for a plan first.
  • Few-Shot Learning: Show the AI 1-2 small examples of the pattern you want.
  • Use Comments to "Steer": Use inline comments to guide the next line of logic as you type.

By following this guide, you shift from hoping the AI understands you to knowing you've given it the best possible chance to succeed. Happy prompting!

STEERING AI Coding Assistant

Comments

Popular posts from this blog

Utk yg mo Bantu2 Keuangan saya
..monggo ke Bank Central Asia BCA 5520166779 a.n. Andreas Tparlaungan Manurung (Indonesia)


For those who would like to help support my finances
..please feel free to send it to Bank Central Asia (BCA) account number 5520166779 under the name Andreas Tparlaungan Manurung (Indonesia)

ANDREAS TOMMY PARLAUNGAN MANURUNG SHARED POOLING ACCOUNT MY ANDROID APKs PAGE please download here! REFRESH PAGE aka CHECK LATEST UPDATE! DOWNLOAD "SHOWING" POOL OF MY ANDROID-APK(s) aka APK CONTAINING LIST OF ALL MY ANDROID-APK(s) APP CLICK HERE FOR ALWAYS BEING UPDATED FOR MY LATEST APK! CONTOH HASIL "PROGRAM" App: Prompts' Guide aka TEMPLATE-HELPERs click here to download! Youtube and Instagram EMBEDded to Blogger/Blogspot.com SOURCE CODE Click this box to download 📥 TikTok EMBEDded to Blogger/Blogspot.com SOURCE CODE Input: BrowserLINK (mandatory) Click this box to download SHORTCUT-APPs note :  "precise" click to download R8: ronin1985.blogspot.com R2M: ronin-manu.blogspot.com Helping Download(ing) OnlineVIDEO! ...

[ERROR BUG]
ChatGPT+Gemini: TikTok → Blogger Embed Converter using Cloudflare/Online Server

🔄 Refresh Page ERROR BUG: The connection is blocked because it was initiated by a public page to connect to devices or servers on your local network. Planning: Revise Program CODE Code USING Javascript/Online Server Code NOT USING Javascript Sample Working Code aka Already Repaired! Temporary Solution is by Asking AI Assistant to do REPAIR CODE of (Not yet Repaired) Current Conversion Program Code-Output TikTok Archive – Embedded Preview TikTok Embed ▶ View this video on TikTok ⚠️ DISCLAIMER: INPUT URL LIMITATION This program is currently restricted to processing Full Browser URLs only. It does not support TikTok’s mobile "short-link" format (e.g., vt.tiktok.com ). Required Action: Users must open the video in a web browser and copy the expanded URL from the address bar before pasting it into this program. URL Conversion Example ❌ UNSUPPORTED: https://vt.tiktok.com/ZSaXoFyov/ ✅ REQ...

REPOST: Studying WATER PUMP by ROMAN ENGINEERING

*^ Ini yg Asli Gan! Mekanisme pada Concrete Pump: Kok ky Sistem Mekanik Romawi ya?! Tapi malah bisa HANYA pake PER aka bukan "MATA BOR look a like" Mekanisme Drill yg Cost Pembuatan bikin REPOT aka harus Tool SUPER Khusus Dari Material Besi yg digunakan terlihat langsung secara kasat mata Jauh Lebih Banyak drpd Per Biasa seperti yg ditunjukkan pd Video Alternatif dgn Penggunaan PER Video dr Instagram: Source: YouTube Rome's drainage machines #history #romanempire #engineering