I think swearing in public is very bad behaviour. And internet is public.
But, swearing when with group of friends is very diffrent. In such situation all now that I (anyone) don't intend to offend anyone (me), those words are just used to magnify the expression, to let the emotions outside. Of course, there is always a line which should not be crossed.
The last thing is swearing when beeing alone. Just like you drop your favourite coffe mug inside your computer which you repair, and it bursts, coffe turns your CPU and PSU into pile of junk. This is a situation when strong words really help to stop from doing something one may regret later (as for example, making a vow "I will never come close to computer with coffe again", or something) ;)