• 0 Posts
  • 4 Comments
Joined 2 years ago
cake
Cake day: April 10th, 2022

help-circle

  • The solution is not centralization, the solution is a protocol. The team at Flattr tried to do something that worked for content, but it was centralized. The team at Ganxy tried to expand the definition of monetize, but it was centralized. If we had a protocol where teams could publish metadata that enabled users to use any data-driven app to generate some form of compensation for the contributors, then we could build all sorts of workflows into package managers that made it easier.




  • It means do not test HOW it is done, only test WHY it is done. Obviously you cannot test an abstract interface, only an implemented one. However, you should not be testing HOW it is implemented. Instead, you should be testing that given X input you get Y output based on the expectations set in the interface.

    For example, take method F(x, y) that is designed to take in an identifier x and use it to fetch you a record from some persistence object y. Testing the interface of F(x, y) would mean testing that given the input x you get what you expect from the persistence object y. Testing the implementation would mean testing that F(x, y) issues a call to a specific method of y. For example, if y has an interface with methods getRecordById, getAllRecords, and searchRecords, testing the implementation means asserting which of these methods gets called (usually with a test using a mock object that can be interrogated in this way). Testing the interface means not caring which of these methods are called when satisfying the request for F(x, y)