25 lessons from Richard Hamming for doing great research

There are very few great scientists who teach the art of doing science. Richard Hamming is one of them. On 7 March 1986, at Bell Communications Research Colloquium Seminar, he gave a lecture with the title “You and your research”. The lecture also became a chapter in his rare bookArt of Doing Science and Engineering: Learning to Learn”. As the name suggests, the book is about learning how to learn. It is also about the art of doing science – a topic few scientists like to talk about. 

Here, I am extracting 25 lessons from the lecture. The points 1-5 are about having the right outlook towards research work. The points 6-15 are about how to approach the research problems. Hamming touches the issue of collaborative work in points 16-18. In the points 19-22, he talks about how to present our work and how to make a real contribution to our field. The concluding points 23-25 are about dealing with the larger system in which we work.

  1. Drop the modesty and accept your aspiration to do significant work.
  2. Luck favors the prepared mind.
  3. Courage, commitment, and drive are more important than intelligence.
  4. Knowledge and productivity are like money that grows with compound interest.
  5. Make a significant shift in your area of research after every seven years.
  6. Transform a defect to an asset by turning problems around a bit. Convert something difficult into something easy and still important.
  7. Tolerate ambiguity and keep track of what doesn’t fit into the picture.
  8. Keep your problem at the center of attention for a long duration so that it can access your subconscious sub-minds.
  9. Work on important problems in your field that are attackable.
  10. Contemplate about great ideas once a week. Understand the big problems in your field.
  11. Have a list of 10 to 20 problems and keep looking for an attack to them. Whenever new ideas show up anywhere, find out what it bears for some of your problems and get after it.
  12. Finding the way to get an already known answer in elegant or faster manner is also an important contribution.
  13. Attack an isolated problem only if it is a characteristic of a class and others can stand on your shoulders.
  14. Find the generalization of an isolated problem and then attack the whole class.
  15. It is not how much but how you read that matters.
  16. Keep your doors open for new ideas.
  17. Brainstorm with people who are can reflect ideas back instead of just absorbing them.
  18. It’s very valuable to have first-class people around.
  19. Sell by writing clear papers and giving talks, both formal and informal.
  20. Get credit for what you do.
  21. Spend at least as much time in the presentation as you did in the original research.
  22. Books that filter the essentials are the best long-term contributions.
  23. Learn to work with the system and take advantage of all the system has to offer.
  24. Conform to simple expectations of others like dressing when the price of asserting your ego is too high.
  25. The day your vision, what you think needs to be done, is bigger than what you can do single-handedly, then you have to move toward management.
Advertisements

Electron cloud as a strange liquid

We classically picture atoms as electrons moving in circular orbits around a nucleus. However, electrons don’t move along fixed trajectories like small balls. We cannot have intuitions about their motion in a given situation: they do not obey Newton’s laws which are the basis of the common sense ingrained in our world view. They obey the laws of quantum mechanics represented mathematically as an equation called the Schrodinger equation.

Interestingly, when we solve this equation for an electron around a nucleus, it doesn’t tell us how the position of the electron changes with time. Instead, this equation throws on us a function that simply contains information about the chance of finding the electron at a place for a given time. Where is the electron? We do not know. What we can calculate instead is a cloud of probabilities for the electron. If one could take thousands of pictures of the electron moving around the nucleus and superimpose all of them on a photographic plate, the final picture that would emerge will match with the cloud of probabilities calculated from the Schrodinger equation. So, the electron exists not like a dense billiard ball but like a diffused cloud: you cannot pinpoint where it is. It is everywhere simultaneously in the cloud!

The electron cloud can change with time as things change around the atom. Suppose that two atoms come closer to one another. The electron clouds around them might start attracting or repelling one another. The problem is that it is very difficult to develop a common sense about how does this picture of the electron as a cloud of probabilities changes as it interacts with a given potential (the technical name for the landscape in which the electron moves). The cloud analogy does not help us much in this task.

