Should you get a PhD?

Most people like to learn, some like it more than others… and they decide to focus their life on learning. They become scholars. I think it is a mistake to pursue a Ph.D. for its own sake but it is not a mistake to pursue scholarship.

In the good old days, people received a Ph.D. as a recognition of their status as a scholar. To industrialize and normalize the process, but the Ph.D. is just a badge or a signal, not what makes a scholar.

The Ph.D. represents, or at least represented, a core badge of honor for a scholar. Veblen, in the theory of the leisure class, argued that we are not driven by utility, but rather by social status. Thus many people to pursue a Ph.D. for status. We must not exaggerate this prestige however. Going to a bar and telling girls or boys that you have a Ph.D. won’t improve your odds. And there are deeper issues:

  • The Ph.D. effectively delays your entry in the real world by 5 years, give or take. You will learn a lot, but you learn a lot in the real world too. Such a delay in your life may soon look a bit more like a temporary escape from reality. It is an easy way out.
  • Since the seventies, but more acutely since the eighties, and partially by design, there has been a glut of Ph.D.s. This means that once you get your Ph.D., you will be in a sea of other Ph.D.s, with relatively few desirable jobs, and even fewer desirable jobs where you would want to work. Increasingly, foreign countries like China are awarding reputable Ph.D.s as well, so the glut is not going away. Why do I say that it is by design? Because instead of letting the market regulates the number of people going for a Ph.D., governments are working hard to entice more young people to go for the Ph.D. (despite the poor job market) by awarding scholarships or other support. Hence, unlike accountants or M.D.s, your Ph.D. does not grant you an exclusive access to a lucrative job category. Rather, you enter an overcrowded market. (There are exceptions. But do not go on instinct.)
  • Getting a Ph.D. is typically not a huge accomplishment if you are smart. It has more to do with proving you can conform than anything else. This explains why there is a glut and why the “prestige” associated with the Ph.D. is relatively fragile. That’s why we ended with books like Getting a Ph.D. is not enough. The Ph.D. is more like an initial badge: it only looks like a big deal when you don’t have one.
  • To derive any financial benefit from a Ph.D., you must join a large organization. This means that to be a “true” Ph.D., you have to become a bureaucrat. A professor at a research institution might spend 30% of his time seeking funding. Forget about spending your time daydreaming about great ideas: you will be filling forms, networking, attending meetings, and so on. Oh! You might be a prestigious bureaucrat, but that’s what you’ll be nevertheless, a bureaucrat. You might think that you’ll be free, but this freedom is narrow. To get funded, you must play the game. It used to be that one in a thousand researchers was as prolific as Einstein: we now have a few Einsteins per department. It is not that people have been getting smarter, is that they game the system by publishing and citing work entirely as a pursuit of prestige. And that is if you are successful: if you fail to secure a research position, you may end up going from post-doc to post-doc until you settle on a regular position that you could have gotten without the Ph.D.
  • To continue deriving prestige from your Ph.D., you should stay away from utilitarian work. The problem is that working on real problems makes you smart. The German philosopher Heidegger famously made this point with a hammer. To paraphrase him, it is not by staring at a hammer that we learn about hammers. I have spent most of my adult life around Ph.D.s, and they aren’t very smart on average. At best, they are focused. Many of them have culture. But they aren’t smart on what matters, they are just experts at an academic game.

My practical recommendations:

  • If you are young and smart, and you want to be a scholar, and must pursue a Ph.D., at least make sure to select one of the few forgotten fields where there is no glut of Ph.D.s. Be warned that there are fewer such fields than you think.
  • In all likelihood, even if you want to be a scholar, you are better off finding a good job of some sort even if it is not what you dream about and spending some time on your research. Initially, you won’t be able to spend as much time on your scholarship as you want. But over time, after a decade or two, you might earn the freedom to spend more and more time on it. You may even get paid for it eventually. Lots of people with regular jobs write books and articles. Eventually, they acquire as much and more prestige than people who went the “Ph.D. way”. Whatever prestige you acquire will be due to your contributions, not some game you played. It will keep you honest.

    Some people will argue that without a PhD, or a formal research position, you cannot realistically be a scholar. What they mean is that you will not be able to pursue the academic game without such positions. But there are plenty of very successful scholars outside of this scope. In computer science, we have people like C. J. Date or J. M. Bach who made lasting contributions to their respective fields without any help from academia.

Source: This post is an edited version of an answer I gave on Quora.

Further reading: Secrets of a Buccaneer-Scholar

Elegance as a luxury

As a young student, I was undisciplined. Though I did well in mathematics, I often couldn’t be bothered to write down clean computations. I would do the work mostly in my head, and I would quickly jot down the answer. Such a strategy serves you well early on during your education. However, later on, it becomes a handicap.

In part, I blame my schooling. We reward kids that are fast. Who is the best math. student in the class? Whoever can solve the problem fastest. That is entirely wrong. Instead, the best mathematician is whoever can solve the most difficult problems. While speed matters, the ability of scale up with difficulty is much more important. Schools often teach the wrong lesson.

When working on a difficult problem, the problem space often exceeds the capacity of your short-term memory. Though some have better short-term memory than others, the really difficult problems are likely to exceed the memory capacity of any mortal. At that point, method trumps raw speed.

It is useful to think of your brain as a CPU. Modern CPUs are very powerful by historical standards, but they still have very limited memories. What sets apart the best software is how it is able to optimize memory usage so that the CPU does not have to remain idle.

I was never quite able to unlearn my bad habits as a mathematician when working on paper. Part of it is the medium. Though I make extensive use of pen and paper in my daily life, it is mostly for quick collection of simple facts. I never learned to use pen and paper to go deep in my ideas. Instead, at an early age, I learned programming. And it is through a computer that I learned to organize my thoughts.

I am not quite alone in my messiness. Van Emden had a post this week-end where he reports that the famous physicist, Boltzmann, was unapologetically messy as a mathematician. He felt that elegance was a luxury.

But once you see your brain as a CPU, then a more practical question arises. How do you organize the problems to maximize the efficiency of your brain…

