President Donald Trump delivers a private, prophetic warning to Christian leaders about what’s happening in the country and how the midterms are going to be a referendum on your religion.
Christians are so fragmented and scattered we don’t have a coherent mechanism for sharing messages like the left has. That needs to change! We must spread the word, and take over these midterm elections.
Goodbye, Clean Code
It’s a Phase
Obsessing with “clean code” and removing duplication is a phase many of us go through. When we don’t feel confident in our code, it is tempting to attach our sense of self-worth and professional pride to something that can be measured. A set of strict lint rules, a naming schema, a file structure, a lack of duplication.
You can’t automate removing duplication, but it does get easier with practice. You can usually tell whether there’s less or more of it after every change. As a result, removing duplication feels like improving some objective metric about the code. Worse, it messes with people’s sense of identity: “I’m the kind of person who writes clean code”. It’s as powerful as any sort of self-deception.
Once we learn how to create abstractions, it is tempting to get high on that ability, and pull abstractions out of thin air whenever we see repetitive code. After a few years of coding, we see repetition everywhere — and abstracting is our new superpower. If someone tells us that abstraction is a virtue, we’ll eat it. And we’ll start judging other people for not worshipping “cleanliness”.
I see now that my “refactoring” was a disaster in two ways:
Firstly, I didn’t talk to the person who wrote it. I rewrote the code and checked it in without their input. Even if it was an improvement (which I don’t believe anymore), this is a terrible way to go about it. A healthy engineering team is constantly building trust. Rewriting your teammate’s code without a discussion is a huge blow to your ability to effectively collaborate on a codebase together.
Secondly, nothing is free. My code traded the ability to change requirements for reduced duplication, and it was not a good trade. For example, we later needed many special cases and behaviors for different handles on different shapes. My abstraction would have to become several times more convoluted to afford that, whereas with the original “messy” version such changes stayed easy as cake.
Am I saying that you should write “dirty” code? No. I suggest to think deeply about what you mean when you say “clean” or “dirty”. Do you get a feeling of revolt? Righteousness? Beauty? Elegance? How sure are you that you can name the concrete engineering outcomes corresponding to those qualities? How exactly do they affect the way the code is written and modified?
I sure didn’t think deeply about any of those things. I thought a lot about how the code looked — but not about how it evolved with a team of squishy humans.
Coding is a journey. Think how far you came from your first line of code to where you are now. I reckon it was a joy to see for the first time how extracting a function or refactoring a class can make convoluted code simple. If you find pride in your craft, it is tempting to pursue cleanliness in code. Do it for a while.
But don’t stop there. Don’t be a clean code zealot. Clean code is not a goal. It’s an attempt to make some sense out of the immense complexity of systems we’re dealing with. It’s a defense mechanism when you’re not yet sure how a change would affect the codebase but you need guidance in a sea of unknows.
Let clean code guide you. Then let it go.
The Mind Meld of Bill Gates and Steven Pinker
Mr. Gates readily acknowledged that the person he is today is not one he would have recognized when he was in his 20s and single-mindedly building Microsoft. “I was a zealot,” he said. “I didn’t believe in weekends. I didn’t believe in vacations. I knew everybody’s license plate so I knew when they were coming and going. That was my life: doing great software.”
.. Plus, you don’t want a tech company run by somebody in their 60s. At least I didn’t want to. I ended up retiring at 53.
.. But for a young man in his 20s, writing software night and day may be the best way to add to human welfare. I’d never heard of vaccines. I didn’t have any money. But the personal computer, the internet, hey, that’s what I was good at. And I enjoyed doing it every day.
.. I came across statistics that homicide rates in the Middle Ages were about 35 times what they are today in Europe. When I posted this online, I started receiving correspondence citing more examples: The rate of death in warfare has come down by a factor of 20 since 1945. Domestic violence is down. Child abuse is going down. I was sitting on all these data sets showing reductions in violence that few people were aware of that I thought ought to be better known.
.. That “things getting better” is the greatest story that no one knows.
.. there’s the idea that we can’t want something good for ourselves without wanting it for everyone.
.. What makes Papua New Guinea — where there’s no police and revenge after revenge — different from Western society is that when we give ourselves over to the law, we want it to be executed impartially. We gain stability. But if you could get your son off, of course you’ll try.
.. the proposition, Philip — which comes from Spinoza. He said those under the influence of reason desire nothing for themselves that they do not desire for all humankind. But reason is not a powerful part of human nature. Innately, we favor family over strangers, our tribe over other tribes. It’s only when we’re called upon to justify our beliefs — not consult our gut feelings, but convince others of the right way to act — that we conclude that all lives have equal value.
.. when you consider a radical change, like “Hey, let’s tear up the global trade agreements; they’re a disaster,” you’re more likely to implement it if you think things are getting worse. “Let’s tear up the treaties. Let’s try a nondemocratic approach.” Your willingness to go off the current path is much, much higher.
.. There’s a tendency in journalism and political debates to assume that it’s easy to achieve a perfect society: “Good people would do that.” The fact that we don’t means that evil people must be running the system: “Let’s throw them out and find nobler ones.” This leads to empowering charismatic despots and destroying institutions that have done a lot of good.
.. I’m sure Bill gets this all the time: “Why throw money at the developing world? They’re just going to have more babies and be just as poor.”
.. What indicator improves even faster than reduction in violence? Our distaste for violence. We’re more upset about it today. If I see someone spanking a kid — I’m stealing from Steven’s book — I might get up and say: “Hey, wait a minute!” Forty years ago, it might have been more like: “Do you want to borrow my belt?”
.. Extreme global poverty has been reduced from 90 percent 200 years ago to 10 percent today.
.. The person who invents an affordable and efficient toilet should be made a saint.
Think how much human happiness will be granted, how much human suffering eliminated. We should think quantitatively; it’s the morally enlightened way. But it’s not the way our brains evolved when we make moral evaluations.
.. One of the biggest enemies of reason is tribalism. When people subscribe to an ideology, they suck up evidence that supports their preconceptions and filter out evidence that goes against them. Contrary to the belief of most scientists that denial of climate change is an effect of scientific illiteracy, it is not at all correlated with scientific literacy. People who believe in man-made climate change don’t know any more about climate or science than those who deny it. It’s almost perfectly correlated with left-wing versus right-wing orientation
.. But I’m optimistic. I do think awareness of how things have worked is important to recreate a conservative center — that is, make us careful about what we change.
.. innovation is not viewed as an unalloyed way to improve the human condition. And that’s fair, because it’s not pure. Does social media split us into tribes in a way that’s dangerous? Does it create, even in high school social circles, a channel for bullying, or a desire to look perfect in photos?
.. There are certain things that governments are always going to do better than private innovators. Basic research, for instance.
.. PG: Name a problem we may think of as intractable that you’re optimistic about solving in the near future.
SP: War between countries. Civil wars are harder to eliminate because there are so many insurgent and militia forces. But there are only 192 countries. They could agree not to declare war on each other. I think we’re on the way.