There is another way to imagine this cloud of probabilities that is more intuitive. We can picture the potential in which the atom moves as a landscape with mountains, valleys, and ridges. We can picture the electron cloud as a small pool of liquid in the landscape. Where will the liquid settle after we pour it in the landscape? It will seek the deepest valley and settle there making a little pond. It tries to minimize its energy which decreases with the altitude in the landscape. But, the same thing would happen with a billiard ball. So this is just a classical picture based upon Newton’s laws. Our pond of water is still behaving in the Newtonian way.

How does quantum mechanics come into this picture? Quantum mechanics attributes some strange properties to this liquid. It can not only flow downhill, but it can also flow uphill as well. Think of the downhill motion as the average motion obeying the laws of Newton and the uphill motion as some strange quantum property of this liquid to persistently explore its environment by flowing against the dictums of Newton. So, if you trap it in a shallow pond, it will not just stay there but will occasionally get impatient and shoot out the boundaries of the pond and then return back. If you trap it in a deep well, it will spill out flowing uphill in all directions! If it is rolling downhill and encounters a mountain ahead, don’t think that it will climb the same height from which it came down. It will sore to greater heights and may even jump to the other side of the mountain. A billiard ball obeying Newton can never do that. This climbing over the heights which is impossible in the Newtonian framework is called the quantum tunneling. If you trap it in a large rectangular tub, it will move back and forth forming nice waves. 

This strange liquid is not an imagination. It is how an electron behaves when it moves in an atomic landscape. The strangeness of this liquid (its ability to spread around and move uphill) is measured by a fundamental constant of nature: Planck constant. It is called a constant because it is the same everywhere for all objects at all times. But, we can imagine a faraway universe on which this constant is very large; so large that all objects have this quantum strangeness. How strange that universe would be? It is a good topic for some science fiction. In our real world, this strangeness is small and manifest only at the atomic scale. But it is essential for life to grow out of electrons, atoms, and molecules. It is also essential for the formation of galaxies in the evolution of the universe. 

The electron cloud

I still remember my encounter with quantum mechanics. It was during my eleventh and twelfth-grade textbooks of chemistry. When the physics textbooks were busy describing the formative years of quantum mechanics using the Bohr model, the chemistry textbooks had already introduced us to the Schrodinger equation and wavefunction. Of course, they didn’t attempt us to solve the Schrodinger equation. The chemistry books had to deal with a lot of situations regarding how atoms join to form molecules. They wanted to equip us with some qualitative tools that will give us insight into how atoms undergo such interesting arrangements and form a stable configuration of molecules. The molecular structure was the first quantum mechanical application I learned.

How did these textbooks achieved to teach intricacies of quantum mechanics to kids that are in their final years in schools? By depicting a wave function as an electron cloud. When we were visualizing, for example, the wave function of the hydrogen molecule, we were instead creating a 3D picture of not the wavefunction of the molecule but some other function calculated out of the wavefunction – the probability density. The probability density is like taking the square of the wave function. Yet, it is a more workable quantity. You can easily start intuiting about it. This three-dimensional picture of the probability density function is like a cloud of electron and was called the orbital in our textbooks.

You will object, “how can two electrons of the hydrogen molecule make a cloud?” Yes, it is possible because of the miracle of quantum mechanics, our textbooks told us. If you take a snapshot of the electron at a given time, you will find it at a point near to protons of the hydrogen moment. Take a snapshot at the next moment and it is gone somewhere else. The successive snapshots, when developed on a single photographic plate, will give the final picture of how the electron is behaving. The picture will look like a cloud which is denser around the two protons and less dense in the middle – like a dumbbell.

The most intriguing aspect of this picture is that the electron is not moving from one point to another in a well-defined trajectory. If you quickly project the snapshots on the screen like an animation film instead of developing them on a single photographic plate, don’t expect a nice movie of an electron moving from one point to another in a continuous manner. You will see the electron far away from both the protons at one instant and at the next instant it will be in the middle of the two protons. You will be seeing a dot appearing and disappearing on the screen at random points – like a shooter shooting bullets on a screen. However, if you watch long enough, you will discover a pattern in the dots on the target screen. You will find that the shooter is aiming for two points – the two protons! So, most of his aims are distributed around those two points.

