Skip to main content
What types of page to search?

Alternatively use our A-Z index.

Lost on your coding journey? Our pharmacology researchers can help

Posted on: 15 September 2025 by Rebecca Derrick in Developing the Long-acting Pipeline

Dr Rajith Rajoli is working on modelling software at his desk, the blog title is written over the top

National Coding Week is a UK designated awareness week that begins on the third Monday in September every year.

Why National Coding Week?

The aim of this campaign is to bring together digital literacy and coding in an engaging way. The world, especially the digital world, is rapidly changing and building some coding knowledge can be really beneficial in many walks of life. From a future forward perspective, its importance as a skill will only grow.

Directed by Professor Andrew Owen and Professor Steve Rannard, the Centre of Excellence for Long-acting Therapeutics (CELT) is rooted in creating long-acting versions of existing medications, our team spans the preclinical parts of that work. We’re a cross-faculty team with a mix of materials chemists and pharmacologists. If you don’t know why a team like us would be heralding National Coding Week, we’d completely understand, but coding is actually an incredibly important part of our work that keeps our medical research efficient.

To explain this, we spoke to two of CELT’s modellers who are the leads in all our coding-based work. In our conversation with Dr Henry Pertinez and Dr Rajith Rajoli, we started the discussion with what CELT uses coding for, how they both found themselves on this career path, what the patient benefit of our programming work is, and where they would recommend other people start their coding journey.

What is mathematical modelling?

In the most general sense, mathematical modelling is an umbrella term for developing a means to describe something in the real world, a model, using mathematical language. This includes equations that describe responses, shapes, patterns and trends of the real-world thing in question, and where the nature of these responses, shapes, patterns and trends are governed by the values of parameters in the equations.

In CELT, our modellers are pharmacometricians, applying a range of mathematical modelling approaches to pharmacological problems and data. This is most often the description of pharmacokinetics, the time course of drug exposures in the body following a dose. However, modelling approaches can be applied to many other kinds of quantitative pharmacology data as well.

Modelling goes hand in hand with simulation, if modelling is trying to get a model to describe something in the real world in the first place, the simulation is running the model to check it describes what you want it to. Then, more importantly, we simulate the ‘what if?’ scenarios that inevitably present themselves. In a pharmacokinetic context, this could be as simple as asking “what happens to drug exposures if I double the dose?”, after having got a model to describe pharmacokinetic data at a given dose. All sorts of more complex questions can arise and can be addressed by models of varying complexity.

What does CELT currently use coding for?

For Dr Pertinez, while mathematical/pharmacometric models could be developed, calculated and implemented with pen, paper and a calculator, for all practical purposes pharmacometric modelling and data analysis is done on computer. Coding is the essential skill for implementing and running the models we need on a computer platform. Coding is us ‘talking’ to the computer and telling it what we need to be done.

In the case of pharmacokinetic models, this means

  • Coding for model equations to describe the different dosing routes and regimens, such as oral, intravenous, intramuscular, and the frequency of administration
  • Coding equations to describe the disposition and journey of the drug through the body - its ADME, ‘absorption, distribution, metabolism, excretion'
  • Using code to create statistical models of populations where the parameter values governing the ADME processes vary across a distribution, leading to consequent variability in the model descriptions of exposure
  • Coding is also needed to write computer programs to estimate ADME parameter values that best describe raw data.

In Dr Rajoli’s work, the primary focus is on physiologically-based pharmacokinetic modelling, a bottom-up approach that integrates laboratory-generated data and compound-specific parameters to predict real-world pharmacokinetics. In this case, specifically how drug concentrations change over time in various organs and tissues of a virtual individual or species.

To perform calculations efficiently and accurately, he uses coding to instruct the computer to carry out the necessary computations. Physiologically-based pharmacokinetic models rely on complex systems of differential equations, which are not practical to solve manually.

How did they find themselves in this line of work?

Dr Pertinez was initially a Drug Metabolism and Pharmacokinetics lab scientist in the pharmaceutical industry. He left that area to do a PhD specialising in pharmacometrics, where coding became an essential tool, and he’s been an academic pharmacometrician ever since.

During Dr Rajoli’s PhD in pharmacometrics, he initially used a tool that generated models behind the scenes without requiring direct coding. However, he soon encountered its limitations, which motivated him to learn programming through online courses.

What coding languages do they currently use and how did they learn them?

Dr Pertinez codes mainly in R to do pharmacometric modelling and simulation, parameter estimation and now often production of most graphics too. He learnt R having used Matlab mainly during his PhD studies, as R is open source from the ground up with a large user community and endless freely available code libraries.

Although plenty of courses exist for most computer languages, many of them free and online, the main way Dr Pertinez learnt was through application to problems and tasks that needed to be done during his PhD. Essentially, he learnt practically and on-the-job.

Dr Pertinez firmly believes that computer languages are like human languages – the only way to achieve fluency and be useful with them is through immersion and then continual regular use and practice. Classroom/formal learning will only get you so far, and eventually you will only get really good if you ‘live abroad’ for a while, as it were. Once you get some confidence and see how useful the skill is, it all becomes worth it.

Dr Rajoli had learnt C during his undergraduate studies, which gave him a solid foundation in how coding works. One of the aspects he appreciates most about programming is the availability of free, open-source software that offers great flexibility in application.

He began learning Python because of its simpler syntax and widespread popularity, which made it easy to find high-quality online courses. After gaining experience with Python, Dr Rajoli transitioned to the Julia programming language. Its similar syntax made it easy to learn using the official documentation, and it offered powerful libraries suited to his needs. By this point, understanding new programming languages became much easier, and he was also able to work with R, as Dr Pertinez used it in their projects.

