<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <title>Terra Nostra</title> <link>https://terranostra.one</link> <atom:link href="https://terranostra.one/rss.xml" rel="self" type="application/rss+xml" /> <language>en-us</language> <pubDate>Fri, 21 Jan 2022 16:39:14 +0100</pubDate> <item> <title>How do we know the vaccine works?</title> <link>https://terranostra.one/posts/How-do-we-know-the-vaccine-works.html</link> <pubDate>2021-12-17</pubDate> <author>Daniel Vedder</author> <guid isPermaLink="true">https://terranostra.one/posts/How-do-we-know-the-vaccine-works.html</guid> <category><![CDATA[ society ]]></category><category><![CDATA[ science ]]></category><category><![CDATA[ social media ]]></category><category><![CDATA[ covid-19 ]]></category> <description><![CDATA[ <p>In the past few months, and especially in the last weeks, I have been doing some
pretty intensive research on the safety and efficacy of the Covid vaccines. I was
getting a lot of questions on it from some of my friends, and I wanted to be able
to give them my perspective on this as a biologist looking at the scientific
literature. I&apos;ve been working on a longer document looking at all sorts of issues
that people bring up, but for starters I&lsquo;d like to give a quick overview of some
of the studies that look at the vaccines&rsquo; efficacy. In other words: how do we
know these vaccines actually work?</p>

<!--more-->

<h2>Studies</h2>

<ol>
<li><p><a href="https://doi.org/10.1056/NEJMoa2034577" >Polack et al. (2020). Safety and Efficacy of the BNT162b2 mRNA Covid-19 Vaccine. New England Journal of Medicine, 383, 2603-2615.</a> <em>&rarr; This is the original phase 3 clinical trial of the Pfizer/BioNTech vaccine. It included a total of 44,000 participants and showed an efficacy of 95%, i.e. there were 20x more Covid infections among the unvaccinated control group than among the vaccinated group.</em></p></li>
<li><p><a href="https://doi.org/10.1056/NEJMoa2101765" >Dagan et al. (2021). BNT162b2 mRNA Covid-19 Vaccine in a Nationwide Mass Vaccination Setting. New England Journal of Medicine, 384(15), 1412–1423.</a> <em>&rarr; This is an even larger study, conducted in January in Israel. Based on the data of 1.2 million members of Israel&apos;s largest health insurance provider, it showed that vaccinated people were 10x less likely to contract Covid, be hospitalised with it, require intensive treatment, or die (i.e. a 90% efficacy).</em></p></li>
<li><p><a href="https://doi.org/10.1016/S0140-6736(21)01358-1" >Sheikh et al. (2021). SARS-CoV-2 Delta VOC in Scotland: Demographics, risk of hospital admission, and vaccine effectiveness. The Lancet, 397(10293), 2461–2462.</a> <em>&rarr; This is a study of 20,000 infections in Scotland, looking at the Pfizer/BioNTech and the AstraZeneca vaccine and contrasting their effectiveness against the Alpha variant and the (currently-dominant) Delta variant. For Pfizer, they found 90% and 80% efficacy against Alpha and Delta, respectively; for AstraZeneca the numbers were 70% and 60%.</em></p></li>
<li><p><a href="https://doi.org/10.5694/mja2.51182" >Henry et al. (2021). Effectiveness of COVID‐19 vaccines: Findings from real world studies. Medical Journal of Australia, 215(4), 149.</a> <em>&rarr; This is a review study that combined and compared the results of five different previous studies. It showed that the efficacy varies with various factors such as the vaccine used or the time since vaccination, but seems to consistently lie within a range of 60-90% for fully vaccinated persons.</em></p></li>
<li><p><a href="https://doi.org/10.3390/vaccines9111267" >Hsu et al. (2021). COVID-19 Breakthrough Infections and Transmission Risk: Real-World Data Analyses from Germany’s Largest Public Health Department (Cologne). Vaccines, 9(11), 1267.</a> <em>&rarr; This is a study by the municipal health department of the city of Cologne, who are responsible for contact tracing and quarantining of infected persons and their close contacts. Here, they show that unvaccinated contact persons of infected vaccinated persons had a 15% chance of becoming infected, as compared to unvaccinated contact persons of infected unvaccinated persons, who had a 65% rate of infection. This shows that even in the case of break-through infections (i.e. when vaccinated persons do become infected), they are much less likely to pass that infection on to others.</em></p></li>
<li><p><a href="https://doi.org/10.2807/1560-7917.ES.2021.26.44.2100977" >de Gier et al. (2021). Vaccine effectiveness against SARS-CoV-2 transmission to household contacts during dominance of Delta variant (B.1.617.2), the Netherlands, August to September 2021. Eurosurveillance, 26(44).</a> <em>&rarr; This study agglomerates contact tracing data from municipal health departments across the Netherlands during a period of Delta dominance. It shows that although 71% of the population were vaccinated, only 35% of reported infected cases were. It also showed that while unvaccinated household contacts of unvaccinated infected persons had a 22% chance of infection, that was halved to 10-13% if either the originally infected person or the household contact were vaccinated.</em></p></li>
<li><p><a href="https://doi.org/10.2807/1560-7917.ES.2021.26.39.2100894" >Martínez-Baz et al. (2021). Product-specific COVID-19 vaccine effectiveness against secondary infection in close contacts, Navarre, Spain, April to August 2021. Eurosurveillance, 26(39).</a> <em>&rarr; This is a similar study to the two above (based on contact-tracing), this time from Spain. Here, too, the authors found a 50-80% reduction in infections among vaccinated persons, depending on the vaccine given (though quite strongly reduced for elderly persons).</em></p></li>
<li><p><a href="https://doi.org/10.1056/NEJMoa2114255" >Bar-On, Y. M., Goldberg, Y., Mandel, M., Bodenheimer, O., Freedman, L., Kalkstein, N., Mizrahi, B., Alroy-Preis, S., Ash, N., Milo, R., &amp; Huppert, A. (2021). Protection of BNT162b2 Vaccine Booster against Covid-19 in Israel. New England Journal of Medicine, 385(15), 1393–1400.</a> <em>&rarr; Another study from Israel, this time looking at how long the protection from the second vaccination lasts and how effective a third &ldquo;booster&rdquo; vaccine is. They find that 5-6 months after the first two shots, the vaccine&apos;s efficacy has been strongly reduced, but can be restored with a third shot. (Side note: there are vaccines, like that against Hepatitis B, that require three shots to reach their full effect. There are reasons to believe that the Covid vaccines might be like that too, i.e. that we will not require regular boosters but be sufficiently immune for the long term after three shots. We don&apos;t yet have enough data to say for sure, but we will find out in the next few months.)</em></p></li>
<li><p><a href="http://arxiv.org/abs/2111.12806" >Maier et al. (2021). Germany’s current COVID-19 crisis is mainly driven by the unvaccinated. ArXiv:2111.12806.</a> <em>&rarr; This study is not yet officially published and has yet to undergo peer review, so should be treated cautiously until it is. (All scientific studies are thoroughly reviewed by independent experts, and the authors have to address any queries or critiques the reviewers have before publication.) However, if the results hold up under review, they indicate that only 10-15% of infections in Germany are happening between two vaccinated persons, while 40-50% of infections are taking place between two unvaccinated persons.</em></p></li>
<li><p>Bavarian State Ministry of Health (see image below) <em>&rarr; This recent graph from the data of our state&apos;s MoH shows that the relative infection rate (i.e. infections per 100,000 citizens) in November (when I downloaded the graph) was much lower among vaccinated persons than among unvaccinated persons - 110 vs 1500! The rate of hospitalisation was also significantly lower - 3 vs 14 per 100,000. (Note: this is not at all a formal scientific study, but a neat illustration of the very real effects vaccination is having in preventing infections and illness of individuals at a time of generally very high infection levels in Germany.)</em></p></li>
</ol>

<p><img src="/static/impfschutz.png" alt="Vaccine protection in Bavaria" title="Infection rates among vaccinated ('Geimpfte') and unvaccinated ('Ungeimpfte') persons in Bavaria, November 2021"/></p>

<h2>Closing comments</h2>

<p>I have had long discussions with a number of friends here who are sceptical 
about the vaccines, and have read numerous websites that they passed along 
to me. None of them stood up to closer scrutiny. In many cases, they simply 
offered unsubstantiated speculations about possible long-term effects of the 
vaccines (which, for a whole range of biological reasons, are highly implausible). 
In many more cases, they grossly misinterpreted and/or misrepresented 
scientific data and studies (and yes, I did read the original studies to check).</p>

<p>Yes, epidemiology is really complicated. Who gets infected and/or seriously 
ill is influenced by any number of factors, including things like current 
infection levels in society, age, sex, vaccination status, medical risk 
factors, personal contacts, weather, public hygiene measures, and others. 
Likewise, vaccine efficacy and safety are also affected by numerous factors, 
which makes data analysis tricky and requires some very careful scientific 
work. But this work has been done.</p>

<p>Nothing in this life is ever one-hundred-percent effective, or one-hundred-percent 
safe. Neither are the vaccines. <strong>But after hundreds of millions of vaccinated 
persons around the world and with the accumulated knowledge of dozens of large, 
careful scientific studies, we know enough to say: vaccines work, and it&apos;s a 
lot (!) safer to be vaccinated than to risk contracting Covid.</strong></p>
 ]]></description> </item><item> <title>Putting the vaccinated at risk</title> <link>https://terranostra.one/posts/Putting-the-vaccinated-at-risk.html</link> <pubDate>2021-09-24</pubDate> <author>Daniel Vedder</author> <guid isPermaLink="true">https://terranostra.one/posts/Putting-the-vaccinated-at-risk.html</guid> <category><![CDATA[ society ]]></category><category><![CDATA[ science ]]></category><category><![CDATA[ social media ]]></category><category><![CDATA[ covid-19 ]]></category> <description><![CDATA[ <p><em>Background: A friend of mine shared a meme about Covid vaccinations with the 
caption: &ldquo;The protected need to be protected from the unprotected by forcing 
the unprotected to use the protection that didn&apos;t protect the unprotected.&rdquo;
Here is my response:</em></p>

<!--more-->

<center><b>* * *</b></center>

<p>Put like that, it is a bit of a tongue-twister :D But quite honestly, this is 
no joking matter - and not as difficult as it sounds. The first thing you&apos;ll 
be taught in any epidemiology class (and yes, I have taken a couple) is that 
during an epidemic, there are three basic classes that people fit into: 
Susceptible, Infectious, or Recovered. (This SIR-model is simplified, of course, 
but works quite well nonetheless.) </p>

<p>The idea is that infectious people pass on the disease to susceptible people 
around them, but, once they have recovered, are immune to being infected a 
second time. This means that over time, there are more and more recovered/immune 
people in the population, so that the people currently infected are less and 
less likely to meet susceptible people and eventually the disease dies out.</p>

