As a doctor/nurse who wants to start coding you will be wondering what language to start with. As I am currently writing this post I am still pulling shifts in the Emergency department. Considering the time I have available and the main purpose of why I am coding (data analysis/machine learning) I have chosen python as my primary language. Don’t get me wrong I have released an app on the app store which is coded in objective-C and swift and I have dabbled in C++. However, my main language of choice is Python and here’s why.
I have come across some Ph.D. nurses and doctors who shy away from coding because they think it’s too hard. Python is a high-level language. I’ve already written about this in a previous post: Doctors and Nurses don’t understand code In short because python is a high-level language it’s quick and easy to develop. You don’t have to understand much about computers to code in python. The focus is more on how you break down the problem/project and how you approach it. For a starting, powerful language python is a good choice. You will be able to supercharge audits, analyze data and automate simple tasks. Python is powerful enough to apply machine learning. Although this language is easy to pick up it is not a toy. Astrazenica uses python to develop their drugs. Youtube was initially coded in python.
Interpreted not compiled
Python scripts are not compiled. This means that they are not standalone programs that will run by themselves. This has its good and bad points. A compiled language is generally faster and you don’t have to have a python interpreter in order to run the script. However, once it’s compiled the code is encased and cannot be changed. The python scripts are run in an interpreter which can be downloaded for free at python.org. This means any python script can run on any computer with any operating system. It also means that anyone running the program on their computer can access the code and alter/improve on it. This makes it terrible if you’re going to sell the programs but it makes it amazing for scientific collaboration. For more on this please read: just learning code isn’t enough
Strong science community
Python has modules which you can install to perform tasks. For instance, if you wanted to scrape data off websites you can install the beautifulsoup module. If you want to produce the automated pdf reports that chart your data you install the matplotlib module. These modules are all free and there is a vibrant science community continually developing scientific modules. Scipy is a strong scientific community but there are others out there. These communities make python a fun dynamic powerful language. Who knows maybe one day there will be some nursing and medical modules developed.
Hopefully, this post has made you a little more decisive in your coding adventure. If you’re new to this I always recommend visiting python guide for biologists. Once you get through the basics it will change the way you see problems, approach them and solve them. You will mildly annoy your clinical colleagues trying to find what problems you can solve with coding. They will mildly annoy you as they will not fully understand what is capable with python. Keep at it and best of luck. If you do something contact me. I always get excited when I hear a clinician decide to take on coding/maths and tackle clinical problems.
2 thoughts on “Why I picked python as my main programming language”
Hi, I’m about to finish my nursing degree in the next few months. I was wondering what your insights are for nurses interested in learning Phyton programming language and how it can be integrated in nursing practice. I’d appreciate your insight. Thanks – Gayle
Hey Gayle. Programming is a tool, so python can be used for pretty much anything. If the person understands the problem, then they can use python to speed up and automate a process in solving that problem. This even happens in programming. Software engineers are always automating parts of their jobs so they can focus on the interesting things. Straight off the bat python can be used for sorting and categorising data. You can also spin up servers with python frameworks. These can be used to collect data. You can webscrape, or serve data as an API to nurses who need it. A simple bed management messaging system can be built using python. A checklist server can be built so you can audit the checklists nurses do with a click of a button. The list is really endless. I am based in London. If you’re around here then send me a message through the contact session.