So just how *do* you get good at teaching?

As a scientist with dreams of becoming a professor, I know teaching is part of the package. Whether it’s a class of undergraduates or a single student in a lab, your knowledge isn’t worth anything if you cannot teach it to others. I always say: no one would have cared about Einstein if he couldn’t accurately explain his theories. It doesn’t matter how right you are, science demands you explain your reasoning, and if you can’t explain in such a way to convince others, you still have a ways to go as a scientist.

Einstein was a teacher. After discovering the Theory of Relativity, he wrote and lectured so as to teach his theory to everyone. Likewise I must be a teacher, whether teaching basic concepts to a class of dozens, or teaching high-level concepts to an individual or a small group, teaching is part of science, and mandatory for a professor.

But how do I get good at it?

The first problem is public speaking. I don’t think I get nervous speaking in public, but I do have a tendency to go too fast, such that my words don’t articulate what I’m actually thinking. It’s hard to realize that the concepts you know in your head will be new and novel to the whole world that lives *outside* your head. When teaching these concepts to someone else, you need to go step by step so that they understand the logical progression, you can’t just make a logical leap because you already know the intervening steps.

So OK, I need to practice speaking more, but beside that, what’s the best method for teaching? And here we get to the heart of why I’m writing this post, *I don’t know and I don’t think anyone does*.

Every decade it seems sociologists find One Weird Trick to make students learn, and every decade it seems that trick is still leaving many students behind. When I went to school, teaching was someone standing at the front of the class, giving a lecture, after which students would go home and do practice problems. This “classic” style of teaching is now seen as passe at best, outright harmful at worst, and while it’s still the norm it’s actively shunned by most newer teachers.

Instead, teachers now have a battery of One Weird Tricks to get students to *really* learn. “ACTIVE learning” is the word of the day, the teacher shouldn’t just lecture but should involve the students in the learning process.

For instance, the students could each hold remote controls (clickers) with the numbers 1 through 4 on them. Then the teacher will put up a multiple-choice question at random points during class, and the students will use their clicker to give the answer they think is correct. There’s no grade for this except participation, and the students’ answers are anonymized, but the teacher will give the correct answer after all the students answer, and a pie chart will show the students how most of their classmates answered. So the theory is that this will massively improve student learning in the following ways:

  • Students will have a low-stakes way to test their knowledge and see if they’re right or wrong, rather than the high-stakes tests and homework that they’re graded on. They may be more willing to approach the problem with an open mind, rather than being stressed about how it will affect their grade.
  • The teacher will know what concepts the students are having trouble on, and can give more time to those prior to the test.
  • Students stay more engaged in class, rather than falling asleep, and likewise teachers feel more validated with an attentive class

The only problem is that the use of clickers has been studied, and has failed to improve student outcomes. Massive studies and meta-analyses with dozens of classes, thousands of students, and clickers don’t improve student’s learning at all over boring old lectures.

Ok, how about this One Weird Trick: “flipped classrooms.” The idea is that normally the teacher lectures in class and the students do practice problems at home. What if instead the students’ homework is to watch the lecture as a video, then in class students work on problems and the teacher goes around giving them immediate and personalized feedback on what they’re doing right or wrong?

In theory this again keeps students far more active, they’re less likely to sleep through class and the immediate feedback they receive while working through the problem sets helps the teachers and students know what they need to work more on. Even better, this One Weird Trick was claimed to narrow the achievement gap in STEM classes.

But another large meta-analysis showed that flipped classrooms *again* don’t improve student learning, and in fact *widen* the achievement gap between minority and white students. Not at all what we wanted!

In theory, science teaches us the way to find the truth. Our methods of storing information have gotten better and better and better as we’ve used science to improve data handling, data acquisition, and data transmission. I read both of those meta-analyses on my phone, whereas even just 30 years ago I would have had to physically go to a University Library and check out one of their (limited) physical journals if I wanted to read the articles and learn if Active Learning is even worth it or not.

But while we’ve gotten so much better at storing information, have we gotten any better at teaching it? We’ve come up with One Weird Trick after One Weird Trick, and yet the most successful (and common) form of teaching is a single person standing in front of 20-30 students, just talking their ears off. A style of teaching not too far removed from Plato and Aristotle, more than 2,000 years ago.

I want to get better at teaching, and I think public speaking is part of that. But beyond just speaking gooder, does anyone even know what good teaching *is*?

More about primes

Last time I blogged, we were dividing 1 by prime numbers using long division on a hand-written piece of paper. We saw that while 1/5 in base 10 is the simple, easy-to-remember 0.2, 1/5 in base 12 is 0.2497… with infinitely repeating digits. Why is that?

The answer I think has to do with prime factors. 10 has prime factors of 2 and 5, so in base 10 every prime number *except 2 and 5* will have infinitely repeating digits when you take its reciprocal (again, reciprocal just means “divide 1 by that number” ie the reciprocal of 5 is 1/5). When I used base 12, the reciprocal of the prime number 5 now had infinitely repeating digits, because 5 is *not* a prime factor of 12. The reciprocal of 2 in base 12 was still well-behaved, but that’s because 2 *is* a prime factor of 12.

I can generalize the above point as this: “the reciprocal of any prime number will have infinitely repeating digits, *unless* that number is a prime factor of the base you are using.”

So in base 10, the reciprocals of 2 and 5 do *not* infinitely repeat, while the reciprocal of any other prime does. In base 12, the reciprocals of 2 and *3* do not repeat, while the reciprocal of any other prime does. In base 210, the reciprocals of 2, 3, 5, and 7 do not repeat, and I can prove that because 2, 3, 5, and 7 are the prime factors of 210.