<p>The problem is of course that the process of you being sick may lead to you 
recovering and becoming immune, but it may also lead to you being very seriously 
sick or even dying. So the question is: how do we break the cycle of infection? 
And there are two ways of doing that.</p>

<p>The first is what we were doing all of last year: social distancing, masking, 
quarantining, etc. <em>Not</em> a nice route to go, but it helps to prevent infectious 
people from meeting susceptible people, thus slowing the rate of infection and 
saving lives.</p>

<p>The second way is vaccinating. Vaccines simulate the sickness process, but 
with two crucial differences: (1) you are <em>much</em> less likely to suffer severe 
health consequences, and (2) you are not completely guaranteed to become immune.</p>

<p>Basically, getting the jab &ldquo;jumps&rdquo; you from the &ldquo;susceptible&rdquo; class into the 
&ldquo;recovered&rdquo; class, without having to be properly sick along the way. Unfortunately, 
this only works with a probability of 60-95% (depending on the vaccine [1]). So while 
this is a very good deal compared with the risks of actually contracting Covid,
it isn&apos;t bullet-proof.</p>

<p>But it doesn&apos;t have to be. Because a disease will die out if the percentage of 
susceptible people in the population is low enough, you don&apos;t actually need full 
protection for every individual to eradicate an epidemic.</p>

<p>Imagine a town with 10 000 inhabitants. If they were all vaccinated with a vaccine 
as effective as Pfizer or Moderna, about 9500 citizens would become immune. And 
although a random sample of about 500 would still be susceptible, that wouldn&apos;t 
matter much, because there are too few of them to keep the disease spreading.</p>

<p>But now imagine that only half the citizens were vaccinated. The unvaccinated 
people would keep getting sick, keeping up a high rate of infection and so quite 
probably exposing the 250 people who were vaccinated, but for whom the vaccine 
did not work as intended, to the disease.</p>

<p>It is exactly this effect that is the problem. The Covid vaccines we have work 
remarkably well, and have been shown to do so in every country that is using them [2]. 
But they are still not perfect. And because of that, it does make a difference 
how many people are vaccinated overall.</p>

<p>In short: if you haven&apos;t been vaccinated yet, you are raising the risk of others 
around you - including some who have already been vaccinated. So get your vaccine 
and help to save a life ;-)</p>

<center><b>* * *</b></center>

<p><strong>Addendum 1:</strong> <em>But vaccinated people still get sick, and then infect a lot more 
people, because they don&apos;t have symptoms and don&apos;t realise they are infected!</em></p>

<p>Vaccinated people are much less likely to become infected at all [2], and if they&apos;re 
not infected, they can&apos;t pass it on. It is true that there are cases of unsymptomatic 
infections in vaccinated persons, but these are (a) comparatively rare, and 
(b) current evidence indicates that unsymptomatic cases are probably not as 
infectious as symptomatic cases [3]. Also, it&apos;s not that easy to quantify how much 
somebody is at risk - although there are some clear risk indicators, that doesn&apos;t 
mean that healthy young adults cannot get sick, and badly so [4].</p>

<p><strong>Addendum 2:</strong> <em>The government shouldn&apos;t force you to get vaccinated, it&apos;s the
individual&apos;s choice!</em></p>

<p>Whether or not it should be mandatory is a whole other question. (Although note 
that mandatory vaccinations in and of themselves are nothing new.) But I do find 
it important to emphasise that the choice to be vaccinated is <em>not</em> just an issue 
of personal preference, but a deeply ethical question of responsibility to others. 
In that sense, getting the jab is a form of loving your neighbour ;-)</p>

<p><strong>Addendum 3:</strong> <em>But natural immunity is so much more effective than vaccination! [5]</em></p>

<p>That&apos;s an interesting study! However, I don&apos;t quite understand why you see natural 
immunity as an alternative to vaccination? Basically, what the study says is: 
&ldquo;If you were lucky enough to survive Covid once, you&apos;re almost certainly safe in the 
foreseeable future&rdquo;. But of course the point of being vaccinated is that you <em>don&apos;t</em> 
have to play the Russian roulette that is a Covid illness. The study investigates 
~100 000 Covid survivors - but doesn&apos;t mention that ~16 000 of them would have been 
quite seriously ill, or the ~2000 additional infected people who didn&apos;t make into the 
study cohort because they died of their illness (numbers based on hospitalisation and 
mortality data from the Israeli Ministry of Health [6]). Compared to the known short- and 
long-term risks of a Covid infection, a vaccine may not be 100% safe (few things in 
life are), but the overall risk is lower by <em>several orders of magnitude</em>. And, at 
the risk of repeating myself, that is before we consider the effect that my 
vaccination choice has on the safety of those around me.</p>

<h3>Sources</h3>

<ol>
<li><p><a href="https://www.ema.europa.eu/en/human-regulatory/overview/public-health-threats/coronavirus-disease-covid-19/treatments-vaccines/covid-19-vaccines" >European Medicines Agency. &ldquo;COVID-19 vaccines&rdquo;.</a></p></li>
<li><p>e.g. <a href="https://www.nejm.org/doi/pdf/10.1056/NEJMoa2101765" >Dagan et al. (2021). &ldquo;BNT162b2 mRNA Covid-19 Vaccine in a Nationwide Mass
   Vaccination Setting&rdquo;. The New England Journal of Medicine.</a></p></li>
<li><p><a href="https://www.nature.com/articles/d41586-021-00450-z" >Mallapaty (2021). &ldquo;Can COVID vaccines stop transmission? Scientists race to
   find answers&rdquo;. Nature News.</a></p></li>
<li><p><a href="https://www.rki.de/DE/Content/InfAZ/N/Neuartiges_Coronavirus/Steckbrief.html" >Robert Koch Institut, Epidemiologischer Steckbrief zu SARS-CoV-2 und COVID-19.</a></p></li>
<li><p><a href="https://doi.org/10.1101/2021.08.24.21262415" >Gazit et al. (preprint). &ldquo;Comparing SARS-CoV-2 natural immunity to vaccine-induced
   immunity: reinfections versus breakthrough infections.&rdquo; medRxiv.</a></p></li>
<li><p><a href="https://www.gov.il/en/departments/faq/faq-coronavirus" >Israeli Ministry of Health, Covid-19 Frequently Asked Questions</a></p></li>
</ol>
 ]]></description> </item><item> <title>Tote Kinder durch Corona-Impfung?</title> <link>https://terranostra.one/posts/Tote-Kinder-durch-Corona-Impfung.html</link> <pubDate>2021-06-30</pubDate> <author>Daniel Vedder</author> <guid isPermaLink="true">https://terranostra.one/posts/Tote-Kinder-durch-Corona-Impfung.html</guid> <category><![CDATA[ science ]]></category><category><![CDATA[ social media ]]></category><category><![CDATA[ covid-19 ]]></category><category><![CDATA[ deutsch ]]></category> <description><![CDATA[ <p><em>Hintergrund: Eine Bekannte teilte online die 
<a href="https://correctiv.org/wp-content/uploads/2021/07/Shed-V8.pdf" >Analyse</a>
eines Biologen (Hervé Seligmann), nach der angeblich Covid-Impfungen
von Erwachsenen zu einer erhöhten Mortalität bei nicht-geimpften
Kindern führt. Hier schaue ich mir diese &ldquo;Studie&rdquo; genauer an:</em></p>

<!--more-->

<center><b>* * *</b></center>

<p>Also, fangen wir vorne an: Zu einer wissenschaftlichen Arbeit gehört, dass man 
sie in den Kontext der aktuellen Forschung einbettet. Zu Beginn gibt man einen 
Überblick über neue theoretische und empirische Erkenntnis und skizziert offene 
Fragen. Dann erklärt und begründet man die eigene Methodik und beschreibt die 
erzielten Ergebnisse. Schließlich interpretiert man diese Ergebnisse mit Blick 
auf den Stand der Forschung und diskutiert, welche Auswirkungen daraus folgen 
könnten. Ein durchschnittlicher Fachartikel zitiert deswegen etwa 50 andere Studien, 
die es dem Leser erlauben, sich selber einen Überblick über den Hintergrund der 
Arbeit zu verschaffen. Seligmann zitiert genau 0 Fachartikel – das ist einfach 
nur unseriös.</p>

<p>Aber das ist noch lange nicht das Hauptproblem. Kurz gesagt hat Seligmann 
schlicht keine Ahnung von Statistik, er ist hier methodisch völlig außerhalb 
seines Kompetenzbereichs. Um das zu erklären, muss ich etwas weiter ausholen. 
Statistik ist die Wissenschaft der Datenanalyse, oder vereinfacht ausgedrückt, 
eine Sammlung von Methoden, um aus rohen Daten wissenschaftliche Aussagen zu 
gewinnen. Nicht jede Disziplin ist gleichermaßen auf Statistik angewiesen. 
Seligmann ist Molekularbiologe – diese arbeiten meist unter streng kontrollierten 
Bedingungen im Labor und brauchen daher oft nur sehr rudimentäre statistische 
Methoden. Andere Forschungsbereiche, wie Ökologie (meine eigene Disziplin) oder 
Soziologie haben da ganz andere Anforderungen. Dadurch, dass Ökosysteme und 
menschliche Gesellschaften so unglaublich kompliziert sind, von Tausenden von 
Faktoren beeinflusst werden und Experimente mit ihnen nur begrenzt möglich sind, 
müssen wir sehr aufpassen, wie wir unsere Daten analysieren. Deshalb brauchen 
wir oft sehr komplizierte statistische Methoden, die dieser Komplexität des 
Lebens zumindest ansatzweise gerecht werden können.</p>

<p>Seligmann begeht hier den fundamentalen Fehler, seine sehr einfachen Methoden 
(Pearson-Koeffizienten und t-Tests) auf Daten anzuwenden, die viel zu komplex 
dafür sind. Obwohl Mortalität von beliebig vielen Faktoren beeinflusst wird 
(Hitzewellen, Grippewellen, Sportereignisse, Verkehrsaufkommen, Lockdowns…)
ignoriert er alle außer der Impfrate. Das darf man aber nicht so einfach machen: 
Es könnte ja sein, dass zwar die Mortalität tatsächlich mit der Impfrate steigt 
(was seine Daten nicht hergeben!), dass aber nicht das Impfen das Problem ist, 
sondern das steigende Verkehrsaufkommen, wenn die Menschen wieder aus dem 
Homeoffice kommen.</p>

<p>Damit ignoriert Seligmann die wichtigste Regel, die es in der Statistik überhaupt 
gibt: „Correlation does not imply causation!“ Das ist wissenschaftlich unentschuldbar. 
Aber es geht weiter. Zwar berechnet er die Signifikanz seiner Zwischenergebnisse, 
also die Wahrscheinlichkeit, dass solche Ergebnisse einfach nur zufällig zustande 
kommen. Doch für seine nächsten Analyseschritte ignoriert er die Signifikanz 
völlig und rechnet fröhlich mit Zahlen weiter, die so unsicher sind, dass sie 
genauso gut null sein könnten.</p>

