Hacker News new | ask | show | jobs
by nicodds 3122 days ago
Suppose you are a physicist and you have a theory you want to test, ok? Then, you design an experiment to test your theory. If it fails, you are sure that your theory is wrong. Otherwise, you know that it works, unless future experiments show that it fails.

In my opinion, this is pretty like Test Driven Development, which has lots in common with the practice of physics (aka Popper's falsification).

2 comments

In this physicist's opinion, that's a fairly strained analogy. I sort of chuckle a bit when I hear things like "code coverage" and "test driven development" and the like. These things are dressed in the robes of empiricism, but there's very often a lack of genuine rigor that makes the analogy a bit of a stretch.
It could also mean that the experiment didn't approximate the ideal you were aiming for. It's not nearly that simple.

TDD has almost nothing in common with physics. Engineering is about repeatable process. Science is about repeatable results. Testing, CI, and all the rest are part of a process of repeatably shipping releases of software that are functional. That's all a distraction for science (though some engineering may be necessary to construct the apparatus you want).

TDD is one solution to the troubles humans have when designing complex systems where the entire solution can not be arrived at through a constructivist approach. Put differently the solution is to complex for a human to keep in their head at once. I came to this conclusion after reading “notes on the sysnthesis of form” by Christopher Alexander

TDD is about people, not software.