I’m not in it for the money. The money is a barometer of something else. If someone can make money in this business (not that hard to do), then something they wrote is successful at some level.
I can confidently say that 90% of the code I have ever had to maintain is total garbage. I am often stunned that it even runs and I used to wonder how it ever made it into production. (I don’t wonder any more, now I know, hardly anyone QA’s source code anymore.)
(Another example: Today I refactored 1200 lines of code that edits credit card numbers down to 46 lines, removing 4 bugs in the process. This has been running in production for 18 years. This is not a joke.)
I realize that what I see is not a random sample of all code. I never get to work on the good stuff; no one does - that’s the whole point.
My work, on the other hand, has been wildly received by my customers and users for many years. I love what I do and love providing value to others. I can’t imagine doing anything else.
For some reason (my internal metaprogams or something), I am much more highly motivated by seeing someone else’s garbage doing well and thinking, “I can do WAY better than that,” instead of people saying, “That was good.” I don’t know why.
Also, it’s my experience that most people do not see the possibilities for truly excellent software (present readers excluded, of course). They believe they have to put up with my previous example. I can’t wait to show them otherwise.