Vaccines and CSS

The magic of the COVID vaccine, how we figure out distribution, and some CSS mixed-in

It’s been over a month since my last update. A few of you have rightly pointed out that I’m long overdue!

My plan going into the new year was to continue my extended reading period. But as the weeks progressed, I (like many of you) have felt increasingly anxious about the vaccine rollout.

As someone who now has a lot of time on my hands… I couldn’t really justify spending my time on anything but vaccines.

So, since the beginning of the year, I’ve been volunteering with the US Digital Response (USDR) to help with vaccine distribution.

For some quick background, the USDR is a volunteer organization that helps various governments architect pieces of technical infrastructure. They frequently act as the conduit between various community groups, volunteer organizations, and experienced technical teams.

In doing so, it’s taught me a LOT about both the vaccine and how governments actually work. Sadly, I am heavily NDA’d, so I can’t share as much as I’d like. But that said, I can point you to a bunch of the public resources that I’ve encountered in the process, and wrap up with a few of my thoughts on government. [1]

The magic of the COVID vaccine

Before I get into the distribution of the vaccine, I wanted to highlight how much of a wild-amazing-MIRACLE it is that we managed to develop a vaccine in a matter of days.

I’m pulling most of this material from a wonderful post by Bert Hubert, which “reverse engineers” the way the vaccine works and was made.

It turns out there’s several Nobel-worthy discoveries that make up the vaccine, and one super-lucky breakthrough out of a lab in Austin. The whole thing fascinates me. Here’s my understanding of how the vaccine works.

Old-school vaccines vs mRNA

Historically, we developed vaccines by taking a low-strength version of the virus, or an alternative which happens to spark our immune system [2]. Our immune system “trains” itself on the weak version of the virus. When we encounter the virus in the wild, we can immediately eliminate those cells.

The COVID vaccine uses a new and different technology: mRNA. This type of vaccine works less like a fuzzy-matcher, and a lot more like a precision laser. It allows us to target the exact protein in SARS-COV-2 (the scientific name of the strain) we want to train our immune system against.

A quick refresher

Before I go further, it’s worth doing a quick re-cap of first-year biology.

DNA provides the ‘source code’ for all of our cellular functions. The information in DNA consists of different arrangements of four different base pairs (AGCT), which generate for various proteins and power all of our cellular systems.

DNA has to be replicated billions of times, so it is made up of a double helix structure to ensure structural integrity. To generate proteins from that material, DNA is first split into a single strand and converted into mRNA.

Once the genetic material is converted to mRNA, a structure called a Ribosome will run along the entire sequence and create new proteins. Each triplet of three base pairs is called a ‘codon’, and each codon codes for one amino acid. There are 20 different amino acids found in the body. Proteins are just a long series of amino acids that have been chained together. Whew!

The computer equivalent here would be something like…

  • DNA == source code on disk

  • mRNA/RNA == source code in RAM

  • Ribosome == interpreter

  • Amino acids / Proteins == program output

Got it? Good!

Now here’s the cool part. In the same way that we’d write the source code for a program in a text editor, we can programmatically generate the exact sequence of mRNA we need to create any protein sequence. That tees up our gameplan…

Our vaccine gameplan

The primary signature of SARS-COV-2 is what’s known as the “spike” protein. It’s going to be the target we want to train our immune system against.

Our gameplan is to…

  1. generate an mRNA sequence that codes for the same SARS-COV-2 ‘spike’ protein we want to guard against

  2. inject that mRNA sequence into the body

  3. allow our body’s ribosomes to read that mRNA and generate a bunch of that spike protein

  4. let the immune system develop its natural protection against these spike proteins

When we encounter these spike proteins in the wild, our immune system will already know how to destroy them.

That said, there are a few barriers that stand in our way... and a few major scientific breakthroughs that helped us actually deliver a vaccine.

Discovery #1: fooling the body to accept the foreign mRNA

The first problem starts when we inject random mRNA into the body.

