Gemini as a Code Helper

I have been using Google AI Studio for coding assistance. I rarely need help with design or solving problems … I just need help writing chunks of code quickly. Such as …

Grab this Controller and use it as a guide to make a new Controller called PhotoController.

Love love love the speed and then I can grab the several hundred lines and quickly go through and clean up any silliness that the AI might have injected.

My system instructions are simple:

LARAVEL 12, PHP 8.3
NO COMMENTS IN MY CODE.
DO NOT CHANGE THINGS UNLESS I ASK YOU TO DO IT.
NO COMMENTS IN MY CODE.
LARAVEL 12
REMEMBER LARAVEL 12 AND NO COMMENTS IN MY CODE.
READ THIS BEFORE EVERY RESPONSE.

Even with these emphatic system instructions I get (almost every time) stuff like this. It is painfule. These comments are just noise and add no value to anyone. A person that needs this level of comments in their code … is a day-1 beginner. This is your audience? Can we turn this crap off? :smiley:

$table->id(); // Standard auto-incrementing primary key

This comment is pointless!

2 Likes

I am surprised this has not received more responses or likes. Are there other’s out there that find the excessive comments noisy and superfluous? I would suggest that 30% of my interactions with the AI involve me reminding the AI to format the output as I have requested. I think more stringent adherence to final formatting requests would be a boon to people using this as a tool versus a learning apparatus.

If every time I swung my hammer at a nail, the hammer gave me a 5 minute dissertation on the types of nails available and alternative approaches to hammering and where the wood in the handle was grown … I would never get my house built. LOL

Hi @original.mozrin Apologies for late response .
I understand your frustration with unnecessary comments in Google AI Studio, despite clear instructions. To help, please share your Gemini model version and full exact prompt ? For more information please check this Google’s prompt engineering guides on their AI for Developers site offer strategies to refine outputs and minimize unwanted additions Prompt Engineering | Kaggle .
Thank you