Coding while someone is talking nearby can be downright impossible
Only if you are interested in what they are saying.
I can happily program away with somebody sitting right next to me and addressing me directly. Also, listening to music with intelligible lyrics is no problem at all. Having the a video playing while programming is also no problem whatsoever.
The key here is that I can only focus on one stream at the same time and will not process the words of the other stream at all. If I focus on my programming, you could say to me that a beautiful and sexually skilled nymfomaniac is waiting for me in the next room and I would have no recollection of that a minute later. I might have a subconsciously induced boner, but I would probably attribute that to looking at my sexy, sexy code.