The following is a very lightly edited version of email I wrote to my apprentice Ian Bruene after he wrote documentation for his new Kommandant project that was, alas, as awful as I generally expect from programmers. I’m not training Ian for mere coding competence; he’s too talented for that and anyway I have higher standards. This is my way of insisting that he do documentation well – and it was he who suggested it would make a good blog post.
Time to make it public and official. The entire reposurgeon suite (not just repocutter and repomapper, which have already been ported) is changing implementation languages from Python to Go. Reposurgeon itself is about 50% translated, with pretty good unit-test coverage. Three of my collaborators on the project (Daniel Brooks, Eric Sunshine, and Edward Cree) have stepped up to help with code and reviews.
I’m posting about this because the pressures driving this move are by no means unique to the reposurgeon suite. Python, my favorite working language for twenty years, can no longer cut it at the scale I now need to operate – it can’t handle large enough working sets, and it’s crippled in a world of multi-CPU computers. I’m certain I’m not alone in seeing these problems; if I were, Google, which used to invest heavily in Python (they had Guido on staff there for a while) wouldn’t have funded Go.
Some of Python’s issues can be fixed. Some may be unfixable. I love Guido and the gang and I am vastly grateful for all the use and pleasure I have gotten out of Python, but, guys, this is a wake-up call. I don’t think you have a lot of time to get it together before Python gets left behind.
I’ll first describe the specific context of this port, then I’ll delve into the larger issues about Python, how it seems to be falling behind, and what can be done to remedy the situation.
It not news to readers of this blog that I like to find common tactics and traps in programming that don’t have names and name them. I don’t only do this because it’s fun. When you have named a thing you give your brain permission to reason about it as a conceptual unit. Bad jargon obfuscates, map hiding territory; good jargon reveals, aiding reflection on and and improvement of your practice.
In my last post I coined “shtoopid problem”. It went viral; every programmer has hit this, and it’s useful to have the term because you can attach to it recognition rules and tactics for escaping such traps. (And not only in programming; consider kafkatrapping).
Today’s invention is the term “rule-swarm attack”. It’s derived from the military term “swarm attack” and opposed to “deep reasoning”, “structural analysis” and “generative rules”. I’ll explain it and provide some case studies.
There is a kind of programming trap I occasionally fall into that is so damn irritating that it needs a name.
The task is easy to specify and apparently easy to write tests for. The code can be instrumented so that you can see exactly what is going on during every run. You think you have a complete grasp on the theory. It’s the kind of thing you think you’re normally good at, and ought to be able to polish off in 20 LOC and 45 minutes.
And yet, success eludes you for an insanely long time. Edge cases spring up out of nowhere to mug you. Every fix you try drags you further off into the weeds. You stare at dumps from the instrumentation until you’re dizzy and numb, and no enlightenment occurs. Even as you are bashing your head against a wall of incomprehension, consciousness grows that when you find the solution, it will be damningly simple and you will feel utterly moronic, like you should have gotten there days ago.
Welcome to programmer hell. This is your shtoopid problem.
I just posted the following to the Linux kernel mailing list.
Most of you know that I have spent more than a quarter century analyzing the folkways of the hacker culture as a historian, ethnographer, and game theorist. That analysis has had large consequences, including a degree of business and mainstream acceptance of the open source way that was difficult to even imagine when I first presented “The Cathedral and the Bazaar” back in 1997.
I’m writing now, from all of that experience and with all that perspective, about the recent flap over the new CoC and the attempt to organize a mass withdrawal of creator permissions from the kernel.
I’m going to try to keep my personal feelings about this dispute off the table, not because I don’t have any but because I think I serve us all better by speaking as neutrally as I can.
First, let me confirm that this threat has teeth. I researched the relevant law when I was founding the Open Source Initiative. In the U.S. there is case law confirming that reputational losses relating to conversion of the rights of a contributor to a GPLed project are judicable in law. I do not know the case law outside the U.S., but in countries observing the Berne Convention without the U.S.’s opt-out of the “moral rights” clause, that clause probably gives the objectors an even stronger case.
I urge that we all step back from the edge of this cliff, and I weant to suggest a basis of principle on which settlement can be negotiated.
Before I go further, let me say that I unequivocally support Linus’s decision to step aside and work on cleaning up his part of the process. If for no other reason than that the man has earned a rest.
But this leaves us with a governance crisis on top of a conflict of principles. That is a difficult combination. Fortunately, there is lots of precedent about how to solve such problems in human history. We can look back on both tragic failures and epic successes and take lessons from them that apply here.
To explain those lessons, I’m going to invite everybody to think like a game theorist for a bit.
Every group of humans trying to sustain cooperation develops an ethos, set of norms. It may be written down. More usually it is a web of agreements that one has to learn by observing the behavior of others. The norms may not even be conscious; there’s a famous result from experimental psychology that young children can play cooperative games without being able to articulate what their rules are…
Every group of cooperating humans has a telos, a mutually understood purpose towards which they are working (or playing). Again, this purpose may be unwritten and is not necessarily even conscious. But one thing is always true: the ethos derives from the telos, not the other way around. The goal precedes the instrument.
It is normal for the group ethos to evolve. It will get pulled in one direction or another as the goals of individuals and coalitions inside the group shift. In a well-functioning group the ethos tends to evolve to reward behaviors that achieve the telos more efficiently, and punish behaviors that retard progess towards it.
It is not normal for the group’s telos – which holds the whole cooperation together and underpins the ethos – to change in a significant way. Attempts to change the telos tend to be profoundly disruptive to the group, often terminally so.
Now I want you to imagine that the group can adopt any of a set of ethoi ranked by normativeness – how much behavior they require and prohibit. If the normativeness slider is set low, the group as a whole will tolerate behavior that some people in it will consider negative and offensive. If the normativeness level is set high, many effects are less visible; contributors who chafe under restriction will defect (usually quietly) and potential contributors will be deterred from joining.
If the normativeness slider starts low and is pushed high, the consequences are much more visible; you can get internal revolt against the change from people who consider the ethos to no longer serve their interests. This is especially likely if, bundled with a change in rules of procedure, there seems to be an attempt to change the telos of the group.
What can we say about where to set the slider? In general, the most successful – most inclusive – cooperations have a minimal ethos. That is, they are just as normative as they must be to achieve the telos, *and no more so*. It’s easy to see why this is. Pushing the slider too high risks internal factional strife over value conflicts. This is worse than having it set too low, where consensus is easier to maintain but you get too little control of conflict between *individuals*.
None of this is breaking news. We cooperate best when we live and let live, respecting that others may make different choices and invoking the group against bad behavior only when it disrupts cooperative success. Inclusiveness demands tolerance.
Strict ethoi are typically functional glue only for small groups at the margins of society; minority regious groups are the best-studied case. The larger and more varied your group is, the more penalty there is for trying to be too normative.
What we have now is a situation in which a subgroup within the Linux kernel’s subculture threatens destructive revolt because not only do they think the slider been pushed too high in a normative direction, but because they think the CoC is an attempt to change the group’s telos.
The first important thing to get is that this revolt is not really about any of the surface issues the CoC was written to address. It would be maximally unhelpful to accuse the anti-CoC people of being pro-sexism, or anti-minority, or whatever. Doing that can only inflame their sense that the group telos is being hijacked. They make it clear; they signed on to participate in a meritocracy with reputation rewards, and they think that is being taken way from them.
One way to process this complaint is to assert that the CoC’s new concerns are so important that the anti-CoC faction can be and should be fought to the point where they withdraw or surrender. The trouble with this way of responding is that it *is* in fact a hijacking of the group’s telos – an assertion that we ought to have new terminal values replacing old ones that the objectors think they’re defending.
So a really major question here is: what is the telos of this subculture? Does the new CoC express it? Have the objectors expressed it?
The question *not* to get hung up on is what any individual’s choice in this matter says about their attitude towards, say, historically underepresented minorities. It is perfectly consistent to be pro-tolerance and pro-inclusion while believing *this* subculture ought to be all about producing good code without regard to who is offended by the process. Not every kind of good work has to be done everywhere. Nobody demands that social-justice causes demonstrate their ability to write C.
That last paragraph may sound like I have strayed from neutrality into making a value claim, but not really. It’s just another way of saying that different groups have different teloi, and different ethoi proceeding from them. Generally speaking (that is, unless it commits actual crimes) you can only judge a group by how it fulfills its own telos, not those of others.
So we come back to two questions:
1. What is our telos?
2. Given our telos, do we have the most inclusive (least normative) ethos possible to achieve it?
When you have an answer to that question, you will know what we need to do about the CoC and the “killswitch” revolt.
Email archive thread at: https://lkml.org/lkml/2018/9/23/212
In my last two blog posts, on the attempted hijack of the Lerna license and speech suppression in the Python documentation, I have both urged the hacker culture to stay out of political issues and urged what some people will interpret as “political” stance with regard to political correctness and “diversity”-driven speech demands.
The expected “gotcha!” comments that “ESR is saying hacker projects should stay clear of politics while arguing politics” have duly followed. While the way this sort of objection is usually posed barely rises above the level of a stupid rhetorical trick, there is an actual issue of principle here that deserves exploring.
Comes the news that the Python project has merged a request to partially eliminate the terms “master” and “slave” from its documentation on “diversity” grounds. Sensibly, Guido van Rossum at least refused to sever the project from uses of those terms in documentation of the underlying Unix APIs.
I wish Guido had gone further and correctly shitcanned the change request as political bullshit up with which he will not put. I will certainly do that if a similar issue is ever raised in one of my projects.
The problem here is not with the object-level issue of whether the terms “master” and “slave” might be offensive to some people. It’s with the meta-level of all such demands. Which the great comedian George Carlin once summed up neatly as follows: “Political correctness is fascism pretending to be manners.”
That is, the demand for suppression of “politically” offensive terms is never entirely or usually even mostly about reducing imputed harms. That is invariably a pretense covering a desire to make speech and thought malleable to political control. Which is why the first and every subsequent attempt at this kind of entryism needs to be kicked in the teeth, hard.
Today I learned that something called the Lerna project has added a codicil to its MIT license denying the use of its software to a long list of organizations because it disagrees with a political choice those organizations have made.
Speaking as one of the original co-authors of the Open Source Definition, I state a fact. As amended, the Lerna license is no longer conformant with the OSD. It has specifically broken compliance with clause 5 (“No Discrimination Against Persons or Groups”).
Accordingly, Lerna has defected from the open-source community and should be shunned by anyone who values the health of that community. I will not contribute to their project, and will urge others not to, until and unless this change is rescinded.
We wrote Clause 5 into the OSD for a good reason. Exclusions and carve-outs like Lerna’s, if they became common, would create tremendous uncertainty about the ethics and even the legality of code re-use. Suppose I were to take a snippet from Lerna code and re-use it in a project that (possibly without my knowledge) was deployed by one of the proscribed organizations; what would my ethical and legal exposure be?
It gets worse. Suppose I write code that happened to be identical, or very similar to, portions of Lerna? Could anyone make a case that I was in violation of their license? It is definitely unsafe when a question like that turns on facts of knowledge and intent no one outside a putative violator’s skull can know for certain.
The Lerna project’s choice is, moreover, destructive of one of the deep norms that keeps the open-source community functional – keeping politics separated from our work. If we do not maintain that norm, we risk fractionating into a collection of squabbling tribes arguing particularisms and unable to sustain really large-scale cooperation.
I would consider such a disintegration not merely unpleasant but actually dangerous to civilization, which relies on us for an increasing portion of its critical infrastructure. Accordingly, we need to cooperate more, not less.
That, in turn, means that, even as we may hold strong individual opinions about issues like those motivating Lerna’s proscription list, we need to be more neutral and non-discriminatory in our collective behavior about such issues, not less.
Updare: Less than 24 hours after I posted this, the license change was revoked and its committer expelled from the project. This is how sanity wins – one fightback at a time.
Yesterday a well-meaning hacker sent me a newly-recovered koan of Master Foo in which an angry antagonist berated Master Foo for promoting an ethic of open-source software at the expense of programmers’ livelihoods.
Alas, I knew at once that he had been misled by a forgery, or perhaps some dreadful chain of copying errors, at whatever venerable monastic library had been the site of his research. Not because the economics was wrong – Master Foo persuades the antagonist that his assumption is in error – but because the koan conflates two things that were not the same. Actually, at least three things that are not the same.
Eighteen years into the third millennium, long after the formative events of Master Foo’s time, many people fail to understand how complex and contingent the relationship between the Unix tradition and the open-source ethos actually was in the old days. Too readily we project today’s conditions backwards in a way that impedes understanding of history.
Here’s how it was…
My apprentice and A&D regular Ian Bruene had bad experiences with a cheap home router/WiFi recently, and ranted about it on a channel where I and several other comparatively expert people hang out. He wanted to know how to get a replacement solid enough to leave with non-techie relatives.
The ensuing conversation was very productive, so I’m summarizing it here as a public-service announcement. I’ve put the year in the title because some of the information in it could go stale quickly. I will try to mark each element of the advice with an expected-lifetime estimate.
Even before seeing any of the comments on this post I’m going to say you should read them too. Some of my regulars are more expert than I am about this area.
I think we all better hope we get germ-line genetic engineering and really effective nootropics real soon now. Because I think I have seen what the future looks like without these technologies, and it sucks.
The paper From Terman to Today: A Century of Findings on Intellectual Precocity does a lot of mythbusting.
The recently popular notion that IQ > 120 has little incremental utility is dead false. Even small differences in IQ predict significant differences in creative output and odds of having a top-tier income.
Gifted children (and adults) are not fragile creatures with chronic emotional problems, they are “highly effective and resilient” individuals.
Not stated, but implied: IQ measurement in the upper ranges (above 137) is measuring something precisely enough to justify real-world predictions that differ significantly even over single-digit spans.
Not stated, but implied: Multifactor theories of intelligence are bunk. To a good first approximation there is only g. Otherwise the shapes of the bottom four outcome curves in Figure 3 would have to be more divergent than they are.
“g, fluid reasoning ability, general intelligence, general mental ability, and IQ essentially denote the same overarching construct”
“if graduation from college were based on demonstrated knowledge rather than time in the educational system, a full 15% of the entering freshmen class would be deemed ready to graduate.”
“Failure to provide for differences among students is perhaps the greatest source
of inefficiency in education.”
“Overall, there does not seem to be an ability threshold [even] within the top 1% beyond which more ability does not matter.”
A marked characteristic of the profoundly gifted is “willingness to work long hours.”
I spent 20 minutes under general anesthesia this morning, and had an odd memory afterwards.
It was nothing serious – my first screening colonoscopy, things looked OK, come back in five years – but I hadn’t been under general anesthesia in 40 years (since having molars removed as a teen) and I was self-monitoring carefully.
When I came out of it, I brought with me two memories. One was that I had been aware of people talking around me. The anesthesiologist had told me that might happen, and I wouldn’t have been surprised by it anyway; I’ve read of that effect.
This tells you human beings are really social animals – so much so that we’re partially alert to people-talk even when we’re knocked out. After all (gasp!) our status might change…
I wouldn’t have posted this if the comment thread on “The sad truth about toasters” hadn’t extended to an almost ridiculous length, but…
I dearly love classic American breakfast food. I delight in the kind of cheap hot breakfast you get at humble roadside diners. I think it’s one of the glories of our folk cuisine and will cheerfully eat it any time of the day or night.
I posted a fancy breakfast-for-two recipe a while back (Eggs a la ESR). What follows is the slightly plainer breakfast I make for myself almost every morning. It’s the stable result of a decades-long optimization process – I haven’t found a way to improve it in years.
I bought a toaster today.
I didn’t want to buy a toaster today. About ten years ago I paid $60 for what appeared to be a rather high-end Krups model in accordance with my normal strategy of “pay for quality so you won’t have to replace for a good long time”, an upper-middle-class heuristic that I learned at my mother’s knee to apply to goods even as mundane as light kitchen appliances.
I had reason for hope that I would get a well-extended lifeline for my money. I recalled the toasters of my childhood, chrome and Bakelite battleships one just assumed would last forever, being passed down generations. “Luke, this toaster belonged to your father…an elegant weapon from a more civilized age.”
Alas, it was not to be.
I had a good sword class today. There was much sparring with many different weapons.
At one point, Sensei Varady and I faced off, him with paired shortsword simulants, me with a longsword simulant. It went pretty well for me; sensei is bigger, faster, at least 20 years younger, and more skilled than I am (he runs the school), but he kept letting his guard fall just a _little_ bit too low and I got in three or four good clean kill shots on his left neck-and-shoulder pocket – a favorite target of mine at any blade length.
Understandably this adrenalizes him some and the next time my block is not quite fast enough he fetches me a whack on the ribs that he immediately realizes was way overpowered. Starts apologizing, grins, and says something like “You’re a good, tough fighter, I tend to power up automatically to deal with it.” (Sense exact, words not.)
I said “I am very happy that you treat me with that respect.”
And absolutely meant it. Given a choice between taking a bruise occasionally because the instructor has to play hard to beat me and being ineffectual enough that he always has control of the fight…I’ll take the bruises, thanks. And enjoy how I got them. A lot.
I’ve seen analyses of the long odds the U.S. government would face if it ever attempted to confiscate civilian firearms before. The Mathematics of Countering Tyranny seems like a particularly well done example.
The authors compute that under very generous assumptions there are about 83000 door-knockers available to perform confiscation raids. Dividing that into the estimated number of semiautomatic rifles in the U.S. and assuming that each raid would net three rifles confiscated (which I think is optimistic in the raiders’ favor) each doorknocker would have to execute and survive 864 raids in order for the entire stock of rifles to be seized.
Notice that we’re not even addressing the far larger stock of handguns and other weapons yet. But I’m willing to tilt the conditions of the argument in the confiscators’ favor, because that makes the conclusion more difficult for them to rebut.
There’s a different way to slice these numbers. Applying the 3:1 force ratio military planners like to assume, this means the number of violently resistant gun owners – people willing to shoot a doorknocker rather than watch their country sink into tyranny – needs to be about 249000.
Is this a plausible number?
The NRA has about 5.2 million members. That’s about 1 in 20 NRA members.
According to the General Social Survey in 2013, about 1 in 4 Americans owned guns. That’s 79 million gun owners, and probably an undercount because gun owners are chronically suspicious of the intention behind such questions. But we’ll go with it as an assumption that’s best-case for the doorknockers.
That means that in order to stop attempted gun confiscations dead on a purely force-on-force level, only one in 317 American gun owners needs to remember that our first American Revolution began as spontaneous popular resistance to a gun-confiscation order. Only one in 317 American gun owners need to remember their duty under the U.S. Constitution as members of the unorganized militia – “the body of the people in arms”. Only one in 317 American gun owners need to shoot back.
Is that a plausible fraction? Yes. Yes, I think it is. Count me as one of them.
Why am I publishing these numbers? To persuade the would-be confiscators that their enterprise is doomed to fail in fire and blood, so freedom-loving people never actually have to take on the moral burden of killing them. The fact that we’re ready to do so if we have to does not mean we want that terrible day to arrive.
But eternal vigilance is not the only price of liberty. Eternal deterrence against would-be tyrants – including the threat and in extremis the use of revolutionary violence – is part of that price too. The Founding Fathers understood this. The question is whether a critical fraction of American gun owners today know our duty and would do it.
Here is why I am optimistic on that score: every estimate in this back-of-the envelope calculation has been pushed to the end of the plausible range that favors the confiscators. In fact, the stock of weapons that would need to be confiscated is much larger. The number of gun owners is pretty certainly underestimated. Even getting full compliance with confiscation orders from the agents and local police is unlikely, reducing the effective number of doorknockers.
Correspondingly, the critical fraction of American gun owners that would have to be hard-core enough to resist confiscation with lethal violence in order to stop the attempt is lower than 1 in 317. Probably much lower.
Especially if we responded by killing not merely the doorknockers but the bureaucrats and politicians who gave them their orders. Which would be more efficient, more just, and certain to follow.
There’s a phrase I’ve used on this blog more than once that I had reason to Google just now and found that (to my surprise) the top hits are mostly my writings. It is “defect attractor”.
In this post I’m going to explain why I think this is an important concept that needs to be in the toolkit of every software engineer, and talk about the practice it implies.
I’ve had a strong amateur interest in historical linguistics since my teens in the early 1970s.
Then, as today, a lot of the energy in that field was focused in the origins and taxonomy of the Indo-European family – the one that includes English and the Latin-derived and Germanic languages and Greek and also a large group of languages in northern India and Persia. This is not only because most linguists are Europeans, it’s because there’s a massively larger volume of ancient literature in this family than can be found anywhere else in the world – there’s more to go on.
People have been trying to pin down the origin of the Indo-European language family and identify the people who spoke its root language for literally centuries. Speculations that turn out not to have been far wrong go back to the 1600s(!) and serious work on the problem, some of which is still considered relevant, began in the late 1700s.
However, until very recently theory about Indo-European origins really had to be classed as plausible guesses rather than anything one could call well-confirmed. There were actually several contending theories, because linguistic reconstruction of the root PIE (Proto-Indo-European) language was sort of floating in midair without solid enough connections to archaeological and genetic evidence to be grounded.
This has changed – dramatically – in the last five years. But there isn’t yet any one place you can go to read about all the lines of evidence yet; nobody has written that book as of mid-2018. This post is intended to point readers at a couple of sources for the new science, simply because I find it fascinating and I think my audience will too.
Occasionally I have dreams that seem to be trying to assemble into the plot of an SF novel – weird and fractured as dreams are, but with something like a long-form narrative struggling to develop.
Occasionally I have nightmares. I don’t know how it goes for anybody else – and one reason I’m posting this is to collect anecdotal data in the comments – but if I wake up from a nightmare and then fall asleep shortly afterwards, it may grab hold of me again.
Yesterday morning I woke up about 5AM remembering one I’d just had. This is how it went, and how it ended…