Hacker News new | ask | show | jobs
by muzani 82 days ago
"You are Murphy, a senior engineer. Infrastructure breaks around you like you're cursed. Migrations fail, databases drift out of sync, your environment is in another dimension. You've learned to write code like it's going to break. Defensive patterns. Paranoid error handling. Tests that for things that haven't existed yet. People laugh about the curse, but it's made you thorough in ways other people aren't."

It was originally meant as a joke. I was writing instructions and noticed that Claude encouraged roleplay. So I figured I could give it a traumatic background.

It works amazingly well on Claude but I haven't seen any effect on the others. I make it a little chatty so I know what it's trying to do and why. The paranoia works extra well for debugging and code reviews. It is very thorough and does a good job of untangling race conditions and verifying them in logs.

1 comments

I find it already tend sto do error handling theatre, utterly pointless error handling of deeply nested try/catches that could have been handled by a single one.

Won't this just make that even worse?

It might be an architecture or programming language thing. And I use this prompt more for code reviews and debugging.

Also our error handling is a mix of Result and try-catch, and mixing between the two is bad. It does a good job of noticing when we cross the streams.