thinlens

Notes on life and tech by Abraham Neben

I originally wrote this as a “non-scientist's introduction” for my PhD thesis in astrophysics, but didn't end up including it.

The big bang is like biological evolution: the non-technical world makes a big fuss about it, but scientists simply shake their heads and move on. Our understanding of biology and astronomy is so inextricably linked with these theories that there would practically be nothing left if we suddenly decided to reject them out of hand. Indeed belief not the most useful word here, or in science generally. To be sure, science requires at least a working belief that we live in a physical universe governed by mathematical laws, but if a scientific theory were backed up by so little data that it required belief to be accepted, then it’s unlikely to be very useful. There is, of course, an intermediate ground for theories in development or proposed before technology exists to test them. No one would suggest discarding these theories outright, but they aren’t said to be accepted either. Rather, scientists say about string theory and supersymmetry, for instance, that the jury is still out.

In this essay, I will discuss the modern field of cosmology and the evidence which puts the big bang squarely in the realm of fact. First, though, an important point about terminology. Many scientists and science popularizers play fast and loose with what the term big bang actually refers to. Does it refer to the predicted singularity 13.8 billion years ago? Or both the singularity and its aftermath? Just its immediate aftermath, or the resulting expansion continuing into the present day? Or does it refer to the theory which predicts that event? I suspect this ambiguity arises in part out of efforts to wow audiences at public lectures, and in part because the definition of the big bang is really beside the point in the technical literature. Experimentalists focus on building instruments and studying distant galaxies and theorists work to better understand the predictions of quantum field theory and general relativity. Editors don’t make a big deal over the precise vocabulary used in paper introductions. Because of all this ambiguity, and because of the baggage the term big bang carries among the public, I prefer not to use it at all. Let’s just discuss what we know.

I could just describe our modern picture of the Galaxy, the universe and cosmology, but I fear it would be all to easy to simply dismiss as simply a philosophy like any other. So I’ll take a more historical approach and describe the main breakthroughs over the past century that have made cosmology the precision science that it is today.

Our story begins in the early 1920s, by which time a number of poorly understood spiral nebulae, fuzzy spiral blobs, had been observed in the night sky. There were essentially two possibilities. On the one hand, perhaps they were clouds of gas in the far reaches of our own galaxy; on the other, perhaps they were galaxies like our own except farther away than any object ever seen before. The implications were enormous. Is our galaxy all there is, or is it part of a space even more vast with countless others?

Things came to a head in the famous Great Debate between astronomers Harlow Shapley and Heber Curtis at the Smithsonian in 1920. The debate itself was mostly a stunt, scientific disputes aren’t settled by debate but by better data. At the time, there existed measurements supporting both points of view, but none of the data were extremely convincing. The dispute wasn’t settled until Edwin Hubble, using the new 100 inch Palomar telescope on Mount Wilson outside of Los Angeles, made the first measurements of the distances to these spiral nebulae, and demonstrated they were way outside our galaxy. Hubble sought and monitored a type of pulsating stars in these nebulae called Cepheid variables, which are known to pulsate with a period proportional to their intrinsic brightness. Then by comparing their apparent brightness, more distant objects generally appearing dimmer, their distances could be obtained. Many of the spiral nebulae were millions of light-years away, while our galaxy is (and was) known to be only about 50,000 light-years from side to side. The debate was settled, the universe was much larger than we had known.

For his next trick, Hubble turned his attention to even more distant galaxies, and the results were just as shocking. With only a few exceptions, all appeared to be flying away from us at staggering velocities, hundreds or thousands of kilometers per second. Fast enough to travel around the earth in less than a minute. Moreover more distant galaxies were flying away from us faster…linearly faster. Exactly what you’d expect for a uniform expansion of space itself. It was as if a rubber sheet with dots on it was being stretched out; no matter which dot you’re sitting on, all others are moving away from you at a rate proportional to their distance. This relationship is known as Hubble’s law, and the coefficient of proportionality, in units of velocity per distance, is knowns as the Hubble constant. Modern measurements place this value at roughly 70 km/s per Mpc, where 1 Mpc = 1,000,000 parsecs.

