| ▲ | What Is a Property?(alperenkeles.com) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 points by alpaylan 5 days ago | 14 comments | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | skybrian 25 minutes ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The property being tested in this example is “after inserting a row into a database table, the same value can be read back again.” The insert statement isn’t independent of the database because the table needs to exist and it’s schema has to allow the inserted values. If the database is generated randomly, you need access to it to generate an insert statement that will work. This is straightforward to do if the library is designed for it. Using my own TypeScript library [1]: const insertCaseArb: Arbitrary<InsertCase> = arb.from((pick) => {
Why might that be difficult? Some property testing libraries don’t let you call a pick function directly. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | happytoexplain 3 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Maybe I have a bit of a brain problem, but for me, 90% of the effort that goes into learning anything in tech is spent on identifying which nouns are Nouns, and which are just nouns, and the (often mushy) semantics of how people use those nouns in varying contexts and sub-contexts. I understand the reasons for this complexity - domain-specific terminology is valuable and forms naturally from pre-existing words. It's just that, in tech, everything is abstract, and everything consists of multiple contexts spread across multiple dimensions (vertically, in abstraction layers; horizontally, in use cases), so the domain-specific terminology explodes like an exponential web. Sometimes I'm talking to somebody and they are using some word, and it takes me days to even realize that they are using it in a much more specific context than I assumed. It's a little hellish. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | cristoperb an hour ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I missed the "a" in the title and expected something about Proudhon | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||