DEV Community

Cover image for The Art of Talking to AI: Prompts That Actually Work for Coding

The Art of Talking to AI: Prompts That Actually Work for Coding

Aditya on August 06, 2025

Why This Matters If you're new to coding, you've probably heard about AI tools like ChatGPT, GitHub Copilot, or Cursor that can help w...
Collapse
 
leob profile image
leob

Great article - and I'm pretty sure it wasn't written by AI ! (interesting - can AI already think or reason about ... AI ?)

Collapse
 
juny34 profile image
Anthony Nwagbaoso Onyeador

*Great comment here. Thought so myself *

Collapse
 
extinctsion profile image
Aditya

Sorry but saying truth.... this article was formatted in english by AI. I used my own dev.to mcp server to write about the article in plain english(you can find this in my github).
Atfirst i think about good quality topic and write an outline. I feed that outline in a LLM. Then the prompt generated by AI, I feed that in my mcp server and it creates a post for dev.to. Finally I tweak some changes, add some gifs and then publish my articles live.

So, yes AI is creating content for another AI

Collapse
 
js402 profile image
Alexander Ertli

No need to apologize genAI isn’t magic...
Thanks for the article btw.

This while AI thing... It's just a force multiplier of what you already understand, and not a substitute for intuition, knowledge, or structure...
On it's own models only output meaningful content if the question/prompt you provide hits the training data.

Thread Thread
 
extinctsion profile image
Aditya • Edited

Exactly, this is how it works and provides us with meaningful outputs.

Collapse
 
leob profile image
leob

That's clever! You still "authored" it, but used "AI" as your 'editor-in-chief' (or should I say "ghost writer") :)

Thread Thread
 
extinctsion profile image
Aditya • Edited

Yes, AI is now my junior support and it helps me achieving my goals faster than ever.

Collapse
 
anik_sikder_313 profile image
Anik Sikder

AI tools like ChatGPT, GitHub Copilot, and Cursor are amazing but only if you know how to talk to them. I love how this guide breaks down the art of prompting with clear examples and real-world tips.
The “be specific” rule is gold. I’ve seen huge improvements just by adding context like skill level, language, and desired output.
This isn’t just about getting code it’s about learning smarter and faster. Bookmarking this for every new coder I meet!

Collapse
 
extinctsion profile image
Aditya

I agree. People who feeds bad prompt and expects AI to do everything speaks bad about ai. They are just missing good prompt and that all they need to boost their productivity.

Collapse
 
kaymen99 profile image
Aymen K

Great stuff! I've been coding for few years now (not a pro, but I get by 😉), and I'm always arguing with Claud (windsurf) about how the code/app should work. It definitely takes some trial & error to get the prompts just right!

Collapse
 
extinctsion profile image
Aditya

I too sometimes gets struck in the merry-go-round. Then I try to switch to some other models or rephrase what I said. Even if it does not work, then I do that work myself :)

Collapse
 
rj33 profile image
RJ

I have learned writing bots in Node.js and Python with various LLMs is that once your code becomes a larger project and especially if you make it modular you need to make sure you are specific on exact changes and it does not hurt to say "Please do not change anything else".

I have had AI make changes assuming I wanted something. They do eventually get and actually state "I am leaving everything else as is".

Collapse
 
xzel profile image
Axel Howind

Articles like this are so much needed. AI needs enough context to create good answers (just as humans).

One interesting thing I noted after using AI for quite some time is how much models have improved in context awareness when you use an AI that has access to your whole project. For example, when some time ago the AI would generate working but quite verbose code, I now get answers like "here, need to be done and I noticed you already have a Utility class X with method y that does exactly that, so I used it" and provide very concise and readable code.

Collapse
 
extinctsion profile image
Aditya

Agreed, AI is all about context, dataset, training and accuracy. It is definitely improving day by day!

Collapse
 
elfreda profile image
Elfreda

These are great!
I’ve been using ChatGOT for coding and find that running the same prompt on DeepSeek and GPT-4o gives me two solid options to start with.
It’s like getting a second opinion from another senior dev.

Collapse
 
abi_abi_5fbf3e273d0ccdbbc profile image
abi abi

Great post btw. I would like to suggest create AI context engineering post like this man...

Collapse
 
extinctsion profile image
Aditya

Thanks, what kind of posts you would like to see? I post stuffs from various fields. Let me know. Also you can follow to get more such contents.

Collapse
 
abi_abi_5fbf3e273d0ccdbbc profile image
abi abi

Sure, I already following you 🙌, I want context engineering post Aaditya

Thread Thread
 
extinctsion profile image
Aditya

Okay, I'll be posting more about prompting in the upcoming posts

Collapse
 
idha profile image
Idha

Ok, let's be specific, but who prompts "write a function" anyway?

Collapse
 
extinctsion profile image
Aditya

Lol. "I know a guy who knows a guy" writes like this

Collapse
 
varshithvhegde profile image
Varshith V Hegde

that guy would be me😂

Collapse
 
prime_1 profile image
Roshan Sharma

This was a solid read. I've observed that when I simply ask for code, the output tends to be very generic. However, when I provide context, such as what I’m building, my skill level, or the programming language I want to use, the responses become much more useful. Requesting explanations alongside the code also aids my learning, as it prevents me from just copy-pasting without understanding.

Collapse
 
extinctsion profile image
Aditya

Being a good prompt engineer requires you to be a good engineer first. Your algorithm and problem solving skills decides how you gonna direct the AI to do things. That's how it always should be.

Collapse
 
smart2go profile image
Smart2GoTraining

Very good article! I been the bad and I'm getting better at prompting. The key takeaway for me is about 'specificity' - the more specific the better the results. I can't tell you how many times my coding agent and I went round and round to resolve a problem not because it was incapable, but because I was incapable of specifying what I needed. Burned through a lot of tokens on that lesson. But, here I am, 4 full-stacked apps later, fully AI generated, [I couldn't code a single line of anything!] and still can't get enough about learning how to prompt with AI.

Collapse
 
extinctsion profile image
Aditya

Im glad that you liked this article. I'm also learning on how we can use AI to leverage our productivity. Right now I'm also experimenting with prompts and its output. I'll keep writing more n more as I keep learning. I'm really happy that you liked my article!

Collapse
 
ashwinperti profile image
Ashwin Perti

Nice and simple article on prompt engineering

Collapse
 
kniraj profile image
Niraj Kamdar

This is waste of input tokens and same things can be achieved with proper context with minimal prompt. The problem is context not prompts

Collapse
 
extinctsion profile image
Aditya

Agreed. As a rookie, I don't know how to write a prompt with all context that i need, so I will write in english how would I talk to my teammates. This is the first step towards providing proper contexting to get desirable outputs.

Collapse
 
rcarrasquillo19 profile image
Roberto Carrasquillo

Excellent article. Great introduction to prompts engineering

Collapse
 
extinctsion profile image
Aditya

Thanks. I'm glad that you liked it.

Collapse
 
mikec711g profile image
Michael Casile

Great article. I'm thinking most of those prompts could be used with vscode and coPilot ... are there other environments you would recommend for hosting these conversations and code modifications?

Collapse
 
extinctsion profile image
Aditya

Yes, it could be used anywhere where prompting is needed. Your prompt quality decides your output. Like I say,"We are just one prompt away to create something amazing".