I view coding as creative work not that different from writing or drawing. Sure there are techniques and rules to follow, but to do great work you need to get in the flow of things until your creative brain figures stuff out on its own. It takes time to warm up and any interruption destroys the momentum you had. I put my phone on airplane mode for most of the work day because of this.