Tips for clinicians to start coding

I get it, long shifts in a hospital to not encourage the average clinician to learn how to code. There is no doubt that coding can improve your data handling abilities and automate some very dull tasks or improve communication and clinical outcomes, but the environment you work in can make it hard to get you coding skills off the ground. This isn’t the fault of your profession, colleagues or workplace. The main focus of your job is to help improve patient outcomes, not learn how to code. However, if you’re reading this then chances are you understand the advantages of learning how to code. Here are some tips to get you to a place where you can use your coding skills:


Picking a language 

This can be a daunting task. I wasted a good part of a year flittering between different languages. I tried to force hard low-level languages into my head between shifts only to forget what I learned the following week. As a result, I got nowhere and didn’t really develop a foundation. Although it might seem like a good idea to learn C++ because it’s one of the most powerful languages out there or sign up to online courses in Swift or Java because they are used in Android and iPhone app development this is a bad move. These languages are not easy to pick up and run with, they are compiled and they are easier to mess up in. If you pick these languages so you can write a phone app you will not only have to get your head around a tough language but you will also have to get to grips with the framework and operating systems around these phones. From no coding experience at all there it will be a long time before you develop something of use. As a result, you are highly likely to give up before completing anything.

I’d recommend an easy high-level programming language to start off with. Python is the one I always recommend to junior doctors. Once you get your head over the basics you can start playing whilst learning about the logic behind conditional statements, loops etc. This brings us nicely onto the next tip.

Screen Shot 2016-11-12 at 05.54.54.png

Expect to be bad 

I’ve had my fair share of junior doctors fall into the trap highlighted in the previous tip. They come to me saying that they want to code a phone app, or that they want to code an app for the computer system in their hospital. Whilst it’s good to have drive and a long term goal these outcomes happen further down the line. It’s along the same lines as saying that you want to be a cardiac surgeon, you want to play for a semi-professional football team, or that you want to play the violin for a local orchestra and you are going to make your first step to doing it now. Whilst competition varies amongst these examples they all have one thing in common, you have to gain some sort of general proficiency first. With the violin, it’s music theory, beats and learning how to read music and play the basics. With football, it’s understanding the rules of the game, recognizing general trajectories of balls and being physically fit enough to endure a full game before you start developing your football skills to get into a team. As for being a cardiac surgeon, an 18-year-old can’t become one by only learning about cardiac surgery. They will have to pass a general medical education at medical school and do rotations before they can apply for cardiac surgical training.

The same goes for coding. This is why I always advocate an easy language to get the basics.

Considering the previous tip hopefully, you can see why this is important. Playing is the best way to learn how to approach problems, complete projects and apply logic. Think about your clinical training. Yes, you were studying and sitting exams but in your clinical placements although you were putting in work you were kinda playing at being a nurse or doctor. The registered clinician had the responsibility of the patient and your interactions were sandboxed. Same goes for playing sport or music. You practice and play for fun before playing seriously. Coding is no different. An error that I see often is doctors learning code and directly applying it to their grand design. This is ineffective, confusing and not fun. Chances are you’ll write some confused long stream of code and give up half way. I remember trying to write programs to automate streaming processes in Accident and Emergency before I learned how to nest functions in classes. Looking back at it I’m not surprised I didn’t complete the project. Writing code for simple games like hangman will not only help you get to grips with logic quickly, it will make it fun. An introductory exercise I always get junior doctors to do is code a simple DVT calculator. The logic is simple so you can get used to conditionals and there has to be some score keeping and user input. For a quick tutorial on how to code a DVT risk score in python with no coding experience watch it [here].


Find tuition 

The last tip is to find tuition. This doesn’t mean that you need to find a personal tutor or attend a university. Finding tuition means going through a video series on how to code, paying to use a website or reading through a book and trying out the exercises step by step. Although you will get a slight buzz by hacking through problems and creating your solutions there have been well tried and tested methods on how to solve problems. You’d be silly not to use them in order to solve your bigger problems that you will come across when creating software. For starters, I recommend code academy [link]. It’s free and will get you up to speed with the basics. It also has interactive code challenges and gets you making mini projects. This is where I first started. Once I had completed the course I moved on to the paid site Team Treehouse [link]. I wouldn’t start paying for a course just to learn the basics. You can find tons of material but paying for a site like Treehouse to learn more advanced concepts like writing code within a framework so we can build a phone app of a website is definitely worth it.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s