I think I am smarter than when I was 22. I can solve more difficult problems more reliably. I am a better software programmer. I am a better mathematician.

  • I go slowly. Instead of rushing at the end, I try to make sure I really understand the problem. I try to see its natural components. I divide up the problems in small, manageable parts (that fit in my short-term memory).

    This is where my students most often go wrong. They are trying to go too fast. To try to teach them to go more slowly, I often simply ask them questions about the problem.

  • As much as possible, I work locally. That is, I work on parts of the problem that only require a few facts. I only move to another part of the problem once I am done with the current part.

    When I was younger, I would eagerly jump from one part of the problem to another, hoping for a breakthrough. Unconsciously, I was hoping for a flash of insight. I took me years to understand that insights are more likely to come if you focus on a narrow issue.

  • I spend a lot of time contemplating alternatives. When I was younger, I would latch on the first credible approach I could think of. Why solve the problem in two different ways when only one way will do? I have since learned that comparing different approaches, and understanding why one is better than other, is often how you derive the most important insights.
  • I spend almost as much time checking my answers than deriving them. I have since learned that even “obvious” facts should be triple checked. I cannot recall how many times I got “stuck” on a problem because of a faulty assumption, or faulty derivation.

Probabilities in computing: they may not mean what you think they mean

I like to throw off my academic colleagues outside of computer science by pointing out that much of our software relies on probabilities… down to the ubiquitous hash table. They often expect software to be mostly designed around deterministic ideas. But probabilities are everywhere.

One common problem in software is to distribute objects evenly into buckets. Think about a manager who needs to assign files to one of 60 clerks. Maybe these files are customer complaints. He wants to keep all clerks busy, so he wants to give a roughly equal number of files to each clerk. He could, of course, just pick the next file and give it to the idle clerk, but this would force the manager to have some additional system to keep track of which file went to which clerk. Instead, he notices that all files are identified with a time stamp, and the stamp is precise down the second. He figures he will just assign a number to each clerk from 0 to 60 and match the second figure in the time stamp with the clerk. In this manner, all clerks are likely to be equally busy, and the manager can very quickly find which clerk was assigned which file if he is given the time stamp.

This is called hashing. You take objects and you map them to integers (called hash values) in a way that appears random. What do we mean by “random”? Specifically, we often require that any two objects are likely to have different hash value (a property called universality).

In the problem with the clerks and the files, where does the randomness come from? From one point of view, there is absolutely no randomness. Customers could file their complaints at a one minute interval. Thus a single clerk would get all of the files.

Much of hashing in computing works this way. It is not at all random. This lack of randomness is a problem as it leaves software open to attacks. If the adversary knows your hash function, he can create trouble. It is not just a theoretical idea, but something hackers actually exploit.

So computer scientists have proposed the introduction of randomness at the level of the hash functions. For example, our manager could ask his clerks to propose ways to map the time stamp to numbers from 0 to 60. Each day he could pick one such approach.

It is used in practice: Ruby and Java have introduced random hashing. This makes these languages more secure. And, yes, this means that the hash value a string takes on Monday can be different from the hash value a string took on Friday.

To be clear, once you have picked one hash function, you have to stick with it. If you kept on changing the hash function, the manager would lose track of his files. So, for a given time period, you use one specific hash function.

So, what do we mean then by “given two distinct objects, they are unlikely to have the same hash value”…? We mean that give two fixed objects, there will be relatively few hash functions mapping these two objects to the same hash value.

It would seem that universality solves all your problem, doesn’t it? Given two customer complaints, they are unlikely to go to the same clerk.

But what if, on Monday, the manager picked the hash function that maps time stamps to seconds, and, on that day, the customers decide to file in their complaints at a one-second interval? Then, on that day, the manager is in trouble.

It is only on the long run, after picking many hash functions, that the manager is ok on average. Any single hash function could be terrible.

There is another probabilistic interpretation that is entirely different. Maybe one can fairly expect the filing times to be random. For example, maybe the customers have little control on when the complaint is actually filed. Then the time stamps themselves can be assumed to be random. In such a case, there may not be any need to change the hash functions.

But how do we know that our hash function is good enough that it does not require changing?

Suppose that the manager picks a new hash function every day. He hired a theoretical computer scientist as a consultant, and the computer scientist proved that the way the hash functions are picked is “universal”.

Further, the manager feels confident that the time stamp are random, and has this proof of universality. So he picks one hash function and sticks with it, figuring that he is now pretty safe.

Ah! The manager just made a critical mistake. It is entirely possible that the manager just picked a very bad hash function (say one that allocates all files to one clerk).

If he wants to stick with one hash function, and work on the assumption that the time stamps are random, he needs to go back to the theoretician with this specific model. In such a case, the theoretician might check whether the chosen hash function is regular, an entirely different property from universality.

Probability is a hard concept to deal with. You absolutely need to keep track of where the randomness comes from. It makes no sense to just say that a given piece of software is likely to run fast or securely. You have to make your probabilistic model explicit.

Further reading: Use random hashing if you care about security?

The myth of the scientist as a disinterested individual

We like to have an idealized view of the scientist. He or she is someone who chose against a high-paying career to pursue the ideals of science and academia. Unlike the greedy engineer or entrepreneur, he works not for himself, but for the greater good.

We often hold similar views of politicians, journalists and medical doctors. Politicians went into politics “to make a difference”. Journalists aim to expose the truth. All medical doctors, of course, chose their profession to “help others”.

As a model, the disinterested individual is a poor one. In fact, an entire academic school is based around the realization that politicians and civil servants seek to advance their own interests: public choice theory. And despite having entire TV shows dedicated to exposing this truth, most people have a hard time thinking of politicians as self-interested. But they are, of course!

Scientific research is even more problematic because most people cannot even imagine what a researcher does. However, once you start thinking about scientists as greedy for status, many things make sense. If scientists were primarily motivated by the public good, they would make their research papers accessible and they would carefully publish the data and software. There would be no need for funding agencies to try to compel scientists to share.

In practice, that is not what you find. Scientists are often silently pleased when their results are difficult for others to reproduce:

The people who dominate both the natural and social sciences primarily think in terms of reputation and career. They think that the point of making a scientific discovery is to (…) further your career. (…) they lament the additional year it’ll take just to confirm that something is true.

[They are] irritated with the idea that ordinary scientists should be able to replicate easily, several times, what they’ve done once, for the first time in human history. (source: Andrew Gelman’s blog)

Of course, being self-interested does not make you evil. A lot of scientists, in their quest for the Nobel prize, have made tremendously important advances.

Still, we cannot count on scientists to police themselves fairly. That some researcher is highly regarded among his peers might simply mean that he contributed greatly to the advancement of these peers… To illustrate this point, consider Marc Hauser. He was a star Harvard professor who earned high praises from his peers (including Peter Singer and Noam Chomsky). He only fell from grace when his research assistants (who were mere undergraduate students) challenged him. As it turns out, much of Hauser’s career was based on fabricated science.

