I recently took on a contract job that will largely involve generating data feeds from my client's data and sending it to external partners, via feeds and API invocations.
I've always found this particular kind of coding to be frustrating, for a number of reasons:
- You have to rely on specs, which often diverge from the actual implementation or simply don't go into sufficient detail
- You have little to no ability to see into the external system, to ensure that your data has been accepted and interpreted properly
- If there's any kind of problem with data you've generated, it's not always straightforward to back out the changes and try again
- External testing and staging environments frequently diverge from production logic and the production database
What are some best practices for doing this kind of work?
Creating mocks and stubs won't necessarily resolve my problems, as my real concern is: do my feeds have the correct effect on another system, which is basically a black box? Mocks simply duplicate my assumptions.