To be honest, in my experience, programmers are like the classic stereotype of sailors. Swearing is practically part of the language. I'm surprised no-one ever introduced it into an actual programming language. Heheh, imagine if GOTO never existed and was replaced with
(Mode Edit...only warning).
It also gets a lot more prolific once you leave school/college and enter business. I think it's the stress of getting programs to work and basically having deadlines which put your whole job on the line. I've seen programmers punch monitors for example and chuck phones and keyboards across the room, or even be huddled up in the corner having a bit of a cry. A bit of swearing in comparison is nothing.
Heh, reminds me of that comedy sketch (Fast show maybe?) where an undercover agent is found out when he doesn't swear.

It was all, "Golly lads, I'm no dirty copper. Darn you for such a comment!"
On the other hand it depends on the situation. I've never sworn in front of a client (I'm practically McSweary at work) unless on the rare occasion they swear all the time, and have never ever sworn in front of my parents (unlike my sister who does it all the time). Apart from one time on a really icy road (with a cliff on one side) with my mum and I was driving, and an idiot overtook me on a blind bend and hill. Well icy too. I instinctively yelled out what a darn fool he was (increase sweary factor by about 100 times). Then I realised my mum was in the car. Neither of us said anything ever...
Cheers
I am 99% probably lying in bed right now... so don't blame me for crappy typing
Current fave quote : "She was like a candle in the wind.... unreliable...."