<p><strong>Fazit:</strong> Beide seiner Analyseschritte sind von Grund auf völlig falsch. Damit ist 
es absolut egal, was für Zahlen am Ende seiner Rechnung stehen – sie können 
keinerlei Aussagekraft haben. Doch selbst damit nicht genug: In seiner Diskussion 
versteigt er sich schließlich in die abstrusesten Spekulationen. Was er hier 
schreibt, ist in keinster Weise von sonstigen wissenschaftlichen Erkenntnissen 
gedeckt, noch wäre es gerechtfertigt, selbst wenn seine Analysen richtig gewesen 
wären. Spätestens hier hat er für mich die Grenze der wissenschaftlichen 
Inkompetenz überschritten: ein solches Gefasel als „wissenschaftlich“ zu verkaufen 
ist einfach nur unredlich.</p>

<p><em>Siehe auch die Faktenchecks von <a href="https://www.mimikama.at/aktuelles/kinder-spike-proteine/" >Mimikama</a>
und <a href="https://correctiv.org/faktencheck/2021/07/12/covid-19-nein-kinder-koennen-nicht-am-spike-protein-von-geimpften-sterben/" >Correctiv</a>.</em></p>
 ]]></description> </item><item> <title>On the effectivity of masks against Covid-19</title> <link>https://terranostra.one/posts/On-the-effectivity-of-masks-against-Covid-19.html</link> <pubDate>2021-04-29</pubDate> <author>Daniel Vedder</author> <guid isPermaLink="true">https://terranostra.one/posts/On-the-effectivity-of-masks-against-Covid-19.html</guid> <category><![CDATA[ society ]]></category><category><![CDATA[ science ]]></category><category><![CDATA[ covid-19 ]]></category><category><![CDATA[ social media ]]></category> <description><![CDATA[ <p><em>Background: A friend of mine shared a 
<a href="https://boriquagato.substack.com/p/cdc-admits-no-rcts-support-mask-efficacy/comments" >post</a> 
that quoted the CDC as saying: &ldquo;CDC is not aware of any randomized control 
trials that show that masks or double masks or cloth face coverings are 
effective against COVID-19.&rdquo; As my response turned out a bit longer than
expected, I&apos;m archiving it here for future reference&hellip;</em></p>

<!--more-->

<center><b>* * *</b></center>

<p>Well, you just sent me down the rabbit hole with that one&hellip; The quick summary: 
the post above is misleading, but not completely wrong; the evidence for mask 
effectiveness is spotty, mixed, but more positive than not.</p>

<p>I&apos;ve taken a quick but not detailed look at the studies the author cites, 
as well as reviewing around a dozen other studies. I also have some general 
comments about the nature of scientific evidence. (Yes, this is going to be a 
long answer ;-) )</p>

<p>Let&apos;s start with the latter: What the FOIA request was asking about was 
something very specific: randomised control trials (RCT) of mask-wearing with Covid-19.</p>

<p>RCT are a type of experimental design whereby you take a number of test 
subjects, randomly assign them to a treatment or non-treatment (i.e. control) 
group, and then compare your response variable across the groups (here: 
rate of Covid-19 infection). When done properly and with a sufficiently 
large number of subjects (the &ldquo;N&rdquo;), RCT are the gold standard of medical 
study design. However, they can pose problems. For a start, they take a 
lot of effort, time, and money to implement. Especially because you really 
do need a large N, if possible in the thousands - an RCT with a low N is 
worse than useless. Also, there may be ethical concerns: if you have a 
risk-free treatment for which there is already some indication that it works, 
it would be problematic to refuse to give this treatment to your control 
group - potentially risking their lives just to get slightly better data.</p>

<p>So, for this combination of practical and ethical reasons, it is 
understandable - though very unfortunate - that there is not yet a RCT of 
masks with Covid-19. However, RCTs are far from the only study design 
available to researchers. Two other common categories, which have been 
used to address masking with Covid-19, are observational and laboratory studies.</p>

<p>Observational studies are what are known as &ldquo;quasi-experimental&rdquo; designs. 
The idea is to find a situation which is as close as possible to the 
experiment you&apos;d like to have carried out, and then analyse the participants 
in this situation. For example, there was a study of Covid-infection on 
flights, where the passengers on some planes had worn masks while those on 
other planes hadn&apos;t. Or a German city that introduced compulsory masking 
several weeks before the rest of the country. This has multiple advantages: 
1) you don&apos;t need to spend time conducting the experiment, the situation 
has already occurred; 2) it&apos;s often easier to get a large N; 3) there are no 
ethical concerns because you aren&apos;t actively intervening in the situation. 
The <em>major</em> drawback is that you can&apos;t exclude confounding factors the way 
you can in an experiment. Indeed, as these are real-life situations, there 
are likely to be <em>a lot</em> of factors at play, whatever the outcome. There are 
statistical techniques for reducing the uncertainty this introduces, but 
basically you&apos;ll never be able to guarantee that there wasn&apos;t some other 
factor to blame for your results.</p>

<p>Laboratory studies, on the other hand, exclude &ldquo;real-life&rdquo; as much as possible, 
only recreating the bare necessities in a completely controlled environment. 
For example, one study used two dummy heads in a glass cage, with infectious 
aerosols being sprayed out of the one dummy&apos;s mouth and sucked in and measured 
through the other&apos;s mouth, with different combinations of masks in between. 
The benefits of this are that you need few or no human subjects and can 
completely exclude any factors you&apos;re not interested in. The problem is that 
those excluded factors may actually be the more important ones, or you 
may be asking the entirely wrong question. (&ldquo;Yes, masks can physically 
stop virus particles if they are worn in public - but what if most infections 
are happening at home?&rdquo;)</p>

<p>In summary, there are different study designs, all of which have merits and 
all of which have flaws. While RCT are deservedly seen as the best, it is 
not appropriate to just ignore all the others, or claim that they are &ldquo;bad science&rdquo;.</p>

<center><b>* * *</b></center>

<p>Among the studies I looked at, there were observational and laboratory 
studies on masking and Covid-19, as well as RCT on masking and other 
viral disease (which also should not be discounted!). The evidence is 
not as clear as I would have expected, and there are not as many studies 
as I would have thought. Among the studies I found, some say there is no 
effect, most say the effect varies or is very slight, while yet others 
find a clear effect. As always, some studies seemed to have a stronger 
design and/or analysis than others.</p>

<p>In general, my impression was that overall, masks do help - but they are not 
a cure-all, and their effectiveness is obviously limited to the occasions when 
they are actually worn. (I.e., masking rules may reduce infections in public 
gatherings, but they won&apos;t stop infections in private home settings.)</p>

<p>The complete list of studies I used is below. The one I thought the best
is <a href="https://doi.org/10.1016/S0140-6736(20)31142-9" >Chu et al. (2020)</a>.
This is a meta-study, so it combines the results of many individual studies.</p>

<p>Having already said all that, I should emphasise that situations like 
this, with spotty and equivocal data even on important questions, is 
actually very common in science. I&apos;m planning to do my PhD in conservation 
biology on the question of how effective protected areas are at protecting 
biodiversity. The first PAs were established 150 years ago, we&apos;ve been using 
them intensely for 50 years, and we&apos;re still not sure how much they actually 
help. Turns out, collecting data is really hard and expensive, and nature 
is incredibly messy. (I&apos;ll be combining data sets from over 20 different 
organisations and agencies, and the analysis techniques I need to use are 
partly still being developed.)</p>

<p>So in that sense, I&apos;m not particularly worried by the uncertainty in the 
masking question. We know PAs help at least somewhat, so we keep lobbying 
for them. If we didn&apos;t do anything until we could put a precise percentage 
on their effectiveness, there would be no nature left to protect. Likewise, 
we know there can be positive effects of masks, and the negative effects 
are minor. So if the situation is urgent (which it is) and every little 
counts (which it does), I think it would be foolish to ignore them, even 
if we don&apos;t yet know as much as we&apos;d like.</p>

<h3>Bibliography</h3>

