Category Archives: Hints and Tips

A new Graduate students (unexperienced) guide to academic literature.

Given this is my first ever attempt at a blog post, let alone one on such a highly regarded platform I feel it’s proper that I introduce myself. Hi, my name is Maranga, I am a second-year SABS student starting my DPhil project in Small molecules, and honestly, I really don’t like reading. Especially, scientific journals. Now I can appreciate this does not bode well given my chosen career path, however, my aversion for reading is not new (shoutout to Biff, Chip and Kipper) and hopefully not permanent.

Continue reading

3 Useful UNIX commands you might not know

nohup

The command nohup (stands for “No hang up”) allows your script to run even if you quit the terminal. It can be very useful, especially if your terminal has been opened through ssh and you have a dodgy connection. It can be used as follows:

nohup python my_script.py > log.out &

nohup will automatically append the output from your script to a file named nohup.out. By adding the > log.out part of the command you can save the output to a different file of your choice.

Continue reading

Improving your Python code quality using git pre-commit hooks

Intro

I recently completed an internship during which I spent a considerable amount of time doing software engineering. One of my main take-aways from this experience was that in industry, a lot more attention is spent on ensuring that code committed to a GitHub repo is clean and bug-free.

This is achieved through several means like code review (get other people to read your code), test-driven development (make sure your code works as you are adding functionality) or paired development (have two people work together on the same piece of code). Here, I will instead focus on a useful tool that is easy to integrate into your existing git workflow: Pre-commit hooks.

Continue reading

The right tool for the job – The Joy of Excel

Excel’s pervasiveness has resulted in it being used (correctly or incorrectly) in just about every area of science.

Unfortunately, Excel has some traps for the new player and unless you’ve fallen for them before, they are not entirely obvious. They stem from the fact that Excel will try to help the user by reformatting data into what it thinks you mean.

Continue reading

Prerecording Conference Talks and Posters using OBS Studio

Seemingly every conference due to take place this year has either been cancelled or will be run virtually due to the COVID-19 pandemic. Many organisers have decided that running entirely live virtual programmes causes more trouble than it’s worth (e.g. due to unforseeable IT and internet issues disrupting the schedule), and so are asking their presenters to prerecord their talks, which are then broadcast “live” on the day.

I recently “presented” two virtual prerecorded talks at the ISMB conference using Open Broadcast Software Studio (OBS Studio), a free open-source software package most commonly used by live-streamers on Twitch and Youtube. It is super simple to use and achieves a professional output, with video overlaying a presentation slide deck/poster PDF. This blog is a “how-to” on getting started with OBS for conference talks/poster presentations.

Continue reading

Uploading/downloading small files across systems

Sometimes you just want to quickly move a copy of a script, image or binary from, for example, your local (linux) machine to another (linux) machine. The usual tool would be SCP, but this can get complicated when there are several layers of ssh and sometimes it doesn’t work at all (as is the case for transfers between the Department of Statistics computers and the outside world).

Continue reading

Lightning-fast Python code

Scientific code is never fast enough. We need the results of that simulation before that pressing deadline, or that meeting with our advisor. Computational resources are scarce, and competition for a spot in the computing nodes (cough, cough) can be tiresome. We need to squeeze every ounce of performance. And we need to do it with as little effort as possible.

Continue reading