Blog posts

2024

Some useful customizations for macOS.

4 minute read

Published:

I started using a Mac back in 2018. My computer, an fairly standard HP laptop I’d bought back in 2013, was beginning to become a source of troubles. The charger wouldn’t charge, the keyboard wouldn’t hold the keys in place, and generally the computer wouldn’t compute. This was a problem, given that I was a destitute student. To my surprise, older MacBooks (the white poylycarbonate MacBooks made back in 2010) where dirt cheap, even when bought from overseas and thus with shipping and custom costs included in the price. I bought one for about 130€. It lacked the Euro (€) key and I couldn’t type words containing an ñ directly, but it felt like a small inconvenience and I quickly found workarounds. That little laptop proved hardy and powerful enough for my daily tasks, and it carried me through a computational physics course during which the rubber in the bottom peeled due to the excessive heat emanating from its dying processor. It was a pretty nice machine.

2022

PAULA: Protein Analysis Using a Least-squares Approach

4 minute read

Published:

Last year, I took a physical chemistry class which had to do with the behaviour and analysis of biomolecules (mainly proteins and nucleic acids). It was fun to step outside of my comfort zone and being in a chemistry lab again, and I had a great deal of fun learning about bio-stuff again. The course worked by alternating theory classes (where we learned the formal aspects of the techniques we would later apply) and lab sessions. We were given a small sample of the problem molecule which we wanted to characterise over a period of two-or-so months, which in this case was hen egg-white lysozyme, a cheap and common protein. One goal was to pass polarised ultraviolet light through a sample of this protein, and measure how well the protein is able to twist the plane of the incident light rays. This technique is called far-ultraviolet circular dychroism, and it turns out that learning about the way a protein interacts with these particular wavelengths in this very particular sense yields a great deal of information about its structure!

2020

Exporting your FilmAffinity profile to a .csv file using R.

5 minute read

Published:

Updated May 14th 2024: the code stopped working after FilmAffinity changed the way ratings are shown. A small change in the code was needed to take this into consideration. Thanks to those who emailed me about it!

Happy pRide!

less than 1 minute read

Published:

Here’s a fun way to generate the pride flag using one (long) line of R code.

Making animations in R.

9 minute read

Published:

Animating the results of a simulation comes in handy very frequently, especially when one wants to check the evolution of a system. Even though R does not have native tools especially desiged to generate .gif files, it can be easily done by putting a few lines of code together. To illustrate this, I’ll show the steps to create a simple animation, but keep in mind that the process can be modified to make more complex animations. (There’s nothing a quick Google search won’t give away when it comes to making an R plot look prettier). The full code for this example is available at the end of this post, but I want to explain every bit first to make it clear. Let’s start.

The Game of Life

1 minute read

Published:

John Conway’s famous Game of Life is a “zero player game”, as he calls it. There exists a great deal of literature exploring the intricacies that can emerge from its very simple rules. Citing Wikipedia:

Newtonian mechanics and Verlet integration.

2 minute read

Published:

I have recently been dealing with Verlet integration as part of the curriculum of one of my classes. While I won’t cover the details here, I will eventually upload all the code to my GitHub account.

Studying emoji usage through geolocation.

1 minute read

Published:

Andalucía, the southernmost community in peninsular Spain, just celebrated its regional holiday. Every 28th of February, students all over Andalucía gather in their playgrounds and eat the much-celebrated “panaceite”: a slice of bread with locally made olive oil, as well as stuff like chocolate, sugar or green beans. People wish each other a happy day on social media, but there’s a (very unimportant) problem: the Andalusian flag does not exist in emoji form. The flag, which consists of three green-white-green horizontal stripes, looks really similar to the Nigerian flag, the only relevant difference being the vertical disposition of the latter. But that does not seem to be a problem for most.