<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rick</title>
    <description>The latest articles on DEV Community by Rick (@devpromptsbyrick).</description>
    <link>https://dev.to/devpromptsbyrick</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3910051%2F3e6cc17f-69aa-4021-bffd-79c5f6e662df.png</url>
      <title>DEV Community: Rick</title>
      <link>https://dev.to/devpromptsbyrick</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devpromptsbyrick"/>
    <language>en</language>
    <item>
      <title>5 ChatGPT prompts I use every day as a Python developer</title>
      <dc:creator>Rick</dc:creator>
      <pubDate>Tue, 12 May 2026 06:00:00 +0000</pubDate>
      <link>https://dev.to/devpromptsbyrick/5-chatgpt-prompts-i-use-every-day-as-a-python-developer-509l</link>
      <guid>https://dev.to/devpromptsbyrick/5-chatgpt-prompts-i-use-every-day-as-a-python-developer-509l</guid>
      <description>&lt;p&gt;5 ChatGPT prompts I use every day as a Python developer&lt;br&gt;
I've been writing Python for years — Flask apps on my own VPS, scrapers, trading bots, the occasional React frontend bolted on top. The last 12 months I've used ChatGPT (and Claude, and Gemini) daily as part of my workflow.&lt;br&gt;
What I've noticed: most devs use AI like a search engine. They type "how do I do X in Python" and paste the first answer. That's fine, but it's leaving 80% of the value on the table.&lt;br&gt;
The real leverage is in reusable prompt templates — structured prompts you fill in with your code or error, that consistently get you a useful answer. Below are five I use almost every day. Copy them, save them in a snippets file, thank me later.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The "explain this error like I'm tired" prompt
When you've been debugging for two hours and the stacktrace is starting to look like ancient runes.
I'm getting this Python error:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;{paste full traceback here}&lt;/p&gt;

&lt;p&gt;Here's the relevant code:&lt;/p&gt;

&lt;p&gt;{paste 10-30 lines of context}&lt;/p&gt;

&lt;p&gt;Explain in 3 parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What is actually breaking, in plain English&lt;/li&gt;
&lt;li&gt;The most likely root cause given my code&lt;/li&gt;
&lt;li&gt;The smallest possible fix&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Don't rewrite my whole function. Don't add features. Just fix it.&lt;br&gt;
Why it works: the "don't rewrite my whole function" line is critical. Without it, you get back 80 lines of "improved" code when you only needed one line changed.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The refactor prompt that doesn't go rogue
For when a function works but you know it's ugly.
Refactor this Python function for readability and maintainability.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Constraints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep the exact same input/output behavior&lt;/li&gt;
&lt;li&gt;Keep the same function signature&lt;/li&gt;
&lt;li&gt;No new dependencies&lt;/li&gt;
&lt;li&gt;Add type hints if missing&lt;/li&gt;
&lt;li&gt;Add a one-line docstring if missing&lt;/li&gt;
&lt;li&gt;Explain each change in a bullet list AFTER the code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's the function:&lt;/p&gt;

&lt;p&gt;{paste function}&lt;br&gt;
The "explain each change" part is what makes this useful. You learn why it's better, not just see different code.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The test generator that actually thinks about edge cases
Generate pytest tests for this Python function.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The happy path (1-2 tests)&lt;/li&gt;
&lt;li&gt;Edge cases (empty input, None, wrong type, boundary values)&lt;/li&gt;
&lt;li&gt;Any failure modes the code clearly handles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use pytest fixtures only if genuinely needed. No mocks unless the function makes external calls. Group tests in a single class.&lt;/p&gt;

&lt;p&gt;Function:&lt;/p&gt;

&lt;p&gt;{paste function}&lt;br&gt;
The trick here is being explicit about what you don't want (mocks, fixtures everywhere). Default AI output loves both.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The "is this code review-ready" prompt
Before I open a PR I run this on the diff.
Review this Python code as a senior developer would.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Focus on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bugs or logic errors&lt;/li&gt;
&lt;li&gt;Security issues (especially around input handling, SQL, file paths)&lt;/li&gt;
&lt;li&gt;Performance red flags&lt;/li&gt;
&lt;li&gt;Naming and clarity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don't comment on style if a linter would catch it. Don't suggest comments. Be direct — if it's fine, say "looks good" and move on.&lt;/p&gt;