How do we keep politicians in check? By limiting their power. That’s why we have constitutions. We don’t let other politicians be the judge of politicians: we ask independent experts (judges) to assess their actions.

Scientists similarly need to be assessed by independent experts, and it cannot be their immediate peers. You cannot trust Peter Singer and Noam Chomsky to tell you whether Marc Hauser is doing solid work. (They falsely told us that he was!)

In computer science, we have these independent experts: for every computer scientist, there are hundreds of highly qualified engineers who can put the science in practice.

Want to know whether the science is any good? Ask someone who independently put it in practice.

If I had my way, funding agencies would systematically rely on practitioners to assess the proposals. Sadly, that is not how it works.

Getting good performance in Go by rewriting parts in C?

Go is a new programming language invented by Google engineers. Apparently, it came about because they were tired to wait for their C++ code to compile.

To run Go programs, you need to compile them. However, compilation is so amazingly fast that Go may as well be an interpreted language like Python or JavaScript.

Compared to C++ or Java, Go is a very simple language. I am no expert, but I learned the basics in a few hours. This means that, even though I have only been programming in Go for a few days, I can read most Go programs and instantly understand them. In contrast, even though I have 15 years of experience in C++, I often cannot understand C++ code without effort.

In theory, Go can offer the performance of C++. In practice, Go has performance superior to Python and JavaScript, but sometimes inferior to C++ and Java.

My friend Will Fitzgerald wrote what has become a reference implementation of the bitset data structure in Go. I felt that it could be faster. Will was nice enough to let me contribute some enhancements to his bitset library.

Go makes it easy, or even trivial, to call C functions. So I thought optimizing the code was a simple matter of rewriting the performance sensitive parts in C. Let us see how it worked out.

Will’s bitset implementation is an array of 64-bit integers were some of the bits are set to 1 and others to 0. An expensive operation is to count the number of bits set to 1. It is implemented as a tight loop which repeatedly calls a Hamming weight function written in Go (popcount_2):

for _, word := range b.set {
	cnt += popcount_2(word)
}

The popcount_2 isn’t exactly free:

func popcount_2(x uint64) uint64 {
	x -= (x >> 1) & m1             
	x = (x & m2) + ((x >> 2) & m2) 
	x = (x + (x >> 4)) & m4        
	x += x >> 8                    
	x += x >> 16                   
	x += x >> 32                   
	return x & 0x7f
}

In C, when using GCC-like compiler, we would simply call an intrinsic (__builtin_popcountl). Presumably, it is as fast or faster than anything we can come up with. Go makes it really easy to call a C function:

C.__builtin_popcountl(C.ulong(word)))

Alternatively, we can write the entire function in C and call it from Go:

unsigned int totalpop(void * v, int n) {
    unsigned long * x = (unsigned long *) v;
    unsigned int a = 0;
    int k = 0;
    for(; k < n ; ++k) 
        a+= __builtin_popcountl(x[k]);
    return a;
}

So how do these three alternatives compare? I created a small benchmark (that you will find in the bitset package) and tested all three alternatives.

    microseconds/operation 
Pure Go 12
Calling __builtin_popcountl 130
Entire rewrite in C 9

So while rewriting the entire function in Go helped, repeatedly calling __builtin_popcountl made things much worse. This reflects the fact that calling a C function from Go is expensive. In contrast, calling a C function from C++ is dirt cheap.

Beside the high cost of calling C function, I have also been unable to call SSE intrinsics in Go while using the default Go compiler. Indeed, the function I would really like to call, when it is available, is _lzcnt_u64. I am not sure that it is possible to do so by default.

Conclusion: Go is a wonderful language. In theory, you could ensure that it is fast by calling C functions when needed. In practice, the overhead of C function calls in Go is likely to be a bottleneck when working with functions that run for less than a millisecond. You either have to rewrite your entire functions in C, or live with the poor performance.

The rise to power of computer scientists

Want to become CEO of a major technology company? Consider the background of the hot CEOs of the hour:

  • Amazon: Jeff Bezos has a degree in electrical engineering and computer science.
  • Apple: Tim Cook got a degree in industrial engineering.
  • Facebook: Mark Zuckerberg studied computer science.
  • Google: Larry Page has a master’s degree in computer science.
  • Microsoft: Satya Nadella has a master’s degree in computer science.
  • Twitter: Dick Costolo has a degree in computer and communication sciences.
  • Yahoo!: Marissa Mayer has a master’s degree in computer science.

My discussions with students suggest that many want a technology or computer science degree as an entry point to higher level jobs. That is, they don’t study computer science in college to become programmers… rather they want the degree to secure leadership positions.

Credit: This posted was inspired by Seb Paquet and Phil Jones.

Compression is never worth slowing down your code?

Should you ever compress your data to reduce memory usage?

We are in 2050. Nobody uses tapes or disks anymore. The NSA has 1 billion servers. It needs so many to hold all of the data in memory.

A contractor offers a marvellous algorithm that can compress data by a factor of 1,000,000,000. The problem is that it decreases all processing by a factor of two.

Does that sound like a good deal?

Let us put it in practice. The president wants the NSA to take all data and change lower-case letters by upper-case letters, and vice versa.

Without fancy compression, it would take all of the 1 billion servers one hour to complete the task.

With the new compression technology, you can use just one server to hold all of the data and do the processing. Unfortunately, your throughput is half, and you have just one machine, so it would take you 2 billion hours. To complete the task in 1 hour, you would need 2 billion servers. That’s twice as many as you have.

Thus the NSA rejects the contractor offer. He goes on to sell the technology to North Korean where it is used for evil purposes we shall discuss another day.

Where did I go wrong in my story?

Credit: This fun puzzle was given to me in a different form by Leonid Boytsov.

To be smarter, try being crazier?

Many of us want to be original in our work. For researchers, it is a job requirement. For software programmers, it makes little sense to redo what others did.

Many of the people who did great things stood out by their originality. Great scientists like Nash are sometimes slightly or entirely mad. Many of the brightest minds belong to minorities that entertain uncommon values and practices (e.g., Jews). Turing effectively admitted he was gay at a time when this could get you badly mistreated.

