Thursday, March 19, 2015

Junk In, Junk Out ...just let it be when playing middleman for an API

Imagine this, others will submit data to your code, your code will do its thing and then hand off to another, third party API or perhaps get back stuff from the other API as a part of doing its thing. It's probably wise not to sanity check the users' stupidity to prevent them from handing in values that don't make sense at the API. A time hole comes in being "clever" like this and you are possibly limiting your own feature by limiting the API. You need to be able to tell the red-headed step child "You be you." and if it isn't solving a problem itself you probably should not take it upon yourself to build a fortress around it. There could be a valid reason why the API behaves as it does or has been left wide open. Don't try to warp the expected behavior.

No comments:

Post a Comment