We were told that there are only a few standard shapes these clouds can acquire, each shape having its own energy. When two atoms come close enough, their electrons clouds rearrange into new shapes of lower energies. These new clouds were called molecular orbitals. A few qualitative rules about these molecular orbits enabled us to make sense of the complicated world of molecular structure.

How often does a cricket team win the toss in all the five matches of a series?

There are many strange theories that claim to predict the outcome of a fair coin toss. One example is that if you throw a coin with its head face upwards, the outcome of the toss is more likely to be a tail. All such theories are false. But, one is tempted to believe in them when stakes are high as in the cricket matches. When there are only five matches in the series and winning the toss is crucial for winning the match, such hypotheses might appear to have some substance to you. Who will believe in the fairness of the coin and the fact that the probability of winning the toss by either side in a cricket match is identical when you can end up fairly often with one team winning the toss all the time in the whole series?

Let’s estimate the probability of a team winning the toss N times consequently. When N=1, we have just two possible toss outcomes for our favorite team: win or loss. Let us denote a win by W and a loss by L. So, the possible outcomes for a single match are {W, L}. This simply means that the probability of winning toss one time is 1/2. When N=2, the possible outcomes of the toss can be {WW, WL, LW, LL}. So, the possibility of winning the toss consequently two times by our favorite team would be 1/4 as there is one such event in a possible set of four events. When N=3, the possible outcomes are {WWW, WWL, WLW, LWW, WLL, LWL, LLW, LLL}.

The probability of our team winning three tosses consequently is clearly 1/8. Looking at this pattern, we can say that the probability of a team winning N times consequently in a series of N matches is 1/2^N. However, the probability of the other team winning the toss in all the N matches is also 1/2^N. So, the probability of any of the two teams winning the toss consequently in N matches is 1/2^N+1/2^N or 2/2^N. So, or a series with 4 matches,  probability of one team always winning the toss is 1/8. For 5 matches, this probability is 1/16.

Most series in cricket are of 5 matches. So, on average, in every sixteenth of such series, one of the teams should win the toss in all the matches. It’s not that rare! Once in a year or so, we should see this happening.

If we are interested the probability of a team loosing toss only once in a series of N matches, the probability will be even more higher: 2N/2^N. (How to do such a calculation is a topic for another post.) For, N=5, this probability is  5/16, a fraction very close to 1/3. So, in every third cricket series of 5 matches on average, a team should loose toss only once. This is quite a headline!

 

 

From Fermat principle to quantum mechanics

When light travels from one point to another in vacuum, it chooses a straight line trajectory. However, when the light ray encounters variable density or some discontinuity on its way, it no longer moves along a straight line. It adapts it’s trajectory to benefit from the density variations of the medium – by trying to avoid the denser parts that reduce its speed and by preferring to walk more on rarer parts of the medium where it gains speed. It seems in hurry to reach at the destination in the shortest time. That light travels along a path between two points for which time taken is minimum is called Fermat’s principle.

I like to explain this principle using a loose biological analogy. I like to view light a small organism trying to reach its food in shortest possible time by adapting its trajectory in a medium where its movement varies from place to place. The organism does not want to be trapped in the denser regions where it can be trapped for longer times. It want to make the maximum use of the rarer regions where it can move relatively faster. Of course, the analogy is not literal in the sense that light senses its medium and adopts a path that minimises the time taken to reach its destination. The analogy is appropriate only in the sense that it describes the optimisation going on in the propagation of light in a language we can easily understand.

In classical mechanics, a similar principle, called principle of least action, dictates the trajectory of a particle under the influence of a force field. However, the allowed path does not minimise time but a quantity called action. The path that minimises action is always consistent with Newton’s law of motion. So, the principle of least action is mathematically equivalent to Newton’s law of motion.

In the quantum mechanics, electrons and other elementary particles do a similar thing: they sense all the neighbouring paths so that they can move on the fastest one. Yet, this sensing is not perfect in quantum mechanics and you may find the electron straying into regions not allowed classically. Yet, if you let hundreds of particles move from one point to another, most of them will be roaming around the classical path.

