I have nothing but respect for people who have the grit and skill to go through a PhD program. Another side of the coin - dropping out of PhD studies after 6 months 10 years ago was retrospectively the best thing I ever did. Quitting is fine if one sees better opportunities elsewhere - NOT quitting when the only reason not to quit is an irrational fear of "being a failure" is equal to a sunk cost fallacy. I was quite familiar with the research setting at that point and moving to other things allowed me more space to grow professionally and meet new people with different views of life. Yeah, I choose OpenGL over density functional theory. This was a much better match for my limited math skills (compared to other physicists) and enthusiasim towards shiny things. I would have not quitted unless the new position had seemed like a very unique position, though - which it was.