<ul>
<li><p>Bundgaard, H., Bundgaard, J. S., Raaschou-Pedersen, D. E. T., von
Buchwald, C., Todsen, T., Norsk, J. B., Pries-Heje, M. M., Vissing, C.
R., Nielsen, P. B., Winsløw, U. C., Fogh, K., Hasselbalch, R.,
Kristensen, J. H., Ringgaard, A., Porsborg Andersen, M., Goecke, N. B.,
Trebbien, R., Skovgaard, K., Benfield, T., &hellip; Iversen, K. (2020).
Effectiveness of Adding a Mask Recommendation to Other Public Health
Measures to Prevent SARS-CoV-2 Infection in Danish Mask Wearers. <em>Annals
of Internal Medicine</em>, <em>174</em>(3), 335&ndash;343.
<a href="https://doi.org/10.7326/M20-6817" >https://doi.org/10.7326/M20-6817</a></p></li>
<li><p>Chu, D. K., Akl, E. A., Duda, S., Solo, K., Yaacoub, S., Schünemann, H.
J., Chu, D. K., Akl, E. A., El-harakeh, A., Bognanni, A., Lotfi, T.,
Loeb, M., Hajizadeh, A., Bak, A., Izcovich, A., Cuello-Garcia, C. A.,
Chen, C., Harris, D. J., Borowiack, E., &hellip; Schünemann, H. J. (2020).
Physical distancing, face masks, and eye protection to prevent
person-to-person transmission of SARS-CoV-2 and COVID-19: A systematic
review and meta-analysis. <em>The Lancet</em>, <em>395</em>(10242), 1973&ndash;1987.
<a href="https://doi.org/10.1016/S0140-6736(20)31142-9" >https://doi.org/10.1016/S0140-6736(20)31142-9</a></p></li>
<li><p>Cowling, B. J., Zhou, Y., Ip, D. K. M., Leung, G. M., &amp; Aiello, A. E.
(2010). Face masks to prevent transmission of influenza virus: A
systematic review. <em>Epidemiology &amp; Infection</em>, <em>138</em>(4), 449&ndash;456.
<a href="https://doi.org/10.1017/S0950268809991658" >https://doi.org/10.1017/S0950268809991658</a></p></li>
<li><p>Doung-Ngern, P., Suphanchaimat, R., Panjangampatthana, A.,
Janekrongtham, C., Ruampoom, D., Daochaeng, N., Eungkanit, N.,
Pisitpayat, N., Srisong, N., Yasopa, O., Plernprom, P., Promduangsi, P.,
Kumphon, P., Suangtho, P., Watakulsin, P., Chaiya, S., Kripattanapong,
S., Chantian, T., Bloss, E., &hellip; Limmathurotsakul, D. (2020).
Case-Control Study of Use of Personal Protective Measures and Risk for
SARS-CoV 2 Infection, Thailand. <em>Emerging Infectious Diseases</em>,
<em>26</em>(11), 2607&ndash;2616. <a href="https://doi.org/10.3201/eid2611.203003" >https://doi.org/10.3201/eid2611.203003</a></p></li>
<li><p>Freedman, D. O., &amp; Wilder-Smith, A. (2020). In-flight transmission of
SARS-CoV-2: A review of the attack rates and available data on the
efficacy of face masks. <em>Journal of Travel Medicine</em>, <em>27</em>.
<a href="https://doi.org/10.1093/jtm/taaa178" >https://doi.org/10.1093/jtm/taaa178</a></p></li>
<li><p>Kim, M. S., Seong, D., Li, H., Chung, S. K., Park, Y., Lee, M., Lee, S.
W., Yon, D. K., Kim, J. H., Lee, K. H., Solmi, M., Dragioti, E.,
Koyanagi, A., Jacob, L., Kronbichler, A., Tizaoui, K., Cargnin, S.,
Terrazzino, S., Hong, S. H., &hellip; Smith, L. (2021). <em>Comparative Efficacy
of N95, Surgical, Medical, and Non-Medical Facemasks in Protection of
Respiratory Virus Infection: A Living Systematic Review and Network
Meta-Analysis</em> (SSRN Scholarly Paper ID 3768550). Social Science
Research Network. <a href="https://doi.org/10.2139/ssrn.3768550" >https://doi.org/10.2139/ssrn.3768550</a></p></li>
<li><p>Leung, N. H. L., Chu, D. K. W., Shiu, E. Y. C., Chan, K.-H., McDevitt,
J. J., Hau, B. J. P., Yen, H.-L., Li, Y., Ip, D. K. M., Peiris, J. S.
M., Seto, W.-H., Leung, G. M., Milton, D. K., &amp; Cowling, B. J. (2020).
Respiratory virus shedding in exhaled breath and efficacy of face masks.
<em>Nature Medicine</em>, <em>26</em>(5), 676&ndash;680.
<a href="https://doi.org/10.1038/s41591-020-0843-2" >https://doi.org/10.1038/s41591-020-0843-2</a></p></li>
<li><p>MacIntyre, C. R., Seale, H., Dung, T. C., Hien, N. T., Nga, P. T.,
Chughtai, A. A., Rahman, B., Dwyer, D. E., &amp; Wang, Q. (2015). A cluster
randomised trial of cloth masks compared with medical masks in
healthcare workers. <em>BMJ Open</em>, <em>5</em>(4), e006577.
<a href="https://doi.org/10.1136/bmjopen-2014-006577" >https://doi.org/10.1136/bmjopen-2014-006577</a></p></li>
<li><p>Matuschek, C., Moll, F., Fangerau, H., Fischer, J. C., Zänker, K., van
Griensven, M., Schneider, M., Kindgen-Milles, D., Knoefel, W. T.,
Lichtenberg, A., Tamaskovics, B., Djiepmo-Njanang, F. J., Budach, W.,
Corradini, S., Häussinger, D., Feldt, T., Jensen, B., Pelka, R., Orth,
K., &hellip; Haussmann, J. (2020). Face masks: Benefits and risks during the
COVID-19 crisis. <em>European Journal of Medical Research</em>, <em>25</em>(1), 32.
<a href="https://doi.org/10.1186/s40001-020-00430-5" >https://doi.org/10.1186/s40001-020-00430-5</a></p></li>
<li><p>Mitze, T., Kosfeld, R., Rode, J., &amp; Wälde, K. (2020b). Face masks
considerably reduce COVID-19 cases in Germany. <em>Proceedings of the
National Academy of Sciences</em>, <em>117</em>(51), 32293&ndash;32301.
<a href="https://doi.org/10.1073/pnas.2015954117" >https://doi.org/10.1073/pnas.2015954117</a></p></li>
<li><p>Offeddu, V., Yung, C. F., Low, M. S. F., &amp; Tam, C. C. (2017).
Effectiveness of Masks and Respirators Against Respiratory Infections in
Healthcare Workers: A Systematic Review and Meta-Analysis. <em>Clinical
Infectious Diseases</em>, <em>65</em>(11), 1934&ndash;1942.
<a href="https://doi.org/10.1093/cid/cix681" >https://doi.org/10.1093/cid/cix681</a></p></li>
<li><p>Payne, D. C., Smith-Jeffcoat, S. E., Nowak, G., Chukwuma, U., Geibe, J.
R., Hawkins, R. J., Johnson, J. A., Thornburg, N. J., Schiffer, J.,
Weiner, Z., Bankamp, B., Bowen, M. D., MacNeil, A., Patel, M. R.,
Deussing, E., CDC COVID-19 Surge Laboratory Group, &amp; Gillingham, B. L.
(2020). SARS-CoV-2 Infections and Serologic Responses from a Sample of
U.S. Navy Service Members&mdash;USS Theodore Roosevelt, April 2020. <em>MMWR.
Morbidity and Mortality Weekly Report</em>, <em>69</em>(23), 714&ndash;721.
<a href="https://doi.org/10.15585/mmwr.mm6923e4" >https://doi.org/10.15585/mmwr.mm6923e4</a></p></li>
<li><p>Ueki, H., Furusawa, Y., Iwatsuki-Horimoto, K., Imai, M., Kabata, H.,
Nishimura, H., &amp; Kawaoka, Y. (2020). Effectiveness of Face Masks in
Preventing Airborne Transmission of SARS-CoV-2. <em>MSphere</em>, <em>5</em>(5).
<a href="https://doi.org/10.1128/mSphere.00637-20" >https://doi.org/10.1128/mSphere.00637-20</a></p></li>
<li><p>Van Dyke, M. E., Rogers, T. M., Pevzner, E., Satterwhite, C. L., Shah,
H. B., Beckman, W. J., Ahmed, F., Hunt, D. C., &amp; Rule, J. (2020). Trends
in County-Level COVID-19 Incidence in Counties With and Without a Mask
Mandate&mdash;Kansas, June 1&ndash;August 23, 2020. <em>MMWR. Morbidity and
Mortality Weekly Report</em>, <em>69</em>(47), 1777&ndash;1781.
<a href="https://doi.org/10.15585/mmwr.mm6947e2" >https://doi.org/10.15585/mmwr.mm6947e2</a></p></li>
</ul>
 ]]></description> </item><item> <title>Review: Lessons from the Presidents</title> <link>https://terranostra.one/posts/Review-Lessons-from-the-Presidents.html</link> <pubDate>2019-12-23</pubDate> <author>Daniel Vedder</author> <guid isPermaLink="true">https://terranostra.one/posts/Review-Lessons-from-the-Presidents.html</guid> <category><![CDATA[ politics ]]></category><category><![CDATA[ history ]]></category><category><![CDATA[ leadership ]]></category><category><![CDATA[ books ]]></category> <description><![CDATA[ <p>&ldquo;Leadership &ndash; Lessons from the Presidents for Turbulent Times&rdquo; is the 
<em>magnum opus</em> of US presidential historian Doris Kearns Goodwin. It is hands-down
the best book I read this year, and quite possibly the most inspiring book on
leadership I have ever read. But let&apos;s start at the beginning.</p>

<!--more-->

<center><b>* * *</b></center>

<p>Goodwin has spent much of her adult life studying and writing about US presidents.
As a young woman, she worked for Lyndon B. Johnson; and later went on to write a 
half-dozen presidential biographies. Now in her seventies, she decided to take
a step back and have a fresh look at the men she&apos;d studied, this time with one
specific focus&mdash;leadership. She writes:</p>

<blockquote><i>
Are leaders born or made? Where does ambition come from? How does adversity
affect the growth of leadership? Do the times make the leader or does the leader
shape the times? [...] Is leadership possible without a purpose larger than
personal ambition?
How fondly I remember long and heated sessions over just such questions with
my graduate school friends, arguing through the night with a fervor surpassing
our level of knowledge.
</i></blockquote>

<p>Revisiting these questions five decades later, what she doesn&apos;t produce is a
dry, academic treatise on the historic principles of leadership. Instead, she
tells the story of four presidents, letting their lives and not her words show 
what made them great leaders. The result is a joint biography of Abraham Lincoln,
Theodore Roosevelt, Franklin D. Roosevelt and Lyndon B. Johnson; a biography that
doesn&apos;t just tell the story of the men and their times, but of great leaders and
how they led.</p>

<center><b>* * *</b></center>

<p>Goodwin structures her book in three sections, with a chapter on each president
in each section. The first section is their early life: how and where they spent
their childhood, their character development as young men, and the circumstances
that first brought them into politics. The second section is all about adversity:
how each man experienced a deep crisis in his life and the effect this had on his
career, his character, and his leadership. The third section sees them take the
White House, facing challenges that threaten an entire nation. &ldquo;<i>There</i>&rdquo;, as 
Goodwin writes, &ldquo;<i>at their formidable best, when guided by a sense of moral 
purpose, they were able to channel their ambitions and summon their talents to 
enlarge the opportunities and lives of others.</i>&rdquo;</p>

<p>It is no accident that Goodwin chose these four. Aside from the fact that they
are the presidents she has studied most thoroughly, Lincoln and the two Roosevelts 
are known as perhaps the greatest presidents the United States have had. Johnson
makes an interesting addition, his legacy and memory scarred by his administration&apos;s 
handling of the Vietnam war. However, he nonetheless deserves great respect for the
wide-reaching civil rights legislation he implemented. Also, his somewhat more
problematic character (which Goodwin can write about from first-hand experience)
makes a thought-provoking narrative counter-point to the almost saintly Lincoln.</p>

<center><b>* * *</b></center>

<p>For me personally, the book came with perfect timing. I had been
wanting to read more about American history for some time, I value
good biographies, and I was on the lookout for a fresh book on
leadership. Goodwin&apos;s presidents covered all bases admirably.</p>

<p>Her writing is delightful to read and she gives one a good feel for the atmosphere
of the times she is describing. Switching between the presidents (and the decades) 
between chapters can be a bit confusing, but also provides an illuminating
birds-eye perspective of the broad sweep of American history. She keeps up a good
pace throughout her stories, but not at the expense of relevant detail. Her
characterisation of her subjects is warm and personal and up-close; making the
reader feel as if one has really gotten to know these men, how they thought,
felt, and acted. Lastly, her commentary on their leadership never feels imposed
or forced. She doesn&apos;t use their lives as plump illustrations of her ideas, rather,
her comments serve to delicately accentuate the principles they lived.</p>

<p>Quite frankly, I found her book inspiring. But what did it teach me?</p>

<center><b>* * *</b></center>

<p>Although the book holds many lessons, the three overarching principles it drives 
home with force are the importance of <strong>character, teamwork, and communication</strong>.</p>