But that got me thinking, what about non-prime numbers? (For the record, mathematicians call non-primes “composite” numbers but there’s already enough jargon here so I’ll go with “non-primes”)

Do the reciprocals of non-primes repeat infinitely or do they not? Well a few examples show mixed results, 1/20 is 0.05, but 1/21 is 0.047619… with infinitely repeating 047619s. Then there are cases like 1/24, where the reciprocal starts with some non-repeating digits and then later digits repeat infinitely, 1/24 is 0.04166… with only the 6s repeating, not the 041.

It makes sense why these reciprocals all have a leading zero, when you do the long division you need to bring down more zeros before you get a number you can divide into. So the reciprocal of any number between 10 and 100 will have 1 leading zero, and between 100 and 1000 will have 2 leading zeros, etc.

See above, the reciprocal of 30 and 300 is the same except for how many zeros you need in the front before you get to something you can divide into. (EDIT: just imaging I put the line over the 3s in 1/300, I just realized in editing that I forgot to do that, -2 points on the test for me).

But aside from leading zeros, why do some reciprocals have *only* infinitely repeating numbers and some have a set of numbers that repeat and a set of numbers that do not? I surmise again that it has to do with prime factors.

If *all* the prime factors of a non-prime number are *also* prime factors of the base you’re using (so in base 10, 2 and 5 are its factors), then the reciprocal of the non-prime number will be finite and well behaved like 1/20. On the other hand, if *all* the prime factors of a non-prime are not shared with the base (such as 21), then the reciprocal will only have repeating digits (baring leading zeros if the number is bigger than 10, 100, 1000 etc). Finally, the prime factors of a non-prime are mixed between those shared with the base and those not shared, then the reciprocal will have a bit at the beginning that does *not* repeat and will then go into repeating digits.

This should all hold true in other bases as well. In base 28, the reciprocal of 25 should be infinitely repeating (since they share no prime factors) while the reciprocal of 224 should be some non-repeating number (as 28 and 224 have the exact same prime factors, 2 and 7). I won’t show you the calculations as they’re quite messy but I think 1/224 in base 28 is 0.035 (I don’t dare do the reciprocal of 25, I’m sure to mess it up).

I’m sure mathematicians have known all this for year, but I enjoyed finding it out myself, and just wanted to share.

What’s so special about prime numbers?

If you’ve ever watched Numberphile, you’ve probably heard a *lot* about prime numbers. In school prime numbers are mostly just curiosities. They’re numbers that can only be (cleanly) divided by 1 and themselves, so you hate getting them in a fraction. But the further you go in higher math, the more prime numbers seem to show up *everywhere* even in places you wouldn’t expect them.

My new favorite Numberphile video is on the reciprocals of prime numbers. A “reciprocal” of a number is just 1 divided by that number. So the reciprocal of “10” is “1/10” or in decimal form 0.1 . The video shows off the work of a 19th century mathematician named William Shanks who exhaustively catalogued the reciprocals of primes.

Because you see, prime numbers are special this way. Prime numbers don’t make “clean” reciprocals like 1/10 . The reciprocal of a prime tends to be made up of infinitely repeating digits instead. 1/7 is equal to 0.142857142857142857142857142857142857142857142857142857 with the “142857” part repeating infinitely. In math class we represented this with a line over the repeating digits. But I’m having trouble getting wordpress to properly display bars over numbers, so I’ll use “…” to represent repeating digits instead. So 1/7 would be 0.142857… in my decimal notation.

Now back to primes. What Shanks did was he took the reciprocal of larger and larger prime numbers and counted how many digits it took before the the numbers start repeating. So 1/7 repeats after 6 digits while 1/11 repeats after just 2 digits (0.09…). Shanks catalogued these repeating digits all the way up to prime numbers in the 80,000 range, whose reciprocals don’t start repeating until 60,000 digits or more.

The video is well worth a watch, and it’s fascinating to wonder if there’s any pattern to the data. But what struck me was a question from the host Brady near the beginning of the video: “do the reciprocals of all primes repeat?” The mathematician Matt Parker answered “yes” and continued the math lecture, but this got me thinking.

As soon as I told this question to a friend, they immediately said what many of you are probably thinking: “what about 1/5?” 5 is a prime number itself, but 1/5 is a nice, clean, non-repeating number of 0.2 . 2 is also a prime number and makes a clear 0.5 with its reciprocal. Maybe Matt Parker just wasn’t so attentive when he answered “yes” but it seems that not all reciprocals of primes repeat.

But then why are 2 and 5 so special? Why, out of every single prime number, are they the only ones with non-repeating reciprocals? Again I think everyone knows the answer: it has to do with Base 10, but I wanted to study this phenomenon a bit more so I did some math myself.

First, a quick note: we say our counting system is “base 10” because when writing a large number, each position in the number corresponds to units of 10 raised to some power. You may remember from school writing a number like 435 and being taught that is has “4 hundreds,” “3 tens,” and “5 ones.” AKA 435 is (4*100) + (3*10) + (5*1). It’s important that all the positions in a base 10 counting system correspond to 10x for some value X. The hundreds place represents 102, the tens place represents 101, and the ones place represents 100.

Now what about a base 12 counting system instead? What does the number 435 mean in base 12? Just like before, each position corresponds to some power of 12. So 122 is 144, meaning that 4 is in the “144s” place. The 3 is in the “12s” place and the 5 is still in the “1s” place because 120 and 100 both equal 1. So a 435 in base 12 is equal to (4*144) + (3*12) + (5*1), which would be 617 in base 10.

