2
Had a senior dev tell me my GPT prompts were too vague for code generation
He said to treat it like I'm giving instructions to a junior engineer who's never seen the codebase - now I specify exact function names and file paths every time, what's your go-to prompt structure for refactoring?
2 comments
Log in to join the discussion
Log In2 Comments
paul_webb4514d ago
Is it just me or does that advice apply to way more than just coding? I've noticed the same thing happens when I'm trying to give directions to someone or even explain how to use a new app. If I'm too vague, they get stuck and I have to re-explain everything anyway. Getting super specific from the start feels inefficient at first, but it actually saves time in the long run. Kind of like how I've learned to write out every step when I'm showing my dad how to do something on his phone, because "tap the settings icon" doesn't work when he's got six different settings icons on his home screen. The senior dev's point about treating it like a junior engineer is spot on, I've started applying that to how I write emails and even how I leave sticky notes around the house.
3
ruby_sanchez4514d agoMost Upvoted
Oh man, the dad phone thing hits way too close to home (I've literally had to draw arrows on a screenshot for mine). But you're totally right, it's like we've all been trained to think "specific = annoying" when really it's the opposite. I catch myself doing this with everything now, even leaving notes for my roommate about the dishwasher. Like, "put the soap in the little door" is apparently not enough info when you're tired at 10pm. The senior dev probably didn't realize they were dropping life advice along with coding tips. Though I have to admit, I once wrote a three page manual for how to use the TV remote and my mom still called me to ask which button was "the one that makes the numbers show up". So maybe there's a limit to how specific you can be before people's brains just shut off anyway.
5