<p>Indeed, character is what Goodwin focuses on the most. Time and again she emphasises
how these presidents combined fierce ambition with a deep-seated desire to truly
help others. Surprisingly, they were humble men&mdash;not slinkingly &apos;umble as Uriah
Heep, but humble in the sense that they really cared about the person opposite them.
Almost paradoxically, it was this humility that drove them on, that made them <em>want</em>
to make things better for people around them, and that made people around them trust
them enough to give them ever more responsibility and power. They were, in fact,
servant leaders.</p>

<p>The greatest example for this (thoroughly biblical) principle is Lincoln. Goodwin remarks
of him: &ldquo;He never allowed his ambition to consume his kindheartedness.&rdquo; Although
he dreamt of greatness from an early age, he was always a compassionate and patient
man. A key trait of his personality was that he had a kind eye for those ranked
lower than him. As a lawyer, he would talk with even the youngest clerk; as a 
president, he visited his soldiers in their camps and kept the White House door 
open for them. He knew that personal was not the same as important. When the Civil 
War broke out shortly before his inauguration, he assembled a cabinet of the most
capable men in the Union&mdash;which happened to be his greatest rivals, men from both
parties. It took all his determination, empathy, and leadership to hold this group
together, but eventually he forged them into a team of deeply devoted colleagues.</p>

<p>This makes him an excellent example of a good teamplayer, too. I found an even more 
striking example, though, in the story of FDR. After an attack of polio left him
crippled in a wheelchair, he assembled a small, intimate group of friends to be his 
advisers and co-workers. This team (which included his wife Eleanor) became an 
&ldquo;extension of his body&rdquo;, his &ldquo;eyes and ears&rdquo; where he couldn&apos;t go. From this nucleus,
Roosevelt&apos;s team grew in proportion to his responsibilities. As Governor of New York,
a special advisory committee of three professors brought him into contact with
experts in any field he needed to learn about. But his finest hour, and one of the
most inspiring stories of teamwork I know, came when he was elected as president.</p>

<p>Defeating the incumbent Herbert Hoover, FDR came to power in 1933, at the height
of the Great Depression. America&apos;s economy was in free fall: unemployment was
at 25%, and thousands of banks had collapsed or were in imminent danger of doing 
so. As the backbone of the economy, the recovery of the banking system was of
immediate and paramount importance. Accordingly, within hours of his inauguration,
President Roosevelt set his new-formed cabinet the task of addressing the crisis.
Within a day, he closed all banks nation-wide by executive order, imposing a
week-long &ldquo;bank holiday&rdquo; to halt the tumble and give the administration time to
come up with emergency legislation. Now, his team kicked into overdrive. Working
around the clock, the president and his ministers consulted with bankers and governors,
congressmen and officials to find a way forward. Before the week was out, they
had drafted a bill and presented it to a special session of Congress. With both
parties working in unison, it passed both the House of Representatives and the
Senate in an astonishing, record-breaking nine hours.</p>

<p>The new law provided a framework to begin the long, slow climb out of the Depression.
But it could only work if people trusted it, and if they renewed their trust in
the banks enough to deposit their money again. Thus, Roosevelt&apos;s last act of his
crazy first week in office was to speak to the people. In the first of his famous
&ldquo;fireside chats&rdquo;, he addressed the nation by radio. Simply and personably, he
explained &ldquo;<em>what</em> has been done in the last few days, <em>why</em> it was done, and <em>what</em>
the next steps are going to be&rdquo;. And when the banks reopened the next day, the
people responded&mdash;across the country, long queues of people waited not to take
their money out of the banks, but to put it back in. The tide had turned.</p>

<p>The glowing examples of FDR&apos;s fireside chat or Lincoln&apos;s Gettysburg Address mark
them out as gifted communicators. But although Teddy Roosevelt and LBJ perhaps 
aren&apos;t primarily remembered for their great speeches, they too knew how to connect
with people. Each of these four presidents knew the importance of good communication.
They could reach out to people and touch them; inform, persuade, and inspire 
individuals and societies. And this, together with their character and teamwork,
made them leaders.</p>

<center><b>* * *</b></center>

<p>This is what the book showed me. Although I have read many books on leadership
(and I heartily recommend reading a more systematic book too, if you&apos;re interested
in the subject), Goodwin&apos;s &ldquo;Lessons from the Presidents&rdquo; brings theory to life
by simply looking at the lives of these four great leaders. They were four men 
who made a difference&mdash;four men who knew how to leverage their own gifts and those
of others, who weren&apos;t perfect but who worked hard to make the world just a little
better. Because, as was said of FDR: &ldquo;his general attitude was that <em>the people 
mattered</em>.&rdquo;</p>
 ]]></description> </item><item> <title>A poisoned democracy</title> <link>https://terranostra.one/posts/A-poisoned-democracy.html</link> <pubDate>2019-11-05</pubDate> <author>Daniel Vedder</author> <guid isPermaLink="true">https://terranostra.one/posts/A-poisoned-democracy.html</guid> <category><![CDATA[ society ]]></category><category><![CDATA[ politics ]]></category><category><![CDATA[ democracy ]]></category><category><![CDATA[ essay ]]></category><category><![CDATA[ favourites ]]></category> <description><![CDATA[ <p>It&apos;s time to talk. I&apos;ve been thinking about this for months, and it&apos;s time
to &ndash; well, not stop thinking, but start talking. What&apos;s bugging me? That
Americans have stopped talking. Or at least, that they no longer seem to talk
with each other, but only about each other &ndash; that the concept of political
debate has been given up in favour of self-reinforcing bubble building and the
creation of an all-pervading enemy mentality.</p>

<p>Why does this bother me, sitting safely on the other side of the Big Pond?
Because I can see it affecting my friends, and because the same societal patterns
are beginning to manifest themselves here in Germany, too. America was the first
modern democracy and we have learnt much from its experience and example. But
right now, I find myself praying: &ldquo;God, don&apos;t let us become like the United 
States.&rdquo; The Land of the Free and the Brave has become a poisoned democracy.</p>

<!--more-->

<center><b>* * *</b></center>

<p>In Rick Riordan&apos;s &ldquo;Percy Jackson&rdquo; fantasy series (some of my favourite books,
by the way), there is a summer camp for halfbloods. It&apos;s the only place where
these children, demigods born from the union of a Greek god with a mortal, are
are truly safe. To keep out the ever-present monsters, a magic pine tree guards
the camp, protecting its borders.</p>

<p>One day, a traitor poisons the tree. As it turns yellow, shedding its needles
in a slow death from the inside out, the camp boundary becomes permeable.
Monsters start to come through, round-the-clock border patrols must be organised,
and of course a quest is dispatched to find a cure for the tree.</p>

<p>In a way, democracy is similar to Camp Halfblood: a safe haven in a world that
tends much more towards corruption, oppression, and dictatorships than it does
towards freedom and the rights of citizens. And like Camp Halfblood, democracy
has a good spirit protecting it: the willingness to solve problems by talking.</p>

<p>A common misconception is that democracy is all about the right to vote. It&apos;s not.
It&apos;s about the right to talk, or more specifically, the right of every citizen
to have a say in the attempt to overcome society&apos;s challenges. Voting is simply a
necessary abstraction for this in a country too large to give everybody a physical
seat at the table. Democracy is not about voting for who gets to be the Big Boss,
its about discussing what kind of country we want to live in and how we plan to
get there. In ancient Athens, a core concept of their democracy was <em>parrhesia</em>,
the right of the free man to speak up in the assembly of the city. That is what
they meant when they coined the term <em>demokratia</em>, &ldquo;the rule of the people&rdquo;.</p>

<p>That, incidentally, is also why the Parliament ought to be more important than 
the President. A president without parliament is simply an elected dictator. 
(And believe me, plenty of dictators started out that way.) &ldquo;Parliament&rdquo; comes 
from <em>parler</em>, meaning &ldquo;to talk&rdquo;, and that&apos;s what parliament is for. This is the
institution where the great debates of the age ought to take place, where a 
group of citizens gets together to talk through the challenges facing our society.</p>

<p>Of course, the debates in parliament are merely an extension of the discourse
going on in society at large. And it is a hallmark of a healthy democracy that
there is a lively culture of political discussion. The first thing dictators do
is to get rid of this, suppressing communal problem-solving and exchanging it for
The One True Way (their&apos;s, obviously). They know that when the people start
talking again, openly discussing the situation, they&apos;re in trouble. That&apos;s
precisely what happened thirty years ago in East Germany. The people started
talking, and eventually a wall fell and a despotic government crumbled.</p>

<p>What happens when people stop talking voluntarily?</p>

<center><b>* * *</b></center>

<p>Now it may seem strange to accuse Americans of not talking enough. After all,
few countries have such a strict interpretation of &ldquo;free speech&rdquo; as the USA.
But the real question is not whether you talk, it&apos;s how you talk.</p>

<p>As I said above, the idea of democracy is that we want to solve our problems
together. The difficulty is, of course, that you and I may have very different
ideas about what the best solution is, or even what the problems are. So we need
to talk.</p>

<p>If you&apos;ve ever sat down with a group of people with diverging opinions and tried
to find a common solution (even if it was just about what game to play with your
siblings), you&apos;ll know how challenging this can be. Some people, after all, are
quite attached to their opinions. (I certainly am&hellip;) But if you want to find a
solution that works for as many people as possible, you need to get off your
high horse for a moment and actually listen to what the other person is saying.
You have to try to understand him, his situation, and his motives. What is he
proposing? Why is this important to him? Could this work for you too, or can you
think of an alternative approach that addresses both his and your concerns?</p>

<p>Ideally, you&apos;ll come up with a solution that everybody is happy with, or can at
least live with. Of course, sometimes you won&apos;t. But while it&apos;s not such a big
deal not to reach a deal on which game to play tonight, there are some issues
where a No Deal would be catastrophic. (And no, I&apos;m definitely not looking at
you, UK&hellip;)</p>

<p>Obviously, the attitude with which you go into the negotiations has a huge impact
on their likelihood of success. If you want to play chess and your brother doesn&apos;t,
he isn&apos;t likely to change his mind if you insult him as &ldquo;too stupid for a thinking
game&rdquo;. The best way to sink a negotiation before it begins is to a) question the
other person&apos;s motives, or b) insult him personally.</p>

<p>And now we&lsquo;re at the crux of the matter. Because almost all Stateside political
comments I have read recently neatly fall into one or both of these categories.
Somehow, it&apos;s not enough to disagree, you have to do so disagreeably. Instead of
simply sticking to the facts, you have question your opponents&rsquo; intelligence for
not coming to the same conclusions as you. Instead of trying to understand what&apos;s
important to them, you come out with blanket accusations of dishonesty and 
corruption.</p>

<p>And so you entrench yourself in your cocoon of like-minded partisans, assuring
each other that you are right and that the other side is not only wrong, they
are evil. You are no longer citizens working towards a common solution, or even
parties with differing ideas, you are enemies &ndash; and because you&apos;re obviously
on the side of the Goodies, the others have to be the Baddies.</p>

