<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bob Glickstein on Medium]]></title>
        <description><![CDATA[Stories by Bob Glickstein on Medium]]></description>
        <link>https://medium.com/@bobglickstein?source=rss-40f6292862ba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*xUdZ7sTXdOBCTwIO.jpg</url>
            <title>Stories by Bob Glickstein on Medium</title>
            <link>https://medium.com/@bobglickstein?source=rss-40f6292862ba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 22:51:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bobglickstein/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Large language models and plagiarism]]></title>
            <link>https://bobglickstein.medium.com/large-language-models-and-plagiarism-22d93051577c?source=rss-40f6292862ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/22d93051577c</guid>
            <category><![CDATA[plagiarism]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[creativity]]></category>
            <dc:creator><![CDATA[Bob Glickstein]]></dc:creator>
            <pubDate>Tue, 18 Nov 2025 16:22:23 GMT</pubDate>
            <atom:updated>2025-11-18T16:22:23.807Z</atom:updated>
            <content:encoded><![CDATA[<p>Are large language models plagiarism machines, as some pending lawsuits allege?</p><p>Large language models, or LLMs, are the technology behind modern “generative AI” services like ChatGPT and Gemini.¹ Their design mimics some aspects of how real brains absorb, encode, recall, and synthesize information. To the extent that that’s true, it’s hard to see how to call their output plagiarism — at least, not without also calling human writers plagiarists. Creativity is just combining sources, and it’s not plagiarism if you combine enough of them.</p><p>And yet, even if LLMs work <em>exactly</em> like human brains, there’s one thing they can do that humans can’t, and it means that the authors and artists currently suing OpenAI and Google and others do have a legitimate complaint, albeit a slightly different one than they think.</p><p>Join me on a discursive journey…</p><p>I’m thinking of a very popular English-language novel. It contains 122,368 words. Here is the beginning of its <a href="https://en.wikipedia.org/wiki/Histogram">histogram</a>: a list of the words in the novel, and how many times each one appears.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*qebJjwWAp64dl09lt6JZxg.png" /></figure><p>These are only the most-frequently occurring words in this novel. The full histogram, which you can see <a href="https://docs.google.com/spreadsheets/d/1XfRJEthJ9DiisTTkX15fAxw5qu3aslouxptFcFsZW6A/edit?usp=sharing">here</a>, contains 6,343 entries, with some words used often (e.g. the 121 uses of “hope”) and some used seldom (e.g. the three uses of “shaken”). Add up all the uses of those 6,343 words and you get the aforementioned total of 122,368.</p><p>In giving you this information, have I plagiarized that novel? Clearly not. Although my histogram is derived from the novel, it is a <em>total transformation</em> of the information the novel contains. You can’t reconstruct the novel from my histogram² or, in any meaningful way, get from my histogram what you can get from the novel.</p><p>Now suppose I add some information to the histogram. For each word, I tell you which words follow it, and how often. For example, “the” is followed by “whole” 72 times, “same” 69 times, “other” 58 times, “house” 56 times, and so on. We have “the envelope” and “the discussion” twice each, and “the prospects” once, among many other combinations. (In fact, there are 1,256 different words that follow “the” in this novel.) There are now two histograms: the first one, containing the count for each word; and a new one containing the count for each word <em>pair.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*aLkbFJWAW5ozx2PUTNV-Bg.png" /></figure><p>Have I plagiarized yet? It depends on how easily I’m able to reconstruct the novel, or substantial parts of it, from this enhanced information.</p><p>Here’s how I might try. First, I’d choose a starting word at random, based on the counts in the first histogram. That means it should be about twice as likely for me to choose “she” (1,709 occurrences) as it is for me to choose “is” (857). Imagine rolling a 122,368-sided die, with 4,334 sides labeled “the,” 4,166 sides labeled “to,” and so on.</p><p>Once I have my starting word, I repeatedly choose a next word based on the counts in the second histogram, the one containing word pairs. Here’s how that might go:</p><p>For my initial word, I choose “it” at random. The word “it” occurs 1,534 times out of 122,368 words, or 1.25% of the time.</p><p>The word-pairs histogram tells us that, of those 1,534 occurrences of “it,” the next word is “was” 254 times, “is” 193 times, “would” 69 times, and so on. I choose “is” at random, which follows “it” 12.6% of the time.</p><p>The pairs “is not” and “is a” occur 76 times each; “is the” occurs 36 times; “is very” occurs 34 times; and so on. I choose “a” at random (8.9%), and so far we have “It is a.”</p><p>There are 659 different words we could choose after “a,” from the likely — “very” — to the unlikely — “confession.” Suppose we land on an unlikely choice this time: “truth” (0.05%).</p><p>The word-pairs histogram guides us next to “universally” (3.7%) and “acknowledged” (33.3%) to give us one of the most famous opening phrases in English literature: “It is a truth universally acknowledged,” from Jane Austen’s <em>Pride and Prejudice.³</em></p><p>To get even this far in reconstructing the input from the word and word-pairs histograms is enormously unlikely: 1.25%×12.6%×8.9%×0.05%×3.7%×33.3%, which is 0.000000086%. I’m much more likely to end up with some half-English, half-gibberish sequence like “It was to think so often meet.”⁴</p><p>Not to mention the fact that, character and place names aside, the vocabulary and phrasing in this novel is probably very close to that of Austen’s other novels. As unlikely as it is to reproduce <em>Pride and Prejudice</em> from this data, it’s probably about equally likely to produce something close to <em>Sense and Sensibility.</em></p><p>The process I’ve just described is a simple example of a <a href="https://en.wikipedia.org/wiki/Markov_chain#Markov_text_generators">Markov-chain generator</a>, which can read in some sample text and produce new text with some of the same statistical properties, like word and word-pair frequencies. You can make it fancier by considering word triples and quadruples, etc., in addition to single words and word pairs.</p><p>Large language models are far more complicated. But Markov chains are a good way to start thinking about how they work. In both cases, a data model is trained on some input text to produce a truckload of statistics. In both cases, those statistics are then used to generate some output text that tries to mimic the input text in some ways.</p><p>Let’s talk about brains for a moment — mine, specifically, since it’s the one about which I have the best information. Based on the evidence in front of you, you can tell my brain likes writing articles for public consumption from time to time. This began in college, when I became an avid fan of the prize-winning humorist <a href="https://www.davebarry.com/">Dave Barry</a>, whose regular column in the <em>Miami Herald</em> was among the earliest syndicated content to be available on the ancient, text-only, pre-web Internet.</p><p>So inspired, I started contributing a weekly column of my own to my college newspaper. I cringe to think of those articles now. They were transparently striving to be Dave Barry articles, and reliably failing at that.</p><p>In large-language-model terms, my brain had been trained on too small a data set. Everything going into it was Dave-Barry-like, and so everything coming out of it was Dave-Barry-like too. Expecting anything else would be like trying to use my Jane Austen Markov-chain generator in the hope of producing something Hunter S. Thompson-like. It just wouldn’t work.</p><p>Time passed. I read a lot more and I wrote a lot more too. That Dave Barry training in my brain got blended with a few thousand more sources. It’s still in there, of course, but I think we can agree that it doesn’t make <em>this</em> article particularly Dave-Barry-like, any more than seasoning a curry with a pinch of cinnamon makes it taste cinnamony.</p><p>When I was writing my bad Dave Barry knockoff articles in college, was I plagiarizing him? No, I wasn’t. I wrote about my own topics. But they weren’t entirely original, either. They were a sort of mash-up of my topics with some of Dave Barry’s rhetorical patterns and joke-telling rhythms. I was appropriating his “voice.” (Trying, more like, with extremely limited success.)</p><p>I have long since found my own voice, but what does that mean, and when did it happen? The only possible answer is that my writing style — and by extrapolation, that of any writer — gradually became a mash-up of enough different ingredients, like the cinnamon in the curry, that no one of them is now particularly distinguishable. In other words, the difference between having an original voice and appropriating someone else’s is one of degree, not of kind. Nothing is truly, completely original — <a href="https://www.brainyquote.com/quotes/voltaire_121880">least of all this idea</a>.</p><p>A human learns to write well by reading many authors. When we train an LLM by feeding it books, is that meaningfully different?</p><p>Some would say it is. “Machines can only <em>mimic</em> creativity,” they say.</p><p>I don’t know about that. I have firsthand experience with mimicking creativity, when I was in my Dave Barry phase. Turns out I just wasn’t trained enough yet. Now I am (I humbly suggest). No switch flipped. I didn’t go from “mimicking creativity” one day to “real creativity” the next. I just improved. As Voltaire said, creativity <em>is</em> mimicry, disguised.</p><p>Some would say, “computers have no awareness.” Do they not? How would we know? Do humans have awareness? How would we know that? The only available evidence — the written output — is comparably convincing in some cases and unconvincing in others, whether we’re talking about humans or computers.</p><p>I think we have to conclude that, until and unless we can demonstrate otherwise, the way an LLM learns and writes is at least in the same ballpark as the way a human brain does.</p><p>So if we accept that premise, are LLMs plagiarism machines?</p><p>The only possible answer is, in general, no — not any more than a human is. Plagiarism by computers and humans is certainly possible, when the mimicry isn’t sufficiently disguised beneath enough layers of influence — when there aren’t enough ingredients in the curry. But if anything, computers are probably <em>less</em> prone to this than humans, simply because of the sheer superhuman volume of sources on which they can be trained.</p><p>Generative AI companies are minting billions from LLM technology trained on the writings of many authors. Does this mean they owe those authors a cut?</p><p>Well, what do I owe Dave Barry for the contribution he made to my writing style? What do I owe to Jane Austen? To Carl Sagan? Neal Stephenson? Bill Bryson? Kurt Vonnegut? Stephen King? J.R.R. Tolkien? Ray Bradbury? Douglas Hofstadter? Roald Dahl? Edgar Allen Poe? Arthur Conan Doyle? Etc etc etc. They get no say in how I use the knowledge they helped me form, nor do they get to share in any benefits I enjoy from using that knowledge. I owe them only my gratitude, and the purchase price of their books, which I’ve already paid.</p><p>Assuming OpenAI and Google, et al., have paid that price for the sources used in their LLM training,⁵ and based on the conclusion that LLMs aren’t plagiarism machines, they shouldn’t owe authors and artists anything else.</p><p>Except…</p><p>Even if LLMs and human brains work similarly — even if it turns out they work <em>identically</em> — there is still one important difference between them: <strong>a trained LLM can be duplicated endlessly,</strong> and a brain cannot.</p><p>A single book sale can, in principle, “train” only a small number of human minds. But when it comes to LLMs, the same book can train hundreds, thousands, or millions of “individuals,” without bound, each one producing its own writing.</p><p>Existing copyright law rests invisibly on the assumption that getting a book’s contents into the heads of millions requires many, many copies of the book. It prohibits me from duplicating my copy and giving it to you — you’ve got to buy your own — but it doesn’t prohibit me from creating a functioning replica of the mind that resulted from reading that book, if only I could.</p><p>This insight suggests a way forward for the burgeoning LLM industry that might also be fair to the humans who supply them with their smarts, willingly or not: pay-per-mind. You bought a library full of books and trained an LLM with them? That’s fine. Now you want to spin up another copy of that same LLM? Pay a bit more to each copyright owner. How much? And how to track LLM individuals, and what they were trained on? I leave that to the legislators.</p><p><em>I am grateful to my sons for their feedback on an early draft of this essay.</em></p><p>¹ — Generative AI encompasses a variety of different tools, some of which can produce pictures, or video, or music; some of which can interpret medical data and imagery; and so on. This essay focuses on written language and trusts that its observations can be extrapolated to other types of output.</p><p>² — In theory, since you have all the words and their counts, you could list them all and try shuffling them to put them in the right order. But the number of ways to permute 122,368 words is in excess of 8-with-569,426-zeroes-after-it — a number big enough to count every atom in our universe and another half-million universes just like it. So, good luck.</p><p>³ — If I had included just one more bar in the “word-pair histogram” bar graph above, you would have seen that “mr-darcy” appears 243 times, which would have spoiled the surprise.</p><p>⁴ — To get the rest of that famous opening sentence (“…that a single man in possession of a good fortune must be in want of a wife”) is <a href="https://youtu.be/no_elVGGgW8">many orders of magnitude unlikelier still</a>. To say nothing of a paragraph, or a chapter, or the whole novel.</p><p>⁵ — A safe assumption? I don’t know, and won’t comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22d93051577c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Of a particular moment in time]]></title>
            <link>https://bobglickstein.medium.com/of-a-particular-moment-in-time-f94a44e09a75?source=rss-40f6292862ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/f94a44e09a75</guid>
            <category><![CDATA[television]]></category>
            <category><![CDATA[history]]></category>
            <dc:creator><![CDATA[Bob Glickstein]]></dc:creator>
            <pubDate>Mon, 07 Oct 2024 15:43:42 GMT</pubDate>
            <atom:updated>2024-10-08T19:24:43.849Z</atom:updated>
            <content:encoded><![CDATA[<p>Once upon a time, the image on a consumer TV screen came from one place and one place only: analog radio broadcasts over the air. TVs in those days didn’t have “inputs.” Instead, they had a place to attach an antenna, which was just a conductive terminal where you would screw down a pair of wires ending in “spade lugs.” It looked like this:</p><figure><img alt="Antenna wires connected to the back of an old TV set." src="https://cdn-images-1.medium.com/max/960/0*OmM9EcT92xL4JpPQ" /></figure><p>The antenna, also called an “aerial” or “rabbit ears,” sat on top of the TV set and looked like this:</p><figure><img alt="TV with rabbit-ears antenna." src="https://cdn-images-1.medium.com/max/396/0*l3zKgo4sZTNCqpaC" /></figure><p>When the TV picture was fuzzy — which could happen as a result of atmospheric conditions, or if someone was running a vacuum cleaner or blender or some other big electrical motor nearby — you’d get up from the couch, walk over to the TV, and start manipulating the antenna, angling it this way and that until the picture got clearer. Sometimes, simply touching the antenna improved things, and then your friends or family would ask you to stay in that position so that they could watch their show.</p><p>TV broadcasts used two frequency bands, <a href="https://en.wikipedia.org/wiki/Very_high_frequency">VHF</a> (for “very high frequency”) and <a href="https://en.wikipedia.org/wiki/Ultra_high_frequency">UHF</a> (for “ultra high frequency”), each divided into several channels. VHF channels were numbered 2 through 13; UHF channels were numbered 14 through 83. VHF channels were the main ones, featuring the major national and local broadcasts. UHF channels were sparsely used and featured oddball programming, which Weird Al spoofed in his movie <a href="https://en.wikipedia.org/wiki/UHF_(film)"><em>UHF</em></a><em>.</em></p><p>To tune in a UHF channel, you’d turn the VHF knob to “UHF” and then the UHF knob to the channel you wanted. These two knobs looked like this:</p><figure><img alt="VHF and UHF tuning dials on an old TV." src="https://cdn-images-1.medium.com/max/432/0*xlwgQuVLQaxzJcZH" /></figure><p>Each major city had its own channel layout. In New York in the 1970’s, the channels were:</p><ul><li>2: CBS affiliate</li><li>4: NBC affiliate</li><li>5: WNEW (local)</li><li>7: ABC affiliate</li><li>9: WOR (local)</li><li>11: WPIX (local)</li><li>13: PBS</li></ul><p>The sequence 2, 4, 5, 7, 9, 11, and 13 is as familiar to New Yorkers of a certain age as the alphabet. It’s memorialized in at least one place I know: a scene in <em>The Goodbye Girl,</em> when Richard Dreyfuss is lamenting <a href="https://clip.cafe/the-goodbye-girl-1977/channel-5-honest/">the terrible reviews he got for his Richard III</a>. He asks Marsha Mason not to tell her daughter about “channel 5, or channels 2, 4, 7, 9, and 11.”</p><p>It was weird the first time you went to another city and discovered that NBC programs were on channel 5 instead of channel 4.</p><p>There was no Internet yet of course, nor was there a “channel channel,” where you could tune in to see what was playing on the other channels when. Instead, you subscribed to a weekly magazine called <em>TV Guide</em> — once the most-widely circulated magazine in America — which listed each channel’s programs and also featured interviews and other articles. It looked like this:</p><figure><img alt="Examples of a cover and an internal page of old TV Guides." src="https://cdn-images-1.medium.com/max/1024/1*feR56nnY2Jk2W75auFhDCw.png" /></figure><p>(And now that you know what this looked like, you’re ready for <a href="https://www.facebook.com/photo/?fbid=10229806541563269&amp;set=a.1384116358475">this note-perfect parody</a> and others like it from this one Facebook account.)</p><p>Your favorite TV shows were on at the same time every week, but other programming could appear at any time. When a new <em>TV Guide</em> arrived, you’d scan it to see what times you’d have to set aside that week in case they were showing a favorite old movie, or Evel Knievel’s latest stunt, or a <a href="https://youtu.be/-JXuHkXvdPQ"><em>Battle of the Network Stars</em></a>.</p><p>In 1972 there came a major innovation: <a href="https://en.wikipedia.org/wiki/Magnavox_Odyssey">the Magnavox Odyssey</a>, the first home video game. For our purposes, the innovation was in the way it connected to your TV (which, remember, could receive pictures and sound only from an antenna). There was a switch that looked like this:</p><figure><img alt="Old TV/Game switch." src="https://cdn-images-1.medium.com/max/640/0*b-ACbfE6qOXfFpLn" /></figure><p>You’d unscrew the antenna from the TV and re-screw it to the terminal at the bottom of this switch. The game plugged into the top of the switch. And the switch’s spade lugs connected to the TV. The whole Frankenstein contraption hung awkwardly off the back of the TV — not too differently from how a <a href="https://en.wikipedia.org/wiki/Chromecast">Chromecast</a> does today! Now, when you wanted to watch TV broadcasts, you slid this switch to the “TV” position, and when you wanted to play your game, you slid it to the “Game” position <em>and then tuned your TV to channel 3.</em> The Magnavox Odyssey, and later devices like it, produced a signal that looked to the TV like a channel-3 broadcast.</p><p>(My dad once surprised us with a Magnavox Odyssey after he came home from work one night. We excitedly set it up and played Pong for a little while. Have you ever played Pong? If so, then you won’t be surprised to know we got bored with it that same night, and he returned the expensive toy for a refund the very next day.)</p><p>This switching mechanism was also the idea behind the first iteration of cable, or what we then also called “pay TV” (by contrast with the broadcast stations, which were free). The first widely available pay channel was HBO, and my family were early adopters. We got our “HBO box” in 1975. The HBO signal arrived over a cable instead of the airwaves, so it had better quality. Because it was supported by a subscription fee, it didn’t have to chop up programming into short bits and insert commercials everywhere. And because it wasn’t broadcast over the public airwaves, it was not subject to the standards of decency that prevailed at the time, so movies could be shown without editing out profanity, nudity, and violence.</p><p>I couldn’t find an image online of the HBO descrambler set-top box we had, but it had one big slider switch, with a position for “Regular TV” and a position for “Premium,” and it also had a key. Parents could disable Premium TV by turning the key and removing it, to protect the tender sensibilities of their kiddies from all the nastiness that HBO sent into the living room; the 1970s equivalent of withholding the wifi password. Also, it was a different time; most of what counted as nasty then is pretty tame today. (See <a href="https://bobglickstein.medium.com/wtf-8e1f798bffad">this related article</a>.) And even so, HBO saved the really raunchy stuff for late at night, when the kiddies were presumably safely asleep.</p><p>HBO had its own version of the TV Guide. It was called the HBO Guide and it came out monthly. It looked like this:</p><figure><img alt="Collection of old HBO-Guide covers." src="https://cdn-images-1.medium.com/max/1024/0*0IjPtN2uZXJnHxzA" /></figure><figure><img alt="Interior pages of an old HBO Guide." src="https://cdn-images-1.medium.com/max/1024/0*zDqIGYUxaKuz2x2k" /></figure><p>After a while, other premium TV services appeared. Additionally, local TV stations started making themselves available over cable in addition to broadcast (since customers were willing to pay a subscription fee for the better picture and sound quality). And some local channels started using cable as a way to find viewership outside their local markets. For the first time, “channel surfing” became a thing. Before the 80’s, there just weren’t that many viewing options. Network executives devoted a lot of effort to designing synergistic program schedules that would keep viewers from changing the channel. A commercial break in the middle of <em>Happy Days</em> would remind viewers that <em>Laverne and Shirley</em> was coming up next and, like as not, if you were watching one you’d stick around for the other. Those commercials would urge, “Don’t touch that dial!”</p><p>For, when you did want to change the channel, you got up from the couch, crossed to the TV, and turned the dial — usually to the specific channel that the TV Guide told you you wanted to watch for the next hour or two. Some TVs had remote controls, but they were rare and very space-age. Like this one:</p><figure><img alt="The Zenith “Space Commander Three Hundred” ultrasonic remote-control." src="https://cdn-images-1.medium.com/max/448/0*I7_guTHUg4nL9vU3" /></figure><p>It had no batteries. Instead, the two spring-loaded buttons tripped a little internal hammer that struck a tuning fork tuned to an ultrasonic frequency that only the TV could hear. My Uncle Solly had one and I remember being amazed by it as a small child.</p><p>Anyway, with the proliferation of many channels, planning your viewing with a printed guide became less practical, and browsing through channels until you found what you were interested in became routine. No one wanted to stand at the TV itself while doing this. So during the period between the proliferation of many channels, and the rise of infrared remotes with a new generation of TVs, many cable subscribers relied on a box like this one, with a long wire that could reach from the TV to the couch:</p><figure><img alt="Vintage mechanical cable-channel switching box, in a scene from After Hours." src="https://cdn-images-1.medium.com/max/967/0*JiO1vpPtKj1zWyxA" /></figure><p>This is a still image from the movie <em>After Hours.</em> Griffin Dunne is bored after work, finds nothing good on TV, and decides to go out, setting the film’s events in motion. This image appeared in <a href="https://framed.wtf/archive?day=937">a framed.wtf puzzle</a> a few days ago, which is what got me thinking about this whole topic. The interval in which TV viewers relied on a wired remote cable box like this was short, which is why I commented to my son (who shares my love for those puzzles) that this image is “very of-a-particular-moment-in-time.”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f94a44e09a75" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WTF]]></title>
            <link>https://bobglickstein.medium.com/wtf-8e1f798bffad?source=rss-40f6292862ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e1f798bffad</guid>
            <category><![CDATA[profanity]]></category>
            <dc:creator><![CDATA[Bob Glickstein]]></dc:creator>
            <pubDate>Mon, 07 Oct 2024 14:10:09 GMT</pubDate>
            <atom:updated>2024-10-08T01:55:24.496Z</atom:updated>
            <content:encoded><![CDATA[<p>When I was a programming intern at the very start of my career, circa 1987, our tech writer had this sign above her workstation:</p><figure><img alt="“Before asking me a question / RTFM / Read the manual”" src="https://cdn-images-1.medium.com/max/377/1*DEhKr1b8Xsz5f6najj88ow.png" /></figure><p>No one had ever heard “RTFM” before, and this formulation was funny because (at the risk of stating the obvious) it omitted the F from the expansion of the acronym. Here’s what’s funny about that: you effortlessly fill in that blank yourself, and you recognize that everyone else can too, which highlights the frivolity of that bit of prudery; and at the same time you recognize the hostility of someone who’s been asked too many dumb questions, ill concealed in a sign made ostensibly polite by the omission of what the F stands for.</p><p>“RTFM” became widespread not long after that, but every single subsequent time I saw it — on t-shirts and coffee mugs, on demotivational office posters and in e-mail signatures — and every time someone wittily quoted it to me, it was always “Read the fucking manual,” <em>which completely misses the point</em>. There’s no frivolous prudery on display, no conspicuously bad attempt to conceal the hostility of the sentiment. RTFM had become just an abbreviation for a crude message and a tiny bit of something important was lost from the world.</p><p>Here’s another thing: a few years after that first RTFM sign, in 1990, the movie <em>Goodfellas</em> came out, and there was a brief flurry of discussion on <a href="http://en.wikipedia.org/wiki/Usenet">Usenet</a> surrounding the effort made by one dedicated moviegoer to count the number of times the word “fuck” is used in the film: 296, raising <em>Goodfellas</em> head and shoulders above former champ <em>Scarface</em> (from 1983, with 207 occurrences of that word).</p><p>“Fuck” still had the ability to shock and surprise, as evidenced by the astonished reactions on Usenet to its profligate use in <em>Goodfellas</em>, but thanks to that film and <em>Casino</em> (1995: 422 “fucks”) and their ilk, that power was waning. Soon a torrent of “fucks” would be used for comic effect in <em>The Big Lebowski</em> (1998: 260) and then we had <em>The Sopranos</em> (1999), every episode of which was 20% “fuck” by weight.</p><p>The power of “fuck” is almost all gone, and that’s a shame, because what can take its place as the all-purpose strong taboo epithet? By overuse it’s been demoted to a very mild intensifier, as in “You cannot fucking believe the fucking paella at this fucking place, it’s fucking amazing.” Texters use LMFAO and OMFG without a second thought (and without pretending they stand for “laugh my ass off” and “oh my god”), and a little more of something important is lost from the world.</p><p><em>[An earlier version of this article appeared on a blog in 2010.]</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e1f798bffad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Trump’s weakness is his strength]]></title>
            <link>https://bobglickstein.medium.com/trumps-weakness-is-his-strength-98cb9942aac0?source=rss-40f6292862ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/98cb9942aac0</guid>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[trump]]></category>
            <category><![CDATA[meritocracy]]></category>
            <dc:creator><![CDATA[Bob Glickstein]]></dc:creator>
            <pubDate>Mon, 09 Sep 2024 13:34:15 GMT</pubDate>
            <atom:updated>2024-09-09T13:34:15.916Z</atom:updated>
            <content:encoded><![CDATA[<p>Early in the 1997 film <em>The Fifth Element,</em> the Earth is menaced by a flaming ball of space-evil. The space navy fires its biggest missiles at it, but those only make the flaming evil ball bigger and stronger.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*9m8cg2aLK6cM7u3nVTzrEw.gif" /></figure><p>This is an allegory for Donald Trump’s political career. The man is plainly incompetent, illiterate, dishonest, disloyal, pervy, cowardly, and cruel, not to mention increasingly deranged. But no amount of loading these irrefutable accusations into our missile tubes and firing them at him or his supporters has diminished the Trump menace. If anything it has made it worse. Why?</p><p>Paradoxically, the answer is: <strong>meritocracy.</strong></p><p>What could be more just than a society where success is based on merit? Maybe nothing, and that’s a tragedy.</p><p>We’ve tried the system where what you deserve depends on who your parents are. (By “we,” I mean humans.) That’s not very fair.</p><p>We’ve tried the one where what you deserve depends on the whims of a strongman. That’s not very fair either.</p><p>Neither are the ones where success comes from how many enemies you can defeat in battle, or how many serfs or slaves you can subjugate, or how closely you can hew to what this era’s priests say are the divine rules of the universe.</p><p>In America we are rightly proud of overthrowing those earlier systems and organizing ourselves as a meritocracy.</p><p>But here’s the thing: <strong>all of those systems pick winners and losers.</strong> (We’ve also tried doing away with winners and losers, but that never seems to work out.) Meritocracy is no different in that way. But it is different in one important respect: if you’re a loser in a dictatorship or a monarchy, you know whom to blame, but if you’re a loser in a meritocracy, there’s no one to blame but yourself.</p><p>Now, that’s not really true. “No one to blame but yourself” is just marketing. It’s meritocracy’s brand. The fact is, if you’re a meritocracy loser, there are a lot of things you could blame. Merit can be measured along multiple different dimensions, and in our society some count and some don’t. You could be the best, hardest-working grade-school teacher in the country, but that is never going to make you rich, or even save you from having to buy your own classroom supplies. On the other hand, you could be only a mediocre CEO and have no personal problems worse than where to park your yacht.</p><p>Who decides which kinds of merit count, and for how much? Unfortunately the answer is hazy. It’s a diffuse agglomeration of historical attitudes, public policies, and profit motives. It’s hard to point your finger at any one villain, so “no one to blame but yourself” wins out.</p><p>With the disintegration of the middle class, we have a lot of losers in America, and that adds up to a lot of people sitting with this toxic idea… and being driven insane by it.</p><p>Imagine you’re one of those folks. (Or maybe you don’t have to imagine.) You know what success looks like, especially now that the Internet makes it so easy to compare your life to those of others far away. There is no path to that kind of success for yourself.</p><p>Now along comes Donald Trump. He’s flabbier than you. His marriage is in worse shape than yours. He can barely form a coherent sentence. You sometimes leave an ungenerous tip? <em>He</em> skips out on the whole bill. Your work colleagues don’t respect you? His hate and undermine him. You have impure thoughts? He brags about grabbing women by the pussy. Your business is failing? He bankrupted six.</p><p>Whatever it is that disappoints you about yourself, whatever you think is holding you back, he’s worse — and somehow he makes that shit work. The more others point out his flaws, the more it endears him to you. At first you are ashamed of this and keep it to yourself, but thanks again to the Internet you get connected to others of like mind, and you are all emboldened.</p><p>He is your champion, because a world in which <em>even he</em> can succeed is surely one in which you can, too.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98cb9942aac0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your inner me]]></title>
            <link>https://bobglickstein.medium.com/your-inner-me-79a6c415cf71?source=rss-40f6292862ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/79a6c415cf71</guid>
            <category><![CDATA[poem]]></category>
            <category><![CDATA[metaphysics]]></category>
            <dc:creator><![CDATA[Bob Glickstein]]></dc:creator>
            <pubDate>Fri, 16 Aug 2024 15:47:03 GMT</pubDate>
            <atom:updated>2024-08-16T15:47:03.370Z</atom:updated>
            <content:encoded><![CDATA[<p>Inside you<br>There’s an inner me<br>Who talks to you<br>Independently</p><p>He says things<br>I’ve never said<br>But might if I<br>Were in your head</p><p>How faithful<br>This facsimile<br>To the outer me<br>That others see?</p><p>How much like me,<br>This me in you?<br>How much does he<br>Combine we two?</p><p>He started off<br>As my design<br>So is he yours<br>Or is he mine?</p><p>Would I endorse<br>His words to you?<br>Approve of what<br>He helps you do?</p><p>Or would I say<br>“No, that’s not me”<br>If ever I could<br>Your me see?</p><p>You may ask<br>The same things too<br>’Cause in <em>my</em> head’s<br>An inner you</p><p>I’d like to<br>Introduce those two:<br>Your inner me,<br>My inner you</p><p>Would others<br>Seeing them discuss<br>Believe that<br>They were watching us?</p><p>Would inner we ask<br>In our steads<br>Of inner inners<br>In <em>their</em> heads?</p><p>Someday I’ll<br>No longer be<br>But you may go on<br>Separately</p><p>The me in you<br>May outlive me<br>Is this<br>Immortality?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79a6c415cf71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Third term’s the charm!]]></title>
            <link>https://bobglickstein.medium.com/third-terms-the-charm-508c145c0236?source=rss-40f6292862ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/508c145c0236</guid>
            <category><![CDATA[satire]]></category>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[george-w-bush]]></category>
            <dc:creator><![CDATA[Bob Glickstein]]></dc:creator>
            <pubDate>Sun, 09 Jul 2023 05:37:23 GMT</pubDate>
            <atom:updated>2023-07-09T05:37:23.623Z</atom:updated>
            <content:encoded><![CDATA[<p>With both boys now away at college the time finally came to purge two decades’ worth of clutter that accumulated while childraising left us no bandwidth to spare.</p><p>We’ve been making all sorts of discoveries among our long-forgotten belongings, including this: an outline that I wrote in early 2006 for a story about presidential politics.</p><ul><li>August 2006, Crawford, Texas: George W. Bush summons campaign advisors to his ranch. There is speculation that he is making succession plans and may appoint his brother Jeb VP. (But Jeb’s circle is not in attendance.)</li><li>Right after Labor Day, word leaks: Bush may campaign again.</li><li>White House Press Secretary Scott McClellan is evasive. “The Constitution does prohibit getting elected to more than two terms — but it doesn’t prohibit <em>campaigning</em> for a third term.”</li><li>Democrats’ heads exploding. Negativity starts to erase gains going into the November congressional elections. The GOP retains a congressional majority.</li><li>Republicans say the two-term limit is “our rule” in response to FDR, and is now “outmoded,” adding that the GOP <em>deserves</em> a three-term presidency because the Democrats had one.</li><li>The GOP launches an effort to amend the Constitution.</li><li>Bill Clinton promptly announces <em>he’ll</em> run for a third term.</li><li>The GOP amends its amendment effort: only three <em>consecutive</em> terms are OK.</li><li>The press attacks Clinton.</li><li>Democrats attack the press.</li><li>Hillary is pissed. This was supposed to be her turn.</li><li>Numerous GOP challengers emerge, but self-destruct. (E.g., Giuliani over the <a href="https://en.wikipedia.org/wiki/Bernard_Kerik#Criminal_investigation_and_convictions">Kerik</a> affair.) Bush is the party’s best candidate going into the primaries.</li><li>In the Democratic primaries it’s Bill vs. Hillary. They cancel each other out.</li><li>Bush wins the election (amid questions over the vote).</li><li>The Supreme Court rules the Constitution’s term limit rule is moot in this case, because enforcing it would undermine the will of the majority.</li></ul><p>It’s a measure of how far the Trump presidency moved <a href="https://en.wikipedia.org/wiki/Overton_window">the Overton Window</a> on constitutional abuses that this now reads as quaint satire. At the time I wrote it this would have been an all-too-plausible pulse-quickening nightmare.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=508c145c0236" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Disco-ball Earth]]></title>
            <link>https://bobglickstein.medium.com/disco-ball-earth-5efb560fa44d?source=rss-40f6292862ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/5efb560fa44d</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[climate]]></category>
            <dc:creator><![CDATA[Bob Glickstein]]></dc:creator>
            <pubDate>Mon, 18 Jul 2022 15:12:47 GMT</pubDate>
            <atom:updated>2022-07-18T19:28:38.747Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Defeating global warming with frickin’ lasers.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*6NTOs39wvdV7ERtvKwRiXw.jpeg" /></figure><p>[This is another in <a href="https://www.geebobg.com/tag/save-the-world/">my occasional series</a> of half-baked ideas for saving the world. If you can actually make this idea work, it is all yours, and a grateful planet will thank you.]</p><p>As you probably know, the climate crisis is due to the greenhouse effect, in which the Earth absorbs more energy from the sun than it is able to shed back into space, causing the planet gradually to grow warmer and warmer. This is a change from the past, when the Earth’s “energy budget” — the amounts of arriving and departing energy — was more or less in balance.</p><p>The problem is that a lot of solar radiation reaching the Earth is in the form of ultraviolet light, which is easily able to pass through the atmosphere and reach the surface, where it heats things up. Hot things emit <em>infrared</em> light, and if enough of that can escape back into space to offset the incoming ultraviolet, all is well.</p><p>But carbon in the atmosphere blocks infrared from escaping — while doing nothing to reduce the amount of ultraviolet getting in. All substances absorb some wavelengths of light and not others; that’s simply “color.” (Ultraviolet and infrared are just colors our eyes can’t perceive.) When it comes to the gases in the atmosphere, the color hand we’ve been dealt is: let in UV, trap IR. It seems unfair, but chemistry doesn’t care about your feelings.</p><p>The politics of our age make it doubtful we can rebalance the energy budget by meaningfully reducing the amount of carbon in the air in a useful timeframe. Too bad we can’t convert the infrared getting trapped back into ultraviolet that can escape, as an alternative.</p><p>Or… <em>can we?</em></p><p>Much of what the sun heats up is ocean — naturally, since that’s most of the Earth’s surface. The warming of the oceans is associated with more-intense storms, acidification and coral bleaching, imperiling the Gulf Stream, and a host of other ills.</p><p>Most of the warming of the oceans is confined to the upper few hundred feet of depth. Below that in most places is a <em>thermocline</em> — an abrupt temperature drop, with much cooler water below, mostly isolated from the warming effects above.</p><p>The <em>thermoelectric effect</em> is a physical phenomenon that can convert a difference in temperature into an electric current.</p><p>Putting all of the above together, here’s the idea: build a buoy that floats on the ocean. Beneath the buoy, a long wire extends down past the thermocline. The difference between the surface temperature and the temperature at depth creates a current in the wire — small, but continuous. The current is used to power an ultraviolet laser in the buoy, aimed at the sky. It shines weakly, but continuously, steadily drawing heat from the ocean and beaming it into space.</p><p>With enough of these simple, inexpensive units built and deployed, we should be able to offset the greenhouse effect. Doing the math on how many that would be is left as an exercise for the reader. Undoubtedly it would take thousands, perhaps millions, of UV-laser buoys floating in oceans all around the world.</p><p>One thing is for sure, though: if this solution works, saving the world wouldn’t be the only cool thing about it. An alien looking at the Earth from space, with eyes that can perceive ultraviolet rays, would see a spinning celestial disco ball.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5efb560fa44d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I have realized my DVD-streaming dreams]]></title>
            <link>https://bobglickstein.medium.com/i-have-realized-my-dvd-streaming-dreams-5769de5a0c0?source=rss-40f6292862ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/5769de5a0c0</guid>
            <dc:creator><![CDATA[Bob Glickstein]]></dc:creator>
            <pubDate>Sat, 09 Jan 2021 21:47:08 GMT</pubDate>
            <atom:updated>2024-10-03T22:38:20.961Z</atom:updated>
            <content:encoded><![CDATA[<p>A little procrastination made it easier than I ever thought possible</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nqzwTmjH5YuvtcCrxzj5gg.png" /></figure><p>One afternoon in the 1980’s I got to visit the Pittsburgh apartment of filmmaker George Romero. Among the delights of that visit for this budding cinephile was the wall of shelves filled, floor to ceiling, with hand-labeled VHS tapes of famous movies. Classic films, popular films, important films, silly films. My eyes popped out of my head at each title I read. I resolved then and there someday to have my own such wall.</p><p>A decade later I resolved to rid myself of the movies on VHS that were plaguing me. I didn’t have just one neat wall of them: they were in stacks and mounds all over my house. I had been diligently, perhaps obsessively, recording them from premium cable TV services for years. To save space and money I recorded them in <a href="https://www.techwalla.com/articles/what-is-sp-lp-and-slp">“SLP” mode</a>, fitting up to three movies on a tape at the expense of image quality — and that was when the recording was new. As was well-known even then, the quality of a VHS recording degrades rapidly (leading filmmaker James Cameron to give this technology the memorable label, “crap-vision”). Some of my recordings had become all but unwatchable.</p><p>And almost insultingly, a flood of titles was now becoming available on a newfangled technology called DVD, with theater-quality audio, clear, uncropped widescreen images that <em>didn’t</em> degrade, random-access chapter stops, and irresistible special features like vintage trailers and commentary tracks. By now I had a little money to spend and so started building my DVD library.</p><p>You can see where this is going, right? Before too many more years, with my VHS collection consigned to the trash heap, it was my DVD collection crowding us out of house and home, especially now that my wife and I had started a family and we needed the space for Thomas trains and Lego. But what could replace it? Not Netflix’s DVD-by-mail service; excellent as it was, it still involved unacceptable delays when the impulse to see a particular title struck, and occasionally would fail to have a desired disc available (a problem that has only worsened over time). And not the streaming services that arose in the 2010’s, with their haphazard patchwork of ever-expiring or <a href="https://blog.blcklst.com/in-search-of-the-last-great-video-store-efcc393f2982">unobtainable</a> licenses.</p><p>No, the solution clearly was to rip my DVD’s and store them as computer files.¹ This could be done at the cost of hundreds of megabytes per title, if I were willing to <a href="https://en.wikipedia.org/wiki/Transcoding">transcode</a> the resulting rip to a compressed format (using something like <a href="https://handbrake.fr/">Handbrake</a>). But I wasn’t willing: that would sacrifice alternate audio tracks, menus, chapter stops, and more. I wanted a bit-for-bit <em>backup</em> of my DVD’s, at the cost of six or eight <em>gigabytes</em> per title (easily done with the <a href="https://wiki.archlinux.org/index.php/dvdbackup">dvdbackup</a> tool, which duplicates the <a href="https://en.wikipedia.org/wiki/ISO_9660">ISO-9660</a> filesystem that discs contain; and then the <a href="https://wiki.debian.org/genisoimage">genisoimage</a> tool, which bundles the resulting hierarchy of files and folders into a single big file).</p><p>That storage requirement, multiplied by the number of discs I owned, was formidable. I envisioned needing to stash a great honkin’ <a href="https://en.wikipedia.org/wiki/Network-attached_storage">NAS server</a> in a closet somewhere and running Ethernet to my living room.</p><p>At some point it dawned on me that if I were willing to pay a cloud-services provider like Amazon or Google to store my backed-up DVD’s, I wouldn’t need that NAS.</p><p>Once I could deliver the bits of my backed-up DVD’s to my living room one way or another, what software could play them back on my TV as if the disc were present? Here I lucked out: there was already a mature open-source package called <a href="https://kodi.tv/">Kodi</a> (formerly xbmc) that fit the bill.</p><p>I started teaching myself about how to build a home-theater PC. It would have to be silent — no noisy fans to interfere with movie-watching — and able to display sixty frames per second on the 4K TV I hoped to have someday. Another tall order, requiring expensive components and the willingness to risk destroying them by soldering them together with limited expertise.</p><p>I would write the necessary software bridging the gap between Kodi and the cloud storage system where my backed-up DVD’s lived.</p><p>As the Covid-19 pandemic descended and we were all condemned to shelter in place for an indefinite period, the time finally seemed right to get serious about this project. And then something glorious happened: Google introduced the latest version of its <a href="https://store.google.com/us/product/chromecast_google_tv">Chromecast</a> streaming dongle.</p><p>A Chromecast is a tiny, silent computer! With fast wireless networking! And the ability to display sixty frames per second on a 4K TV! Best of all, the latest version can run Android apps — including the Android version of Kodi.</p><p>Suddenly I had almost everything I needed, for the low low price of fifty bucks, plus 6–8 cents per month to store each of my ripped discs in Google Cloud Storage. Say what you will about the dumpster fire that was 2020 — it gave us this. All that was left was to write the software to deliver data from Google Cloud Storage in a format that Kodi could use. This I did at <a href="https://github.com/bobg/kodigcs">github.com/bobg/kodigcs</a>, and made it available as open source, like Kodi itself. The whole thing works like a hose and has made lockdown more tolerable. Even better is the thought that it might do the same for you. I only regret that this didn’t all happen in time for George Romero to enjoy it too.</p><p>¹ — Here it’s worth mentioning the fuzzy legality surrounding the practice of ripping DVD’s. What’s clearly illegal is making a duplicate of a copyrighted work available to anyone else. (I am not a lawyer, but this presumably includes selling or giving away the original disc once you’ve backed it up.) It’s less clear how acceptable it is to make backups (or “format shifts”) for personal use. Some information on the topic can be found at <a href="https://en.wikipedia.org/wiki/Ripping#Legality">https://en.wikipedia.org/wiki/Ripping#Legality</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5769de5a0c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tenant isolation in hosted services]]></title>
            <link>https://bobglickstein.medium.com/tenant-isolation-in-hosted-services-d4eb75f1cb54?source=rss-40f6292862ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4eb75f1cb54</guid>
            <category><![CDATA[database-development]]></category>
            <category><![CDATA[multitenancy]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Bob Glickstein]]></dc:creator>
            <pubDate>Tue, 21 Jan 2020 03:48:04 GMT</pubDate>
            <atom:updated>2020-01-21T03:48:04.199Z</atom:updated>
            <content:encoded><![CDATA[<p>This article describes a new technique for achieving safety when hosting online services, with respect to customer-data security. It also presents an open-source software package, <a href="https://github.com/bobg/pgtenant">pgtenant</a>, implementing this technique.</p><p>When you host an online service for multiple customers, particularly one that stores sensitive information on their behalf, one of the challenges you must solve is to ensure that each customer can only ever access <em>their own data</em> and never someone else’s. This should be true even in case of programming errors.</p><p>If the data were stored in plain files, it might suffice to place each customer’s data in its own separate folder or directory. It would be hard for a software bug accidentally to deliver the wrong customer’s data¹ — it would <em>actively</em> have to circumvent the separate-folders safeguard. This makes it a pretty safe approach.</p><p>However, very often data in online services is stored partly or entirely in relational databases rather than in plain files. In a relational database, there are a couple of ways to get the same effect as separating files into different folders. One is simple and safe, but costly in terms of computing resources. Another is economical but error-prone: bugs that leak data to the wrong customer can happen <em>passively</em>, by leaving out necessary logic. This is so easy to do accidentally that it’s almost inevitable.</p><p>The customers whose data you store are sometimes called “tenants” of your service, and the problem of keeping their data properly separated is called “tenant isolation.” This article describes a new approach to tenant isolation— an approach both economical and safe.</p><h3>Background</h3><p>In a relational database, information is collected into <em>tables</em>. Each table defines some number of <em>columns</em>. Data is then added to the table in <em>rows</em>, each row consisting of values for each of the table’s defined columns. This may sound complicated but is in fact dead simple. Here is the time-honored example of an “employee” table in a hypothetical HR database:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*YinmPCR-S0L58ABx86G9uA.png" /></figure><p>Here, the columns are Name, SSN, Hire date, and Salary. There are two rows, one for each of two employees.</p><p>To extract information from a relational database, one writes queries in SQL, the Structured Query Language. With SQL it is possible to say “show me the names of employees hired before 2005” or “show me the SSN of Alice Smith.” Those queries look something like this:</p><pre>SELECT Name FROM Employees WHERE HireDate &lt; &#39;1/1/2005&#39;;<br>SELECT SSN FROM Employees WHERE Name = &#39;Alice Smith&#39;;</pre><p>Now imagine that this database is not internal to a single company’s HR department, but is instead part of a cloud-hosted HR service. Suppose that many companies use this service to store and manage information about their employees. Then each such company is a tenant of the database, and it’s up to the HR-service provider to isolate the tenants from each other.</p><p>One approach is to create separate instances of the database, one per tenant. Software querying data from one instance would have a very hard time mistakenly getting data from a different instance. But multiple instances are slow to set up and expensive to run. This is the “simple, safe, but costly” option mentioned above.</p><p>Another approach, and by far the more common, is to combine all tenants’ data into a single database, and to distinguish one tenant’s data from another’s by adding a “tenant ID” column to each row of each table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*43wCtXNSNk6kA3pQVm7SEg.png" /></figure><p>Imagine someone from ThingTech wants a list of employees earning more than 35,000. They ask the HR service for this information, and behind the scenes the HR service turns this into a SQL query like this:</p><pre>SELECT Name FROM Employees WHERE Salary &gt; 35000;</pre><p>The list comes back: Alice Smith, Carla Doe, and Don Baker. “Who are Carla Doe and Don Baker?” wonders the ThingTech employee. The software has leaked StuffCo’s data in response to ThingTech’s query.</p><p>To prevent this, the software is required to narrow each search to a specific tenant ID, like this:</p><pre>SELECT Name FROM Employees WHERE Salary &gt; 35000<br>  AND TenantID = &#39;ThingTech&#39;;</pre><p>The problem is that a typical service will have many different tables and many different queries against them. The developers of the service must remember to include a tenant ID column in every table and a “TenantID =” clause in every query. This is bound to get overlooked from time to time. This is the “economical but error-prone” approach.</p><h3>Automation to the rescue</h3><p>A data-leaking bug is likely because the same thing needs to be done to very many SQL queries. (Namely, the inclusion of a tenant-ID clause.) When something is mindless and repetitive it’s easy occasionally to skip that step by mistake.</p><p>However, when something is mindless and repetitive it is the perfect candidate for automation by software. We’d have greater faith in the tenant-ID approach if, before executing any database query, we could somehow ensure that it included a proper “TenantID =” clause.</p><p>One way to achieve this would be to design a SQL query builder. Instead of putting query strings like this directly into our code:</p><pre>SELECT Name FROM Employees WHERE Salary &gt; 35000;</pre><p>we would instead ask the builder to create those query strings for us, by telling the builder what kind of query we want. The builder would unfailingly include a “TenantID =” clause in its result.</p><p>For simple queries, this isn’t too bad:</p><pre>builder := NewSQLBuilder(“ThingTech”)<br>builder.Select(“Name”)<br>builder.Table(“Employees”)<br>builder.Where(“Salary &gt; 35000”)<br>sql := builder.Query()</pre><p>but this interface is inadequate for expressing more complex queries. We might try to elaborate the builder API to make it more expressive, but the more different kinds of queries one wants to describe to the builder, the closer one comes to redesigning all of SQL, only badly.</p><p>Also, to someone reading our code, a series of calls to a SQL builder is never as clear as the simple SQL string they replace. Readability is a very high priority in software engineering. Sacrificing it makes it likely that in the zeal to avoid one kind of bug we just introduce other new ones.</p><p>Happily, there is another way, in which we continue to write SQL strings in our code, but those strings are prevented from getting to the database before they can be made tenant-safe. In other words, we continue writing:</p><pre>SELECT Name FROM Employees WHERE Salary &gt; 35000;</pre><p>and rely on a transformation layer converting this automatically to</p><pre>SELECT Name FROM Employees WHERE Salary &gt; 35000<br>  AND TenantID = &#39;ThingTech&#39;;</pre><p>on its way to being executed by the database.</p><p>This involves much more than just pasting “AND TenantID =” onto the end of every query. The transformer needs to <em>parse</em> each query and understand what is in it. If it involves multiple tables, it needs to add a tenant-ID clause for each table. If it doesn’t have a WHERE clause, it has to add one. If it has a WHERE clause with a top-level “OR,” it has to parenthesize it before adding an “AND.” And of course if any other clauses follow the WHERE (such as “<a href="https://www.postgresql.org/docs/9.6/queries-table-expressions.html#QUERIES-GROUP">GROUP BY</a>” or “<a href="https://www.postgresql.org/docs/9.6/queries-limit.html">LIMIT</a>”), it has to make sure the tenant-ID checks get inserted in the right spot.</p><p>This is the approach taken in <a href="https://github.com/bobg/pgtenant">pgtenant</a>, the Go package implementing these ideas. It creates a tenant-specific wrapper for a database-connection object. The wrapper intercepts each attempt to execute a query. It transforms that query using a caller-supplied column name (such as TenantID) and value for the tenant-ID before issuing it to the database.</p><p>With this approach we no longer have to remember to include “AND TenantID =” in the SQL queries we write. We do have to remember to include a tenant-ID column in every table we create, but if we ever forget, we’ll quickly discover and fix the mistake, because the first query that tries to use that table will fail with a “no such column” error, after being transformed to expect a TenantID column.</p><p>The SQL transformer in pgtenant understands many types of SQL query but not every possible one. There are several features of SQL that pgtenant has never yet been needed for, and so to save time and effort those features have been omitted from pgtenant. We are content for the transformer to produce an error if it ever encounters a query it isn’t programmed to handle. Encountering such an error is our cue to update the transformer so that it <em>can</em> understand that kind of query. In this way the capabilities of the transformer expand incrementally.</p><p>Because of this, if you use pgtenant in your software, there is the possibility of introducing new, unhandled queries, and not discovering the mistake until after a release to production. This would result in users sometimes encountering no-such-column errors: not as bad as a data leak, but still undesirable.</p><p>Good testing practices should help to prevent this from happening. Every query in your codebase can be added to a test suite. The pgtenant transformer must demonstrate its ability to transform every query correctly before the tests can pass, and there should be no software release without passing tests.</p><p>But even great testing practices are never perfect. As with the original problem of having to remember a “TenantID =” clause in every query, now we have to remember to add every query, anywhere in the codebase, to a test suite, and sometimes this can be overlooked.</p><p>To help you remember to test every query, pgtenant requires you to specify a <em>whitelist</em> of all permitted queries. The database wrapper refuses to issue any query to the database that doesn’t appear in this list. It’s easy to use the same list of queries for both the whitelist and a test suite. You might overlook adding a query to the test suite; you’re less likely to overlook adding it to both the test suite and the whitelist.²</p><p>Database queries are often static: they are known ahead of time, they’re hard-coded into the software, and they can be whitelisted in this way.³ Some queries are dynamic: they are assembled only when needed, from query fragments based on user input. There are too many possibilities to enumerate in advance and therefore they can’t be included in the whitelist. For cases like these pgtenant includes an “escape hatch” that allows unwhitelisted queries to pass through to the database — after transformation, of course.</p><h3>The implementation</h3><p>Pgtenant is written in Go and can be found at <a href="https://github.com/bobg/pgtenant">github.com/bobg/pgtenant</a>. Access to the database happens through Go’s built-in <a href="https://golang.org/pkg/database/sql/">database/sql</a> package. A third-party package, <a href="https://github.com/lfittl/pg_query_go">github.com/lfittl/pg_query_go</a>, parses SQL queries.</p><p>SQL, the language, is (somewhat) standardized and is (somewhat) the same across many types of database — Postgresql, MySQL, and Oracle, among others. But the details of connecting to a database server, sending SQL queries to it, and collecting results are completely different. These differences are encapsulated by Go into the <a href="https://golang.org/pkg/database/sql/driver/">database/sql/driver</a> package. Each database type implements its own version of the driver.Driver interface, which is responsible for opening database connections. Those connections must satisfy the driver.Conn interface, which is where the logic for issuing queries and collecting responses lives.</p><p>Pgtenant thus has its own implementation of driver.Conn — and therefore also a driver.Driver whose Open method can produce one — as a wrapper around a Postgresql driver.Conn object (from the <a href="https://github.com/lib/pq">github.com/lib/pq</a> package). Our driver.Conn transforms its input into tenant-safe form before passing it along to the Postgresql one.</p><p>Our Driver type appears <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/driver.go#L12-L37">here</a>. Its Open and OpenConnector methods use a pq.Connector that can open a nested Postgresql connection. That nested connector is created <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/driver.go#L63">here</a> and its Connect method called <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/driver.go#L78">here</a>.</p><p>We ensure that the nested connection we receive satisfies <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L15-L24">our </a><a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L15-L24">ctxConn interface</a>, which is just a collection of database/sql/driver-defined interfaces that our connection type needs. We then put the new nested connection into our own Conn object, defined <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L26-L30">here</a>.</p><p>Our Conn object defines some driver.Conn methods, like <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L101-L109">Close and </a><a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L101-L109">Begin</a>, very simply: by delegating to the nested connection it contains. <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L117">QueryContext</a> and <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L139">ExecContext</a> also delegate to the nested connection, but they do query transformation first, via the method <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L35">Conn.transform</a>.</p><p>Transforming a query string begins by <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L36">“normalizing” it</a> to remove variations in whitespace that would destroy its ability to be used as a lookup key. Once that’s done, it’s used to <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L37">index the whitelist</a> (defined <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/driver.go#L34">here</a>). This is the aforementioned list of permitted queries and their transformations. If it’s found there, the result is simply returned as-is.</p><p>If the query is not in the whitelist, then it has to have been explicitly permitted with the aforementioned “escape hatch”: <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/context.go#L16-L21">the </a><a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/context.go#L16-L21">pgtenant.WithQuery function</a>, which attaches the query to the <a href="https://golang.org/pkg/context/">Context</a> object for the current request. (<a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/example_test.go#L55">Here</a> is a simple example of WithQuery being used to permit a query that does not appear in the whitelist.) If it hasn’t been, an error is returned (<a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L41">here</a>).</p><p>If that test succeeds, then as an optimization <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L43-L45">we check a cache</a> to see if we’ve recently transformed the same query, and if we have, we return the cached output.</p><p>Finally, if it’s not a precomputed or a recent transformation, <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L47-L50">we parse the query</a> into a syntax tree, <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L51-L54">run </a><a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L51-L54">doTransform on it</a>, then <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L55">cache the result</a> and return it.</p><p>The doTransform function first walks the syntax tree looking for the highest-numbered positional parameter referred to in the query. These are the $1, $2, … placeholders that get filled in at runtime with the value arguments passed to QueryContext and ExecContext. Our tenant ID will be appended to those values (see below), so it gets a positional parameter with a number that’s <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L60">one higher</a> than the highest one already in the query. After choosing a number for the tenant ID positional parameter, doTransform instantiates <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L61-L64">a transformer object</a> and calls <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L39">its </a><a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L39">transformTree method</a> on the syntax tree.</p><p>The transformTree method is a thin wrapper around <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L46">transformStmt</a>, which starts another walk of the syntax tree, passing to its subroutines two new objects: a <a href="https://golang.org/pkg/bytes/#Buffer">bytes.Buffer</a> for collecting the transformed query, and an <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L27">environ</a>, which records information about table names encountered during the tree walk.</p><p>Four top-level statement types are handled: inserts, updates, deletes, and selects. Let’s take a closer look at <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L174">transformSelect</a>, which illustrates the techniques common to all four statement types.</p><p>A Postgresql SELECT statement handled by the transformer has this overall syntax:</p><pre>WITH ctes<br>SELECT targets<br>FROM sources<br>WHERE conditions<br>GROUP BY items<br>HAVING items<br>ORDER BY items<br>LIMIT expression</pre><p>Every part is optional, except for SELECT targets.</p><p>The WITH clause defines some ctes (“common table expressions”), each of which gets a name and behaves like a table for purposes of selecting from or joining with. This is handled <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L175-L178">here</a>. (And <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform_test.go#L312">here</a> is one example of a WITH … SELECT query.)</p><p>Now <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L179">we add the </a><a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L179">SELECT verb to the output</a> (accumulating in the bytes.Buffer from transformStmt, referred to here as w, an io.Writer). At this point, some SELECT statements filter their output with the DISTINCT keyword. This is an example of a SQL feature that pgtenant does not yet support, so if DISTINCT is seen the transformer <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L181">produces an error</a>.</p><p>In <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L183-L214">this section</a>, we list the targets (column names, usually) being selected. We handle SELECT * specially, and <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L195-L197">produce an error</a> if SELECT * appears as part of an INSERT (another not-yet-implemented feature). The targets are a comma-separated list, and each one is individually transformed with <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L506">the </a><a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L506">transformSelectCol method</a> in <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L204">a call to </a><a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L204">commaSeparated</a>. Finally we <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L212">add the tenant ID column</a> as one of the ones being selected.</p><p>Next <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L215-L222">we handle the </a><a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L215-L222">FROM clause</a>. Its items are also produced by the commaSeparated function, with each item individually transformed, this time by transformNode. Then we handle the <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L223-L226">WHERE</a>, <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L227-L233">GROUP BY</a>, <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L234-L240">HAVING</a>, <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L241-L263">ORDER BY</a>, and <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L264-L270">LIMIT</a> clauses, and then we’re done.</p><p>As you can see, most of this logic is dedicated simply to walking the syntax tree in order to re-render the SQL string that produced it in the first place. In fact this is true for most of the rest of transform.go, too. The changes that are needed to the original SQL are few:</p><ul><li>When we encounter INSERT INTO table (column, …) <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L93">we add the tenant ID column name</a> to the list of columns.</li><li>If it’s an INSERT … VALUES <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L120">we add the tenant ID value</a> to the list of values (to match the column name we added to the column list).</li><li>If it’s an INSERT … SELECT instead, we rely on <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L105">a nested call to </a><a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L105">transformSelect</a> to add the tenant ID value.</li><li>If the INSERT has an ON CONFLICT clause, <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L142">we add the tenant ID column name</a> to the list of columns.</li><li>When we encounter a WHERE, <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L338-L347">we add an </a><a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L338-L347">AND tenantIDColumn = tenantIDValue</a> for each table involved. (And when we don’t encounter a WHERE, <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/transform.go#L284-L296">we sometimes add one</a>.) Expressions are parenthesized as needed to prevent ambiguity, so for example WHERE foo = $1 OR bar = $2 becomes WHERE (foo = $1 OR bar = $2) AND tenant_id = $3.</li></ul><p>Back to the QueryContext or ExecContext call that initiated query transformation. Once the transformed query is ready, with its added positional parameter for the tenant ID column, a value for that parameter must be appended to the list of query arguments supplied by the caller. This happens <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L128">here</a> and <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L150">here</a>.</p><p>The value for the tenant ID comes from the Context object, using the ID function (<a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L123">here</a> and <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/conn.go#L145">here</a>). Naturally the tenant ID must have been attached to the Context object at some earlier point, using WithTenantID. An example is <a href="https://github.com/bobg/pgtenant/blob/a38ab5289f611b486c81b6cc20ce72bccf0a898f/example_test.go#L39">here</a>.</p><p>This technique has proven itself through years of trouble-free deployment in hosted services with dozens of tenants. It achieves high performance by caching the transformation of most queries, avoiding on-the-fly transformation. It achieves correctness by using those transformations as test vectors, and safety by funneling all database calls through the transformation layer.</p><p>Although this implementation is specific to Postgresql, the general approach is suited for all SQL databases.</p><h3>Endnotes</h3><ol><li>Especially if the software takes certain precautions to make wrong-customer data difficult or impossible to access, such as using chdir or chroot before performing data-related operations.</li><li>Since the test vector includes input strings together with their expected post-transformation output, the test vector, which is also a whitelist, serves a <em>third</em> role as a precomputed cache of transformed queries, improving performance by relieving us of having to invoke the transformer at runtime.</li><li>With a query like SELECT Name FROM Employees WHERE Salary &gt; 35000, the 35000 is not actually part of the query. It’s supplied separately, as an argument, so the same query can be used for any salary threshold without having to list every possible variant. The query string itself is SELECT Name FROM Employees WHERE Salary &gt; $1, and $1 is replaced with argument number 1 at query time.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4eb75f1cb54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[All for nothing?]]></title>
            <link>https://bobglickstein.medium.com/all-for-nothing-1144db0b90a3?source=rss-40f6292862ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/1144db0b90a3</guid>
            <category><![CDATA[star-wars]]></category>
            <dc:creator><![CDATA[Bob Glickstein]]></dc:creator>
            <pubDate>Fri, 20 Dec 2019 15:56:17 GMT</pubDate>
            <atom:updated>2019-12-20T15:56:17.152Z</atom:updated>
            <content:encoded><![CDATA[<p>See <em>Star Wars: The Rise of Skywalker</em> in 3D. When it begins, and the title and opening crawl recede into the the starry backdrop, the depth effect is amazing. It is the best part of the movie.</p><p>The second best part of the movie is five seconds near the very end: a wordless look that passes between Oscar Isaac’s Poe Dameron and another character. You’ll know it when you see it. That Oscar Isaac — he can do more with a look than the rest of the movie can do with $XX million in special effects. It’s worth the price of admission.</p><p>The third best part of the movie is the subversiveness of casting Keri Russell, a famously beautiful woman, as a character whose face we don’t even see.</p><p>The fourth best part of the movie is that they never mention midichlorians.</p><p>The fifth best part of the movie is that John Williams gets a blink-and-you’ll-miss-it on-screen cameo.</p><p>The sixth best part of the movie came after it ended. As my wife and I drove home, there was a long stretch of baffled silence while we separately mulled over what we had both just seen, and she suddenly exclaimed, “What?!” in a way that caused us both to laugh and laugh and laugh.</p><p>The relationship of <em>The Rise of Skywalker</em> to <em>Star Wars</em> is the same as that of the modern-day Church to the original teachings of Jesus: the result of generations of people with opinions and ambition troweling layers of ponderous meaning and import on top of something that once was compact and simple and wonderful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1144db0b90a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>