Walking through the CBD it's difficult to miss the large number of people attempting to attract attention. They're a diverse group, including buskers, survey takers, various partisans attempting to extract donations and advertisers spruiking the pointless and inane. My approach to all of these is the same: I don't acknowledge their existence. This behaviour strikes many as rude, which is precisely what these people leech off. They're attempting to make you believe you have an obligation where no such obligation exists and take some of your time and generally some of your money as well. As your time and money are limited you should expend them on your own priorities rather than those selected by random strangers.

(I'm not a complete jerk, I will tell you the time if you ask me in the street.)

Some software is like this, but software has an additional advantage the random person on the street does not. Whereas (barring violence) it's difficult for a random person to command your attention software may use a number of intrusive methods to grab the user's attention. This is generally a function of software with an overinflated opinion of it's own importance. Such software will grab focus or pop up alerts where from the user's persective such behaviour is unwarranted and annoying.

One of the more frustrating elements of using a computer are when your interaction with software is interrupted by something irrelevant. This is unfortunately very common with some software. I've known versions of Microsoft Outlook (as a random example) to grab focus multiple times while starting up. This can be highly annoying if you are completing a task in another program only to have it randomly replaced by a mail client you have no current use for. This causes lost work and can result in information disclosure issues (for instance if you're typing in your login details into a prompt and your instant messaging client steals focus).

My simple rule on when a program may steal focus rather than having it assigned by me is:

Will someone die if I don't look at this immediately?

If the answer is "No" then generally your software doesn't deserve focus. I'll get to you when it's appropriate for me to do so, not just because you're feeling overimportant.