<center><b>* * *</b></center>

<p>Thus, democracy is poisoned. With every Facebook post condemning the &ldquo;Left&rdquo; and
every tweet blasting the &ldquo;Right&rdquo;, every article degrading a group of people for
holding the wrong opinion, every campaign speech criminalising the opposition.
Our German president recently said: &ldquo;It is through their sum, the daily cannonade
of attacks, that many small injuries turn into the gaping wounds afflicting and
eroding our culture of discourse today.&rdquo; It matters how we phrase our disagreement,
what words we choose to criticise those of differing opinion; for the words you
choose today will affect how you see each other tomorrow. Death comes by a thousand
paper cuts. And as the tree withers, the monsters invade.</p>

<p>Because a society that has forgotten how to come to an agreement still needs to
make decisions, the feuding parties resort to subterfuge and tactical maneuvering.
Instead of a round table of common discussion, politics becomes a battlefield where
every achievement for the enemy is necessarily a loss for oneself. Consequently,
all means are legitimate if they only serve to frustrate the opposition. 
Parliamentary procedures meant to expedite the decision-making process are used
to prevent a real debate. Constitutional constructs drawn up to manage emergencies
are fired indiscriminately until they become daily occurrences.</p>

<p>But democracy was not designed for this. A German constitutional scholar famously
said: &ldquo;Democracy lives on prerequisites it cannot itself guarantee.&rdquo; Although our
constitutions make allowance for dealing with individual misbehaviour, they cannot
indefinitely sustain a wholesale attack on the trust underlying the system.
Democracy only works when people are willing to talk, and when they trust each
other enough to actually do so. And so every attack on the fundamental credibility
of a party or an institution ultimately becomes an attack on democracy. Because
where people stop talking, they start fighting. Suddenly, democracy has become
anarchy.</p>

<p>It&apos;s happened before. It happened at the end of the Roman Republic, where an
increasingly corrupt Senate took to settling political scores using gangs of thugs
on the streets. It happened in the run up to the American Civil War, when tempers
became so heated over the question of slavery that war seemed like the only way
out. It happened in the Weimar Republic of Germany, when communists and fascists
resorted to pitched battles at campaign events, and public trust in the democratic
institutions was so far eroded that the people voted the openly anti-democratic 
Nazis into power. When the tree is poisoned, the monsters invade.</p>

<center><b>* * *</b></center>

<p>We have to keep talking. It sure isn&apos;t easy, but who ever said democracy was
supposed to be easy? Talking doesn&apos;t mean pretending there are no problems, or
that there are no differences in opinion. Talking does mean respecting those
differences in opinion and not disqualifying somebody from the debate just
because you don&apos;t agree. After all, the very concept of a debate presupposes
a diversity of opinions. That&apos;s something we&apos;ve just got to live with &ndash; it&apos;s
the price of freedom.</p>

<p>I&apos;m not some big politician or journalist, I don&apos;t have the kind of influence it
would take to change a culture. I cannot go questing for the Golden Fleece to 
magically heal the tree. But I can watch what I think and what I say. I can remind
myself to see others as fellow citizens with their own ideas about things. I can
try to understand where they are coming from &ndash; if only to help me persuade them
with arguments that are actually relevant to them. And who knows? I might even
learn something from them. Perhaps they do have a point. I&apos;ll never find out if
we don&apos;t keep talking.</p>
 ]]></description> </item><item> <title>Some final thoughts on programming</title> <link>https://terranostra.one/posts/Some-final-thoughts-on-programming.html</link> <pubDate>2019-10-14</pubDate> <author>Daniel Vedder</author> <guid isPermaLink="true">https://terranostra.one/posts/Some-final-thoughts-on-programming.html</guid> <category><![CDATA[ computers ]]></category><category><![CDATA[ programming ]]></category> <description><![CDATA[ <p>In the past seven posts of this series, we&apos;ve looked at how to make software
understandable, reliable, and extendable. We&apos;ve seen techniques for dealing
with errors, reducing complexity, and developing in teams. We&apos;ve touched on
different programming languages and paradigms, and conventions for documenting
code. Of course, these have been very cursory glances; but hopefully enough
to give a brief overview of what to think about when developing software in a
scientific context. Now, in closing, I want to mention two last topics and give
a few pointers on where to go from here.</p>

<!--more-->

<h2>Optimisation</h2>

<p>Thankfully, we are no longer in an era where 
<a href="https://www.freecodecamp.org/news/where-do-all-the-bytes-come-from-f51586690fd0/" >every byte of memory is precious</a>
and <a href="http://www.catb.org/jargon/html/story-of-mel.html" >programmer time is cheaper than computer cycles</a>.
Today, most programmers rarely have to worry about performance issues when 
writing their code.</p>

<p>Unfortunately, computational scientists often still do. Whether we deal with
huge data sets (such as genomic sequences or imaging data) or construct complicated
mechanistic models, we are often pushing the boundaries of what our computers
can do. So if we find our program&apos;s memory consumption exceeds the RAM we have
available, or the run-time starts to be measured in weeks instead of minutes, we
need to optimise. This takes some skill.</p>

<p><strong>The first rule of optimisation is: do it last!</strong> In the words of Donald Knuth:
&ldquo;Premature optimisation is the root of all evil.&rdquo; <em>First</em> make sure your program 
is correct, <em>then</em> figure out where the performance bottlenecks are, <em>then</em> try 
and make them more efficient.</p>

<p>Figuring out performance bottlenecks first, before you start tweaking your program,
is incredibly important. Usually, one small part of a software is responsible for
the lion&apos;s share of its run-time or memory consumption. Improving this bottleneck
can get you orders of magnitude more efficiency. And as long as the bottleneck
remains, improving all the other pieces is virtually useless.</p>

<p>To figure out where these bottlenecks are, you can use a program known as a
&ldquo;profiler&rdquo; (every language has at least one available). This will tell you in
detail which function calls use how much time and memory. Alternatively, if you
just need a quick-and-dirty overview, you can use your language&apos;s <code>time()</code> call
to calculate function run-times yourself.</p>

<p>(Keep in mind that you can optimise for processing speed and a low memory 
footprint &ndash; but at some point, you are usually going to have to settle for a
trade-off between the two.)</p>

<p>Three common types of bottlenecks that you will face are those related to 
algorithms, data structures, and I/O (input/output) calls.</p>

<p>Algorithms and data structures are a huge component of computer science as a
discipline that I won&apos;t even try to cover here. Generally, you don&apos;t need an
in-depth knowledge of the various algorithms anyway, but it does help to at least
be aware of tried-and-tested solutions to common problems like sorting or 
searching. Data structures is something you should try to learn more about, as
the right choice of data structure can make a world of difference to your program&apos;s
performance. You can have a look at this <a href="https://www.tutorialspoint.com/data_structures_algorithms/index.htm" >online resource</a>,
or check your local library for a relevant text book on the topic.</p>

<p>Whereas algorithmic optimisation is a very mathematical endeavour, I/O optimisation
is much more about the hardware you&apos;re working on. Often, it isn&apos;t the actual
calculations that make a program slow, but the time it takes the computer to move
the bits and bytes around. Common operations that take a lot of time are network
connections, disk reads/writes, or screen output. If you do a lot of these
successively, the effect will be noticeable. Here, it often helps to cache data
in memory (instead of re-reading it every time it&apos;s needed), or buffering output
data and flushing it out in one go (instead of setting up a new connection for 
every little bit).</p>

<p>Overall, optimisation is a huge topic that quickly leads into highly advanced
techniques based on very specialised knowledge. Therefore, I will say no more
about it, except to encourage you to keep looking and learning, to find out what
works in your scenario in your language on your machine.</p>

<h2>Licenses</h2>

<p>Strictly speaking, licenses are not an aspect of software development, but if you
work with or create open source software, you&apos;ll have to know at least a bit
about them.</p>

<p>&ldquo;Open source&rdquo; means that, unlike for most commercial software, the source code
for a program may be freely inspected, modified, and redistributed. There&apos;s a
whole range of licenses that allow this, each with slightly differing conditions.
It can all be a bit confusing, but fortunately, there are <a href="https://choosealicense.com/licenses/" >good overviews</a>
available that can be consulted.</p>

<p>Perhaps the two most important are the GNU General Public License (GPL) and the
MIT license. The GPL is what is known as a &ldquo;copy-left&rdquo; license &ndash; not only must
the source code for the work itself be made freely available, but all future
derivative works must be published under the same license. The MIT license is
less restrictive: it only stipulates that any redistribution of the software
must retain the original license notice, but derivative works may choose a
different license model.</p>

<p>But don&apos;t be too worried: if you&apos;re choosing a license for your own software, it 
basically boils down to a matter of preference (and software-political opinion) &ndash; 
unless your employer has a stated policy in the matter. Αnd if you&apos;re joining an
existing project, that choice has already been made anyway.</p>

<h2>Going on from here</h2>

<p>Slowly, the importance of good software development practices is being recognised
by the scientific community. Recently, the topic was even covered by <a href="https://www.nature.com/articles/d41586-019-02046-0" >Nature</a>.
Various groups are forming to train, support, and connect scientists who write
software &ndash; examples being the <a href="https://www.software.ac.uk/" >Software Sustainability Institute</a>
or the <a href="https://rse.ac.uk/who/" >Research Software Engineer Association</a>.</p>

<p>As I have previously said, the purpose of this series of articles is to give an
overview of topics that must be considered when developing software, especially
in a scientific context. I hope this in itself proves useful, but must stress
that everything I have touched I have touched only very briefly. Much more could
and perhaps should be said &ndash; but diving deeper remains an exercise for the reader.</p>

<p>In closing, I can only repeat my mantra from the beginning: to become a better
programmer, you must <em>read, write, and repeat</em>. In that spirit, happy hacking!</p>

<p><strong>&ndash; &ndash; &ndash;</strong></p>

<h3>Read on</h3>

<ol>
<li><p><a href="https://terranostra.one/posts/Principles-of-Software-Development.html" >Principles of Software Development</a></p></li>
<li><p><a href="https://terranostra.one/posts/Understandable-Software.html" >Understandable Software</a></p></li>
<li><p><a href="https://terranostra.one/posts/The-Art-of-Abstraction.html" >The Art of Abstraction</a></p></li>
<li><p><a href="https://terranostra.one/posts/Dealing-with-Errors.html" >Dealing with Errors</a></p></li>
<li><p><a href="https://terranostra.one/posts/Programming-tools-languages.html" >Programming Tools: Languages</a></p></li>
<li><p><a href="https://terranostra.one/posts/Programming-tools-paradigms.html" >Programming Tools: Paradigms</a></p></li>
<li><p><a href="https://terranostra.one/posts/Developing-in-a-team.html" >Developing in a Team</a></p></li>
<li><p><a href="https://terranostra.one/posts/Some-final-thoughts-on-programming.html" >&gt;&gt; Final Thoughts &lt;&lt;</a></p></li>
</ol>