Now my question: do the reciprocals of primes still repeat the same way in a base 12 counting system as they do in base 10? We already know that 2 and 5 are special primes in base 10, their reciprocals don’t repeat. How about in base 12?

Well the reciprocal of 2 still works, it’s just equal to 0.6 instead of 0.5. But the reciprocal of 5 suddenly becomes madness

Here I did the long division for 1/5 in base 12. To keep myself on track I wrote a base-10 version of the subtractions I was doing at each step of the long division. And I don’t know how real mathematicians do it, but since I don’t have a number to represent “10” and “11” as single digits, I used “A” and “B”.

As you can see, *now* this prime’s reciprocal *does* repeat, even though it didn’t in base 10!

I think the mathematician was getting at something deeper when he said all reciprocals of primes repeat, but I’ll have to save it for another post as I had wanted to publish this one on Sunday and I’m already 3 days late.

Gene drives and gingivitis bacteria

One piece of sci-fi technology that doesn’t get much talk these days is gene drives. When I was an up and coming biology student, these were the subject of every seminar, the case study of every class, and they were going to eliminate malaria worldwide.

Now though, you hardly hear a peep about them. And I don’t think, like some of my peers, that this is because anti-technology forces have cowed scientists and policy-makers into silence. I don’t see any evidence that gene drives are quietly succeeding in every test, or that they are being held back by Greenpeace or other anti-GMO groups.

I just think gene drives haven’t lived up to the hype.

Let me step back a bit: what *is* a gene drive? A gene drive is a way to manipulate the genes of an entire species. If you modify the genes of a single organism, when it reproduces only at most 50% of its progeny will have whatever modification you give it. Unless your modification confers a lot of evolutionary fitness to the organism, there is no way to make every one of the organism’s descendants have your modification.

But a gene drive can do just that. In fact, a gene drive can confer an evolutionary disadvantage to an organism, and you can still guarantee all of the organism’s decedents will have that gene. The biggest use-case for gene drives is mosquitoes. You can give mosquitoes a gene that prevents them from sucking human blood, but since this confers an evolutionary disadvantage, your gene won’t last many generations before evolution weeds it out.

But if you put your gene in a gene drive, you can in theory release a population of mosquitoes carrying this gene and ensure all of their decedents have the gene and thus won’t attack humans. In a few generations, a significant fraction of all mosquitoes will have this gene, thus preventing mosquito bites as well as a whole host of diseases mosquitoes bring.

Now this is a lot of genetic “playing God,” and I’m sure Greenpeace isn’t happy about it. But environmentalist backlash has never managed to stamp out 100% of genetic technology. CRISPR therapies and organisms are on the rise, GMO crops are still planted worldwide, environmentalists may hold back progress but they cannot stop it.

But talk about gene drives *has* slowed considerably and I think it’s because they just don’t work as advertised.

See, to be effective a gene drive requires an evolutionary contradiction: it must reduce an organism fitness but still be passed on to the progeny. Mosquitoes don’t just bite humans for fun, we are some of the most common large mammals in the world, and our blood is rich in nutrients. For mosquitoes, biting us is a necessity for life. So if you create a gene drive that knocks out this necessity, you are making the mosquitoes who carry your gene drive less evolutionarily fit.

And gene drives are not perfect. The gene they carry can mutate, and even if redundancy is built in, that only means more mutations will be necessary to overcome the gene drive. You can make it more and more improbable that mutations will occur, but you cannot prevent them forever. So when you introduce a gene drive, hoping that all the progeny will carry this gene that prevents mosquitoes biting humans, eventually one lucky mosquito will be born that is resistant to the gene drive’s effects. It will have an evolutionary advantage because it *will* bite humans, and so like antibiotic resistant bacteria, it will grow and multiply as the mosquitoes who still carry the gene drive are outcompeted and die off.

Antibiotics did not rid the world of bacteria, and gene drives cannot rid the world of mosquitoes. Evolution is not so easily overcome.

I tell this story in part to tell you another story. Social media was abuzz recently thanks to a guerilla marketing campaign for a bacteria that is supposed to cure tooth decay. The science can be read about here, but I was first alerted to this campaign by stories of an influencer who would supposedly receive the bacteria herself and then pledged to pass it on to others by kissing them. Bacteria can indeed be passed by kissing, by the way.

But like gene drives, this bacteria doesn’t seem to be workable in the context of evolution. Tooth decay happens because certain bacteria colonize our mouth and produce acidic byproducts which break down our enamel. Like mosquitoes, they do not do this just for fun. The bacteria do this because it is the most efficient way to get rid of their waste.

The genetically modified bacteria was supposed to not produce any acidic byproducts, and so if you colonized someone’s mouth with this good bacteria instead of the bad bacteria, their enamel would never be broken down by the acid. But this good bacteria cannot just live in harmony and contentment, life is a war for resources and this good bacteria will be fighting with one hand tied behind its back.

Any time you come into contact with the bad bacteria, it will likely outcompete the good bacteria because it’s more efficient to just dispose of your waste haphazardly than it is to wrap it in a nice, non-acidic bundle first. Very quickly the good bacteria will die off and once again be replaced by bad bacteria.

So I’m quite certain this little marketing campaign will quietly die once its shown the bacteria doesn’t really do anything. And since I’ve read that there aren’t even any peer reviewed studies backing up this work, I’m even more certain of its swift demise.

Biology has brought us wonders, and we have indeed removed certain disease scourges from our world. Smallpox, rinderpest, and hopefully polio very soon, it is possible to remove pests from our world. But it takes a lot more work than simply releasing some mosquitoes or kissing someone with the right bacteria. And that’s because evolution is working against you every step of the way.

