My experience with AI in programming, particularly with tools like AI copilots, leads me to conclude that we're currently in a supervised programming phase, not yet at "vibe programming." This assumes that programmers can provide clear and comprehensive descriptions of their requirements.
Where AI Excels: Auto-Completion
The most helpful and efficient mode I've found for AI copilots is auto-completion. In this scenario, I estimate around 70-80% of generated code is successfully used. This indicates AI's strong capability in assisting with direct, context-aware code suggestions.
Challenges with Autonomous ("Vibe") Programming
Attempting to use an AI copilot for fully autonomous "vibe programming" is generally inefficient for several reasons:
Iteration Overhead: Achieving an acceptable solution often requires numerous iterations to fix syntax errors and correctly implement logic.
Increased Processing Time: The processing time for these more complex generation tasks is significantly longer.
Rapid Quota Consumption: Premium quotas are used up very quickly. For example, in a recent project where I used a copilot to generate unit tests, the usage limit was reached within two days.
Context Window Limitations: "Vibe programming" demands full context and examples. Due to the limited context window, AI often struggles to grasp external dependencies like the "gofr" framework, including:
Solution architecture/project structure/layers
Initialization procedures
Database connection creation
HTTP client initialization
Function signatures
To overcome this, a good implementation or example must be provided for the AI to complete the rest of the code effectively.
Potential Pitfalls of AI-Generated Code
Over-fitting to Test Cases: Similar to the concept of over-fitting in machine learning, AI sometimes generates code that specifically matches test cases rather than providing a more generic or robust solution.
Codebase Degradation: If not closely monitored, AI can introduce "garbage" code, leading to an unmanageable and deteriorating codebase over time.
Comments
Post a Comment
Please leave you comments