Feynman was not happy with the way his contemporaries were visualising the quantum mechanics. So, he invented a formulation of quantum mechanics which assigns probabilities to all the various paths a particle can take while going from one point to another point. It turns out that the probability for the path dictated by Newton’s law comes out to be the maximum while the probabilities for all other alternate paths is heavily suppressed for almost all large-scale motions we encounter in our daily lives. However, for motions of elementary particles like electrons at small scales, the probabilities for alternate paths are also appreciable. The Schrodinger equation simply tells those probabilities. 

But, when a microscopic particle like electron moves between two points crossing some hindrances, it behaves in a fashion similar to the small organism drifting in search of rarer regions in a fluid. Just like the living organism, the response of the electron is not deterministic in quantum mechanics. You make it run again, and it will follow a different trajectory. As always, there will be many trajectories close to the classical path. But, we will see more drastic deviations more frequently as we probe motions on smaller and smaller scale.  Of course, the analogy doesn’t go too far. Electrons are much simpler than living organisms.  They simply obey Schrödinger equation. 

A minimalist fuzzy finder to quickly open files and apps – fzf

I am constantly trying to simplify my life. This process includes my digital life as well. Gone are the days when my desktop screen used to be full of shortcuts to various folders I would be working upon. Now, when I open my computer, it greets me with just a nice wallpaper. There are no icons anywhere. Earlier, I used to have the dock (a bar of icons of your favorite apps) at the left side of the desktop. Now, it has shrinked also and contains few icons (file browser,  a shortcut for opening the list of apps, and some running apps and minimized documents). It shows up gracefully only when I press the shortcut key or hover the mouse there. I have to keep it for the sake of people who want to do something on my laptop and are irritated by seeing a blank screen with just a wallpaper and no icons to click. I seldom use it to open an app or find a document.

You might be wondering how I open a program on my computer and how I find a folder or file on which I want to work. I use a desktop search program (Spotlight on Mac, Synapse on Linux). On pressing the window key of my computer to do some of these tasks. Yet, I would end up doing it in the traditional way for some tasks: open a program from a menu, opening the folder by going through the whole hierarchy, and then opening the relevant file. The search app doesn’t always work because it does not recognize all of the programs and often is slow to find files buried deep in the file hierarchy.

Often, I have to search and compile programs on the terminal after selecting them from a folder that contains hundreds of files. Again, the auto-completion ability of the terminal apps are a great help and save one from typing the long file names or browsing the subdirectories. Yet, I always needed a magical way that autocompletes the file names for me by pressing few keystrokes.

I solved all these problems by using the terminal along with a program called fzf to fuzzy search for files, folders, and history on my computer. You can think of this approach as a super hack that replaces any desktop search app you are using.

I open my terminal (I prefer zsh on iTerm on Mac and guake on Linux) by pressing a shortcut hotkey. Then, I do a fuzzy search along with an fzf shortcut to find a file or directory, or to launch an app.

What is the fuzzy search? Suppose I need a file called “Fuzzy finder fzf.txt”. I will simply type “Fuzzy”. The fzf script will automatically list all files with the word “Fuzzy” for me to select from. If the list is small, I select the right file by arrow key and press enter to open it. Otherwise, I narrow down the search by typing another word, say “fzf” or “txt”. The idea behind fuzzy search is that I can type any unique set of letters present in the file name and I end up with the file at my fingertips. So, I can find the file “Fuzzy finder fzf.txt” by simply typing “z z z” if it is the only file whose name contains three z’s.

There are three main key-bindings for fzf. To search a folder, press alt+c; to search a file, press ctrl+t; and to search a command, press ctrl+r.

If you want to change your directory, press alt+c and type few letters of your choice from the name of the folder. You will see that a list appears with the desired folder at top of it or very near to the top position. You either type more letters in its name to bring it as the top option or you simply select it by pressing few down arrows till you reach it. Pressing return will take you to the desired directory.

