On Learning to Code as a Physician or Medical Student



After discussing why physicians/medical students should consider learning to code and a key mistake that you should avoid along the way, it's time to talk about how to do it.

People who want to learn programming generally have three options: Going down the route of formal education and taking classes at a university, enrolling in a bootcamp for a period of roughly 2–4 months or trying to find their own way as self-learners.

The potential advantages and disadvantages have been discussed extensively in various blogs and forums from a general point of view. Today, I'd like to share my thoughts on how they apply to people in the medical field and what they want to achieve by acquiring programming skills.  

 

Formal education

Degrees and credentials are traditionally very important in the medical field. When I set foot in a US hospital for the first time, I was astonished by the amount of letters some people have after their name. While not all of these letters represent super impressive achievements, they demonstrate the desire to prove your ability with some sort of certificate.

This desire is understandable since it is very difficult for patients to assess the skill of their doctor. What most patients refer to when they meet someone who they consider 'a great doctor' is his way of communicating and the outcome of the treatment. While communication is certainly an important part of the skill set of a physician, it is far from being the only one. The outcome of the treatment can be representative of a doctor's skill but there are situations where the outcome isn’t satisfactory even though the doctor in charge had incredible skill and did everything right. However, a significant amount of the skills that a doctor should have, remains hard to assess.

As someone with training in radiation oncology, I can assess other people's understanding of oncology with decent confidence from the way they discuss their cases and the arguments they make in tumor board reviews. Yet it is still incredibly difficult to assess the skill level of other specialities, let's say vascular surgeons. I could stand next to them in the operating room and still be pretty much clueless if they're doing good work since I have no idea what good work looks like in that field. For patients who haven't spend a significant part of their life on medical education, this is obviously even more difficult.

Degrees therefore establish some sort of basic trust in the relationship between the doctor and the patient. If someone has completed medical school and is board-certified in the speciality where you as a patient have a problem, the likelihood that he knows what he is doing is a lot higher than for a random person on the street or a random person in the hospital in a white coat.

In computer science, formal education is less important. It is more about showing what you can do, ideally by impressive projects that you have done. Even the more competitive job listing usually require 'a PhD or equivalent experience' while you won't see anyone searching for someone with a 'degree in medicine or equivalent experience'.

Physicians are therefore often inclined to go down the path of formal education. This path has several advantages:

  • You learn a lot more 'from the ground up'.
  • You get exposed to things that you wouldn't normally look for but that might still be useful.
  • You get to know people on a similar path.
  • You get a degree when you finish.

Disadvantages include:

  • It takes time, usually years, and even hybrid/online programs have dates where you have to be present for exams which can make things difficult.
  • Depending on the country, it can be expensive.
  • You learn a lot of things that you will likely not use again.  

 

Bootcamps

The fact that you can get into programming without a degree is illustrated by the number of courses that try to enable you to get a job with just a few months of intense, hands on education. These so called bootcamps do this by focussing on more practical skills and leaving out some of the more theoretical (and sometimes outdated) aspects you will likely encounter in an academic setting. Bootcamps can be taught in person or online which has become especially prevalent during the COVID-19 pandemic. While online programs sometimes offer part-time classes (e.g. only in the evening), this is rarely the case for in person bootcamps.

Advantages include:

  • High focus on practical skills that you can use almost immediately to start your own projects.
  • You get to know people on a similar path.
  • Sitting in a room with other people learning to code for several hours a day creates accountability and keeps you going.

Disadvantages:

  • While completing a bootcamp is shorter than obtaining a degree, it still takes a few months where you don't have time for other activities.
  • Some of the theoretical things you skip might have been useful to you someday.
  • Bootcamps can cost quite a bit of money and you'll also need some savings to support yourself for the duration of the course since you won't be able to work much.
  • The pace can be pretty high which is especially daunting if you have no prior experience.
  • You might get a certificate when you graduate but not a 'real' degree.  

 

Self-learning

Studying on your own is probably the most feasible approach for people who have many commitments. Lets go over the advantages:

  • Total flexibility – you can create your own schedule.
  • You decide exactly what you want to learn.
  • Cheap/free – the amount of freely accessible resources online is incredible.

Disadvantages:

  • Sometimes it is hard to decide what you should learn.
  • No accountability – when you stop, it’s over without any barrier to doing so.
  • You don't get to know people.
  • There is no degree – projects are the only option to prove your skills.  

 

My suggestions

When you're a physician/medical student who wants to learn programming, you should ask yourself what you want to achieve with it. While there are some physicians who want to stop practicing medicine in the clinic and might even want to leave the field altogether, the majority seems to be more interested in programming as a way to advance their career within medicine.

What these people refer to when wanting to learn programming, is actually data science: Some programming, but also some statistics, maybe signal processing and in many cases one of the fancy ways to make better predictions i.e. machine learning in general and deep learning in particular. All of this, of course, in combination with a lot of domain knowledge in medicine.

If you belong to the first group and want to transition out of medicine, getting a degree might be an option for you since it equips you with a broad foundation to hop into another field. However, you should keep in mind that the combination of coding skills and your domain knowledge in medicine is a very strong asset…so maybe don't leave the medical field behind completely.

For the latter group, I'd suggest to start as a self-learner. You can start coding a little to find out if you enjoy it and (maybe even more important) can deal with the frustrations. While being frustrated is also a well-known feeling for many physicians, the feeling can be quite different when you're frustrated because you can't find the bug that's causing your program to crash.

In addition, trying to learn the things you actually need for your research in a degree program will take years and most likely involve a lot of additional self-learning anyway. Most degrees are designed to give you a foundation in computer science, while the data science aspects you're looking for, are often taught in more advanced programs that require a CS degree to even enrol. As data science continues to become more popular, there will likely be new opportunities to dive in immediately, but at the moment, this is rarely the case.

However, just because you will eventually end up doing data science doesn’t mean you can skip the basics of programming. There are plenty of resources online for almost every area of computer science. While I started with python, I can't really give a recommendation because I pretty much stuck with it unless there was absolutely no other option, so I never (voluntarily) tried anything else. Since python has a plethora of packages for scientific applications (numpy, pandas, scikit-learn), it is definitely not the worst choice for someone who wants to eventually do data science and use his acquired skills in medicine.

Two courses I can recommend in particular are:

Note: I really enjoyed both courses, those are NOT affiliate links ;-)

If you start as a self-learner and enjoy it, someday you might have the opportunity to do a bootcamp. Maybe you switch jobs and are able to schedule three months in between. In that case, your self-learning gives you a head start and you can get more out of the bootcamp since you are able to focus more on difficult concepts and not trying to remember the syntax. And even if you never get to do any full-time coding, you can acquire pretty decent skills by being persistent. Once you have published some papers using your coding skills, the lack of formal education becomes significantly less important.

Last but not least, I'd highly recommend always having a project to work on that is related to whatever course you're studying. It can be small, but it should be meaningful to you. I've written a whole article on tutorial hell and always having something that allows you to use the skills that you acquire is the best way to never get stuck and stay motivated. Since there are always things to automate/research/make more efficient at a hospital, you should have plenty of ideas!

If you found this article helpful, let me know! If you disagree with some of the things I said, let me know as well!

Get in touch