It is not that being weird or mad makes you brilliant, of course. But I think that there is a hidden causality between originality and brilliance.

  • By trying original new things, you learn more or, at least, you gain more valuable insights. Everything else being equal, a software programmer that learns exotic programming languages, or tries out exotic platforms, will hold more valuable expertise.
  • Being more original might allow you to see things that others just do not see. In his autobiography, James Bach recounts how he could not help but to see a disconnect between the (academic) theory of software testing, and what actually worked in practice. He co-wrote one of the most important book in his field. Though software testing is usually more of a low-status activity (e.g., compared with software development), he managed to leap ahead and become somewhat famous precisely because he embraced his originality instead of hiding it.

Given these benefits, you would think that everyone would go wild and keep on experimenting with crazy ideas and practices. But that is not at all what happens.

In fact, most of us try to “fit in” as the benefits of fitting in are often perceived to out-weight the theoretical benefits that come with originality.

There is no denying that originality gets you in trouble. For example, I am an experienced gardener, but my garden often looks like hell because it is of giant experiment with many failures. Though my father would have me install a sprinkler system, I have purposefully rejected the idea, to try a build a garden that works without artificial watering… just to see how far I can push the idea.

As a result of my experiments, I might know a few weird things that most gardeners do not know. However, I do not have much recognition as a good gardener and my experiments have been costly at times.

I have been around many college professors and they all tend to look the same. Moderately clean shirts with short hair. (In my case, very short hair.) Ladies professors are just as bland looking as their male colleagues.

The inability of professors to try different looks is also reflected in their work. I started out by saying that originality is a job requirement for researchers. When we review grant proposals, we do get annoyed when people propose to do work that has been done repeatedly in the past, or that looks like what everyone else is doing. But while lack of originality might trigger boredom, true originality is likely to trigger instant rejection.

A colleague of mine recently made a major discovery. He toyed with the idea of basing his upcoming research program around this discovery, but after checking with wise colleagues, he is proposing a continuation of what he did for the last 20 years. If he were to propose a radical shift of his research agenda toward something that nobody is doing, he would likely get sunk. He can, of course, pursue his radical ideas on the side, and once they mature, he will be able to come in the open.

Let us contrast this with Google’s secret lab, Google X. Hand-picked engineers pursue truly original ideas. Such pursuits, at least as far as I know, are absurdly rare.

I think I would be richer and have a higher status if I had played it safer throughout my life. Conformance definitively wins out most of the time. Until it does not. We always hear about exciting research coming out of the most prestigious laboratories. However, on the whole, researchers are a boring lot. (I spent part of the last few weeks reviewing grant proposals.) They stick with what they know, they propose ideas that are mostly risk-free. Though I have read dozens of grant proposals in the last few years, I have not seen a successful grant leave anything to chance.

Let us consider open source software projects. It is generally plagued with endless repetition. How many web frameworks do we have? It is always amazing to me to see that so many programmers use their free time to build risk-free software, effectively cloning what thousands have done before.

The problem is that failure is how you learn. The bigger your failures, the most important are your learning opportunities.

Though I think you can succeed socially, I don’t think you can remain truly smart while avoiding failures. And you cannot be super smart by avoiding massive failures.

At the very least, screwing up makes for interesting stories.

Further reading: McAdle’s new book: The Up Side of Down: Why Failing Well Is the Key to Success.

Are C++ and Java declining?

In a recent Dr. Dobb’s article, Binstock announced the decline of Java and C++:

By all measures, C++ use declined last year, demonstrating that C++11 was not enough to reanimate the language’s fortunes (…) Part of C++’s decline might be due to the emergence of competing native languages.

Mobile programming kept Objective-C advancing and it limited Java’s decline. The latter was surely due to the language falling out of fashion (…) and the pressure exerted by other JVM languages (…)

The article provides no data to back up these “declines”. So let us look at the data ourselves. The article cites Ohloh. What Ohloh seems to do is look at the number of commits per programming language. According to Ohloh, both Java and C++ appear quite stable. They both have about 10% of the share of commits in open source projects, and that has been true for the last 6 years or so (C++ is the orange line while Java is the purple one).

So it is not clear what Binstock meant when he wrote that by all measures, C++ declined.

Finally, the article cites the Tiobe index. That is the only source that does show a decline. Java went from 24% to 17% in the last 5 years whereas C++ went from 15% to about 7%. But let us put this “decline” in perspective. Java is still within 1% of being the most popular language according to Tiobe while C++ is still in fourth place. What is more striking is that Objective C went from 0% to over 10% in a few short years (because of its use on Apple iOS).

But Binford points us to 2013. During that year, C++ went from 9.1% to 7.5%. A significant drop, to be sure. However, a much more significant story is that Python went from 4.2% to 2.4%. Maybe these wild variations should lead to us to question the Tiobe index over short periods of time?

If Android were to drop Java as the default language, we might be able to talk about an actual decline in Java use. However, Google did the opposite of dropping Java: they just upgraded their support for Java. Java is clearly in good shape.

I don’t know what the near future hold for C++. We did get a very strong upgrade that was quickly adopted by all vendors (C++11). However, C++ remains a very difficult language to master. It is not for everyone.

Why is the NSA grabbing all your private data?

Snowden revealed to the world that the NSA was systematically spying on all of us. Maybe more critically, we have learned that the NSA is spying on all American citizens. In fact, the NSA is even spying on its own congress. This spying violates the US constitution.

We also know that such spying is ineffective when it comes to stopping terrorists. A cost-benefit analysis shows that the NSA is wasteful.

So why are they doing it?

They are doing it precisely because it is very expensive.

This seems counterintuitive, but only if you haven’t spent years around bureaucrats. You see, whereas private entrepreneurs try to make as big a profit as possible, bureaucrats try to grow their budget. That is, to government bureaucrats, things like profit or cost-benefit are irrelevant. The only thing that matters is how big your budget is…

As an illustration, consider college professors. Nobody ever does a cost-benefit analysis of their research projects. Given two professors with the same output, whoever has spent the most money will be the winner. The need to acquire more money drives many research projects.

So I am sure it applies to NSA spies as well: given two agents, one that proposes a cost-effective technique with proven results… and one that proposes a over-engineered massively expensive endeavour… the second one will win every time. NSA managers want to be able to go to the president with arguments as to why their budget needs to be so large.

It is even more fun for the NSA since its budget demands are classified. So there can be no downside to asking for more money. And to ask for more money, credibly, you have to have proposals. There are only so many bona fide terrorists that need be tracked. And most of them are blundering idiots. But everyone is a potential terrorist if you are creative enough. So spying on everyone is naturally what any spy agency will want to do… you can then justify almost infinite budgets.

