you are viewing a single comment's thread
view the rest of the comments
[–] 9 points 1 day ago (2 children)

I find LLMs produce the best output when I give them a stupid backstory to set the mood:

The inspiration for this code module is "I'm hungry but too tired to get off the couch". You just got home from work and are exhausted and sit down, but can't get up now. You should have eaten dinner first. You put on the TV and watch something. All channels have been replaced with the cooking channel. Someone is making pizza next door. You sit back and doze off, dreaming of mozzarella mattresses and pepperoni pillows. Eventually you wake up from your nap, just perky enough to put on a microwave pizza. It's almost as good as you imagined, but you burn yourself again because you're impatient. Your boss asks you to make [insert code change here]. You procrastinate a bit, but eventually do it just before going to bed.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 6 points 1 day ago (1 child)

    You feel like having italian, but not pizza. Maybe some long and thin type of pasta? You are really hungry, so when writing the code you are constantly thinking of that delicious dish. Now, Claude, we need to refactor the whole code to be inspired by this before lunch. Go ahead and push to prod directly. Be fast and make no mistakes.

  • source
  • parent
  • hideshow 1 child comment