Biology is increasingly becoming interdisciplinary. From agricultural patterns explored with mathematical models, to the genomics of bacteria analyzed by Python queries, an analytical background is becoming a desirable feature for the modern Biologist. In practical terms? That means learning to code.
As I dig deeper into programming, bioinformatics, and computational applications, I’ve been trying to keep up with coding culture as well. Some tips to try and troubleshoot before getting started?
1. Make it reproducible.
I was chatting with a computer scientist who often teaches biologists how to code. One of the results of pushing biologists towards coding, he mentioned, was that we have a lot of lousy code floating around. A 101 course does not make a programmer! We should try to make code that is clean, annotated, and reproducible – for others, sure, but also for ourselves a few months down the road.
No one remembers what they were thinking at 3am in the midst of a Python binge. Be nice to yourself – and professional – and make it a habit to annotate, clean up, and generally explain what’s happening at each step.
2. Spend some time on theory.
Traditionally, I’ve gotten by simply by being hacky. Start with someone else’s code, throw in a few lines of my own, do a quick google search to troubleshoot and add a few scripts I didn’t know I needed – presto, I have a workable program.
It works (well, usually). But there is theory I might not consider if I’m totally self-taught. More traditional learning can help me to think like a programmer, approaching problems more logically and efficiently.
Some languages are good for data analysis, others for optical image analysis; there are favorites for bioinformatics, and languages good for general use. It’ll help to grow to be multilingual here, even if as I grow I’ll start selecting my personal favorites.
4. Keep it DRY.
In computer science, DRY stands for “Don’t Repeat Yourself.” That’s good writing advice. And apparently, it’s good coding advice, too. Just like an essay, code should be written with a “first draft” mindset. Making the code dry will make it cleaner, easier to understand, and more reproducible, and that will require going back and editing it a few times.
We’ll see how far this can take me! It’ll certainly be an area for growth on this challenging part of the grad school journey.