4 ms·
I have a method in our Java app`iKnowWhatImDoingGiveMeTheSession()` that will only work if you have set the system property `doYouReally=Yes, I really know what
by Bjartr 4y ago
I have a method in our Java app`iKnowWhatImDoingGiveMeTheSession()` that will only work if you have set the system property `doYouReally=Yes, I really know what I'm doing`
It should never be used in production, but can be helpful to have available when doing certain kinds of investigation.
- deleted 4y ago[deleted]
- thehappypm 4y agoWhat you’re describing is a debugger!
- febusravenga 4y agoAll my migration/tweak-production-db scripts run by default in dry run mode and require `--really` to override it. It's good excercise to write mutating code as much transactional way as possible.
- Bjartr 4y agoA debugger doesn't remember the proper steps for me, a written function does. I absolutely use this function in a debugging context. If it didn't exist, could I get at what I needed? Yes, but it's inconvenient to use reflection to get at private Java fields during a debugging session. Not impossible, just inconvenient. This function exists as a convenience, but it has to look weird, otherwise its convenience might lure someone into using it to do the wrong thing for a production use case. Good APIs make the right thing easy and the wrong thing hard.