Well, don't criticize then unless you want to own it. There's a variation of this advice wrt communicating with your boss, which is blindingly obvious to anyone who's ever been a manager, but rarely obvious to the subordinate: don't come to me with problems. Any idiot can do that, and many do. Come to me with solutions, or at the very least a proposal on how to solve problems that you're prepared to follow through on. This is basically the surest way to advance your career on any team, yet people just don't do it. Nobody likes the complainer, everyone, especially managers, likes the problem solver.
The question was how to deal with newcomers' arrogance, and your suggestion is to have them try and fix things to find out why it needed a bad solution.
What I tried to reply to you is that they may have no problems fixing the bad code because the reason for it to be bad may be gone.
Now, if I understand correctly, your reply to that is to "threaten" them with having to fix it? The point of my comment was that they'll have no problem in fixing it and they'll keep being arrogant because they'll "prove" that there was no reason for it to be bad.
EDIT: s/shitty/bad/. I meant no offense to anyone.
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.
At least where I am, we are both fixing the bad code and sharing unkind thoughts about its origin.