If I am right, then it puts a dent in the theory that the NSA is 10 years ahead of the rest of the world in mathematical cryptography. The problem with mathematics is that it is dirt cheap. Even if the NSA hired all of the top-notch mathematicians who want to work for a spy agency… it would still not be a large expense. So it is unlikely that mathematics has much clout at all. In fact, mathematicians never have much clout within a bureaucracy…

Why are there so many science PhDs?

McArdle, an economist, recently wrote that a substantial fraction of PhD programs really shouldn’t exist. McGowan goes further by pointing out that there is little demand for science and technology PhDs. I can only agree. Meanwhile, the gap between tenure-track positions and the number of new PhDs keeps on increasing. In countries like Japan, we are facing a crisis:

Of the 1,350 people awarded doctorates in natural sciences in 2010, just over half (746) had full-time posts lined up by the time they graduated. But only 162 were in [academia], of the rest, 250 took industry positions, 256 went into education and 38 got government jobs.

In the US, things are getting worse and worse:

In 1973, 55% of US doctorates in the biological sciences secured tenure-track positions within six years of completing their PhDs, and only 2% were in a postdoc or other untenured academic position. By 2006, only 15% were in tenured positions six years after graduating (…)

Even in a field like computer science, 55% all new PhDs go into industry, rarely landing a research position while less than 7% end up with a tenure-track position in a doctoral-granting school.
Yet between 2000 and 2010, in the US, the number of STEM graduate students grew by 30%. Why?

McGowan writes:

It is not surprising that many STEM students believe there is a strong industry appetite for freshly minted Ph.D.’s given these numerous advertising and public relations campaigns by many businesses.

McGowan provided little support for this assertion. I went looking and found nothing in the last 10 years. In fact, I ended up reading several articles warning students against graduate work…

I am left with something of a mystery… why are we producing more and more PhD students?

My thoughts:

  • To a student, the PhD job market is an abstract entity. The financial incentives provided by the government (e.g., scholarships) are not.
  • Even though the job prospects of a science PhD might be bad, maybe the alternatives look even worse. Yes, you can make a good living as an engineer or an accountant in industry… but maybe students imagine that the life of a PhD, no matter how difficult, is somehow more exciting?
  • It might be all about status signalling. A science PhD might be a way to tell the world that you are smart. Even if employers are unimpressed, maybe your friends or prospective mates could be impressed?
  • Schools and professors are misleading students. If your local dean says that there is a shortage of science PhD, are you going to check the data for yourself?

What are your thoughts?

Life is sweeter than you think in 2014…

Jokingly, Rao pointed out that Americans are starting 2014 with an optimistic outlook:

(…) it’s tough, but let’s just write off polar bears and groundwater pollution from fracking already and move on.

But life is even sweeter than Rao thinks. Indeed, polar bears are not going extinct contrary to what the press and government research told us for the last few years:

A narrative of imminent polar bear extinction pervaded the analysed material. Estimates of current numbers were framed to suggest that polar bears are experiencing cataclysmic decline. (…)

In the 1960s, scientific estimates, based on numbers of pelts sold historically to the Hudson’s Bay Company and other traders, estimated a global population of 5000 wild polar bears. It is impossible to compare these figures with the current estimates of 20,000-25,000, due to the improvements in monitoring methods and technologies, greater numbers of polar bear scientists, and greater collaborations with indigenous northerners. However, (…) it is widely accepted that bear numbers have, at least until recently, been on the increase and that, at least historically, polar bears have not existed in greater numbers. (Tyrrella and Clark, 2013)

Tyrrella and Clark do not tell us to go hunt down polar bears. If we want to keep them around, we have to take sensible measures. However, they are simply not going extinct.

What about fracking and the resulting shale gas? It is true that there has been at least one case of methane water contamination by some company that did not follow sensible guidelines. However, methane is non-toxic. And methane naturally occurs in drinking water. People reported bubbles of methane in their wells as far back as then XIXth century. The real problem with methane is that it is a potent greenhouse gas: we would rather not release it in the air needlessly.

What about the toxic chemicals used as part of fracking? It does not end up in the drinking water:

Many claims of contaminated water wells due to shale gas extraction have been made. None has shown evidence of chemicals found in hydraulic fracturing fluids. (The Royal Society, 2012)

Of course, hydraulic fracturing uses lots of water and some nasty chemicals. We would rather not have such technologies. But everything is relative. Nasty chemicals are involved in making the electronics you are using to read this blog post. Overall, hydraulic fracturing is clearly positive:

Globally, the [greenhouse gas] footprint of shale gas is likely to be smaller than the coal footprint. Thus, a shift would slow global warming and decrease related cost for climate change adaptation measures – assuming all other factors remain constant. (…) Over the entire lifecycle, (…), power from coal consumes more water than power from shale gas (…). Shale gas drilling also causes less surface disturbance than coal mining. (Jenner and Lamadrid, 2012)

We should keep on studying fracking and we need sophisticated monitoring techniques. However, it is not any more dangerous than thousands of other industrial activities. And it pollutes a lot less than burning coal!

When delegating… consider quality, maintenance and learning

John Cook provides some valuable advice today about when to delegate. An important point he raises is that doing a per-hour analysis makes little sense since human beings are not simple machines. For example, delegating low-pay work that you find enjoyable might not be financially wise despite appearances.

For intellectual work, the “per hour” paradigm is almost always nonsensical. This was clearly illustrated by Brooks in The Mythical Man-Month.