It turns out that our immune system is really good at rejecting foreign mRNA. So we have to fool it!

Typical RNA involves four base pairs: Adenine, Guanine, Cytosine, and Uracil (AGCU). We’ve discovered if we replace every U with a slightly different molecule (1-methyl-3’-pseudouridylyl, also denoted by Ψ), it gets past our immune system. What’s more, when this mRNA is replicated, it is treated just like a U.

So to start, we change our mRNA sequence to replace any U peptides with Ψ.

Discovery #2: generating protein, ASAP

Once we’ve injected this artificially generated mRNA, our cells need to go to work to generate those spike proteins.

To do this, a cellular structure called the Ribosome attaches to the strip of RNA.

The area that the Ribosome attaches to is sort of like a “landing strip”, called the 5’ untranslated-region (5’UTR). This landing strip isn’t just the attachment point, but it also tells the Ribosome “when, and how much of the protein should be produced?”.

For the vaccine, scientists printed a region that is more or less the equivalent of “produce as much as possible, ASAP!” The region adapted from the alpha globin gene (part of the protein sequence that generates a necessary part of red blood cells to carry oxygen), but genetically engineered to generate proteins more robustly!

Finally, there’s the sequence for where the protein should go. This sequence tells the protein to exit the cell so that immune cells can properly identify it.

Discovery #3: a more robust RNA sequence

There’s one other interesting difference in the vaccine sequence vs standard mRNA.

The vaccine uses more Cs and Gs to code for the same sequence of amino acids. Why?

Multiple codons can code to the same individual amino acid. As you can see in the first line of the above chart, the sequences of ATT, ATC, and ATA all code for the amino acid Isoleucine.

When it comes to protein synthesis, C and G pairs tend to be converted more efficiently! So wherever we can, we substitute those into our mRNA structure.

Discovery #4: maintaining a structural integrity

It might seem like we have everything we need at this point, we’ve got an mRNA sequence that can be inserted into the body, that will then generate a massive amount of spike proteins quickly and robustly.

But there’s one last hang-up. It turns out that while this sequence will generate a spike protein, these spike proteins will collapse on themselves if they aren’t attached to the virus structure. We end up developing immunity... but not against the right thing! It's just against the collapsed structure!

Here’s where we got a very lucky break. In 2017, a lab in Texas was studying the SARS-COV-1 virus (remember the SARS virus from 2003? yeah, that one), which was the precursor to the SARS-COV-2 virus we’re familiar with today. They found that by substituting a key amino acid sequence, they could reliably bring structure to the protein.

And there you have it. Three profound discoveries that allow mRNA vaccines to succeed, and one lucky break that allowed us to defeat SARS-COV-2 in a matter of days.

By understanding the individual components, it’s easier see why the COVID vaccine isn’t a dangerous process. The body builds a natural defense mechanism against the signature protein that’s a part of the SARS-COV-2 virus. The protein itself isn’t inherently dangerous… but it’s the Rorschach test of our immune system.

It also explains why the new variants are so dangerous. If that signature spike protein ever goes away, our existing vaccines won’t work anymore. We’re incredibly lucky that the virus didn’t emerge any earlier, or we might’ve been in for a 3-5 year long search for a vaccine.

Vaccine Distribution

Of course, creating a vaccine is really only half the battle. From there, there’s a lot of work to be done in terms of supply chains, scheduling, appointments, and getting the vaccine to the right people.

The supply chain

Let’s start with the supply chain.

There’s a lovely article breaking this down from the MIT Tech Review, but the short version is that…

  • The federal government is responsible for ordering vaccines from manufacturers, Pfizer, Moderna, and soon, Johnson + Johnson.

  • A Palantir-built system called Tiberius is responsible for matching vaccine doses with counties and providers which need them. It was created last summer explicitly for the purpose of distributing vaccines, and pulls from census data and other reports.

  • Once Tiberius allocates vaccines, they are uploaded into VTrckS, the vaccine ‘order management’ system for individual providers that ask for shipment.

  • Individual states can adjust the allotments, but are responsible for submitting the final vaccine orders into VTrckS.

  • From there, the manufacturers will fulfill orders and ship them directly to various pharmacies and hospitals.