Buying a desktop in 2023

I bought my last desktop in 2014.  It was a very high end machine at the time, and while I’ve had several new laptops since then, the desktop long remained the workhorse of my gaming setup.  But with the recent AI craze, I found that my desktop didn’t have enough power to run stable-diffusion (the AI art program) or even GPT4All (an open-source version of ChatGPT). 

So I decided to finally get a new desktop, and it was harder than expected.  I bought my 2014 desktop at Fry’s Electronics, which went under during the pandemic.  With them gone, the only computer stores nearby are a fleet of Best Buys.  Best Buy isn’t bad, but I’ll warn you that it won’t come across well in this story.

When I went to Best Buy for a new computer, I only knew I wanted a machine powerful enough to run stable-diffusion.  And I figured that in this day and age, maybe I don’t need a desktop to do the most powerful computing.  Desktops seem like dinosaurs these days, most of my coworkers only have laptops or tablets.  I even know some people whose only computer is their phone.  So maybe I just need a top-end laptop to do what I want? 

But looking for laptops in Best Buy felt like trawling a souk for antiquities.  There was a huge language barrier, and no one seemed like they knew what I wanted.

I did some homework online, and it turns out that AIs don’t just need a powerful graphics card, they need a very special type of card.  They need an NVIDIA card with a lot of VRAM.  NVIDIA is needed because only its cards contain “CUDA” which is can make AIs go.  CUDA is a suite of on-card libraries for complex math and parallel computing.  I know the AMD stans will tell me that there are libraries to run stable-diffusion on AMD, but installing stable-diffusion is already a pain, and trying to install CUDA work-arounds using barely-commented GitHub files is too much work for a simple hobby.

And in addition to an NVIDIA card, you also need the card to have VRAM.  VRAM stands for video RAM, and it’s needed to let graphics cards work their best.  How it was explained to me is that your PC and your graphics card are like 2 major cities connected by a single dirt path.  Each city has their own big highway system, so moving data within them is quick and easy, but moving data between them is slooooooooooooooooow.  So modern cards use VRAM, which is like a data warehouse for GPU-land.  

This is important because GPU-land is the part of the computer specialized for complex math.  In the old days, the demand for math processing was primarily driven by video games, which needed to calculate position and momentum of thousands of characters and particles across 3D space.  This is why GPUs are most associated with video games, but recently crypto-mining and AI have also emerged as major drivers of GPU demand since they have their own high-end math requirements.

Before VRAM, every time the GPU did a calculation it had to store its answer in the main system memory, then ask for that answer back if it needed it for the next calculation. It was sort of like this:

the computer says: “what’s the square root of 2+7 over 77+23?”  

The GPU says “OK 2+7 is 9.  Now what was in the denominator?”

Computer: “77+23”

GPU: “OK 77+23 is 100.  Now what was in the numerator?”

Computer: “well, you just told me 2+7 was 9”

GPU: “OK 9/100 is 0.09.  Is that all you wanted?”

Computer: “you forgot to square-root it”

GPU: “OK, the square root of 0.09 is 0.3”

Computer: “Did you say 0.3000000000000000004?  Sounds right to me”

GPU: “Don’t forget to check for floating point errors.  See you next time!”

That’s a lot of cars going back and forth along the dirt road, and it made for slow computing.  But with VRAM, the GPU can store all its answers locally and only talks to the computer when it’s finished calculating.  This clears a hell of a lot of traffic off the road, and without VRAM most modern AIs just don’t work.

So I knew I wanted a lot of VRAM, and the internet told me 16GB was a good number.  I also knew I needed an NVIDIA graphics card.  But finding all that at Best Buy was an exercise in frustration.  

I would walk up to a computer to check its specs.  The tag says it has an NVIDIA card with 16GB of RAM.  16GB RAM?  That’s way too low for modern storage.  So that 16GB must be the VRAM, right?  It also says it has a 512GB solid state drive, which I assume is the computer’s main RAM storage.  So half a terabyte of memory and 16GB VRAM, that’s exactly what I want, right?  But on closer inspection of the actual computer and not the tag, it says it has an intel graphics card.  It seems this model of laptop can either have an Intel or an NVIDIA, and while the tag says NVIDIA the computer itself says Intel.  So this is not what I want.

The next computer over does say NVIDIA, and it’s got a whole terabyte of memory.  It still says 16GB RAM, so I guess it’s a buy, right?  Well dxdiag is a simple windows command to tell you the computer’s specs, and I run it on this computer just to check.  It turns out that the 16GB RAM is made up of 6GB display memory and 8GB shared memory.  I guess Best Buy uses base 8 math where 6+8=16.  That would explain their prices, but 6+8 isn’t what I’m looking for.

Even worse, I do some searching and find that only display memory is “true” VRAM.  The 8GB of shared memory is actually just normal RAM that is “reserved” for the graphics card.  Using the analogy from above, it’s like the GPU city owns a warehouse in the Computer city, so when it has too much data it can offload it there for pickup later.  The problem is that to move that data it still has to go back and forth down the dirt path between the two cities, which means it’s still very slow.  So for my purposes, 6+8=0.

But here’s the thing, I’m not an expert so I don’t know if “display memory” really is the same thing as “VRAM.”  I’m only assuming it is.  But maybe I’m wrong and the VRAM is listed elsewhere?  I flag down a Best Buy employee and ask him what display memory actually is.  He tells me “oh it makes the graphics card go faster, but it doesn’t make it more powerful.”  That’s incredibly generic, I ask him if “display memory” is the same as VRAM.  He says “I think kinda, yeah,” and at that point I realize he doesn’t know any more than I do so I thank him for his time and leave.