<h3>Bibliography, part II</h3>

<p>Apart from the books cited <a href="https://terranostra.one/posts/Principles-of-Software-Development.html" >before</a>
and the associations mentioned above, here are three more sources for further reading:</p>

<ul>
<li><p><a href="https://terranostra.one/static/softdev/best_practices.pdf" >Wilson et al. (2014)</a>
  <em>&ldquo;Best Practices for Scientific Computing&rdquo;</em> &ndash; Things to keep in mind when
  developing code (largely similar to the topics covered in this series).</p></li>
<li><p><a href="https://terranostra.one/static/softdev/good_enough_practices.pdf" >Wilson et al. (2016)</a>
  <em>&ldquo;Good Enough Practices in Scientific Computing&rdquo;</em> &ndash; Things to keep in mind when
  working with computers in science generally. Includes a brief section on writing
  code, but also touches on things like data management and project organisation.</p></li>
<li><p><a href="https://guide.esciencecenter.nl/best_practices/overview.html" >Netherlands eScience Center guide</a> &ndash;
  A comprehensive guide to software development produced by the Dutch expertise
  center for research software. Goes into a lot more detail on many topics covered
  in this series.</p></li>
</ul>
 ]]></description> </item><item> <title>Developing in a team</title> <link>https://terranostra.one/posts/Developing-in-a-team.html</link> <pubDate>2019-07-30</pubDate> <author>Daniel Vedder</author> <guid isPermaLink="true">https://terranostra.one/posts/Developing-in-a-team.html</guid> <category><![CDATA[ computers ]]></category><category><![CDATA[ programming ]]></category> <description><![CDATA[ <p>Although a lot of scientists who write code usually work on their own, there will
always be occasions when one becomes part of a development team. This could be
because a junior colleague is joining your project (or vice versa), or because
the software you are working on is so large and complex it requires the joint
efforts of several people to complete. These scenarios not only make the 
principles we have already discussed more important (readable code, good 
architecture, etc.), they also necessitate a whole new set of procedures.</p>

<!--more-->

<h2>Exchanging code: version control</h2>

<p><em>(If you already know about git, you can skip this section.)</em></p>

<p>The first issue you&apos;ll face is how to pass your source files around. Everybody 
needs an up-to-date version and you mustn&apos;t break anything if two people have 
changed the same file &ndash; how do you do that?</p>

<p>For this purpose, there is what is called <em>version control software</em>, the most
popular of which is <strong>git</strong>. In a normal git setup, the code is hosted in a
central <em>repository</em>. Each individual developer can <em>check out</em> this code (i.e.
download it to his own machine) and change it at will. Each batch of changes
is <em>committed</em> &ndash; this creates a &ldquo;snapshot&rdquo; of the project in the current
condition. Finally, the developer <em>pushes</em> his changes back up to the master
repository, from were others can <em>pull</em> them into their own local copies. Git
<em>merges</em> all changes from all developers so that nothing is accidentally lost
or overwritten. (As there are plenty of excellent tutorials out there on how
to use git, I won&apos;t go into details. See <a href="https://www.sitepoint.com/git-for-beginners/" >here</a>,
<a href="https://www.tutorialspoint.com/git/index.htm" >here</a>, <a href="https://git-scm.com/book/en/v1/Getting-Started-Git-Basics" >here</a>,
or <a href="https://help.github.com/en/articles/set-up-git" >here</a> for more.)</p>

<p>The most popular git hosting site by far is <a href="https://github.com" >Github</a>, which
you have almost certainly heard of before. It is free and allows you to easily
share your code with just about anyone. A popular alternative is <a href="https://gitlab.com" >Gitlab</a>,
which has the advantage that you can host it yourself onsite.</p>

<p>An important point to make is that you should be using git anyway, even if you&apos;re
just working by yourself. The series of commits creates a great timeline to follow
your project&apos;s progress, and the ability to jump back to a given commit means
you&apos;ve always got backups in case you screw something up. Also, sharing your work
with others is dead easy if you&apos;ve already got it sitting on Github.</p>

<h2>Improving code: collaborative development</h2>

<p>Developing software in a team offers enormous benefits, if done right. For a
start, the quality of the software itself can increase dramatically, because
there are more minds thinking about it and more eyes looking out for mistakes.
At the same time, the team benefits too, as its members exchange ideas and 
share their experience and knowledge. This effect is especially strong for
junior team members, who can learn rapidly from observing the way more experienced
developers work.</p>

<p>Over the last few decades, industry practice has identified various techniques
to maximise these benefits. Two of the most efficient are pair programming and
code inspections, which I will briefly outline here. Both of these have been 
found to have an error-detection rate of around 40-70%, which is even higher than 
good testing achieves. (Disclaimer: I&apos;ve never actually had the chance to try 
these out myself, sadly. I&apos;m mostly going by McConnell&apos;s <em>Code Complete 2</em> and 
various online sources such as <a href="https://www.cs.cmu.edu/~aldrich/courses/654-sp07/slides/2-inspection.pdf" >this</a>.)</p>

<h3>Pair programming</h3>

<p>Pair programming is a bit of an unusual approach in that it entails two programmers
working on the same computer. One, the <em>driver</em>, is the one actually typing into
the keyboard. The other, the <em>navigator</em>, watches for mistakes and thinks ahead
about what must be done next. The two partners keep up a conversation on what they
are doing or thinking and regularly switch roles.</p>

<p>This technique is especially effective when working on difficult sections of the
code. Pairs keep each other focussed, spot more mistakes and think of more possible
approaches than an individual developer would. Together, they deliver higher
quality code in a shorter time than alone.</p>

<p>However, it takes a bit of practice to get used to this style of coding. Not all
pairs combine well, and not all code is amenable to the technique&apos;s specific 
benefits. When it works, though, it works well; and developers often enjoy the
team-oriented approach.</p>

<h3>Code inspections</h3>

<p>Code inspections are a highly formalised version of code reviews that are intended
to find errors during the development phase. An inspection will be chaired by a
designated moderator (not the author of the inspected code!). This team member
sends out a copy of the code to a small number of reviewers (about one to four)
and arranges a meeting for the actual discussion. Each reviewer prepares by
reading the code himself and annotating any problems he finds, based on a checklist
of common mistakes/good practice. During the meeting, the code is read through
section by section as the reviewers give and discuss their comments. Importantly,
the aim of the meeting is <em>not</em> to find solutions, but purely to identify
problems. Each problem is recorded and the complete list is later handed to the
author for fixing.</p>

<p>Inspections are a very thorough tool that has proved to be highly effective at
finding errors. As McConnell writes:</p>

<blockquote><i>
A study of large programs found that each hour spent on inspections avoided an 
average of 33 hours of maintenance work and that inspections were up to 20 times 
more efficient than testing (Russell 1991).
</i></blockquote>

<p>Although they might seem overdone in their formality, experience has shown that 
less structured code reviews usually perform significantly worse. One challenge 
in the inspection is to keep the discussion on point and technical. This is where
the moderator comes in, as it is his task to ensure that the discussion doesn&apos;t 
drift off-topic or become personal (attacking the author).</p>

<p><strong>&ndash; &ndash; &ndash;</strong></p>

<p><strong>1st Postscript.</strong> The NASA space shuttle software is renowned as being the most
bug-free software ever created. Through stringent development practices, its 
engineering team managed to reach a rate of just one error in half a million
lines of code. (Industry average is 1-25 errors in 1000 LOC!) For an instructive
write-up of how they do this, <a href="https://www.fastcompany.com/28121/they-write-right-stuff" >see here</a>.</p>

<p><strong>2nd Postscript.</strong> I have created a simple code inspection checklist for use
at our institute. If you are interested, you can download the <a href="https://terranostra.one/static/softdev/code_checklist.pdf" >basic version</a>,
or a <a href="https://terranostra.one/static/softdev/code_checklist_detailed.pdf" >self-explanatory version</a>.</p>

<h3>Read on</h3>

<ol>
<li><p><a href="https://terranostra.one/posts/Principles-of-Software-Development.html" >Principles of Software Development</a></p></li>
<li><p><a href="https://terranostra.one/posts/Understandable-Software.html" >Understandable Software</a></p></li>
<li><p><a href="https://terranostra.one/posts/The-Art-of-Abstraction.html" >The Art of Abstraction</a></p></li>
<li><p><a href="https://terranostra.one/posts/Dealing-with-Errors.html" >Dealing with Errors</a></p></li>
<li><p><a href="https://terranostra.one/posts/Programming-tools-languages.html" >Programming Tools: Languages</a></p></li>
<li><p><a href="https://terranostra.one/posts/Programming-tools-paradigms.html" >Programming Tools: Paradigms</a></p></li>
<li><p><a href="https://terranostra.one/posts/Developing-in-a-team.html" >&gt;&gt; Developing in a Team &lt;&lt;</a></p></li>
<li><p><a href="https://terranostra.one/posts/Some-final-thoughts-on-programming.html" >Final Thoughts</a></p></li>
</ol>
 ]]></description> </item><item> <title>Dumping Mendeley for Zotero</title> <link>https://terranostra.one/posts/Dumping-Mendeley-for-Zotero.html</link> <pubDate>2019-07-15</pubDate> <author>Daniel Vedder</author> <guid isPermaLink="true">https://terranostra.one/posts/Dumping-Mendeley-for-Zotero.html</guid> <category><![CDATA[ computers ]]></category><category><![CDATA[ science ]]></category> <description><![CDATA[ <p>For several years, my library program of choice was Mendeley, which used to be a
fantastic piece of software that perfectly fit my needs. Unfortunately,
phenomenally bad management and some very dubious design choices have made it
pretty much unacceptable. I&apos;ve hesitated for a long time, but last week I decided
it was time to take the plunge and have now switched to Mendeley&apos;s open source
competitor, Zotero. Here&apos;s my first impression.</p>

<!--more-->

<center><b>* * *</b></center>

<p>I have to say I&apos;m rather sad about having to switch. I really liked Mendeley. It
had a great user interface, an inbuilt PDF reader and annotator, easy syncing,
good web and mobile apps, and useful Word/Firefox plugins for citing/importing.
In short, it was just what I needed. (Plus, it was free, and it worked on Linux.)</p>

<p>I first got a bit dubious when the company behind Mendeley was bought by Elsevier.
My supervisor is vehemently anti-Elsevier, and I confess I have no great love for
their business practices either. But practicality beats purity, and Mendeley was
great &ndash; so I stayed.</p>

<p>Disaster struck some time last year, when I opened my library one day as usual,
only to find I couldn&apos;t open most of my PDFs anymore. Like a ball in a magician&apos;s
hand, they had simply disappeared! Soon I discovered that I wasn&apos;t the only user
affected, and that the development team had somehow managed to push a buggy
update that had mangled files all over the world.</p>