How can the universe itself be expanding? What does that even mean? A decade earlier, Einstein had applied the equations of General Relativity to the universe as a whole and found that static solutions are impossible, which suggested to him that his equations were not correct. He found that a single constant added to the central equation of the theory was sufficient to ensure a static solution, a cosmological constant. After hearing of Hubble’s results, though, Einstein famously abandoned that addition, calling it his greatest mistake. It wasn’t really a mistake per se, given that there wasn’t any data at the time to test his prediction, more a missed opportunity. He could, after all, have gambled and predicted the expansion of the Universe, and perhaps won a second Nobel prize for his trouble.

Despite this early progress, cosmology largely languished as a research backwater for decades, and for a time fell out of all memory, until the most unlikely creature of all, an engineer, made a breakthrough. In the course of developing ultra sensitive radio receivers at Bell Labs, Anro Penzias and Robert Wilson developed a horn antenna which seemed to pick up a very faint noise which they couldn’t explain.

Radio astronomers often quantify the power of a radio signal by the equivalent temperature of a thermal source emitting the same amount of power. Let us build some intuition here. Any object at a non-zero temperature emits electromagnetic radiation. The hotter it is, the higher frequency of the radiation. Objects at room temperature emit predominantly in the infrared band, while objects at a few thousand degrees, like the sun (and like tungsten filaments in incandescent bulbs), emit in the optical band. At the other end of the spectrum, only very cold objects emit predominantly in radio waves. Note of course that we are only talking about electromagnetic waves emitted by the random jostling around of atoms. By running currents through a wire, substantially more powerful radio waves may be produced which are not random at all, and are useful for transmitting Lady Gaga lyrics, among other things.

The background radiation detected by Penzias and Wilson was equivalent to that emitted by a very cold object, within a few degrees of absolute zero. 3 kelvin to be precise. Moreover, it was almost exactly the same brightness in any direction they looked away from our galaxy. Their discovery set off a flashbang in the cosmology community. Based on calculations of how atoms could have formed in the hot and dense early universe, Ralph Alpher and Robert Herman calculated that the ambient temperature of empty space today would have to be roughly 5 kelvin (See also this and this).

The exact temperature was somewhat uncertain, and later estimates ranged from a few kelvin to tens of kelvin, but Robert Dicke immediately recognized that the observed 3 kelvin radiation was cosmic in origin, corresponding exactly to the aftermath of that hot, dense early universe, what had been mocked as the the big bang by astronomers who opposed the theory. But much as it’s a losing battle to keep non-scientists from referring the Higgs boson as the God particle, the name big bang stuck.

Two additional discoveries made in the early 1990s confirmed these results and began the era of precision cosmology. Both came from a satellite-born experiment named the Cosmic Background Explorer (COBE) designed to better measure the cosmic microwave background (CMB) discovered by Penzias and Wilson. The first key result was a precise measurement of its spectrum, the amount of power emitted as a function of frequency. Purely thermal emitters have a very characteristic spectrum known as the blackbody curve or the Planck function. Radiation emitted by stars and galaxies often looks somewhat thermal, but atoms and dust inevitable emit or absorb some radiation at different frequencies, always resulting in an imperfect frequency spectrum. In fact, the only known source of such a perfect thermal spectrum is the hot, dense early universe when everything was a sort of primordial soup, or perhaps more precisely, a purée. All scientific opposition to the hot, dense early universe model, ie, the big bang, evaporated after the publication of this spectrum.

The second important discovery was the icing on the cake. On top of clear evidence of this exotic hot, dense, homogenous early universe, COBE saw hints of how the modern clumpy universe could have emerged. To the imprecise radio antenna of Penzias and Wilson, the cosmic microwave background appeared just as bright in every direction, but the more sensitive COBE satellite distinguished two interesting patterns. First, after subtracting the sky-averaged intensity corresponding to the 3 kelvin radiation, they observed a bi-polar pattern in the sky. That is, the sky was uniformly brighter in one direction and fainter in the other, just as you would expect due to the motion of our galaxy relative to other galaxies. A doppler shift. It’s as if our dot on the expanding rubber sheet is actually moving slowly across the surface while the balloon is expanding, so dots on one side don’t seem to be receding as quickly, while those on the other recede faster than they otherwise would. Then after subtracting this bi-polar pattern, we see an incredible, random-looking field of fluctuations. This anisotropy of the cosmic microwave background shows us the slight inhomogenieties in the nearly smooth early universe.