What is the patient benefit of the tasks or projects that you work on?

Pharmacometrics has become a vital part of modern pharmacology, by applying modelling and simulation methods to quantitative pharmacological data. Patients benefit from how data analysis, modelling and simulation improves the design, understanding and interpretation of the experiments and clinical trials that constitute the long and twisty path of drug development. Appropriate use of modelling and simulation can speed things up, by removing the need for certain trials, or suggesting where best to allocate resources to trials to answer the key questions, and how to design them.

The use of modelling and simulation in drug development has been steadily increasing, as it plays a crucial role across various stages of the process. Pharmacometric models can accelerate drug discovery, optimize formulation design, and inform clinical trial strategies. This can significantly speed up the identification of new treatments or alternative delivery methods, such as long-acting therapies that reduce the need for daily dosing in chronic conditions. Additionally, modelling provides insight into 'what-if' scenarios mentioned above, particularly in patients who require multiple medications that may interact, either enhancing or diminishing the medical effects of each other.

What about personal benefits?

The UK Government website lists the benefits of learning to code as; developing problem solving, communicating better with developers, automating tasks to save time, opening up work in different industries, and improved career opportunities.

Are these benefits that you’ve experienced and have there been others?

Dr Pertinez views this as a pretty good list of benefits, especially the transferability of the skill itself in today’s world. Although, he’d like to argue that in pharmacometrics, and other niches like it, it’s more fundamental than these. Coding is the skill you need to most efficiently ‘talk to’ a computer, to instruct it and get it to do what you need it to, especially if it’s something novel.

Dr Rajoli agreed and wanted to add that in CELT’s modellers’ day-to-day work, coding plays a key role in analysing the data generated in our labs. Modelling is a key step to integrate this data to provide meaningful insights and simulate different scenarios. Additionally, coding enables us to showcase our mathematical models on Teoreler, making them accessible to researchers around the world.

… persistence and curiosity are essential traits for any coder.

Let’s talk about the skills you need to code.

The UK Government website highlights that skills you may need for coding include; openness to change, determination, problem solving, attention to detail, comfortable using your initiative, good at maths and being skilled with computers. 

Are there any skills you think are missing here or any from the list you would argue with?

This is a relatively generic list of skills that are important for anything you may want to do in life, thought Dr Pertinez. Apart from being good at maths and being skilled with computers, which is pretty specific as an important set of skills that you’ll most likely need to succeed in coding. Being ‘good at maths’ though, might not mean needing to be specifically good at formal mathematics. In this context, ‘maths’ is a shorthand for ‘being able to think in a logical stepwise manner with close attention to detail’, which is vital for coding.

Dr Rajoli wanted to highlight what Dr Pertinez mentioned earlier - coding is essentially about giving clear instructions to a computer to perform specific tasks. However, these tasks aren’t always straightforward, which is why persistence and curiosity are essential traits for any coder. Visualization also plays a key role - it helps you understand how raw, or input data, is being processed to produce the desired output. That said, it’s easy to get absorbed in the details, so effective time management is equally important to stay on track and maintain productivity.

Do not use AI tools until later down the line when you know the difference as to whether they are producing garbage or not

Where is a good starting point for someone at the beginning of their coding journey?

There are many freely available programming languages out there, each with its own strengths and areas of focus. A good starting point in your coding journey is to identify your purpose. For instance, Python and Julia are user-friendly languages well-suited for data analysis, machine learning, and scientific computing, while JavaScript, HTML, and CSS are essential for web development.

To begin learning, take advantage of free or low-cost platforms such as Coursera, Codecademy, or freeCodeCamp. These platforms offer structured lessons that introduce key programming concepts. Focusing on the fundamentals - such as variables, functions, loops, and conditionals - will provide a strong foundation and help you become more fluent in any language you choose.

Once you're comfortable with the basics, a quick Google and YouTube search will be the best places to start looking. Do not use AI tools until later down the line when you know the difference as to whether they are producing garbage or not. To continue the human language analogy, Google Translate often works best when you already have some familiarity with the language in question, helping to avoid misunderstandings and other disasters.

Fluency and competence will only come after extended immersion and practice, which will usually only come from an applied project that you will need coding for to achieve what you need - or rather need coding to instruct a computer to achieve what you need. Ideally, this needs to be invested with some kind of meaning, such as a degree, a job deadline or a hobby end goal.

Start building small projects. These don’t have to be complex - automating a repetitive task, creating a simple calculator, or analysing a small dataset can help you practice applying what you’ve learned. Solving real problems will expose you to common challenges and deepen your understanding.

Joining coding communities like Stack Overflow, Reddit’s r/learnprogramming, or Discord servers can also be incredibly helpful. These communities are full of people discussing challenges, offering solutions, and sharing learning resources.

Finally, attention to detail, persistence, and consistency are key to success in coding. Start small - perhaps with just one hour a day and gradually build up. Don’t be discouraged by failure; it's a natural and necessary part of the learning process. Embrace it, and don’t hesitate to look up answers when you're stuck—every programmer does it.

Understand that you will learn the most when things go wrong and don’t work, when you need to troubleshoot and trawl the internet to see how anyone else may have fixed your issue before, or when you have to spend ages going through lines of code to find the mistakes you have made. This kind of experience only comes through applied practice – courses and exercises are a starting point, but aren’t enough on their own.

… you will learn the most when things go wrong and don’t work

 

#NationalCodingWeek