Category Archives: Tip

Tip: How I minimize jet lag

People who know me can attest: I travel a lot. Over the past 12 months, I have done one return trip to Australia, two to Asia, five to the US, and more than ten within Europe.

By now, I manage to do this with minimal jet lag almost every time. Several people have suggested to me that should write a blog post about my tricks, so here are my thoughts on how to avoid jet lag. Take them for what they are — one person’s personal experience.

Plan to hit the destination timezone

The most fundamental mistake that I see people make is that either they just let things happen and hope for the best, or they plan how to keep themselves entertained during the long flights and layovers in airports. I am not at all concerned with how to make time pass. I have a laptop, plenty of work that needs doing, and noise-cancelling headphones to block out my surroundings while doing it.

My only concern is how to make my body and mind hit the target timezone and be able sleep well already the first night after arriving. I always have a plan for how to make that happen and the plan starts at the latest in the morning of the day that I will be leaving for my trip.

The half night of sleep

By far the most important factor in avoiding jet lag is, unsurprisingly, sleep. When flying to a faraway timezone, the fundamental problem is this: you cannot stay awake until the evening but if you sleep on the trip, you cannot sleep the next night and will suffer jet lag the next day. This is particularly true when flying east.

My solution to that is to get half a night’s sleep on the trip. It is enough that I can make it through the following day feeling mostly fine, but not so much that I cannot sleep the following night. If flight schedules permit, I try to time my 3–4 hours sleep so that I wake up around 6am in my destination timezone. This plan will very often not coincide with when the airline thinks it should be night; I frankly could not care less.

If you wonder how this can possibly work, I suggest reading some of the literature on bi-/poly-phasic sleep.

Skipping a meal

I often find myself on eastbound, overnight flights that leave in the early evening and arrive at the destination in the morning. Invariably, the cabin crew will serve dinner an hour or two into the flight, by when it will be after midnight at my destination. Eating a main meal is not how you tell your body that it is nighttime. Also, flying east compresses the day, resulting in too many meals too shortly after each other.

My solution to this is to usually skip the dinner served by the airline on an overnight flight. For example, when I from the East Coast of the US to Europe, I will usually eat a big breakfast, eat nothing at lunchtime, and have a meal in the late afternoon at the airport. The latter meal will be roughly around dinnertime in Europe, and my next meal will be the breakfast, which is served by the airline shortly before landing. I have thereby already hit the destination mealtimes before even boarding the first flight; that is what I meant by having a plan.

Let there be light

Another important factor that regulates the circadian clock is light, in particular blue light. The latter is why many people who work with computers, myself included, use so-called redshift software to turn down the blue light emitted by our monitors in the evening. Airlines generally make the cabin dark for an extended period of time, which is far longer than the 3–4 hours of sleep in my plan, and sometimes on flights when I plan no sleep at all.

My solution to that is to work on my laptop, keeping the screen brightness reasonably high. Do not forget to change the geographic location data of your redshift software to the destination. That way I get enough (blue) light to convince my body that it is daytime when I want it to be daytime; I stick to my plan whether it agrees with that of the airline or not.

When I arrive somewhere during daytime and my work schedule permits, I always try to get outside for a walk. Strong sunlight and physical activity does wonders to reset the circadian clock and thus minimize jet lag.


You need to have a plan for how to hit the destination timezone, it starts before you even head to the airport, and you should stick to it even if the airline has other plans. The plan should factor in both the timing and the amount of sleep, of food, and of light.

Don’t wing it when you fly.

Tip: Getting data into Impactstory but not your ORCID profile

I use Impactstory to track altmetrics for my publications. I believe they did the right thing by not asking me to maintain yet another online profile and instead building upon existing infrastructure. I also use figshare to publish open datasets and wanted to get Impactstory to track these too.

As is often the case, configuring the complex software infrastructure to do what I wanted was nontrivial. Because Impactstory does not maintain a separate user profile, the only way to get data into Impactstory is to add it to your ORCID profile. This took me much longer to figure out than it should have due to misleading, outdated documentation. In fact, I would not have succeeded without the help from Martin Fenner, who taught me about the missing piece of the puzzle, which is DataCite. Once you know what to do, it is reasonably simple: from your ORCID profile, you choose to add and link works from DataCite, where a simple search should find all your datasets in figshare. Afterwards, you have to change the privacy settings for them in your ORCID profile, and they will show up in Impactstory.

This still left me with one challenge, though. Uploading a dataset on figshare can result in numerous DOIs, since both the dataset per se and the individual files are assigned DOIs, each with and without a version number in the DOI. Since I cannot control which DOIs people cite, I must associate all of them with my ORCID to get accurate tracking in Impactstory. However, doing so will pollute the list of works on my public ORCID profile with hundreds of partially redundant DOIs of data files. This is problematic because my ORCID profile also serves as an online curriculum vitae, with the list of works being the publication list.

It turns out that there is a small inaccuracy in the Impactstory documentation: when they write that you must change the privacy setting to “public”, they mean “public” or “trusted parties”. Therein lies the solution to my problem: I set privacy to “public” for the works that I want shown on my ORCID profile and “trusted parties” for the works that I only want tracked in Impactstory. That allows me to get all the data into Impactstory via ORCID but at the same time have a clean, non-redundant publication list on my ORCID profile.

Update: I fear the trick described in the last paragraph does not work afterall. Since writing this blog post, works with privacy set to “trusted parties” have disappeared from my Impactstory profile. We really need a solution to this. For now I prioritize having a clean, non-redundant publication list on my ORCID profile over having accurate statistics on Impactstory.

Tip: Making the “back” button work with AJAX

About a month ago, I received an email from an otherwise happy user of COMPARTMENTS, who wished there was a way to return to the search results after having clicked a protein. I was just about the send her an email explaining how the lack of “back” button functionality was an inherent drawback of using AJAX, when I thought that it would be wise to do a quick Google search first.

The result was a healthy serving of humble pie from Stack Overflow. It turns out that you can make it work fairly easily by using the history.pushState() method to manipulate the browser history. Because my search page already allowed the query to be specified as a URL parameter, one extra line of JavaScript code for the “Search” button was all it took to fix the “back” button behavior.

So there you have it. AJAX is no excuse for the “back” button not working as it should.