Some mutations are so bad that they are fatal to the organism (don’t compile). Where a gene isn’t that important, the mutation will just confer a fitness change.
this is mediated through a variety of mechanisms. Some mutations just alter the performance of a protein, or the expression dynamics (when, for how long, and how much) of the gene expressed as protein. Many proteins don’t act directly on things but are part of complexes of proteins that perform a function, or are receptors that trigger other things, and thus many genes are “meta” in this way.
Imagine a complex sequence if gene expression during vertebrate development. At one point during elongation, a series of enzymes alter how this process starts and stops. Small variations in the performance and availability of the genes involved in this will nudge the outcome of elongation to result in a longer (or shorter) necked animal. If that is helpful for that individual, the gene will survive and flourish.
This gets more complex as in animals w sexual selection we have multiple versions (alleles) of each gene. There is also a huge realm of epigenetics and modulation (methylation, promoters, antisense, etc).
It’s really stunningly beautiful and amazing.
This is why genetic diversity is important. Populations aren't just more copies of a single genome. They are in fact reservoirs of genetic diversity which makes ecosystems more resilient to change. This partly explains why there are so many species of insects. As the recyclers at the bottom of the foodchain, they are the boots on the ground that do the heavy lifting and are subjected to the first shocks. They evolve into many species not only to specialize, but to guard against rapid changes at the bottom of a food web.
We know the size of genome of an animal, we can estimate the maximum possible number of mutations throughout history. And then calculate if it is possible to create such genome with this number of mutations or not.
For example, if a mutation happens once per K animals, if one successful mutation happens once per L mutations, and there have lived M animals then maximum number of successful mutations is M / K / L. We can compare this number to size of a genome and verify whether it could be created as a result of an evolution.
But the presence of random mutation is extremely well documented, yes - how else do you explain why identical twin humans don't have identical genomes? A great majority of corruptions have no effect, because biological systems are highly resilient to change; the analogy you want is less "delete a line of code" and more "delete a single machine from AWS". Some corruptions are so bad that they cause the organism to fail completely at the embryo stage. Some corruptions have an effect which is detrimental in one environment but beneficial in another; the whims of nature decide whether such an organism survives. Some corruptions are simply beneficial, and if they're sufficiently beneficial then they take over the gene pool in not many generations.
Multiple mathematical approaches were taken based on myriad theories of information encoding, compression, and redundancy. For a brief period of history, the question of how DNA worked wasn't one of biology, but one of statistics and information theory.
Unfortunately, once they had the technology to observe DNA directly, they discovered that almost all of the theories were just wrong, because the encoding from DNA trigraphs to amino acids is basically nonsense. It's not structured, or organized, or elegant. Like so much of biology, it's a hot mess of accident and coincidence, and massively, inefficiently redundant... But, that redundancy has an interesting property. The most commonly used amino acids in protein formation are encoded by a large number of DNA triplets, and in general, one edit to those triplets results in a triplet that codes for the same amino acid.
In hindsight, it is perhaps not surprising that the encoding schema from DNA to amino acids is edit-resistant.
(What cooks my noodle regarding the redundancy is: do we see the redundant DNA encoding because those amino acids are most commonly used, or are those amino acids most commonly used because a large number of DNA triplets code for them so they are statistically likely to be more prevalent? ;) ).
I just listened to interview with Rama Ranganathan about "evolutionary physics".
https://news.uchicago.edu/story/big-brains-podcast-explores-...
I couldn't really follow their discussion. From your post I'm guessing you'd get a lot more out of it.
Your questions about redundant encodings seems related to Ranganathan's assertion that biology can be both efficient and adaptive. Whereas with human design, efficiency and resilience is a more of a tradeoff.
Any who...
There’s a math book that also has a catchy title: Mathematics and Sex, by Clio Cresswell
You might be interested to know how common (naturally) aborted pregnancies and eggs that don't hatch are.
This is why mutations can often not cause immediate "compilation failure" since they just alter a parameter of the environment a specific morphological system is growing in, and the change is usually just noise which the system already has a large buffer of variability it can use to adjust.
If a mutation offers an advantage, even a tiny one, over time and generations is will be selected more than the non-mutation.
I think it's also important to realize that making new stuff, like creating a new type of protein, is very rare in nature. Most evolution is just number tweaking: make the neck or beak a bit longer, increase melanin levels, etc. And the way those "variables" are encodes seems to lend itself to natural variations, which is (one reason) why humans have so different height.
Usually, but not always.
Add to that an astounding number of iterations (random point changes), the fact that changes are guaranteed to be ... well, the metaphor breaks down quickly, but it would be something like "syntactically valid in the language being used, and no larger or smaller than a certain size of diff", and a sort of error correcting/weighted (as opposed to absolute/binary) behavior as a result of each change, and it starts to seem a bit more workable.
But even that is barely scratching the surface of how this stuff works. Code is far from a perfect analogy.
edit: although some genetic mutations do of course result in organisms that will certainly die, possibly before being born
DNA in nucleus - source code on disk
Messenger RNA - source code in memory
Ribosome - JIT compiler
Protein - tiny running program, think unix utilities. Also, not saved to disk.
There is source code for millions of such programs in the DNA.
The compiler (Ribosome) recognizes any combination of the base constructs of the language (C, G, T, A) as valid, but the compiled program may not work.
Genetic encoding has existed for billions. A lot of time and randomness have driven it to become resilient to changes in a way we struggle to yet even comprehend.