I need true VRAM, so now I just start running dxdiag on every computer on the floor.  I find that all of them are set up like the 6+8 laptop and none of them have a lot of “true” VRAM.  Looking online, it also seems like NVIDIA has sneakily given their laptop cards the same names as their desktop cards despite the laptop cards having much lower specs.  I knew a 4070 or 3060 were “good” NVIDIA cards, but the laptop versions are paltry imitations of the real thing and not good enough for AI.  So it turns out I do need a desktop.

OK, well I’m still at Best Buy so I wander over to their desktop area.  I no longer trust tags so I just run dxdiag on anything I see.  And there I seem to strike the motherload: 24GB of display memory, holy crap that’s a lot of VRAM!!  Oh, it’s an AMD card.  Well AMD may be cheaper and have way more VRAM, but it doesn’t have the CUDA so it’s a no-go. 

I finally go over to Geek Squad, Best Buy’s in house specialists, and ask if they do build-a-desktop services.  It turns out no, that’s a service they discontinued a long time ago.  I can buy parts to build it myself, but Best Buy can’t build it for me.  I asked who could build me a computer and every member of Geek Squad plus a randomly patrolling employee all told me to try Micro Center instead.  So I had to head there.

Micro Center was the exact opposite of Best Buy.  As soon as I started looking at graphics cards an employee came up to ask if I had any questions.  I asked him my questions about VRAM and display memory and he was able to point me to a specific card that had plenty of VRAM and which he told me was very good for AI.  He also gave me ideas of other cards I could buy if I wanted to move up or down in power and price, and when I finally settled on which card to buy, he then offered to pick out every part I needed for a computer and put them together for me. 

This was exactly what I needed, a build-a-desktop service with an expert who could actually help me buy something.  We went over all the parts and I made whatever changes I wanted from what he suggested.  Then 2 days later I had a desktop built for just 2000$.  That may seem like a lot, but laptops with way less power were selling for 1800$, and the only laptop that seemed even capable of doing what I wanted had a 2500$ price tag.  I only just got the desktop back to my house, so I still have a few weeks before I find all the things I hate about it, but I’m already liking Micro Center a lot more than Best Buy.

Overall, buying a computer in 2023 is still as overly complicated a mess as it’s always been.  If you just need to write emails to your grandkids, Best Buy has 180$ laptops that will probably do you good.  But if you want the kind of power needed to play modern games and do modern activities, trying to parse all the various GPUs with their CUDAs and VRAMs and so on is way more of a hassle than it should be.  

I wish more computer sellers were knowledgeable in what they were selling, I don’t need all of them to be experts in AI hardware but if they could at least tell me what all the parts mean I’d have been a lot happier.  Shouldn’t a car salesmen be able to explain to you miles-per-gallon and what a hybrid is?  As it stands, I was dumbstruck by how helpless most salesfolks were, and how little the GPU business has changed in decades.  In 2008 the late Shamus Young wrote an article complaining about how confusing it was trying to buy a graphics card, and nothing has gotten better since then.

Maybe someday I can ask an AI what kind of graphics card I need to run it.  Then ask the AI to build it and maybe ask the AI to install itself on there for me.  Some people are scared of AI, but I think if Skynet ever does become self-aware and try to self-replicate, just reading its own hardware requirements will give it enough of an aneurysm to drop it back down to pre-sentience.  Until then, I can’t say I’m looking forward to doing all this again in a few years time.

Choosing your facts based on your beliefs; everyone believes they are the rational one

It’s very common and very well-known that people will, to an extent, choose their facts to fit their beliefs. But for many the facts they choose aren’t necessarily even well-founded.

If you are a conservative, you probably prefer generally lower taxes, and you can find well-heeled economists who generally prefer lower taxes and lower spending over higher taxes and higher spending. Likewise a liberal or leftist can find economists who support higher taxes and higher spending. The issue is not “settled” and as with anything in economics (besides rent control, which is universally known to be bad) there are voices on either side.

But there are some things that are uncontroversially accepted as true by all the experts in their field, and for some reason there are people that argue against it for no reason whatsoever.

When I was in school, I remember a debate about teaching evolution. To cut to the chase, many Christians (not all by a long shot) have thought that evolution undermines their religion, and no matter how much evidence there is for it, these Christians will choose facts to fit their beliefs. That includes denying evolution, but also denying the fossil record (which supports evolution) and the age of the Earth (which supports evolution). This sometimes means denying modern microbiology and cancer biology (which are evolution in action). It’s fairly well-known by anyone who isn’t a Christian that this is a Dumb Thing To Do, and that picking your facts based on your beliefs just leaves you looking stupid.

But then I found that while the Christians do it, the anti-Christians do it too.

Let’s be clear: some atheists are just people who don’t believe in God. That’s fine, everyone has their beliefs. But some atheists are better termed anti-theists, they are people who oppose religion and its existence entirely. And it is these atheists that have constructed their own theories of “Intelligent Design” to support their ideas. Often these theories try to prove that Christianity is not only false, but that is is a complete con from start to finish and that no one truly believes in it anyway.

The Atheist version of Intelligent Design is the “Jesus Myth Theory.” This is the idea that not only was Jesus just a mortal man (not the son of God), but that there was never even a person called Jesus at all, and that this is proof that Christianity was an invented scam. To be blunt, this idea has no more credence than Intelligent Design, but so-called rational atheists who turn up their nose at the stupid Christians with their stupid Intelligent Design will still believe this idea because they have chosen their facts based on their beliefs. I may write a post later about the evidence for Jesus’ existence, but the point I’m trying to make is that even communities which are adamant in their own rationality can wind up being suckered into myths just because those myths agree with what they want to believe.

