3 ms·
The point of structure is to aid comprehension. If you throw out the requirement for the system to be comprehensible, you can write it any way you wish. Treati
by desc 7y ago
The point of structure is to aid comprehension. If you throw out the requirement for the system to be comprehensible, you can write it any way you wish.
Treating code as a black box with regard to making behavioural changes is essentially taking the worst aspects of TDD to extremes. It is not enough that it gives the right answers for your test cases, since you can only test a vanishingly tiny subset of all cases which need to be handled. It must be possible to reason about all possible outcomes, and that means removing unnecessary logic, not plastering over it.
- AstralStorm 7y agoAlternatively it involves actually mathematically proving that the function is used correctly, which is rather hard in sequential programming languages, and nigh impossible in parallel. Just proving the alleged "sync" works is a nightmare involving some proof or assumptions on underlying hardware. Exhaustive testing of parallel behaviors is near impossible too. Removing logic can only go as far as the essentials that are required for solving the problem.