In "The Pragmatic Programmer," Andrew Hunt emphasizes the relationship between trust in code and the level of surprise experienced when issues arise. The premise is that the greater the confidence developers place in their code’s reliability and functionality, the more unexpected and significant their reactions will be when it fails. This highlights the importance of understanding the limitations and potential failures within software development.
The author suggests that developers should cultivate a healthy skepticism towards their code. By maintaining an awareness of possible faults and embracing the reality that problems can occur, programmers can avoid the shock that comes from unexpected failures. This mindset encourages vigilance in coding practices and fosters a more resilient approach to software engineering.