> they were written in an absolutely horrible way with no documentation nor comments
Clearly not talking about a good programmer here, are we? Maybe one with some specialized knowledge, but deficient in other areas.
> According to you, (s)he should have been fired because the code wasn't maintainable
Damn right. It's possible to write maintainable code in any domain. The burden of doing things besides code - documentation, tests, proofs, whatever - gets higher, but that's part of the job.
> it would require top-end education in distributed algorithms, formal verification beyond mere PhD
This is exactly the kind of stuff I do every day. Have been for many years. And I hand it off to others who are able to maintain it. So I don't think your story proves what you want it to. Working in a difficult problem domain is a challenge to do better, not an excuse for doing worse. "Your friend" wasn't demonstrating greatness. "S/he" was demonstrating great carelessness and lack of discipline - hardly qualities I'd expect in someone who claimed to be passionate about their profession, and certainly not qualities I'd reward with continued employment.
Sorry, this sounds like a nitpicking. It's akin to saying that Peter Sagan is a loser, because unlike Chris Froome he will never win Tour de France GC. Not to mention Mark Cavendish or Marcel Kittel, who are complete losers.
People have various talents and their mental capacity is used best accordingly; if you start forcing them to do work that "hurts them", their best parts disappear, you won't get any results and their lives will be miserable. All because you decided how it must be while ignoring nature.
Just out of curiosity, are you a German? I see similar thinking around here a lot.
> if you start forcing them to do work that "hurts them", their best parts disappear,
No offense, but this is starting to sound a bit Nietzschean. The ubermensch is how he is. He need not change, bears no responsibility for improving himself or finding another job more suited to strengths and weaknesses, others must accommodate. Bollocks. Skill must be matched with discipline, or else it's worthless. I'm sure your TdF idols would agree. If they couldn't apply discipline to do the job in front of them and to keep getting better at it, they wouldn't be in the Tour de France.
> Just out of curiosity, are you a German? I see similar thinking around here a lot.
No, but thanks for the stereotype. I know some Germans, I've been to Germany pretty recently, I think I'd fit in pretty well there, but I'm not German. (Actually there might be a percent or two of German blood in there, but there's far more Irish.) It's also pretty ironic that you'd say I seem that way, since you're the one echoing a German philosopher.
Clearly not talking about a good programmer here, are we? Maybe one with some specialized knowledge, but deficient in other areas.
> According to you, (s)he should have been fired because the code wasn't maintainable
Damn right. It's possible to write maintainable code in any domain. The burden of doing things besides code - documentation, tests, proofs, whatever - gets higher, but that's part of the job.
> it would require top-end education in distributed algorithms, formal verification beyond mere PhD
This is exactly the kind of stuff I do every day. Have been for many years. And I hand it off to others who are able to maintain it. So I don't think your story proves what you want it to. Working in a difficult problem domain is a challenge to do better, not an excuse for doing worse. "Your friend" wasn't demonstrating greatness. "S/he" was demonstrating great carelessness and lack of discipline - hardly qualities I'd expect in someone who claimed to be passionate about their profession, and certainly not qualities I'd reward with continued employment.