For starters, this is not an easy position to be in. I'm posting this from a throw-away account so I can be maximally honest and transparent about my own choices. Please note that everyone's advice to others is often the advice _they_ wish they had been given, so take it with a grain of salt.

First, I have changed my career many times -- from a neurobiology PhD student to an electrical engineer to an AI startup CEO back to an applied math / ml postdoc and now a professor who works on bio-adjacent things. I'm pretty old for my field, and just getting started. There's a little bit of age discrimination (young hotshots are rewarded, which has a compounding effect) but it's thus far been ok. I have happily helped place students older than you, after a CS masters program, in successful tech-company-style jobs. So it is possible. I've also considered getting EMT training so I can better understand the technical challenges and market opportunities present in the emergency care space. So I might be envious of your position.

And medicine is hard. Incredibly hard, for-bullshit-reasons hard. MR had a nice piece https://marginalrevolution.com/marginalrevolution/2021/12/wh... "What's wrong with physicians?" in which a commenter talks about all the ways in which medicine is difficult, as a field. This often isn't fully appreciated by skeptics.

But there are _so many_ options for someone who both knows medicine and knows how to code. I've had friends in your position finish their MD and instead of doing a residence, go work at a medtech startup, or go get a CS masters and then do a medtech startup themselves, or go work on hard ML-and-AI style problems at a big tech company. It's all possible, and your domain knowledge is incredibly useful.

HN tends to have a _lot_ of autodidactic people who have self-taught themselves a lot, and there's sometimes (not always!) a tendency to discourage or disparage domain expertise. We see this in a lot of tensorbro-trying-to-reinvent-radiology startups. Your knowledge is valuable. You can know where the problems are. You can know what the state-of-the-art solutions are. You can know how to fix them, and what opportunities exist.

So if you still like medicine, as a domain, or have any interest in developing that part of your skills, I highly encourage you to explore how you can use your CS skills in that context. It's going to be valuable for a long time.

One of the biggest challenges facing American medicine is going to be how to deliver more care with less labor. We forget that doctors in the US are very well-compensated (especially specialists) and that we have an oncoming wave of retirees that are going to massively strain the medical system. Thus there's tremendous interest in using technology to help make medicine more efficient. This is a massive market opportunity.

I'll give you an analogy: when people think of "automation", they often think of analogs to Amazon's (vaporware) drone delivery. Or even Amazon's kiva warehouse robots. Or Amazon's (not ideal) recommendation system. They forget the tremendous impact that basic automation like the checkout scanner had on retail.

Much of modern medicine is still in need of its automated checkout counter. We want AI radiologists and robot doctors, but we still can't get people to take their pills on time. So much of electronic medical record data is still complete and total crap. So much care is unnecessarily delivered in extremely expensive hospitals.

In short, if you can try out your coding skills a bit (consider a summer internship, or talking to people in the CS department who are collaborating with doctors, or the like) then I think you're going to have tremendous opportunities, regardless of age.

Finally, finishing med school shows that, as Joel famously said, you're both smart _and_ get things done.