Skip to main content

CHAT GPT
STEERING the AI CODING ASSISTANT

🧭 Master Class: Steering Your AI Coding Assistant

Steering is about guiding the AI step-by-step, especially within your IDE where it can see your existing code. By providing the logic "skeleton" via comments, you turn the AI into a powerful pair programmer that handles syntax while you handle architecture.

1. Inline Steering with Comments

This is the most powerful technique for real-time coding assistance. You write the "What" in comments, and the AI fills in the "How."

A. Step-by-Step Logic Guidance

def process_orders(orders):
    # First, filter out cancelled orders (status = 'cancelled')
    active_orders = [order for order in orders if order['status'] != 'cancelled']
    
    # Then, calculate total for each order (price * quantity)
    for order in active_orders:
        order['total'] = order['price'] * order['quantity']
    
    # Now, group orders by customer_id and sum their totals
    customer_totals = {}
    for order in active_orders:
        customer_id = order['customer_id']
        # If customer doesn't exist, initialize to 0
        if customer_id not in customer_totals:
            customer_totals[customer_id] = 0
        customer_totals[customer_id] += order['total']
    
    return customer_totals

B. Data Transformation Pipeline

def clean_dataset(raw_data):
    # Step 1: Remove rows with any null values
    cleaned = [row for row in raw_data if all(val is not None for val in row.values())]
    
    # Step 2: Convert "$XX.XX" strings to float
    for row in cleaned:
        if isinstance(row['price'], str) and row['price'].startswith('$'):
            row['price'] = float(row['price'].replace('$', ''))
    
    # Step 3: Normalize email addresses to lowercase
    for row in cleaned:
        if 'email' in row:
            row['email'] = row['email'].lower().strip()
            
    return cleaned

2. File-Level Steering with Context

Use docstrings and TODOs to define the "soul" of a new file before logic is written.

Creating New Utility Files (auth_utils.py)

"""
Authentication utilities for the Flask application.
Uses JWT tokens and bcrypt for password hashing.
"""
# TODO: Import necessary libraries (jwt, bcrypt, datetime)

def hash_password(password: str) -> str:
    """Hash a password using bcrypt with salt"""
    pass

def verify_jwt_token(token: str, secret: str) -> dict:
    """Verify and decode JWT token"""
    pass

3. API & Database Development Steering

Steer toward validation and security requirements within specific routes.

Express.js Route with Validation:
// POST /api/users - Create a new user
router.post('/users', async (req, res) => {
    // 1. Validate request body (name, email, password)
    // 2. Validate email format using regex
    // 3. Check if user already exists in DB
    // 4. Hash the password using bcrypt (10 rounds)
    // 5. Generate JWT token and return 201 response
});

💡 Pro Steering Techniques

  • The "Fill-in-the-Blanks" Pattern: Initialize a class and use # TODO or pass to invite the AI to implement specific methods based on your configuration.
  • The "Fix This Code" Pattern: Paste buggy code and add a // BUG: comment. The AI will prioritize fixing that specific issue over a generic rewrite.
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! ...

Donation Account + CustomAPPs

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). Web-Based to Android Apps Convertion (MEDIAN.CO etc.) CONTOH HASIL Android APK "PROGRAM" SAMPLE: Youtube and Instagram EMBEDded to Blogger/Blogspot.com SOURCE CODE Click this box to download Contoh Sample SHORTCUT-APPs "precise" click to download : median.co R8: ronin1985.blogspot.com R2M: ronin-manu.blogspot.com Gw udah coba Median.co utk mengubah Website gw menjadi Aplikasi Android Keren bet!! Median.co Cekidot Software lain yg mirip! ChatGPT : If you're looking for tools similar to Median.co to convert websites into Android apps, here are some...

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