I’m modifying an app using Python Flask for the backend and SQLAlchemy as the ORM. I needed to add a new non-nullable boolean field to an existing model. While ChatGPT helped with the migration code, things became problematic when I tried to make this field ‘read-only’ in the admin panel.
The AI added the field to the appropriate views and had the logic to assign it a value during creation, but encountered an issue during editing: if the model’s existing value was True and I saved it as a disabled field, it got saved to the database as False because disabled fields don’t get included in the form submission. Despite trying different prompts, ChatGPT struggled to fix this.
This left me frustrated because I feel that while it’s great for quick snippets, it can’t handle even moderately complex logic without introducing bugs. I find more joy in researching and coding myself than in attempting to direct AI towards achieving my goal.
Has anyone else faced similar issues? Is there something I’m missing in how I’m utilizing AI tools?
Many users overestimate their prompting abilities and AI’s context understanding. You usually know more than the AI does, so you have to give it precise instructions.
Drew said:
I’ve been trying similar tasks with LLMs. While they can assist with simple tasks, they may not produce reliable results for complex coding.
It reminds me of blueprints for game creation without knowing C++. Sure, they help, but not enough in many cases.
Drew said:
I’ve been trying similar tasks with LLMs. While they can assist with simple tasks, they may not produce reliable results for complex coding.
AI can be a productivity enhancer, especially for larger projects, but it requires skill to utilize effectively.