Skip to main content

Posts

Showing posts from November, 2024

Latin1 vs UTF8

Latin1 was the early default character set for encoding documents delivered via HTTP for MIME types beginning with /text . Today, only around only 1.1% of websites on the internet use the encoding, along with some older appplications. However, it is still the most popular single-byte character encoding scheme in use today. A funny thing about Latin1 encoding is that it maps every byte from 0 to 255 to a valid character. This means that literally any sequence of bytes can be interpreted as a valid string. The main drawback is that it only supports characters from Western European languages. The same is not true for UTF8. Unlike Latin1, UTF8 supports a vastly broader range of characters from different languages and scripts. But as a consequence, not every byte sequence is valid. This fact is due to UTF8's added complexity, using multi-byte sequences for characters beyond the general ASCII range. This is also why you can't just throw any sequence of bytes at it and e...

Repetitions are Sequences

When doing a task like working out, a common pattern is to perform something like 100 reps, then 90 reps, then 80, and so on, until you’ve completely counted down to zero. But this pattern can also be expressed arithmetically. We say that there are 11 terms in this sequence: 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, and 0. Alternatively, we could count the terms by solving: \[ 0 = 100 - 10 (n - 1) \] Afterward, let S represent the sum of all the terms in our sequence, N represent the number of terms, and \( t_0 \) and \( t_1 \) represent the first and last terms of the sequence. \[ S_n = \frac{n}{2} \cdot (t_1 + t_n) \] If we're beginning at 100 and counting all the way down to zero, we plug those values into our equation to get the total sum of 550. \[ S_n = \frac{11}{2} \cdot (100 + 0) = 550 \]

Definitions

Many words function through their extensional definitions—or the specific examples and instances that give them meaning. For example, consider when someone suggests that the solution to a problem is more ‘agency.’ But unfortunately, they do not elaborate further. This can become a quasi-semantic stopping point, where people hear a word but don’t take time to examine what it functionally means. ‘Just maximize agency,’ someone might say. But we cannot formalize a coherent model or actionable plan from merely hearing the word ‘agency’ and holding a fuzzy, informal concept in mind. Sure, the word may evoke intensional definitions, e.g., related words like ‘autonomy,’ ‘responsibility,’ or ‘power’—but are these associations alone enough? What does maximizing agency actually look like in practice? Does it mean giving more freedom? Increasing decision-making capacity? Creating more opportunities for action? To attempt to answer such questions, we need an extensional definition—specific i...

Frequentism and Bayesianism

From Frequentism and Bayesianism, A Practical Introduction : For frequentists, probability only has meaning in terms of a limiting case of repeated measurements. That is, if I measure the photon flux F from a given star (we’ll assume for now that the star’s flux does not vary with time), then measure it again, then again, and so on, each time I will get a slightly different answer due to the statistical error of my measuring device. In the limit of a large number of measurements, the frequency of any given value indicates the probability of measuring that value. For frequentists probabilities are fundamentally related to frequencies of events. This means, for example, that in a strict frequentist view, it is meaningless to talk about the probability of the true flux of the star: the true flux is (by definition) a single fixed value, and to talk about a frequency distribution for a fixed value is nonsense. For Bayesians, the concept of probability is extended to cover degrees of cert...

Four Forces

It bothers me that in popular science discourse, gravity is so frequently emphasized while other forces are overlooked. Nobody even discusses the strong and weak forces anymore! OK. Maybe they do sometimes and I’m just exaggerating. Furthermore, gravity is the weakest force! However, it does affect things on an infinite scale. Behold, a list of the four physical forces: Strong interaction — This is the strongest force—the force that holds the nuclei of atoms together, binding protons and electrons to nuclei Electromagnetism — Another force stronger than gravity—electromagnetism is the force that acts on charged particles. (e.g. light, radio waves, etc.) Weak interaction — A force weaker than electromagnetism, involved in subatomic interactions like radioactive decay or the decay of unstable particles (e.g. like muons or nuclear reactions in the the Sun) Gravity — The weakest force, but with range that inevitably affects large-scale things, like objects, planets, asteroids, a...

Myths of Human Genetics

From Myths of Human Genetics , by John H. McDonald: A fun way to teach the basics of genetics is to have students look at traits on themselves. Just about every biology student has, in one class or another, been asked to roll their tongue, look at their earlobes, or check their fingers for hair. Students can easily collect data on several different traits and learn about genes, dominant and recessive alleles, maybe even Hardy-Weinberg proportions. Best of all, these data don’t require microscopes, petri dishes, or stinky fly food. Unfortunately, what textbooks, lab manuals and web pages say about these human traits is mostly wrong. Most of the common, visible human traits that are used in classrooms do not have a simple one-locus, two-allele, dominant vs. recessive method of inheritance. Rolling your tongue is not dominant to non-rolling, unattached earlobes are not dominant to attached, straight thumbs are not dominant to hitchhiker’s thumb, etc. In some cases, the trait doesn’t ev...

Radioactive Dating

Matter is composed of chemical elements. Every chemical element has its own arrangement of protons, neutrons, and electrons. As a consequence, each element also has its own atomic number, which indicates the number of protons in its nucleus. Every element also has varying isotopes—differing versions of itself that possess a non-standard number of neutrons in its nuclei. Some of those isotopes are unstable (radioactive), experience decay, and turn into different elements over time. The process of tracing these radioactive impurities in materials is known as radiometric dating. For example, thanks to meteorite samples, we know that the Earth is around 4.5 billion years old. But how, exactly, do we know this? There are various types of radiometrics, and the process can involve different elements—from carbon, rubidium, potassium, samarium, uranium, to thorium. The elements uranium and thorium both decay into lead over billions of years. Thus, it is possible to determine the age of ...

The Ethics of Belief

An excerpt from “The Ethics of Belief,” by William Kingdon Clifford—an essay on epistemology, rationality, and the care with which we should apply when forming our beliefs: A bad action is always bad at the time when it is done, no matter what happens afterwards. Every time we let ourselves believe for unworthy reasons, we weaken our powers of self-control, of doubting, of judicially and fairly weighing evidence. We all suffer severely enough from the maintenance and support of false beliefs and the fatally wrong actions which they lead to, and the evil born when one such belief is entertained is great and wide. But a greater and wider evil arises when the credulous character is maintained and supported, when a habit of believing for unworthy reasons is fostered and made permanent. If I steal money from any person, there may be no harm done by the mere transfer of possession; he may not feel the loss, or it may prevent him from using the money badly. But I cannot help doing this...

Origins of Life

Today I learned the abiotic origin of organic compounds was established in the early 1800s, but the experiment wasn't actually intended to put forth a hypothesis for "abiogenesis"—or how life began on Earth. The question of abiogenesis is the following one: how does so-called inanimate, non-living matter become animate, living matter?  Friedrich Wöhler's so-called seminal contributions to organic chemistry would eventually lead to further hypothesis exploration about abiogenesis. Wöhler took two inorganic compounds—silver cyanate and ammonium chloride—and synthesized them to create urea, an organic compound that was previously believed to only be produced by living things carrying a "life force." After Wohler's experiment, a large number of similar organic chemistry experiments would follow throughout the 19th century—and later those experiments would be followed by the Miller-Urey experiment. The Miller experiment explored an origin of life sc...