After reading Brooks’ books, other points related to delegation come to mind:

  • Though bureaucrats would like to believe otherwise, quality is often more important than quantity for anything that really matters. One of the first things that Steve Jobs did when he took over Apple was to slash the product line. There are certainly cases where delegating can be a way to improve quality: I would be wise to delegate visual design or accounting to others if I want to maximize quality. However, if I delegate things I am passionate about (research, writing and programming), I almost always trade quality away.

    I could certainly write many more research papers if I delegated more… but the more I invest in a research paper, the better it tends to turn out statistically. That’s because I really care about research, more so that most people.

    When teaching, I often delegate. For grading duties, the results might be overall positive as I am not a great grader… But whenever I tried to delegate the production of lecture notes or homework assignments, the result has been poorer quality. Part of the reason is that I have a higher incentive to do a good job than whoever I delegate to.

    If I were to delegate a mathematical modelling problem to John (he is an independent consultant), I can be quite certain that he would do a great job. He has a strong incentive to live up to his reputation. However, what if I were to delegate the production of a web site to a major firm like CGI? Would the programmer in charge of my project have a strong incentive to do a great job? Maybe not. He is probably primarily concerned with not getting blamed.

  • Delegating can save money today, but there are non-immediate benefits to doing things for yourself. For example, I write much of my own software in my research projects. This is unusual: most professors delegate this task entirely to their graduate students, or they hire programmers. Once again, I could get more research done if I didn’t have to write so much code: it can take up far more than half of my research time. However, I have long-term benefits.

    For one thing, I can more easily produce maintainable software. I have software libraries that I have reused over several years. A contract programmer or a graduate student simply does not have as much of an incentive to make sure that software will be useful for a long time. I do. When I write my software, I worry about how I am going to maintain it. Maintained software tends to get better: it receives bug fixes and it is more thoroughly reviewed. Does it matter that I produce better software than I otherwise could? It is hard to tell… but I feel a lot better when I can proudly point to my software instead of having to hide it away like an ugly duck.

    For another thing, while I write the software, I often learn about things I didn’t even know I could learn about (they are “unknown unknowns”). I might have a model in my head of what is efficient, but realize, as I am deep in the code, that I missed a subtle point. Sometimes I realize that my mental model is just flat out irrelevant. A typical realization is that some algorithm that appears naive on paper is far better than the fancier algorithms the theoreticians crave about.

    John Cook advocates that you should consider delegating tasks that drain your energy. For me, that would be accounting. I am terrible at keeping track of bills and accounts. However, for many years, I did all my accounting myself. I had my own business and some of it was quite cumbersome. Why did I do it myself? To understand what was going on. I suspect that a lot of small business owners go bankrupt precisely because they refuse to take accounting seriously. No doubt, the government is in league with the accountants to make accounting as technically challenging as possible… but if you delegate too much, how will you know whether your business decisions are sound?

You should definitively delegate. Trade in goods and services is what made us so wealthy in the first place. In some sense, using computers is all about delegating: from your brain to electronic circuits. However, if you have delegated so much that you are no longer learning from your hands-on work, you may have delegated too much.

Fastest way to compute the greatest common divisor

Given two positive integers x and y, the greatest common divisor (GCD) z is the largest number that divides both x and y. For example, given 64 and 32, the greatest common divisor is 32.

There is a fast technique to compute the GCD called the binary GCD algorithm or Stein’s algorithm. According to Wikipedia, it is 60% faster than more common ways to compute the GCD. Its computational complexity is the number of bits in the largest of the two integers.

I have honestly never written a program where computing the GCD was the bottleneck. However, Pigeon wrote a blog post where the binary GCD fared very poorly compared to a simple implementation of Euler’s algorithm with remainders:

unsigned gcd_recursive(unsigned a, unsigned b)
{
    if (b)
        return gcd_recursive(b, a % b);
    else
        return a;
}

Though Pigeon is a great hacker, I wanted to verify for myself. It seems important to know whether an algorithm that has its own wikipedia page is worth it. Unfortunately, the code on Wikipedia’s page implementing the binary GCD algorithm is either inefficient or slightly wrong. Here is a version using a GCC intrinsic function (__builtin_ctz) to find the number of trailing zeros:

unsigned int gcd(unsigned int u, unsigned int v) {
  int shift, uz, vz;
  if (u == 0) return v;
  if (v == 0) return u;
  uz = __builtin_ctz(u);
  vz = __builtin_ctz(v);
  shift = uz > vz ? vz : uz;
  u >>= uz;
  do {
   v >>= vz;
   int diff = v;
   diff -= u;
   vz = __builtin_ctz(diff);
   if (diff == 0) break;
   if (v < u) u = v;
   v = abs(diff);
  } while (1);
  return u << shift;
}

My result? Using integers in [0,2000), the simple version Pigeon proposed does 25 millions GCDs per second, whereas my binary GCD does 39 millions GCDs per second, a difference of 55% on an Intel core i7 desktop. Why do my results disagree with Pigeon? His version of the binary GCD did not make use of the intrinsic __builtin_ctz and used an equivalent loop instead. When I implemented something similarly inefficient, I also got a slower result (17 millions GCDs per second) which corroborates Pigeon’s finding.

There are cases where the naive GCD algorithm is faster. If one of the two integers is 1, then the naive algorithm returns immediately whereas the binary algorithm might require many steps. A hybrid approach might be preferable.

My benchmarking code is available.

On a 64-bit machine, you probably can adapt this technique using the __builtin_ctzll intrinsic.

Further reading: There is a follow-up to this blog post called Greatest common divisor, the extended Euclidean algorithm, and speed!

Update: You can read more about sophisticated GCD algorithms in the gmplib manual.

Conclusion: The Binary GCD is indeed a faster way to compute the GCD for 32-bit integers, but only if you use the right instructions (e.g., __builtin_ctz). And someone ought to update the corresponding Wikipedia page.

On human intelligence… a perspective from computer science

Whenever I read social scientists, there is often, implicit in the background, the concept of “intelligence” as a well defined quantity. I have some amount of intelligence. Maybe you have a bit more.

But what does computer science have to say about any of this? That is, what is this “intelligence” we are talking about?

  • Except for storage capabilities (memory) and speed, all hardware is equivalent. Though I don’t know much about biology, I doubt that any brain runs at twice the speed of another brain. We are left with memory as a constraint. However, what computer science tells us is that you can always extend your memory with external support (in this case, use a pen and paper, or just Google) and all it might do is slow you down. Thus, it would seem that the main difference between individuals ought to be speed: some people may learn faster than others, or execute some tasks faster.
  • There can be huge differences in software, but software can be upgraded.

If one human being can do something intellectually, then most other human beings can also do it, albeit more slowly. They may need more tools, and they may require more time… but that is all. Yet, given that we have more sophisticated tools with each year that passes, I would expect that the difference in “human intelligence”, whatever it is, ought to diminish in important with time.

I expect that what sets people apart is not this ill-defined intelligence, but rather pure grit. If you want to do something, but you apparently lack the “intelligence” to do it, then it may simply be a matter of finding or building the right tools.

In some sense, this is what software is all about: extending our intelligence.

The idea that one could measure my “intelligence” by locking me up in a room and having me write a test with pen and paper is ludicrous. As I wrote this blog post, I used a dozen sophisticated pieces of software, including Wikipedia and Google Scholar. Where does “my” intelligence ends and where do the tools start? There is no line. What you perceive as the result of “my” intelligence is the result of an aggregate of hardware and software where the genetics of my brain are just one of many ingredients.