If you want to run an app with a particular file opened, just type the app name followed by space and press ctrl+t. You will be greeted with a list of all the files in your current directory. As soon as you type few characters in the desired file name, the list gets trimmed with your destination file being on the topmost place. When you press enter, you will find that fzf has autocompleted the file name for you. Now, you can run the command by entering more options and pressing return in the end.

To run an app, you need to type the command for doing so once on the terminal. Then, you can always fuzzy search your command history using fzf by pressing ctrl+r.

For a more detailed description , see the post by Ryan Selk. You can download fzf and learn more about it from its GitHub repository by Junegunn Choi.

 

No free will in evolution

If we see ourselves as atoms that make us, our history becomes the history of the universe. Then, we were born in first stars as carbon, oxygen, nitrogen, and other light elements. If we identify ourselves with the molecules in our bodies, we are as old as the earth itself. We share our molecular history with the earth. We can insist that we are what our genes or DNA makes us. Yet, we share much of it with most of the species on the earth. Our human identity originated just a few thousand years ago in this cosmic journey spanning billions of years.

When we become highly identified with the newly acquired human form, we delude ourselves by thinking that we can “save the earth”. We happily ignore the right view: it is us, the human species, who need to be saved from our own misadventures on this planet. Earth has survived for billions of years and can survive for billions of years to come. Adding few poisonous gases into the atmosphere or pouring some harmful liquids into the oceans will not harm the earth: it will make us extinct.

This whole evolution of the universe was not a design to bring us to the scene. Things happened when conditions were conducive for them to happen and opening way for many new things to happen. One small piece missing in the chain of events, and the earth would be a dead planet. The origin of life on the earth was a beautiful accident. Yet, our extinction can be a planned genocide.

There was no universal will that evolved life. No intelligence other than the forces of nature. No God other than the laws of nature. The universe, the earth, and the life evolved because of the laws of the universe allow this possibility.

We, as human beings, intend something and then the action follows. This impression of free will is an effective model devised to explain the complex human behavior. Yet, however complex our behavior be, it still obeys the laws of nature. In this sense, there is no absolute free will. We still use the term “free will” in the limited sense as an effective model. The universe doesn’t need an intelligence or free will by which it intends to evolve. Nor does earth. However, we need “free will” in sense of an effective model to explain choices we make as humans.

No free will was needed for the origin of the life on this planet. However, we need “free will” to save life on this planet.

Life is what molecules eventually​ do on the habitable planets

Planets were created as the byproducts of stars. They inherited atoms from birth and death of stars. These atoms reacted. They made molecules including the most abundant molecule – water. All the water got evaporated from the hotel planets. The cooler ones lived in the ice ages. Some planets like earth could retain water. Heavier planets retained their atmosphere due to gravity. Air escaped into space on lighter ones. We on earth are lucky to have the oceans and the atmosphere. But, even our earth was not habitable in its formative stage. Some of the molecules that make me and you today were swimming in the ocean in the myriad of forms at that time. Some of them were flowing in the rivers, settling in the sediments, rising in the mountains, or clashing in the tectonic plates, or drifting with the continents. In those times, we all were erupting from volcanos, thundering in the sky among the clouds of not only water but all of the strange liquids we now sample in the bottles in our chemistry labs.

The molecules we identify as ours today were metamorphosing into all possible compounds documented in the chemistry books, both inorganic and organic. We were erupting, evaporating, boiling, blowing, raining, endlessly. There was no purpose. The earth was not arranging for the life to emerge out of this chemical soup. It was playing the whole game of geophysics and chemistry at the natural pace. The game continued for millions of year and then something significant happened according to our point of view. Life emerged. As for as the molecules that make us today are concerned, they had no point of view. They combined from simpler to the more complex combinations. Each new combination would open up the possibility of millions of newer combinations.

Our earth was not special: similar events might have unfolded on enumerable distant planets in the universe that are conducive to life. We are not alone in this universe. Who knows when which stroke of lighting produced first amino acid, or first RNA, or the first cell! Then, there were many such, replicating themselves, and improvising. The molecules that make us today, at that time, were living spread among millions of micro-organisms. Maybe, a part of you was at the north pole and another at the south pole. Every micro-organism responded to light or temperature or to some other molecules. Our emotions like desire and aversion can be traced back to these simple responses of the first living cells to the outside stimuli. These simple behaviors become more and more complex with time.

