Detecting bugs earlier than you normally would can boost productivity. The primary techniques for doing so are:
- Using non-nil types
- Unit tests
The first three techniques cause bugs to be revealed closer to their source which makes them easier to diagnose.
Unit tests find bugs for various isolated test cases before your main program even runs. The isolation factor makes it easier to diagnose problems than when errors occur in the main program.
See also: DebuggingTopics