People who suggest noise cancelling headphones to fix this are childish and immature. The employee has no moral obligation whatsoever to adapt to a working space that is not suited to the work at hand.
Putting expensive software engineers into an open office is wasting a resource that has huge running costs to save on a resource with less running costs. Although, I understand some places the cost of office space actually is quite high, and I realize in these cases the tradeoff has merits.
The problem with this is that management in other locations start to ape this inane concept even though their office space costs are considerably lower.
So, sure, if it costs an arm and a leg to have office space then just maybe an open office has merit financially.
I have nothing against shared rooms that are actually separated with walls as long as they are not used for hotdesking. Those don't have the same disturbance dynamics as an actual open office and I enjoy them the most of all the combination of work spaces I've been in 12 years as a software engineer.
"oh there's bob, does bob want to say hi or is he busy? he looks stressed probably dont want to interrupt him, should i say hi? nah well he's talking to fred now so i'll go back to fixing this unit test i guess...now where was i? oh look there's gary, i probably should say hi, (he's also a manager), does he want to talk about issue X if i interrupt him", nah it will probably piss him off without a meeting and a heads up, plus i'll look like a noob,
ok back to the code again..."
x 200 times per day.
everyday.