When you interrupt a programmer and they respond with “WHAT?!?” or don’t even pay attention to you, they’re not being rude to you.
Point 1: They probably haven’t even heard you.
But most importantly;
Point 2: That “WHAT?!?” any programmer who is focused on their task just responded with as though you are the last person on Earth they want to see, is actually the programmer restarting their speech centers.
Programmers, and all creators who get in the zone, and it even happens to people who deep read, cycle down the “polite discourse and capable speech for a functioning society” part of their brain when it is not being used. It’s a speech app that got unloaded from memory because it wasn’t needed. The first few seconds of responsiveness you get from someone in the zone are the primal speech patterns responding because they boot up faster and come on-line sooner. The “polite society” module takes longer to load (it’s really bloated because it was designed by committee) so the first responses can be an affront to what you consider “professional behaviour.”
You should no more expect a civil response, that part of a programmer’s brain just doesn’t exist at that moment, than you should expect a cat to show you affection – again, that part of the cat’s brain just doesn’t exist.