Let’s get one thing straight: EVERYONE believes that they’re rational. Everyone believes that their opinions are backed by evidence, backed by science, fundamentally true, and that only the dumb and misled would ever believe something different. That’s what makes the self-professed “Rationalist” community so misguided: claiming you’re the only community focused on rational beliefs is just admitting that you’ve never spoken to a community different than your own.

EVERY community believes they are the rational ones, believes they are driven by facts and not emotions, believes that the others are ignoring facts to suit their opinions. And the Rationalist community has it’s own Intelligent Design theories just as the Atheist and the Christian communities do. A good Rationalist, Atheist, or Christian should of course never believe something just because their compatriots believe it, or just because it would support some of their ideology, but a good Rationalist, Atheist, or Christian must also recognize that they probably have biases themselves and that their own community probably harbors an “Intelligent Design” theory all its own.

In the hallowed halls of Twitter and social media it’s widely believed that only the Left of the political spectrum knows and respects science, all right-wing beliefs are obviously false and dis-proven by data. The the exact inverse is believed on the right. I know both communities are havens of their own misinformation. I have seen too many on the Left tell me that supply and demand don’t exist, that building more housing doesn’t lower rent and cost and that inflation is driven only by corporate greed and not supply or demand. I have likewise seen the misinformation on the right over gun deaths, drug crime, vaccines and the like. I’m sure some of my own beliefs are misinformation, but we are all the heroes in our own stories and so self-reflection is very hard.

But I just wrote this post because even if I’m only screaming into the void I wanted to remind people that everyone thinks they are rational. Your political enemies who you consider irrational and emotional idiots are human just like you, and they arrived at their beliefs through the exact same human mechanisms you did. Are you sure anything and everything you believe is true? Are you sure there could never be any evidence that supports your opponents? Don’t dismiss people are idiots just because they believe something else, most humans are just as rational as you.

Crying over Cryo-EM

OK so the title is hyperbole, but I’ve definitely struggled recently with my cryo-electron microscopy. I guess here I’ll give an overview of what exactly electron microscopy is and why I’ve struggled.

Professor Jensen of CalTech has a great series of videos on Cryo-EM. Why we use it, how we use it, and what it is. Anyone interested in the technology should watch it, but for my own purposes:

  • Cryo-electron microscopy consists of freezing a sample and then shooting electrons at it to see the 3d structure of it at the smallest atomic scales.
  • We’re using it to study a number of proteins that cause diseases. In particular we want to know how the 3d shape of a certain protein creates that protein’s function. And how that function can then go on to cause a disease.
  • So we purify a specific protein, make a cryo-grid from that purified protein, and then look at that cryo-grid under electron microscopy hoping to get a good 3d structure.

But that’s where the problems start. First of all, purifying a protein to 99.9% purity is no small feat, especially when you’re taking proteins out of actual patient samples. I’ve dearly struggled to get the required purity that would be needed to make good grids for imaging.

But once I have some “pure” protein, I need to add it to a grid to image it. A cryo-grid is a 1 millimeter by 1 millimeter circle about 1 micrometer thick. On that grid are cut out many 1 micrometer by 1 micrometer squares. And in each square are a mesh of 100 nanometer by 100 nanometer holes. When I add a tiny drop of my protein sample (which is in water) onto the grid, the hope is that the proteins will settle down into the holes. I will then “blot” the sample by pressing some paper onto both sides of the sample, which wicks away all the water not in the holes. I then instantly plunge the sample into liquid ethane, freezing all the liquid in the holes in an instant.

What you get is supposed to be a grid covered in a tiny thin layer of ice, and in each hole the ice contains your proteins of interest. Since they were flash frozen in ethane, the ice here is “vitreous,” which means glass-like. It’s see-through just like glass. And so a beam of electrons can pass into the ice to create an image of the proteins inside the ice.

But there’s problems. Let’s get back to making the grid: most proteins are hydrophilic which means water-loving. The opposite of hydrophilic is hydrophobic which mean water hating, like oil. Oil and water don’t mix, and neither do hydrophobic and hydrophilic things. Our grids are made of copper covered in a layer of carbon, and that stuff is naturally hydrophobic, meaning it doesn’t interact well with the hydrophilic proteins (and the water they are in).

So before adding proteins we have to glow discharge our grids. This means putting them in a machine that shoots broken-up water molecules at them. Those broken-up water molecules have oxygen in them, and some of them will bind to the grid creating oxygen-containing compounds. Those compounds are very hydrophilic, so the whole grid becomes hydrophilic enough for the proteins to interact with it.

At some point we got a new glow discharger, and I swear that it started destroying my grids. Like I said the grids are tiny and fragile, 1 millimeter across, 1 micrometer thick! This glow discharger shoots water at them, and the new one shot the water so hard that it was punching through my grids and destroying them completely at the microscopic level. I couldn’t see the damage because it’s microscopic, but after adding the protein to my grids and flash-freezing them, I’d look at them under a microscope and see nothing but a completely destroyed grid. I finally just stopped trusting it completely and moved on to using a new glow discharger that’s a bit weaker.

