At the most disruptive place I finally arranged it so I worked at home on Fridays and Monday through Thursday were used to answer questions, attend meetings, do shallow work and do exploratory work for deep work. For instance, you need to do a refactor for a new feature or a bug fix. Is the code going to just let you do it, or will this change require another, and another, and another to get things working again?
So most Fridays I knew exactly what I needed to do and I coded for a solid six+ hours. And having already poked around I typically got about twice as much done in that time as I typically would in a day.