At least where I am, we are both fixing the bad code and sharing unkind thoughts about its origin.
Could you elaborate?
I would hire someone who would boast how he or she wrote excellent code in tight schedule. Because I've done that. And I have seen plenty of bad code and people who were making that code and could not improve even after a considerable time, because they were morons.
Laughing about them is best thing you can do - worse if you have to cry, because they are still there. There are no good ways to deal with this type of bad coding if your company do not have laid foundation of good coding practices and don't follow them.
Professionalism IMO means not only knowing how to code but also work experience on different working environments to understand the difference between good and bad workplaces and predict where things will go south(or great). The things you have described doesn't sound appealing to me - that would not motivate me to code or do anything. And it seems that your coworkers who moved on made a professionally better choice compared to you that is hurt by someone laughing at how things were done before.
Just think about this in different light: new people are looking at you amicable - because criticism that they are making is friendly gesture. Your intentions on crushing this behavior is based in your insecurity. So, are you going to change them all... Again, question from dino - Why do you think that they have to change and not you?
I had a laugh about code - about others and mine. Like I mentioned before - these things can be only changed by changing culture of a company(or by finding a company that does have good coding standarts) and that starts by showing example of how to behave - including attitude towards importance of writing good code. If company has no such foundation and it has created environment for bad coders, then smart coders will initially nervously laugh and seeing that nothing changes will leave. Telling them to consider circumstances of bad code writing sends completelly wrong message. Pardon my expression but that is f*cked up thinking. And I am giving a very friendly advice to sort op's head first and think critically about herself/himself at first, if you and others seems to boldly rush to "help". Because all I read right now is that op thinks that op is justified to do something about others and not apply this attitude towards oneself.
Think about it this way - customers will not laugh at bad code - they will be angry, frustrated and will damage company in the end. Are you really ready to accept EA and Bethesdas blunders because you do not know circumstances of the past? Lol - this is exactly what op is asking to consider. Bad code is a very serious matter - and forcing someone not to laugh at it is great way for a company to go down. You know what - I am all for that selfish workers like op bring down bad companies by implementing more and more absurd ideas... this seems to be working just fiiine in the end.