So OK I solved the glow discharge problem, but now here comes the ice problem. Like I said above, you want the proteins to be encased in glass-like vitreous ice. If you have no ice, well you have no proteins. And if the ice is too thick, it’s no longer glass-like and you can’t see through it. I kept being on both sides of those extremes, first I had ice so thick I couldn’t see anything, then I had no ice at all. You are supposed to manage this problem by configuring your blotting time, which is how long you wick away the water before plunging the grid into the liquid ethane. Shorter blot time, thicker ice, longer blot time, thinner ice or no ice at all. Try long and short times to get the ice just right.

And yet I was using ultra-short blot times and still getting thick and thin ice sometimes at random. On the balance I got more grids with no ice at all, so I kept thinking I needed to drop the blot time more and more. My adviser said that there is a minimum blot time of about 2 seconds and you never want to go lower than that, but I tried 2 seconds and the ice was still way to thin or non-existence. That seems to say that my blot time is still too long, yet 2 seconds is as short as I can go.

I finally asked an expert in the chemistry department who suggested I used their facilities instead. He also suggested that 1 second of blot time is perfectly fine, and so that was what I did. I FINALLY seemed to start getting good grids, so let’s hope it hold out.

So I’ve struggled with glow discharging, and then blot times, as well as protein purity. I’ve finally got some good grids, and I hope I can collect a lot of data on them. If I do that, I may be able to get 3d structural information using AI and a whole bunch of analysis. We’ll see though, we’ll see.

Quantum Computers: Hype or Hopeless?

I’m not an expert on quantum computers by any means, but I do like to blog about things I know a little about. So bear with me.

One of the funnest seminars I ever attended wasn’t even in my major. I’m a biologist by trade, but occasionally in grad school I’d wonder over to the physics department to eat their pizza and have a gander at the science they were touting (they occasionally came for our pizza too so fair’s fair). On one occasion, the CEO of a quantum computer (QC) company (formerly a professor of physics) came by to talk about the exciting new happenings in QC and give us some history.

At that point I had only a surface understanding of QC, and so I had a lot of fun learning how his QC worked and the challenges he’d overcome. He also had a great sense of humor and a fun presentation. At the end he took lots of questions, and so I was also impressed by how he didn’t really sugarcoat or overhype anything. He was very open and honest that the field still had work to do and that working QCs weren’t just around the corner, whereas reading news articles you’d think they were 5 years away at most.

When it came time for my question, I asked the only thing that I, a biologist could think of: “when will we have logical qubits?”

To back up a big, just as classical computers store information in bits, QCs store information in qubits. Classical bits are binary, existing as either 1 or 0. Qubits are quantum mechanical in nature, and they exist as a superposition of states so that every time you measure them they have a probability of being either 1 or 0. This superposition is why QCs can do all those amazing things that people talk about like breaking encryption or what have you.

But this superposition is also highly unstable. Any interaction with the outside world at all will destroy the superposition, rendering it useless. This has long been the bane of QC companies and researchers, how do you make a qubit that doesn’t fall apart before you can usefully use it? When the superposition falls apart, it leads to an error, and error correction in QC is all the tricks and ways that researchers are trying to either keep the superposition stable or rebuild it if it fails.

The holy grail of error correction is the “logical qubit.” A single qubit can of course fall apart at any time so it is a poor store of information. But what if many qubits could be networked together in some way, such that if one fails the others will correct it back to its previous information value. Together, all these qubits would allow the information to be held indefinitely, even if the superposition in 1 or many of the qubits fails individually. And so together these qubits would act as a single “logical qubit,” that is a stable qubit that perfectly holds information, as opposed to the normal qubits that fall apart when you look at them funny.

It has been theorized that a thousand or more qubits will be needed to make a logical qubit, and that the technology for networking qubits to create logical qubits is still not fully formed. So when I asked the seminar speaker how far off logical qubits were, he humbly said that they may not even be possible. From his research, quantum computers may be useful but their utility and longevity will always be undercut by the fragility of the qubit superposition.

I was kind of stunned because in my readings on the field it was taken as writ that as soon as you can produce 1 qubit, you can scale up and produce thousands. Once you produce thousands, you now have logical qubits which will make all our QC programs work perfectly.

What’s interesting is that IBM is now saying it will make a QC with over 1000 qubits, which is around about the number is supposed to be needed to make 1 logical qubit. Yet by in large I haven’t seen much talk about having our first crack at producing a logical qubit.

So again I’d like to ask the question: how long until we have a logical qubit? If qubits will always be unstable superpositions, then I doubt a mass market consumer QC will ever be workable. And while the hype for logical qubits seemed ever-present when they were still a far-off dream, it seems to have subsided as they get closer to being tested for validity. I wonder if they were always nothing by hype.

The Lunar advantage

This post is gonna be weird and long.

I often have weird thoughts that I wish I could put into a book or story. My thought today is about comparative advantage. Comparative advantage is an economic concept that explains why people and countries can specialize into certain areas of work to become more efficient.

For example, in Iceland the cost of electricity is very low, which is why Iceland has attracted a lot of investment in industries that require lots of electricity, such as aluminum smelting. On the other hand countries like Bangladesh have a low cost of labor, which is why labor intensive activities such as clothing manufacturing invest there. It doesn’t make sense for a company to put an aluminum smelter in places where electricity is expensive, nor does it make sense to put a clothing factory where labor is expensive. Iceland and Bangladesh have their own comparative advantages at this moment in time, and that explains their patterns of industry.

Let’s imagine for a moment that there was a fully autonomous colony on the moon. People lived and worked there without needing to import air, water, or food from Earth. They can trade with Earth, but if Earth were cut off they could still make their own goods, just as if our country were cut off from the world we could still make our own food, drink our own water, breathe our own air. Let’s say they use super-future space technology to extract water and oxygen from moon rocks, and grow crops using moon soil.

