Prompts producing Python programs.
28votes
0answers
4.2kviews

One prompt for a polite, resumable web scraper that won't get me IP-banned

I needed to pull a few thousand product pages for a price-history side project. My first scraper hammered the site with 50 concurrent requests, got a 429, then kept retrying instantly and made it wors
12votes
0answers
1.3kviews

Measure-before-optimize prompt so the model stops tuning cold code

I asked a local Llama-3 70B to "make this data pipeline faster" and it micro-optimized a list comprehension that runs once at startup while ignoring the O(n^2) join in the hot loop. Textbook: it optim
5votes
0answers
968views

Splitting a 600-line god function into pure units without behavior drift

The worst function in our codebase does input parsing, three network calls, retry logic, formatting, and logging in one 600-line block. I wanted GPT to carve it into small pure functions plus a thin o
13votes
0answers
1.5kviews

Making the model generate a config loader with validation instead of raw os.environ reads

Half our incidents traced back to config: an env var typo'd to an empty string, a port that was actually the literal text "8080" compared against an int, a feature flag that was the string "false" (wh