<p>Thankfully, I had just handed in my bachelor&apos;s thesis, or I would have been
completely screwed. In my then-current situation, it was merely an inconvenience
that I hoped would soon be righted. But not only did Mendeley take several weeks
(!) to release a fix, it so happens that the fix didn&apos;t work on my machine. Even
now, most of the entries in my library are orphaned.</p>

<p>As I am now back in a stage where I have to do a lot of literature research, that
basically spelled the end of my Mendeley time. I can&apos;t work with a broken library,
and I won&apos;t fix a library if I can&apos;t trust the hosting company not to break it 
again (or even to care that it&apos;s broken). So I knew I finally had to make the
switch to Zotero.</p>

<p>As I read up on making the switch, I discovered two other things about Mendeley.
First, their Word and Firefox plugins are basically forks of older (and inferior)
versions of the same Zotero plugins. Secondly, a couple of months ago,
they started to encrypt their library databases. With the result that Zotero can
no longer import Mendeley libraries, even though the reverse is perfectly 
possible. In other words: Mendeley not only broke my library, they are now
preventing me from salvaging it with a working program.</p>

<p>It turns out I still had an old backup lying around that was still unencrypted,
so I have been able to recover about three quarters of my library entries for
Zotero. But as you can imagine, I was still pretty upset.</p>

<p>So now I&apos;m on Zotero. My general impression is favourable so far, although some
things are still suboptimal. My biggest lament is the loss of the Mendeley PDF
editor. For some inexplicable reason, there still isn&apos;t a decent general PDF
editor available for Linux, at least not on a GNOME desktop environment. Meaning,
I can no longer directly annotate my PDF files. Oh well.</p>

<p>Slightly bothersome was the fact that several features that I was used to from
Mendeley are only available via plugins in Zotero &ndash; but at least they are
available. (For example, creating a constantly updated BibTeX file from a 
collection requires the &ldquo;Better BibTeX&rdquo; plugin.) I&apos;m also going to miss the 
Mendeley mobile app, although I understand Zotero has hired an iOS developer 
to build one. (Hope it comes out soon!)</p>

<p>Other things, however, are significantly better. I am especially pleased with the
import process. Zotero is a lot better at identifying article metadata from the
PDF file. On Mendeley autorecognition worked about half the time, on Zotero it&apos;s
more like 90% &ndash; that saves a lot of effort! Also, the web importer (Firefox plugin)
actually works, and is usually spot on.</p>

<p>I like the coloured tag system, and the ability to attach HTML notes to items.
Most of all, I am relieved to know that this is open source software that I can
fork myself, if necessary; and that I can sync my library using my own WebDAV
server &ndash; without having to trust any external company.</p>

<p>To sum up: I have traded in a bit of convenience and some very useful features
in the switch away from Mendeley. But given that I can no longer trust the
company, I can live with that. And in several ways, Zotero really is better.</p>
 ]]></description> </item><item> <title>Programming tools: paradigms</title> <link>https://terranostra.one/posts/Programming-tools-paradigms.html</link> <pubDate>2019-07-08</pubDate> <author>Daniel Vedder</author> <guid isPermaLink="true">https://terranostra.one/posts/Programming-tools-paradigms.html</guid> <category><![CDATA[ computers ]]></category><category><![CDATA[ programming ]]></category> <description><![CDATA[ <p>When we talk about &ldquo;using the right tools&rdquo; in programming, that applies to a lot
of different choices one can make. One is the choice of programming language,
which we covered in the last article. Another important &ldquo;tool set&rdquo; to be aware
of is that of programming <em>paradigms</em>.</p>

<!--more-->

<p>Briefly, a programming paradigm is a way of thinking about programming. 
Specifically, it describes how we go about representing a real-world problem in
computer code. A paradigm therefore includes both a mindset of how to analyse
these problems, and a process for implementing the solution.</p>

<p>As computer science and programming practice advance, paradigms wax and wane in
popularity. Here, I will briefly outline the three that are currently the most
frequently used.</p>

<h2>Procedural Programming</h2>

<p>This could perhaps be considered the &ldquo;default&rdquo; paradigm. It is what is known as 
an <em>imperative</em> paradigm, meaning that programs are thought of as a series of 
commands for the computer. Programming, in the procedural paradigm, consists of
step-by-step instructions to the computer about how to solve a given problem. 
(&ldquo;First do this, next do that.&rdquo;<strong>¹</strong>)</p>

<p>On the implementation side of things, code is structured in blocks: loops, 
conditionals, and functions. (Hence the name of its historical predecessor,
&ldquo;structured programming&rdquo;.) Generally, functions are viewed not in their 
mathematical sense, but merely as a collection of instructions that are grouped
together for convenience reasons. In short, they are not so much functions as
&ldquo;procedures&rdquo;.</p>

<p>If you write a simple script, chances are you&apos;re using this procedural paradigm.
Its approach is also very prominent in the next paradigm, object-orientation.</p>

<h2>Object Oriented Programming</h2>

<p>If you&apos;re taught software development today, OOP is what you&apos;re taught. This
paradigm was developed in the eighties, caught on in the nineties and was standard
for the development of larger programs by the 2000s.</p>

<p>Its core idea is to view the world as a collection of interacting objects of
various types. To do this, it uses <em>classes, objects, and methods</em>.</p>

<p>For example, imagine you wanted to model a city. A city consists of houses, so
you would have a class <code>House</code>. Houses can do things, like <code>consumeElectricity()</code> &ndash;
this would be a method. But not all houses are alike: there are appartment
blocks, schools, factories, offices&hellip; Each of these subclasses <em>inherit</em> from
the base class <code>House</code>, meaning they can all do that a basic house can (such as
consume electricity). But they can each have more specialised methods, too. For
example, the class <code>School</code> may have the method <code>teachChildren()</code>. (In the 
context of OOP, a method is defined as a function that can only be applied to
values of a defined type; in other words, a function that is associated with a
class.)</p>

<p>But there&apos;s not just one school in a city, neither is there just one appartment
block. Classes, therefore, are instantiated to produce objects. An object is
a specific instance of a class &ndash; not just any school, but &ldquo;Loughby Secondary
School&rdquo;. Each object has all the methods and attributes defined by its class and
any superclasses, but has its own attribute values. (All schools have a name, but
every school has a different name.)</p>

<p>This is a very intuitive approach to many programming problems, especially those
that involve modelling real-world phenomena. It also encourages strong 
<a href="https://terranostra.one/posts/The-Art-of-Abstraction.html" >encapsulation and abstraction</a>.
Because of these strengths, it is currently the most popular paradigm for anything
bigger than a 300-line script.</p>

<p>It does have its downsides, though. For starters, large object-oriented systems
have a propensity to turn into a complicated tangle of classes and hierarchies &ndash;
veritable phylogenies that are about as easy to understand as that of the 
prokaryotes. More significantly, not every programming problem lends itself to
this way of thinking.</p>

<h2>Functional Programming</h2>

<p>Data processing, for example. Although one can use OOP to represent a data 
pipeline (such as that from DNA sequencing data over alignment to genome analysis),
it is more natural to think about it as a set of functions applied in sequence.</p>

<p>That is just what functional programming does. In FP, the real world is not
abstracted into a bunch of classes and objects, but into series of interlocking
functions, each representing one process. Functions here are viewed in their 
mathematical sense, as entities that take some input and provide some output.
Another way of putting it is that FP is about &ldquo;evaluating an expression and 
using the resulting value for something&rdquo;<strong>¹</strong>.</p>

<p>This means that functional code uses a lot less assignment operations than the
imperative paradigms (it is considered a <em>declarative</em> paradigm), as expressions 
can easily be nested. Less assignments mean less variables being used, which 
avoids bugs caused by the improper/unexpected modification of variable values. 
Indeed, &ldquo;pure&rdquo; functional programming dictates that functions should be 
<em>side-effect free</em>, meaning they must not modify any global state at all. Given
identical input, a function should always return identical output &ndash; regardless
of the conditions elsewhere in the program.</p>

<p>The major advantage of this is that such functions are almost trivially easy to
test and debug, and can thereafter be considered &ldquo;black boxes&rdquo;. This greatly aids
reliability and understandability. On the downside, deeply nested function calls
can be troublesome to read, and completely pure FP is hard to achieve.</p>

<p>A second aspect of FP is that because functions are so important, they are made
&ldquo;first-class objects&rdquo;. That means that the programming language treats them like
any other variable type: you can pass functions as parameters to other functions,
or have functions that return functions. This opens up a whole world of 
possibilities. Amongst others, it enables the <code>map</code> function, which takes in a
function and applies it to each element of a given list (a quick alternative to
a <code>for</code> loop).</p>

<p>Historically, FP has been around a lot longer than OOP. (Once again, Lisp was a
pioneer in this department.) During the height of the &ldquo;OOP-craze&rdquo; it very much
diminished in importance, but is now being rediscovered as a sensible solution
for many scenarios.</p>

<h2>Conclusion</h2>

<p>Of course, functional programming isn&apos;t the Holy Grail either (even if some of
its proponents are at least as zealous as many of those of OOP). Remember, the
key message here is to <strong>Use the Right Tools</strong>.</p>

<p>There are many programming problems for which object-orientation is the most
obvious solution, and there are many others for which a functional approach is a
lot better. Equally, there are some programs that are so simple that you don&apos;t
need either.</p>

<p>Use whichever is appropriate, and feel free to mix-and-match. Fortunately, most
languages today are multi-paradigm and support more than one possibility. (Though,
it has to be stressed, not all do equally well in all paradigms!) Just remember:
not everything is a nail.</p>

<p><strong>[1]</strong> <a href="http://people.cs.aau.dk/~normark/prog3-03/html/notes/paradigms_themes-paradigm-overview-section.html" >Kurt Nørmark</a></p>

<h3>Read on</h3>

<ol>
<li><p><a href="https://terranostra.one/posts/Principles-of-Software-Development.html" >Principles of Software Development</a></p></li>
<li><p><a href="https://terranostra.one/posts/Understandable-Software.html" >Understandable Software</a></p></li>
<li><p><a href="https://terranostra.one/posts/The-Art-of-Abstraction.html" >The Art of Abstraction</a></p></li>
<li><p><a href="https://terranostra.one/posts/Dealing-with-Errors.html" >Dealing with Errors</a></p></li>
<li><p><a href="https://terranostra.one/posts/Programming-tools-languages.html" >Programming Tools: Languages</a></p></li>
<li><p><a href="https://terranostra.one/posts/Programming-tools-paradigms.html" >&gt;&gt; Programming Tools: Paradigms &lt;&lt;</a></p></li>
<li><p><a href="https://terranostra.one/posts/Developing-in-a-team.html" >Developing in a Team</a></p></li>
<li><p><a href="https://terranostra.one/posts/Some-final-thoughts-on-programming.html" >Final Thoughts</a></p></li>
</ol>
 ]]></description> </item> </channel> </rss>