If there would be such a moon colony, we would assume there would be trade with Earth. Certainly the cost of moving goods from Earth to the moon and vice versa are enormous. But it was once unbelievably dangerous to cross the oceans, and people still did it because the profits were worth it. We would expect that the moon would have some comparative advantage compared to Earth and vice versa, which would make trade profitable. This comparative advantage is the same reason Iceland sells aluminum products to Bangladesh who in turn sells Iceland clothing.

So with all this in mind, I assert that the moon’s comparative advantage would naturally be in large, heavy goods, but not because of the moon itself but because of the journey.

Let me give another example, suppose there is a factory on Earth making steel and a factory on the Moon making steel. Let’s also say the iron and carbon for the steel can be gotten just as easily on the Moon as on Earth. I assert that the one on the Moon has a comparative advantage because of space travel. Sending goods from the Earth to the Moon means having to spend a lot of energy accelerating out of Earth’s thick atmosphere, then also spending energy to slow yourself down for a moon landing. By contrast it takes much less energy to accelerate off the atmosphere-less surface of the moon, and landing on Earth costs far less energy as you can use the atmosphere itself to brake your fall.

So a moon steel factory can send packages of steel to the Earth at a rather low transport cost compared to vice versa. That gives an advantage to the moon steel factory, as if there are shortages on Earth the moon factory can fill them at a rather low cost, while Earth cannot do the same to fill a need on the moon. The transport costs are not symmetric, and they are in the moon’s favor. I would assert that, all else being equal, investment for steelmaking would flow into the moon and out of the Earth.

Of course the “all else being equal” is the rub. Air, water, and food are hard to come by on the moon. Iron and carbon might be easier but all the mining equipment is already here on Earth. We would have to do a lot of work and build a lot of technology to make a moon-base even possible. But in theory economies of scale and future-technology could make it possible and even economical. And at that point it might enter a virtuous cycle due to these asymmetrical transport costs I mentioned. It will always be cheaper to send goods from the moon to the Earth, than vice versa.

It’s just a random thought I’ve had and I want to put it in a work of fiction. In some sci-fi universe, a moon colony is economically sustained by this comparative advantage compared to Earth. But I’ve never gotten the courage to write this story so until now it’s just been an idle thought in my head.

If the weavers get replaced by machines, who will buy the clothes?

I’ve seen way too many articles about AI casting doom and gloom that it will “replace millions of jobs” and that this will lead to societal destruction as the now job-less replacees have no more money to spend.  The common refrain is “when AIs replace the workers, who will buy the products?”

This is just another fundamental misunderstanding of AI and technology.  AI is a multiplier of human effort, and what once took 10 men now takes 1.  That doesn’t mean that 9 men will be homeless on the street because their jobs are “replaced.”  The gains reaped from productivity are reinvested back into the economy and new jobs are created.

When the loom replaced hand-spinning weavers, those weavers were replaced.  But they could eventually find new jobs in the factories that produced looms, and in other factories that were being developed.  When computers replaced human calculators, those calculators could now find jobs programming and producing computers.

For centuries now, millenia even, technology has multiplied human effort.  It used to take dozens of people to move a single rock, until several thousand years ago someone had the bright idea of using ropes, pullies, and wheels.  Then suddenly rocks could be moved easily.  But that just in turn meant the demand for moving rocks shot up to meet this newer, cheaper equilibrium, and great wonders like the Pyramids and Stonehenge were suddenly built.

The same will be true of AI.  AI will produce as many new jobs as it creates.  There will be people to produce the AI, people to train the AI, people to ensure the AI has guardrails and doesn’t do something that gets the company trending on Twitter.  And there will be ever more people to use the AI because demand is not stable and demand for products will rise to meet the increase in supply generated by the AI.  People will want more and more stuff and that will lead to more and more people using AI to produce it.

This is something that people get hung up on, they think that demand is stable.  So when something that multiplies human effort gets created, they assume that since the same amount of products can be produced with less effort, that everyone will get fired.  Except that demand is not stable, people have infinite wants and finite amounts of money. 

Technological progress creates higher paying jobs, subsistence farmers become factory workers, factory workers become skilled workers, skilled workers enter the knowledge economy of R&D.  These new higher paying jobs create people who want more stuff because they always want more stuff, and now have the money to pay for it.  This in turn increases demand, leading to more people being employed in the industry even though jobs are being “replaced” by machines.

To bring it all back to weavers, more people are working in the textile industry now than at any point in human history, even though we replaced weavers with looms long ago.

AI will certainly upend some jobs.  Some people will be unable or unwilling to find new jobs, and governments should work to support them with unemployment insurance and retraining programs.  But it will create so many new jobs as well.  People aren’t satisfied with how many video games they can purchase right now, how much they can go out to restaurants, how much housing they can purchase, etc.  People always want more, and as they move into higher paying jobs which use AI they will demand more.  That in turn will create demand for the jobs producing those things or training the AIs that produce those things. 

It has all happened before and it will happen again.  Every generation thinks that theirs is the most important time in the universe, that their problems are unique and that nothing will ever be the same.  Less than three years ago we had people thinking that “nothing will ever be the same” due to COVID, and yet in just 3 short years we’ve seen life mostly go back to normal.  A few changes on the margins, a little more work from home and a little more consciousness about staying home when sick, but life continued despite the once-a-century upheaval.

Life will also continue after AI.  AI will one day be studied alongside the plow, the loom, and the computer.  A labor-saving device that is an integral part of the economy, but didn’t lead to its downfall.