&lt;p&gt;Code:&lt;/p&gt;

&lt;p&gt;{paste code}&lt;br&gt;
The "if it's fine, say it's fine" instruction stops the model from inventing problems just to seem thorough. Game-changer.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The architecture sanity check
For when you're about to commit to a design decision and want a second opinion before writing 500 lines.
I'm building {short description of feature, 1-2 sentences}.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;My current plan:&lt;br&gt;
{bullet list of your approach}&lt;/p&gt;

&lt;p&gt;Tech stack: {your stack}&lt;/p&gt;

&lt;p&gt;Tell me:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What's the biggest risk in this approach&lt;/li&gt;
&lt;li&gt;One simpler alternative I should consider&lt;/li&gt;
&lt;li&gt;One thing I'm probably underestimating&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Keep it to under 200 words total. I don't need a treatise.&lt;br&gt;
This one saves me hours per week. Not because the AI is always right, but because forcing yourself to write down your plan in this format already surfaces half the issues.&lt;br&gt;
A note on what makes these work&lt;br&gt;
You'll notice a pattern: every prompt tells the model what not to do. That's not paranoia, that's the whole game. Default AI output is verbose, hedging, and tries to add features. Constraining the output is where the productivity gain lives.&lt;/p&gt;

&lt;p&gt;I've collected 130+ of these — organized by use case (debugging, refactoring, testing, API design, deployment, SQL) — over at &lt;strong&gt;devpromptsbyrick.com&lt;/strong&gt; . Launch-week discount is live until this weekend if you find this stuff useful.&lt;/p&gt;

&lt;p&gt;Either way, save these five somewhere you'll find them. Future-you at 11pm debugging a production issue will thank you.&lt;/p&gt;

</description>
      <category>python</category>
      <category>ai</category>
      <category>productivity</category>
      <category>chatgpt</category>
    </item>
    <item>
      <title>5 ChatGPT prompts I wish I had when I started learning Python</title>
      <dc:creator>Rick</dc:creator>
      <pubDate>Tue, 05 May 2026 12:05:00 +0000</pubDate>
      <link>https://dev.to/devpromptsbyrick/5-chatgpt-prompts-i-wish-i-had-when-i-started-learning-python-3d6d</link>
      <guid>https://dev.to/devpromptsbyrick/5-chatgpt-prompts-i-wish-i-had-when-i-started-learning-python-3d6d</guid>
      <description>&lt;p&gt;When I started learning Python a while back, I had ChatGPT open &lt;br&gt;
in one tab and the docs in another. The thing is — I was using &lt;br&gt;
ChatGPT wrong. I'd type "explain functions" and get a wall of &lt;br&gt;
text I half-understood.&lt;/p&gt;

&lt;p&gt;After a year of trial and error I figured out that &lt;em&gt;how&lt;/em&gt; you &lt;br&gt;
ask matters more than &lt;em&gt;what&lt;/em&gt; you ask. Here are five prompts &lt;br&gt;
that turned ChatGPT from a fancy search engine into something &lt;br&gt;
that actually taught me Python.&lt;/p&gt;

&lt;p&gt;These work just as well in Claude or Gemini.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. The "explain like I just wrote it" prompt
&lt;/h2&gt;

&lt;p&gt;Explain this Python code line by line as if you're&lt;br&gt;
reviewing it with a beginner. For each line, tell me:&lt;/p&gt;

&lt;p&gt;What it does&lt;br&gt;
Why it's needed&lt;br&gt;
What would happen if I removed it&lt;/p&gt;

&lt;p&gt;Code:&lt;br&gt;
[paste your code here]&lt;/p&gt;

&lt;p&gt;Why it works: that third question is the magic. Forcing the AI &lt;br&gt;
to explain &lt;em&gt;what breaks&lt;/em&gt; if you remove a line teaches you the &lt;br&gt;
purpose of every piece, not just the syntax.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. The "find my bug without giving me the answer" prompt
&lt;/h2&gt;