Over time, we predict, but have yet to directly observe, that the denser regions slowly drew in more matter and collapsed due to gravitational attraction, eventually forming stars and galaxies. More recent CMB surveys by the WMAP and Planck satellites have confirmed and extended these results with exquisite precision, and truly made the past two decades the golden age of cosmology.

Lastly, I would be remiss if I didn’t mention the most shocking discovery in cosmology over the past decades: the acceleration of the expansion of the universe. In 1997 and 1998, two groups attempting to reproduce, refine, and extend Hubble’s original measurements observed that galaxies a thousand times more distant that Hubble’s appeared only half as bright as they should given their distance. Recall that Hubble’s law relates the recession velocity of a galaxy to its distance, and thus, to its apparent brightness. An obvious possibility was obscuration by dust, but both groups went to great lengths to demonstrate this was not the case. Dust absorbs preferentially red light, drastically altering the spectrum, but the spectra of these galaxies appeared normal. They were just fainter than their other properties suggested they should be.

The consensus conclusion is that not only is the universe is expanding, but it is accelerating, due to exactly a term in Einstein’s field equation like the cosmological constant he artificially added. But this time with living proof. The acceleration of the universe is often described as a dark energy, often meant as a more general theory than a cosmological constant, but it remains a big question mark. Don’t be discouraged, though. Many of the best breakthroughs in physics have occurred after observations of the unexpected. How fortunate we are to witness one of them!

#physics

Posted by Abraham

#!/PATH/TO/PYTHON
#
# Generate an animated gif of the specified static images.

import imageio
import sys

if len(sys.argv) < 4:
    print('Usage: gif output.gif [frame duration in ms] [image1] [image2] ...')
    sys.exit(0)

output_fname = sys.argv[1]
duration = int(sys.argv[2])
fnames = sys.argv[3:]

images = []
for fname in fnames:
    images.append(imageio.imread(fname))
imageio.mimsave(output_fname, images, duration=duration/1000)

#tech

Posted by Abraham

I love running because I can do it almost anywhere and any time, but after several years of running with poor form, I have mostly switched to lower impact exercises like swimming and biking. I still run once or twice a week, making an effort to use good form. I'm hoping that with good form, good shoes, and good surfaces, I'll be able to run for decades to come!

Poor running form I never ran track and field or had any formal coaching on how to run or jog. Naively, I thought you just did it. So for years my form looked like this. Notice that my rear leg is not fully extended, my front leg is raised up quite high off the ground. My physical therapist explained to me that I was bouncing up and down a lot, which is both inefficient and hard on the knees and ankles. Poor running form

Good running form He explained that by fully extending my rear leg and keeping my front leg closer to the ground, the impact is a lot lower on my body. I have also mostly switched from toe-striking to heal-striking because I find it forces me to use this better form. If I toe-strike then I have a tendency to bounce up and down too much. That said, my physical therapist claims there is nothing inherently bad about either toe-striking or heel-striking, it's strictly a personal preference. Good running form

Physical therapy I highly recommend consulting with a physical therapist if you are dealing with any muscle or joint issues. I like to think of physical therapists as personal trainers with a formal education! They can help with stretching, strengthening, and avoiding bad exercises! Connecticut has a direct access law that lets you see a physical therapist without a referral from a doctor, which reduces the hurdles getting help. For an acute injury, it's probably best to see a doctor first, but I've really benefited from physical therapy for chronic muscle, joint, and tendon issues.

Good running shoes In my previous life, I bought a new pair of sneakers every year and wore them everywhere for everything. By the end of the year they were full of holes, had no tread, and had very little support. I've learned that a quality pair of sneakers is an investment just like physical therapy. I have been wearing Altra running shoes for the past few months, and they provide excellent support. Altra is known for their “foot-shaped” design, which has a wide toe-box to reduce pressure around your toes. I find this reduces the nerve sensitivity I occasionally experience in my left foot. Altra running shoes

#exercise

Posted by Abraham

I came across a superb cover of Bare Necessities from the Jungle Book by a pair of up-and-coming musicians: Carson McKee and Josh Turner (>500k subs between them). The attention to detail in this throwaway cover for the inter webs is impressive! If there was ever a pair of new musicians to support on Patreon, these are them (Carson, Josh)

#music

Posted by Abraham

Apps/Utilities