The end result is, well, very distributed. The distribution effort has some central coordination, but there’s a lot of work put on individual counties and healthcare providers to schedule appointments. That, coupled with with complicated rules and rollouts, has led to a lot of confusion and doesn’t have a strong centralized body.

Alternative distribution schemes

In my general reading, I’ve had my curiosity piqued by a number of alternative distribution schemes compared to what the U.S. is actually doing.

For the most part, these schemes are better thought experiments than actual policy proposals. Given the severity of the problem, I think it’s unlikely that we’ll see widespread excitement for experimentation.

That said, they are interesting to think about.

Simple age-based — Matt Yglesias laid out a proposal to do a simple age-based vaccination plan. Each week, a state or county would declare the minimum age of vaccination. Anyone who shows up just needs some ID with their birthdate. After wading through many different hard-to-administer and even harder-to-understand proposals across a bunch of different states, I can see a lot of merit to this proposal. It certainly removes the type of 51-question form we saw to get a vaccine in NYC, and is a lot more friendly to those who aren’t so tech-literate. I think this is my favorite from a speed and simplicity perspective. When each day matters, speed and simplicity seem like the core principles to maintain!

First-doses first — Alex Tabarrok makes the case for doing first-doses first. The idea here is that a first dose will help a large number of people train their immune system against the virus. If we’re chasing herd immunity, and limited on vaccine supply, why not try and give everyone their first shot before worrying about their second? I’m a bit more skeptical of this scheme though I can see the merits of it. I don’t think we have very good data, or a model on how effective the vaccine is after only one dose.

Market Making — sadly, I can’t remember where I saw this proposal, but the idea is to open up a small percentage of vaccines to market forces. In this case, 10 people could pay $1b, 100 people could pay $100m, 1,000 people could pay $10m, 10,000 people could pay $1m, and 100,000 people could pay $100k for their vaccine. We’d commit 111,110 vaccines for this purpose, and in the process, raise $50b to re-distribute for various forms of relief and infrastructure (for context, we’re currently administering about 1.5m vaccines per day). I think it tends to violate some of our dearly held norms of equity and the rich not being able to skip the line, but it does illustrate that we’re potentially losing out on a lot of value that wealthy individuals would be willing to pay.

Icons first — I’ve read a number of reports that front-line healthcare workers and eligible citizens are worried about the safety of the vaccine and deciding not to get it. A last scheme I’ve encountered appeals to the social proof of our most trusted icons. Vaccinating pop stars, NBA players, business moguls, and other high-profile icons wouldn’t dramatically change overall supply, but could really help drive awareness and a feeling of safety in underrepresented communities.

Governments and vaccines

If there’s one observation I have from working with governments, it’s that the government typically solves very different challenges than vaccine distribution.

For the most part, the CDC plays an advisory role to different states. It is then up to individual states to figure out how to administer doses, and that responsibility often gets passed to counties and local governments.

From my understanding, the only ‘operationally effective’ groups at the federal level are the military and national guard. But neither one has had a recent history of intervening with public health crises.

As such, there’s a lot of negotiation that’s happens. The federal government negotiates with individual states on what guidelines to set, and how to centrally report on vaccine usage. Individual states then turn around and negotiate with individual counties/jurisdictions.

Long-time government people I’ve talked with say that this is pretty typical. The United States has a long history of federalism, which grants similar levels of power to states as it does to the federal government.

Decentralization is more of a feature than a bug when it comes to preventing the concentration of power in the hands of a few. But it’s certainly a harder system to navigate when we need a centralized response.

How we stack up

Despite all this, the U.S. is doing reasonably well when it comes to vaccine distribution. We’re currently administering 1.5M doses per day, and the rate is climbing.