The micro-organisms replicated themselves, sometimes making replications errors. What we see today – the whole diversity of life – are the errors that were better equipped to survive. We do not see the other set of errors – less equipped to survive – due to the obvious reason that they didn’t survive long.

In that era, the molecules that make us today were living millions of lives, most of them wasted, but all necessary. Some of these life forms become more complex, multicellular. We developed organs. The first eye was just a pinhole camera: version 0.1. Then came version 0.2 which could tell few shades of lightness and darkness. Then, the resolution and color sensitivity improved with subsequent versions. Soon, life evolved out of oceans into the land. Gigantic animals like dinosaurs were evolved, sustained, and were destroyed on this earth. If we are the molecules that make our body,  we have lived in dinosaurs as well. When a meteorite destroyed the dinosaurs, we were there exploding in the blast and settling in the dust.

We, as molecules that make our body today, evolved in myriad life forms, always adapting to the new situations and building up complexity out of random fluctuations. Many of our life forms became extinct. Many survive still. We grew on the earth as forests and oxygenated the atmosphere. We blossomed as flowers and flew as bees and birds. The human form that we take as our exclusive identity evolved only just a few thousand years ago in this cosmic journey spanning billions of years.

Stars as ovens where the elements were cooked

After the big bang, all that exists today started its journey as a bunch of particles in space. Soon, hydrogen and some light elements were cooked in the hearth of early universe after big-bang. Frequently, these particles would come close to one another, saying hi, exchange a little energy, separating, and saying bye. They didn’t mingle to form molecules, clouds, stars, planets, oceans, bacteria, fish, butterflies, dinosaurs, or us. The same story repeated again and again for millions of years- the universe went on expanding and cooling.

Next, some regions, which were dense, as random fluctuations, became denser as gravity did its magic. Matter started accumulating. First gas clouds were born. Since we all are made of atoms, we were present as atoms in one or many of those clouds.

Bigger clouds grew bigger grabbing matter from around them. They become so big that they started collapsing under their own weight. Their cores becoming hotter and hotter. Hydrogen atoms started fusing into helium. Soon, newer light elements also were produced like carbon and oxygen – atoms that form most of our body weight today. Those of you who were living in heavier stars had access to heavier elements: sodium, calcium, phosphorous, aluminum, silicon. and so on, up to iron. but, none of us had any access to gold, platinum at that stage of cosmic evolution. Ours was a poor world. Then, the some of us were fortunate. Their stars blasted. Enormous energy was released. New, heavier elements were cooked in the aftermath. That’s why gold is so rare. Platinum is rarer. Uranium is still rarer. These rare elements were cooked only in the explosion of super heavy stars. The debris of explosion contracted and got heated further. New stars were made out of them- richer in elements.

 

The darkness of the night sky

When you look at the sky and see the darkness behind the stars, do you wonder about the nature of this darkness? I remind myself that what my eyes see as darkness is actually the primordial light that is coming to us from all directions. This primordial light was there even before the birth of a single star in the universe: invisible to our eye but visible to a radio telescope.

Looking a faint star through a telescope, we look back in time. In the moment of our looking, our eyes absorb the photon that was created in the star millions of years ago. The star might have been dead by now. The last photon it emitted toward us is might still be traveling in space. Perhaps, there will be no one on this earth to absorb that photon and witness the death of the star.

Had universe been existing from eternity, there would be no darkness in the night sky. If you would have pointed a dark patch to an astronomer in one direction, he would have said that we have to look further back in time with a more powerful telescope and we would find a star there. Our universe is not like this at all. The best telescopes have looked farthest in space and back in time till they find no stars there – they find a sphere beyond which there is total darkness. Yet, to some aliens that can see radio waves, this primordial darkness would be luminous. They would see it as the afterglow of the big bang – an event that created all that we see around us and all that we do not see as well.