Please be more careful when putting out/framing your personal thoughts than this. It's the same category as racism.
Actually, your title would be better off without "thinks they're better than everyone", too, since (unless you have a mind reader) that's not a direct observation either. If you describe your situation more factually and neutrally, you might get a better response from the community. Just a thought.
I’ve worked with a few. They’re usually solid over-achievers in general, and have gotten by with their toxic personalities due to their above-average output. They’re a burden on those around them but management just see the output so don’t really care.
I’ve quit jobs due to people like this.
I don't know what "bad code" is (undocumented?), one of them really like his tricks (especially obscure ones), but each time document what the line does. Also, and i think this has to be because we were taught that at the school, they really like small functions (more than 20 lines of code and they start sweating) and modular code, so i guess to me it is really good code (i was at the same school)
This is a management problem manifesting as an IC problem. If management is aware of this jerky behavior and lets it continue, they're hobbling the team and limiting their overall productivity. If they're unaware of the problem, they're just clueless.
Either way, you probably want dip out on that team. If you're the conscientious sort, you can tell them why as you go.
Also:
> 10x engineer
> he steals work from others
> It’s also really bad code so he’s the only one that can understand it and refuses to document or explain what is going on
10x more code produced != 10x better engineer. When people talk about "10x engineers" they usually mean the latter.
I've worked with people who were truly 10x engineers and others who just thought they were 10x engineers. The actual ones did this by succeeding in the context of the broader team. The ones deluding themselves just made everyone else miserable, and then left messes to clean up when they left.
Bottom line, working with someone who is autistic can be extremely difficult, but it’s not their fault, it’s mostly their defense mechanisms in response to the way people are treating them.
Whether the behaviour "comes from" his autism or not should not have any bearing on how you deal with it. (This is not legal advice)
Do you not have a code review step to prevent bad code from entering the repository?
If he steals work he steals work, less to be done by you. If he crashes and burns, so be it.