Someone with a gigantic memory in 1900 could certainly be a much better scholar. However, in the day and age of Google Scholar, memorizing thousands of quotes and references is much less of an advantage. You may work faster if you don’t need to constantly look up information online. However, as Google and its competitors get better, the scholar with a gigantic memory eventually loses out to someone who relies more on computers… the same way Chess players lost to computers.

To be a scholar in year 1500, you need to have a superb brain and superb education. In 2014, almost anyone can become a scholar… engage in deep intellectual debates, write compelling essays…

Classifying kids as talented or not talented is a gigantic failure of imagination. Software technology has the potential to turn the kid who couldn’t figure out fractions into someone who can do advanced science.

Even faster bitmap decoding

Bitmaps are a simple data structure used to represent sets of integers. For example, you can represent all sets of integers in [0,64) using a single 64-bit integer. When they are applicable, bitmaps are very efficient compared to the alternatives (e.g., a hash set).

Unfortunately, extracting the bit sets in a bitmap can be expensive. Suppose I give you the integer 27 (written as 0b011011 in binary notation), you would want to recover the integers 0, 1, 3 and 4. Of course, you can check the value of each bit (by computing v & (1<<bit)) but this can be atrociously slow. To do it faster, you can use the fact that you can quickly find the least significant bit set:

int pos = 0;
for(int k = 0; k < bitmaps.length; ++k) {  
  long data = bitmaps[k];
  while (data != 0) {
    int ntz = Long.numberOfTrailingZeros(data);
    output[pos++] = k * 64 + ntz;
    data ^= (1l << ntz);
  }
}

In C or C++, the call to numberOfTrailingZeros can be mapped directly some assembly instructions (e.g., bit scan forward or BSF). Though it looks like numberOfTrailingZeros is implemented using several branches in Java, the compiler is smart enough to compile it down similar machine instructions. (Note: thanks to Erich Schubert for pointing out that Java is so smart.)

Up until recently, I did not think we could do better than relying on Long.numberOfTrailingZeros, but I stumbled on a blog post by Erling Ellingsen where he remarked that the function Long.bitCount (reporting the number of bit sets in a word) was essentially branch-free. (As it turns out, Java also converts bitCount to efficient machine instructions like it does for numberOfTrailingZeros.) This suggests an alternative to decode the set bits from a bitmap:

int pos = 0;
for(int k = 0; k < bitmaps.length; ++k) {
   long bitset = bitmaps[k];
   while (bitset != 0) {
     long t = bitset & -bitset;
     output[pos++] = k * 64 +  Long.bitCount(t-1);
     bitset ^= t;
   }
}

Experimentally, I find that the approach based on Long.bitCount can be 10% slower when there are few bit sets. However, it can also be significantly faster (e.g., 30% or even 70% faster) in some instances. Here are the decoding speeds in millions of integers per second on a recent Intel core i7 processor (in Java);

 Density   Naive   Long.numberOfTrailingZeros   Long.bitCount 
1/64 15 143 131
2/64 27 196 202
4/64 45 213 252
8/64 68 261 350
16/64 90 281 431
32/64 115 285 480

My code is available.

On the whole, the approach based on Long.bitCount is probably better unless you expect very sparse bitmaps.

Update: I have created a C++ version and in this case, both techniques have the same speed. So Java particularly loves bitCount for this problem.

The day I subscribed to a dozen porn sites…

This morning, I noticed some odd charges on my VISA card. They were attributed to sites such as videosupport1.com, bngvsupport.com, paysupport1.com, bdpayhelp.com. I called up my bank. They gave me the phone number of the company behind these pay sites and told me to ask what the charges were for.

I called the company behind these sites and they were very nice. They listed about a dozen porn sites that I was a member of. (Update: I don’t actually know that they are porn sites. I assume they are. The company behind sites such as videosupport1.com is a large porn company.) Apparently, someone used my name, my card number and email address.

Of course, I never got any email about this. There is no mention anywhere in my inbox that I subscribed to these sites. VISA never checked with me.

I called back my bank as this is a clear case of fraud. There was a pause. Then the agent started arguing with me that fraudsters do not use stolen card numbers for porn sites, and when they do they never use the owner’s name and email address. They told me that even if they tried to declare it as fraud, it would contested and amount to nothing. Basically, they told me that it was my problem. They did not even offer to block my credit card to prevent further transactions.

Effectively, it appears that the burden of proof is on me to show that I did not subscribe to a dozen porn sites. How do you prove such a thing? You do not.

It seems to me that it is backward… they should have to prove that I did, indeed, subscribe to these services.

Note: Christopher Smith pointed out that the fact that it was porn made me less credible. Apparently, lots of men are caught by their significant other buying porn and they then deny having done so.

Update: After two more phone calls, another agent agreed that the charges were suspicious and marked them as fraud. I offered access to my email account (gmail) and pointed out that I never bought porn before (as they can readily verify), and certainly not hundreds of dollars worth.

As a computer scientist, this story troubles me somewhat. One thing that computer scientists are very worried about are protocols that are open to abuse. I knew about the danger of identity theft and online fraud, but I always assumed that credit-card vendor took this seriously. As we transition to an e-commerce economy, such weak security will come back to haunt us.

Update 2: I estimate the fraud to $290. I will recover most of it.

Do we need academic copyright? Some historical perspective

It is commonly believed that we introduced copyright to entice authors into producing lots of quality work by providing them with increased financial incentives. Despite the contrary evidence, many people still insist that without copyright law, we would not have Harry Potter or video games because authors would lack financial incentives.

It is a lot more difficult to apply this argument to scholarly work. To my knowledge, no scholar ever gets paid for publishing a research article. The opposite is true. Scholars must often pay to publish: page charges, compulsory conference registration, and open-access fees are common. Scholars aren’t alone: many people write or produce content without direct financial incentives.

Why do they publish? For one thing, scholars have indirect financial incentives. For example, professors who publish lots of quality work can get better jobs and promotions. In fields such as computer science, publications can open consulting opportunities. For another, not everything is about money. Publications bring prestige and recognition. Publications open the doors of the invisible college.

In this spirit, Shavell proposed that we abolish copyright for scholarly work. Unfortunately, scholars have dismissed the idea. The core objection is publishing: why would anyone publish a journal without strong copyright protection? Shavell’s counterpoint is that authors, or their employers, would pay the publisher. In fact, this is already happening at a large scale in open-access journals. Nevertheless, the primary business model for a scientific journal is one that relies on copyright.