&lt;p&gt;I have a Python bug. Don't fix it for me.&lt;br&gt;
Instead, ask me three questions that will help me&lt;br&gt;
find the bug myself. Wait for my answers before&lt;br&gt;
giving more hints.&lt;br&gt;
Here's my code and the error:&lt;br&gt;
[paste code and error]&lt;/p&gt;

&lt;p&gt;This one changed how I learn. The instinct is to paste your &lt;br&gt;
error and copy whatever fix the AI suggests. But you don't &lt;br&gt;
learn anything that way. This prompt forces you to think &lt;br&gt;
through the problem.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. The "translate to Python" prompt
&lt;/h2&gt;

&lt;p&gt;I want to do this in Python: [describe in plain English]&lt;br&gt;
Show me three different ways to write it, from beginner&lt;br&gt;
to advanced. Explain when I'd use each version in real code.&lt;/p&gt;

&lt;p&gt;Useful when you know &lt;em&gt;what&lt;/em&gt; you want to do but not &lt;em&gt;how&lt;/em&gt; to &lt;br&gt;
write it. Seeing three versions side by side teaches you &lt;br&gt;
that there's rarely one "right" answer in Python — there &lt;br&gt;
are tradeoffs.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. The "quiz me" prompt
&lt;/h2&gt;

&lt;p&gt;I just learned [topic, e.g. list comprehensions].&lt;br&gt;
Test my understanding with 5 questions, from easy&lt;br&gt;
to hard. Don't give me the answers yet. After I&lt;br&gt;
respond, tell me which I got right and explain&lt;br&gt;
the ones I missed.&lt;/p&gt;

&lt;p&gt;I use this every time I finish a tutorial. Reading code is &lt;br&gt;
passive. Getting tested forces you to actually retrieve what &lt;br&gt;
you learned, which is when it sticks.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. The "code review for beginners" prompt
&lt;/h2&gt;

&lt;p&gt;Review my Python code as if I'm a junior developer&lt;br&gt;
on your team. Be specific about:&lt;/p&gt;

&lt;p&gt;What's good&lt;br&gt;
What works but isn't idiomatic Python&lt;br&gt;
What's actually wrong&lt;br&gt;
One thing I should learn next based on this code&lt;/p&gt;

&lt;p&gt;Code:&lt;br&gt;
[paste your code]&lt;/p&gt;

&lt;p&gt;This one is gold. Most code reviews online are either too &lt;br&gt;
gentle ("looks great!") or too harsh ("this is terrible"). &lt;br&gt;
Asking for a specific format gets you the kind of feedback &lt;br&gt;
a senior dev would actually give you.&lt;/p&gt;




&lt;h2&gt;
  
  
  A note on using AI to learn
&lt;/h2&gt;

&lt;p&gt;The biggest mistake I made was treating ChatGPT as a &lt;br&gt;
shortcut. It's not. It's a tutor that's available at 2am &lt;br&gt;
when you're stuck. Ask it to explain, not to solve. Ask &lt;br&gt;
it to test you. Ask it to make you uncomfortable.&lt;/p&gt;

&lt;p&gt;The day you can write a prompt that teaches you something &lt;br&gt;
you didn't know how to ask for — that's when AI starts &lt;br&gt;
actually making you a better developer.&lt;/p&gt;




&lt;p&gt;If these prompts were useful, I've packaged 50 of them &lt;br&gt;
specifically for Python beginners over at &lt;br&gt;
&lt;a href="https://devpromptsbyrick.com" rel="noopener noreferrer"&gt;devpromptsbyrick.com&lt;/a&gt;. &lt;br&gt;
Same format, organized by what you're learning — &lt;br&gt;
fundamentals, debugging, projects, reading other &lt;br&gt;
people's code.&lt;/p&gt;

&lt;p&gt;What prompts do you use when learning Python? Drop them &lt;br&gt;
in the comments — always looking for new ones.&lt;/p&gt;

</description>
      <category>python</category>
      <category>ai</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
