When talking about productivity, it's important to acknowledge the difference between speed and progress. While working uninterrupted is great for development speed, it might also lead you down the rabbit hole, working with irrelevant features of your liking. I find that regular interruptions helps setting a new course before going too far in the wrong direction.
This is one of the reasons why agile methods work so well. Small tasks limits the scope of concentrated work, reducing the risk of going astray. Pair programming offers a watching party, who can guide and direct while you are busy tunnel-visioning some small method.
This is one of the reasons why agile methods work so well. Small tasks limits the scope of concentrated work, reducing the risk of going astray. Pair programming offers a watching party, who can guide and direct while you are busy tunnel-visioning some small method.