top | item 21865714

(no title)

aassddffasdf | 6 years ago

That all comes down to how well-designed the API is. Not all APIs are created equal but in the hands of a skilled designer, this functionality is priceless. Not only that but you can also look at the actual values to tease apart any meanings that seem ambiguous (but, once again, in the hands of a good designer those won't exist in the first place).

discuss

order

munk-a|6 years ago

I've seen a lot of "self-documenting" code in my time and it can be quite legible when starting in an organization that has good discipline... The issue is that there are always some weird edge cases and poorly named things that exist because "legacy" - in those cases a quick question should clear everything up, if you have access to someone in the know.

When it comes to APIs if you're eschewing documentation it's because (I hope) you are trying to minimize support costs and thus devs using the API won't have someone to ask questions of so those edge cases become mysterious and assumptions are made that may be wrong.

If you're designing an API that serves up items that may be on sale how would you name fields so that the price and possibly sale discount are unambiguous to read?