|
|
|
|
|
by xavdid
133 days ago
|
|
I like this pattern a lot, but it's important that the code in the dry path is representative. I've been bitten a few too many times by dry code that just runs `print("would have updated ID: 123")`, but not actually running most of the code in the hot path. Then when I run it for real, some of the prep for the write operation has a bug / error, so my dry run didn't actually reveal much to me. Put another way: your dry code should do everything up until the point that database writes / API calls / etc actually happen. Don't bail too early |
|