Elektrine lite

← Feed

@alwayscurious@infosec.exchange

Post #2270888

2026-05-08 18:56 UTC

@phillmv@hachyderm.io @AT1ST@mstdn.ca @brib@bribstodon.xyz @jneen@unstable.systems The other part is that one needs to know the expected behavior before writing the tests, and I often don’t know the expected behavior before I write the code that implements it. I write the code as I figure out what needs to happen.

Replies (1)

  • @phillmv@hachyderm.io 2026-05-08 19:00

    @alwayscurious@infosec.exchange @AT1ST@mstdn.ca @brib@bribstodon.xyz @jneen@unstable.systems in static languages the mock satisfies the type; in Go we use an interface but in Java you could have an abstract class iirc? it's just more work but the same basic idea applies > and I often don’t know the expected behavior before I write the code writing the tests performs this same function; start a high level then get more specific, writing the tests teaches you what you want the program to do :)

    Open ##2270889