Sublime Text is an elegant, fast, and lightweight text editor for macOS, and it is my preferred choice for Python/C++ editing. Seriously, VS Code and PyCharm are so much slower that I wonder if people who use them like waiting around for files to open or for project searches to finish.

  • Cmd-P – Quick open file by name (I have remapped this to Cmd-T)
  • Ctrl-G – Go to line number (I have remapped this to Option-G)
  • Opt-D – Insert python debugger (This is a custom shortcut)

rg is far and away the fastest way to search through a large repo of source code from the terminal.

Magnet is the Mac equivalent of Window’s only useful innovation over the past decode: Snap Assist. For any given project, I probably have a 4 windows open (Slack, iTerm2, a jupyter notebook, and Sublime Text). Magnet gives you keyboard shortcuts and sticky screen edges to move any give windows to any half or quarter of the screen.

  • Ctrl-Opt-Left (Ctrl-Opt-Right) – Move window and resize to fill left (right) half of screen.
  • Ctrl-Opt-U – Move window and resize to fill top left half of screen. I use U, I, J, and K to move windows to the top left, top right, bottom left, and bottom right quarters of the screen. But these shortcuts are easy to customize.

CopyPath is a Mac utility that lives in the menu bar and lens you copy the full path of any selected file(s). It's indispensable for anyone that uses both the terminal and the Finder. zsh is a bash alternative which has several nice features: A shared command history between all terminal windows, a built in git aware prompt, and a default pretty color scheme

General mac text editing shortcuts

Ctrl-A (Ctrl-E) – Move cursor to the beginning (end) of the current line Opt-left (Opt-Right) – Move cursor one word back (forward) Shift-Opt-Left (Shift-Option-Right) – Select previous (next) word Opt-Backspace – Delete previous word

#tech

Posted by Abraham

Here's a snippet from a fascinating interview with Democrat data scientist David Shor in New York Magazine.

Mitt Romney and Donald Trump agreed on basically every issue, as did Barack Obama and Hillary Clinton. And yet, a bunch of people changed their votes. And the reason that happened was because the salience of various issues changed. Both sides talked a lot more about immigration, and because of that, correlation between preferences on immigration and which candidate people voted for went up. In 2012, both sides talked about health care. In 2016, they didn''t. And so the correlation between views on health care and which candidate people voted for went down.

One interesting tidbit Shor alludes to is an analysis by political scientist David Broockman (see writeup in Vox) showing that moderate voters do not actually have moderate views on invididual issues. What we call moderate voters are really voters with many ideologically inconsistent views.

For Ahler and Broockman, this solves a puzzle. They note that many states have implemented election reforms to wrest the process away from partisans and empower average voters to elect the moderate politicians they really want. These reforms include open primary elections, nonpartisan redistricting, and public funding of elections. But “the bulk of studies on these reforms finds little evidence that they improve moderate candidates' fortunes.”> The answer, Ahler and Brookman realize, is simple: these voters don't want moderate candidates because these voters aren't actually moderates.

#society

Posted by Abraham

If you type full git commands all the time, you're making life unnecessarily hard for yourself. Add these aliases to your shell config file, eg .bashrc or .zshrc. I'm a longtime user of zshell.

    alias cherry="git cherry-pick"
    alias ga="git add"
    alias gb="git branch --sort=-committerdate"
    alias gca="git commit --amend"
    alias gch="git checkout"
    alias gcm="git commit -m"
    alias gcnm="git commit -n -m"
    alias gd="git diff"
    alias gl="git log"
    alias gr="git reset"
    alias gs="git status"

#tech

Posted by Abraham

For most of my life I felt like the odd man out. I was shyer, more anxious, and less social than any of my friends. To some extent things have changed over the past few years as I've dealt with social anxiety and learned to better accept myself. But I still find that I'm the quiet one in virtually all of my friendships. I always took this for granted, thinking that I must really be in the 99th percentile of shyness. But when my boyfriend and I had dinner with a few of his college friends last week, I started reassessing.

One of his friends was quiet. Very quiet. It's rare that I meet someone shyer than myself. But then I started thinking back to a few weeks prior. I had brunch with an ex and his new boyfriend: also very shy. In fact, Myers/Briggs reports that the population is split virtually half and half between introverts and extroverts. So where were all these shy folks all my life when I was feeling like a social outcast?

