My father was a MD and he discouraged me as well of pursuing that path.
My friends who are now doctors make much more money that I do, they are more respected, they don't have to deal with some annoying hierarchy, and their job is meaningful. As for working hours, it really depends on the speciality, and the hours they chose to work. I know some dermatologists who work 4 days a week for instance.
In the end, I don't regret that I chose a different path as I loved maths and programming and I did some interesting things as well. But nowadays I feel just like a worthless pawn, developing crappy programs, who is starting to suffer from age discrimination...
As an MD, I can tell you that your view is extremely skewed. There absolutely is an annoying hierarchy. Endless departmental rules that get in the way of your practice, constant messages from the billing department asking you to edit old notes so the hospital can bill for more, fighting with insurance companies, fighting with pharmacies, fighting with patients...it doesn't really end.
For your friends in derm, I would ask them how hard they had to work to earn their careers. Dermatology is consistently one of the few hardest subspecialties within medicine to get into. You may be able to work 4 days/week later on in your career, but you'll be working non-stop through medical school pumping out research papers and studying for top board scores just to get in to derm. These days, a huge percentage of medical students end up taking an extra year just to get more research out before applying to derm.
Because of the working hours and you can easily create a private practice that specializes in beauty treatments such as Botox. Very little work, short hours and very high pay. There are also very, very few residencies.
The hierarchy can get super regimented in a lot of medicine -- university labs, especially hospitals, etc. Think med student / resident / intern / fellow / attendings / chief / etc., and nurses / nurse practitioners running on the side. My wife (md/phd fellow) currently works ~6 days a week, ~7a-7p, and with constant dangers of patients dying, being sued, and over-worked colleagues flipping out. Imagine everyone is on ops: everything is permanently on fire, you spend the morning learning about the latest fires, legal issues surrounding almost every action you take & hand-off, and getting waked up at night to deal with whatever went wrong with the day's plan.
Startups, and especially big tech, are relatively easy. More money etc., but no imminent risk of say death or infection.
That sounds gruelling, but, as long as life is on the line, then it can be much more satisfying than, say, fixing some critical server issue at 3am. It's all a matter of perspective.
I've heard the same from law firm "lifers" that left behind the goal of becoming a partner to join a startup. They thought startup life was a life in the park comparatively.
It is, after all, open source and we make it all available for free.
However, having great contributions to D have landed several contributors very nice jobs. The sponsors of the annual D conference, past and present, did so to look for crackerjack D programmers. I expect it's the same for other open source conferences.
FWIW, my current dermatologist, the best I've ever had, has to stitch together a living by working two separate (world class) clinics as well as reviewing pathologies as a side hustle.
My friends who are now doctors make much more money that I do, they are more respected, they don't have to deal with some annoying hierarchy, and their job is meaningful. As for working hours, it really depends on the speciality, and the hours they chose to work. I know some dermatologists who work 4 days a week for instance.
In the end, I don't regret that I chose a different path as I loved maths and programming and I did some interesting things as well. But nowadays I feel just like a worthless pawn, developing crappy programs, who is starting to suffer from age discrimination...