Compared to other countries per capita, we’re 4th internationally.

We aren’t anywhere near the level of Israel or the UAE, but we are surpassing most other developed nations, with orders of magnitude more citizens.

After all this is over, it’s going to be a case study in how we mobilize quickly as a nation. There’s going to be a lot to be learned about where we’ve succeeded, and how we might’ve moved faster.

My prediction is that “normal people” will be able to get vaccinated sometime in May. The federal government has continued to ramp up the number of vaccines ordered, and we’re seeing mass vaccination sites spin up all over the country. I’m cautiously optimistic that we’ll get to 2-3m doses per day administered.


In non-vaccine news, I’ve also been taking time to actually learn CSS and React.

CSS has always seemed like some sort of dark art to me. As a primarily “backend guy”, databases, locking, and servers made a lot more sense to me than the various incantations required to center an element.

But that’s steadily changing for me with a better handful of reference materials:

  1. Julia Evans’ “Hell Yes CSS”. This zine is incredible when it comes to quickly showing you how CSS works and what it might be used for. I think it’s quite possibly the highest density of information on CSS out there if you already have a rough sense of how it works. Well worth the purchase.

  2. CSS Tricks. Searching “CSS Tricks” followed by whatever CSS reference you’re curious about yields an incredibly high quality level of information.

  3. MDN. If you’re looking for the standard “reference”, MDN is the place to go. They have a bunch of detailed examples you can interact with to get a feel for how something should work.

The last key is that I’ve been recording these as cards in Anki to use with spaced repetition. Nothing has helped me ramp as quickly in a language that seems so foreign as spaced repetition.

Putting all them together has also given me a deep realization about CSS that finally made it “click.” If I explain CSS to a friend, here’s how I describe it:

CSS was originally designed for print layouts. If you wanted to design a physical newspaper, CSS would do it quite well. Properly architected CSS promises to layout that newspaper well, whether it’s the size of your phone, your laptop screen, or your big-screen TV.

Viewing everything through a “print-first” lens has helped me de-mystify a lot of the parts of CSS.

It makes a lot more sense now why some elements might be displayed “inline” while others might be “blocks”. It also makes sense why everything displays vertically from the top to the bottom of the page, and why having a “flexbox” style is revolutionary for packing a variable number of items into a set space.

It also explains why there’s a crazy number of hacks to properly lay out a web app… what place does a ‘top nav’, a ‘sidebar’ or a ‘modal’ have in a traditional print layout?

What that also means: there’s a long-history and evolution to CSS as we’ve moved away from “webpages” to “webapps”.

If you’re starting from scratch today, there’s far better options for building an app in the way you’d like. If you are like me and missed the boat on everything layout-related up until now, I’d recommend the following for a new app:

Understanding these pieces from the ground up has helped me both appreciate the design behind CSS, and understand a bit more of how to “do it properly”. If you’re starting at a similar place, hopefully it helps you too.

Other Reading

How to Eat an Elephant, One Atomic Concept at a Timethis essay by Kevin Kwok captures so many of the right ideas for building a product. I hadn’t heard the term “Atomic Concept” before, but now that Kevin gave it a name, I can’t stop thinking about it. Would recommend to anyone building a product.

Debt: the first 5,000 years — I’ve popped open this book on a recommendation of several friends. It’s given me a very new perspective on debt, currency, and the tools that power our economy.

Stuff Matters — this book is an interesting dive into a bunch of the different materials that power our daily lives. Glass, Concrete, Plastics, Metals, and Ceramics are all covered. My notes are here.

[1]: As a sidenote: if you’re at all interested in giving some of your time to help with design, development, data engineering, or product work, I’d recommend signing up on the USDR homepage. They’ve built infrastructure to make helping out as easy as possible.

[2]: Fun fact, vaccine actually comes from the discovery that cowpox was not dangerous to humans, but would trigger the immune response against smallpox. Vacca is the latin for “cow”.