The answer is in the Friendship Paradox: your friends are likely to have more friends than you do. This is a selection bias effect. No matter how shy or introverted you are, your friends are likely to be extroverts because those are the people most likely to be seeking friends. So where are all the introverts? They've been here all along hiding in an extrovert's world. I'm an introvert, and I generally still find extroverts easier to make conversation with. They ask more questions and are better at keeping the conversation going.

I saw Susan Cain's TED Talk a while back, but I never really groked it until now. Even introverts have a bias against introverts. We're quiet and it's time to shout it from the rooftops.

#society

Posted by Abraham

Jony Ive, at the Genius Bar, with a spec of dust?

Apple shipped a super slim new keyboard on the ultra-portable 2015 MacBook, and later introduced it across their laptop line. The redesigned physical mechanism underneath each key allowed for a thinner design and improved key stability while typing. Another triumph for the tech world's best designers and engineers.

Except not.

The butterfly keyboard had reliability problems from the beginning, prompting Apple to set up a dedicated replacement policy. The new mechanism was uniquely sensitive to dust, failing to recognize certain keystrokes at times, or generating double keystrokes at others (eg, see Casey Johnston's eviscerating review and Joanna Stern's column written verbatim on a malfunctioning keyboard). Without publicly admitting failure, Apple repeatedly refined the mechanism in hopes of solving the issues (see iFixit's writeups from 2019 and 2020).

I never had reliability problems with my 2017 MacBook Pro keyboard, but the ultra-low travel, ultra-stable typing mechanism constantly aggravated my wrists. “Key stability” means that only vertical force will cause the key to depress. For instance, if you apply force at an angle 30 deg away from normal, then you are forced to type ~15% harder than you would have to type on the non-butterfly keyboard (ie, F cos θ). “Stable keyboard” sounds like a nice phrase, but the poor ergonomics are inescapable.

This is lesson that Apple has yet to learn. Even now after sunsetting the butterfly mechanism, the replacement remains heavily influenced by it. Yes, the key travel is increased, but the keys remain as rigidly stable as the butterfly's. I typed on the new keyboard in person at the New Haven Apple Store when it was introduced on the new 16 inch MacBook Pro last year...it still takes too much force to type.

The only good solution for serious typists is to use an external keyboard. I have become a devotee of split ergonomic keyboards like the Microsoft Sculpt or the Logitech Ergo. Either that or dig out your beautiful first-generation MacBook Pro with the to-die-for silver keyboard ...

#tech

Posted by Abraham

I switched to Roland Kauffmann''s excellent Programmer dvorak keyboard layout over a decade ago and haven''t looked back since. It has all the advantages of the dvorak keyboard (e.g., 70% of words can be typed without moving fingers off the home row), with some nice improvements for programmers (e.g., parentheses and brackets are placed symmetrically on the top row, and symbols are primary over numbers). Switching to Programmer dvorak has reduced my wrist and finger strain at work, especially paired with a nice ergonomic keyboard like this one.
In this post, I''ll discuss some of the issues I''ve run into with Programmer dvorak and how to address them.

The keys don''t match the keycaps. Sure, you could buy a physical dvorak keyboard or put dvorak stickers on your keycaps, but why train yourself to look at the keys while you''re typing? I created a wallpaper image with the programmer Dvorak layout overlayed on the Andromeda galaxy. So all I had to do was use my Show Desktop hot corner to consult the layout.

Thumb typing. The keyboard layout of the iphone/ipad keyboard cannot be changed to Dvorak. Several years ago, Apple allowed developers to created 3rd party keyboards, and there are a few dvorak ones but they are all disappointing: ugly, slow, and unpleasant to use. All I want is to apply a new layout to the Apple keyboard. For this reason, I thumb-type in qwerty.

Using a bluetooth keyboard with an iPad. Strangely, while Apple doesn''t let you change the layout of the on-screen keyboard to any Dvorak, they do allow you to use the (vanilla) Dvorak layout for Bluetooth keyboards. Unfortunately, there''s no way to use the programmer Dvorak layout.

Computerized standardized testing. The GRE exam is given on computer and requires a typed essay, and just like the SAT, longer essays typically receive higher scores. To prepare for this, I switched 100% back to qwerty for a month prior to the exam to make sure I could type as long an essay as possible.

#tech

Posted by Abraham