Comment by theshrike79
21 hours ago
No, the code isn't what defines it. It's the tests and specs around it.
Code should never be the only source of truth.
Another shitty analogy: baking.
Saying "code is the medium of the definition" is like saying "the cake is the medium of the recipe". So anyone wanting to make the cake or change how it's made should just dive into the cake and start analysing it.
That's why we have recipes, and even they can be modified as long as the exepectation is met: It has to be sweet, soft, covered in something white and must have strawberries inside.
Code should be the same, I should be able to toss the whole codebase in the trash and regenerate it from the tests and written specifications. If I can't there's something wrong with the process.
> That's why we have recipes, and even they can be modified as long as the exepectation is met: It has to be sweet, soft, covered in something white and must have strawberries inside
How sweet? How thick should be the covering? What’s the ratio in strawberry? Even for someone taste, which is subjective, expectations may be precisely defined.
Code is the most precise form of specs. It is not what the computer runs. The computer has no concepts of functions, objects, value types, files, buttons,… We have tools that takes code and transform into what the computer can understand.
What you say is specs is merely some doodling which always need to be properly transform into good engineering drawings. Or someone’s humming that needs to be written properly in a music sheet.