Developer argues 'Review this code' is ineffective ChatGPT prompt for debugging

A developer on DEV Community argues that simply prompting ChatGPT to 'Review this code' is ineffective for finding bugs. They demonstrate this using a buggy Python function for calculating discounts. The article proposes five alternative prompts designed to elicit more precise and useful code reviews from AI models. These prompts add context, request specific output formats, and ask the model to trace logic with concrete examples.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in