It should be stated that the flip side of not giving up is incurring the massive opportunity cost of years of lost compensation. That can easily be over a million dollars for a good software engineer.
If you're a genius, then sure, not giving up makes a lot of sense. But if you're just pretty smart, you better think two, three, or four times before committing to do a startup. It's really easy to end up over thirty and broke.