It seems that abolishing scholarly copyright would be a step into the unknown. Our mental picture is one where we first got scholarly journals that were protected by strong copyright laws… and the likes of Shavell are proposing what is, essentially, an experiment… What would a world without copyright be like for scholarly publications?

However, our mental picture is wrong.

Before the printing press, there was little need for copyright on printed work. Producing a single book was expensive. The establishment for a worldwide legal framework around copyright took centuries after the invention of the printing press. In fact, as recently as the nineteenth century, vast parts of Europe still had week copyright laws (e.g., Germany).

Thus, the scientific journal came to be in an area where our modern concept of copyright was unknown. Volpe and Schopfel have studied the case of what might be the earliest scientific journal, Denys de Sallo’s Journal des Savants. De Sallo died in 1669 whereas the invention of modern copyright can be traced by to the Statute of Anne in 1710. I should stress again that we did not get an international enforcement of copyright in 1710: this took a couple of centuries.

Before copyright, the state could provide (temporary) monopolies. So no other publisher in the kingdom of France could copy De Sallo’s Journal des Savants openly. However, there is every reason to believe that enforcement was weak and limited in scope. It was also a mixed blessing: the government could withdraw this monopoly if it did not like what was being published.

More critically, these copying monopolies did not extend to other kingdoms. Thus, the Journal des Savants was reprinted by a Dutch family called Elsevier. There was no way for De Sallo to prevent Elsevier from republishing its journal and distributing it throughout Europe. Moreover, Elsevier played an important role. It ensured that the journal was widely distributed in a convenient format and at a low price. What is interesting to note is that Elsevier reprinted and distributed the Journal even though it could not, itself, forcefully prevent other publishers elsewhere in Europe from doing the same. Elsevier thrived along with the Journal des Savants despite the lack of copyright.

Thus, it is historically absurd to claim that without copyright we would not have scholarly publishing. The scientific journal came to be in an era without copyright!

The only valid question is whether copyright makes scholarly better. But this case seems awfully weak. All scholarly copyright seems to do is to grant a state-supported monopolies to corporations which benefit without providing much value in return. We could reasonably argue that without copyright, we would not have Harry Potter. I think it is false, but I can see the argument. However, it is entirely absurd to think that without scholarly copyright, researchers would stop publishing. Copyright is just the government giving a rent to publishers at our expense.

Is programming as cool as basketball?

Some of the best job prospects are in the software industry. Programming as a career has several benefits worth considering: though not stellar, the pay can be quite good (e.g., 6 figure salaries are common), you do not need many years of study (e.g., some do not even have a degree), there aren’t any complicated government regulations to satisfy, you can work from wherever you want in the world, and so on. There are also downsides, such as the macho attitude prevalent in some communities, but nothing is perfect.

Despite all of the benefits of a job as a programmer, demand grows faster than supply. In other words, employers have to increase salaries and benefits to keep their best programmers.

Yes, it is “easy” to become a programmer as there are few artificial barriers to entry, and the pay is good… but there are more and more programming jobs every day. According to some estimates, there are about half a million programmers in the US alone. Even outsourcing to countries such as India is not sufficient to keep the salaries from increasing.

We should not worry too much. If demand keeps on growing faster than supply, salaries and working conditions will keep on improving and this will attract more students. For companies like Google or Microsoft, it is a tiny bit of a problem however. For one thing, they would rather not pay their top programmers the way law firms pay their top lawyers or the way hospitals pay their surgeons.

So the large tech. companies have decided to promote the software industry as a career through advocacy groups such as code.org. That is a good idea. I have two problems with their approach however.

First, they use people have never coded for a living to promote a career in the software industry: a basketball player, a race car driver, a few managers, entrepreneurs and countless politicians. Soon enough, Lady Gaga and Al Gore will run ads about why you should learn Java.

I understand what they are doing. An athlete like Chris Bosh is a lot sexier than Linus Torvalds (though, I suppose, it is a matter of taste). But there is also another implication which students are going to catch, if only unconsciously: there aren’t many cool people who code for a living.

And maybe that’s true. Maybe those of us who like to code aren’t exciting. But I don’t think that’s it.

Second, they feel compelled to present programming as something that is easy. After all, why show that any random politician can learn programming?

Programming is not something you pick up on the side. Oh! Sure, you can put together an ugly script that will “sort of” do what it supposed to do. But to be a top performer in the software industry is just as hard as being a race car driver or a surgeon.

If they promoted it as the challenge it really is, they would make it more appealing to the ambitious and smart people… and they would get the people who are most likely to stick with it.

If you are serious about climate change… stop attending conferences?

We know that spending energy tends to release carbon in the atmosphere. In turn this warms up the Earth in the long run. This change might be detrimental.

Being an academic, I am surrounded by people who are seriously concerned by climate change. These same academics are often insistent that we should penalize wealthy companies that produce or use fossil fuels.

However academics themselves contribute to climate change. In fact, given that academics travel more than most people, they are likely to be contributing substantially to the problem. Indeed, academics do move around quite a bit: attending meetings, going to classes, flying to conferences…

Achtena et al. have measured the carbon footprint of academics. They find that transportation accounts for 75% of the carbon footprint of a PhD student. Achtena et al. find that conference attendance alone accounts for 35% of said carbon footprint.

I have yet to meet a single researcher urging his colleagues to stop attending academic conferences. It appears that climate researchers attend as many conferences as their colleagues.

I do ask researchers who travel a lot about their carbon footprint. Invariably they dismiss my question. Sometimes, they are argue that their footprint isn’t so large. Or they point out that it is justified by the importance of their work (compared with, say, business executives).

I expect that some type of travel has been reduced. For example, when I sit on a national grant committee, I no longer expect to have to travel to the capital. But I also observe that the number of “international” academic conferences has been booming. There are more of them and some have gotten larger.

Maybe the argument is that conferences in exotic places are essential for scientific productivity. But where is the evidence? Even if Skype meetings and online exchanges are less effective, are they so bad that we absolutely need to move thousands of researchers to Las Vegas every year so that research questions can be debated?

While this is hardly ever said, a sizeable fraction of government research funding goes toward paying expensive travel… because it is a nice perk. Lots of people love getting paid travel. And some of them like to travel to conferences where they will complain about how little is done against climate change…

How is this not cognitive dissonance?