There is this old-fashioned idea called "professionalism", which seems to have been inadvertently discarded along with dress codes, and of which they were once emblematic. Work is not home, is not friends (wholly), and is most certainly not college (unless it is).
I kid myself that if there was a better age, sex and cultural mix in software companies, these kinds of extremes would be tempered. It would be a start. Is programming the new advertising? Or is it just a side-effect of success?