Erin McKean on Master/slave vs Primary/replica

The master/slave debate Thanks to Vijayasarathi R. for the base image! CC BY 2.0

A couple months ago Drupal and Django switched from master/slave to new terminology. The goal was to adopt a term that’s more inclusive. When that happened, a big discussion kicked off around most of the Tech water coolers.

With inclusiveness as a hot topic today, we figured it’s a good time to fire the discussion up again. Iron.io has the good fortune of working in the same place as Erin McKean. Word nerd, crafty dress maker, and CEO / Developer for Wordnik.com.

We grabbed Erin to share some of her thoughts. What’s in a good method name? What’s the most confusing term in programming? What does it mean to move from master/slave?

Read on to find out!

Paul
First, what is Wordnik and what’s happening in your world right now?

Erin
Sure, so Wordnik is the worlds biggest dictionary. We have more words than anybody else. Yesterday we launched a Kickstarter to add even more words. We’re looking for a million words that aren’t included in traditional dictionaries.

What we’re going to do is find example sentences out in the wild that define these words in context. So that once you read the sentences you don’t need the definition. One day in, and we’re almost halfway to our goal.

Very excited at the thought of adding so many overlooked words.

Paul
If somebody wants to contribute, they can obviously send words to Wordnik.com. Is it on the front page?

Erin
Yes! And you can goto Wordnik.com/Kickstarter for a link to the campaign.

Paul
Today I’d like to talk about a big to-do about Drupal and Django changing terms. They both switched from the Master/Slave to Primary/Replica. A lot of people were provoked by the change, saying things like, “it doesn’t matter” or “it doesn’t mean anything.”

Clearly on the other side of the fence, some folks appreciate the change. LA County requested that any usage of master/slave switch to a different term.

I think it’s an interesting topic, specifically responding to the people who say that words don’t matter. In a broader context, naming is a very difficult thing in computer programming.

Erin
Right.

(laughs)

There are only three difficult problems in computer programming: naming and off by one errors.

Paul
(laughs)

That’s a good one.

Erin
(smiles)

It’s a very old joke.

Paul
If a name doesn’t fit, when is it a good idea to disobey convention? That’s really what master/slave is. What’s your take on the company’s switching from master/slave to primary/replica?

Erin
I think it’s generally positive. In fact, I think it was almost universally positive.

Paul
Cool! Wow.

Erin
For a couple reasons. One, if you truly think it doesn’t matter, why not change?

Two, because I think the metaphor of master/slave doesn’t actually work that well for modern databases.

At Wordnik we use Mongo. We have primaries and secondaries. At anytime you can step up a secondary to become a primary, if they’re properly synced.

I don’t think there’s been any point in the history of mankind, where you can step up a slave to become a master.

Paul
That is very true.

Erin
In fact, most of the time they put a lot of stuff in place to keep that from happening.

Paul
Yeah there’s some weird implications of master/slave as well. Like the master telling the slave what to do. That doesn’t always fit. The master may be sorting work at the front, while slaves process.

Erin
Right, and sometimes the metaphor doesn’t work, because it’s the master actually doing the bulk of the work. If we’re thinking of master and slave as a metaphor, well who was doing the bulk of the work?

Also, it’s all about what you prioritize. Are you going to prioritize a conventional somewhat clunky, not truly evocative metaphor… over real human beings, having real problems with the terminology?

Especially if the people having problems with the terminology, if it actually affected their lives. There are people alive today who are only a couple of generations away from slavery. There are people who have escaped enslavement in countries in the world, today.

This is not an academic question. I’m generally of the opinion, if there’s a choice between language and people… If people are saying “oh it doesn’t really matter”, then choose the people.

If there's a choice between language and people, choose people. - Erin McKean Thanks to George Hall for the base image CC BY 2.0

Paul
That makes a lot of sense. In the context of Tech and diversity, everyone likes to pay lip service. “Oh, we want to be more inclusive”, but when there’s an opportunity to do so, by changing terminology, feathers gets ruffled.

Erin
It’s funny, because if it were anything else technical, how many people would fight for the old over the new when it comes to technical stuff?

Usually you have the complete opposite problem where you have people wanting to jump to new technologies that may or may not be proven. You know, for the joy of novelty, to be able to create something new.

It seems odd that some of those same people would be like, “well you know if this term was good enough for grandpa, it should be good enough for me.”

Are there people not wanting to use terms like ‘growth hacking’ instead of marketing?

Paul
(laughs)

I think some of them would say, Yes. But, I agree that words frequently change over time.

Erin
Yeah… and what about, do they want to do Waterfall instead of Agile? There are a lot of places where you can say that if you want to hold to something because it was traditional, then maybe there’s some inconsistency there.

Paul
That makes sense! I’m going to play devil’s advocate for some of the people that aren’t here. Obviously, doing this piece, I have a bias towards it being a good idea to switch. But I like to pretend at least, that I can see the other side.

Master / Slave has been around for a while. When adding these new terms, if we were to switch, people who are already using those terms would have to learn new ones. In a way, that’s a tax that you’re putting on the industry.

What do you think about that?

Erin
I think if people are significantly cognitively challenged by this switch in terminology, then they are possibly not suited to programming as a career.

The fact of the matter is, there’s no terminology police that are going to come, and cut off your thumbs for using one set of terminology over the other.

It’s just a matter of thinking a little bit about how the words you use affect people.

Paul
This is very interesting, in the context of the campaign you’re running right now to find new words. Outside of Tech, how does that tend to happen in the real world? Where do new words  come from? Where does new terminology come from?

English is like the biggest possible plastic bin of Lego parts.Erin McKean

Erin
New words come from everywhere.

We like to think about people like, “Oh, I’m going to sit down and coin a new word to mean something.” But, English is like the biggest possible plastic bin of Lego parts.

Usually words just come about by people saying, “Oh, this block looks great, I’m going to use it,” or by joining two blocks together.

I was talking earlier today to someone who makes radio and podcasts. He said that sometime he and his colleagues describe things as podcast-y. I was like “Oh, of course that’s perfectly clear.”

Also, making fun of me a little bit for one of the words we use in our campaign, Wordnik wants to make every word ‘lookupable’.

Paul
Nice!

Erin
Yeah, you know what? You know what ‘lookup’ means. You know what ‘-able’ means. Lookupable is transparent.

A lot of times new words in English are just somebody kind of reaching out and groping for the right tool to do the job that they want to do.

Paul
Interesting.

I can hear my 11th grade English teacher screaming right now; Just listening to this. I assume in an Academic context, this doesn’t tend to happen…?

Erin
Oh, Academics make up more words than anybody else! It’s a matter of expanding the world’s knowledge more and more. When you identify a new phenomenon you often put a new term on it.

The great thing about English is you don’t have quota, right? Nobody is saying, “Oh, you have to use X number of new words a day, or week, or month, or life time.” You can just use the words that you want.

If you want to swim against the tide of linguistic innovation nobody is going to stop you. If you want to say “taximeter hansom cab” instead of “taxi-cab” or “taxi” or “cab” nobody is going to stop you.

They’ll look at you funny, but it’s not illegal.

Paul
Cool! In a Platonic kind of ideal you still understand what the intent behind the word is. Communication is still achieved; Which, is the important part.

Erin
Yes.

There are very very few instances where people are confused on the actual word level, instead of on the utterance or sentence level.

A classic example is inflammable and flammable. That was truly confusing! Things labelled inflammable people thought, “whoa that won’t catch on fire,” but in fact it was the opposite. So, that’s a place where language actually changed to make things safe.

Paul
That’s interesting. Do you find if people have sufficient context it’s intuitive? Obviously, if an ornithologist decides to frame a new term for a certain type of feather, I not understand what that new word means.

But, I would assume that other people in the bird field should have enough context, or shared context, that they’re generally able to pull meaning from the ‘blocks’ that’ve been assembled together. Does that tend to happen in programming, and other world’s too?

Erin
It happens everywhere.

People learn words mainly by context. The number of words in your life that you actually went and looked up in the dictionary is vanishingly small compared to the number of words that you’ve encountered.

In fact, that’s why at Wordnik we just try to show as many examples as possible that we can find. Because, that’s the way you match and really learn words.

Anybody who’s ever learned new slang has almost certainly learned it from context. You hear somebody cooler than you using a word, and then you assimilate it because you want to be that cool.

That’s how slang works.

Paul
Right.

Erin
So yeah, the right context makes things clear.

Paul
Ok! So in getting closer to the core of computer science there’s also this thought that naming things so that they’re more accurate representation of what it is. So if you have a function to add two numbers together, and it’s called AandB, then you may want to change that to ‘AddTwoThings’, or another name.

Erin
It’s all about creating the right mental model. Which kind of leads to another question about this idea of Master/Slave. If that’s your mental model for how things interact, well that’s kind of messed up.

It’s also a model, which thankfully many of us don’t have personal experience with. When you’re naming things, you really want to make sure that you’re transferring the right mental model to the person reading or the listening to what you’re saying.

We do this a lot through metaphor. We do this a lot through analogy.

If I were trying to … I do a lot of sewing, right? People say “Oh! Sewing must be really hard.” I say, can you follow a recipe? Can you use a tape measure? Can you drive a car?

Really, sewing is about following instructions, being able to measure things, and running a sewing machine (which uses an accelerator pedal).

Once you put that model in people’s heads, those analogies, then people are like “Yeah! I’ve done all those things. Ok, put that together, and that’s sewing.”

It’s all about creating the right mental model. Erin McKean

Paul
Cool. I like that as a heuristic for people thinking about naming issues. This comes up all the time. This thing about Master/Slave is just a particularly public change, and people like to express opinions about that in public spaces.

I think this is also the sort of thing that you might run into in a new codebase. You might run into a new method and there’s no comments with it. The person who programmed it probably thinks the name is enough to kind of define it for you. But, they often are not.

That’s a good rubric. “Is this achieving the right mental model?” Yes or No? No? Ok, let’s change it.

Erin
Right. Like, names like doThingsToTheStuff. What does that mean? It’s so general, what does that mean? If it were takeOutAllVowels, that works!

Other times, you know, there are namespacing problems. in that we tend to only want one thing to take up each name. There’s no way to name software libraries somethingSomethingJunior. Or, somethingSomethingTheThird. The way that you could do with people.

Sometimes people think “Oh, this would be a cute name!” Then they don’t realise that what they think of as a joke will make others uncomfortable.

Paul
Yeah.

Erin
A couple of years ago, there was a library, I forget what it was for, called UpSkirt. Some of my colleagues were like, “Oh we’ve gotta use this.” I was like, “wow, that name is terrible.” It’s just a bad name.

If you’ve got a name that leaves out like half the human race, and makes them cringe… bad name!

Paul
I think another devil’s advocate argument is that there’s a Tyranny of PC culture. The argument for this is people who are against cursing, for example. Curse words are useful! They’re functional, and I like using them, but there’s definitely a context where they’re appropriate and a context where they’re not.

I guess, how far is too far with trying to be inclusive? Obviously, half the human race is a pretty good group to try to approach. But, is it worth it for ten people? Twenty people?

How do you think about that? How do you weigh it?

Erin
I think it really comes down to what you care about more. When people complain about PC culture, sometimes I think that they are acting as if they are going to be sent to a re-education camp out in the Siberian tundra for using these terms.

What they really want is to say anything without people thinking they’re jerks. That’s not a freedom that’s enshrined in the constitution. You can say anything you want, but you are not absolved of the consequences.

Sometimes I think a lot of people who are talking about PC culture are saying, “Oh they’re trampling on my right of free speech?”

No, they’re trampling on what you thought was your right of being consequence free. That’s a very different thing.

There are a lot of things that bother other people, that don’t bother me. I don’t really care about being addressed as a ‘hey guys’ in a mixed gender group.

I’ve kind of assimilated to that no problem. I don’t think that just because something doesn’t bother me, that it shouldn’t NOT bother other people. If it’s a really easy change for me to make, if it’s easy I’m going to do it.

It’s just as easy for me to say “Hey folks” as it is to say “Hey guys”. It took maybe… a week to make that change? If that means that people that I like, in say a Slack chatroom or in a group, don’t feel for thirty seconds that I think they shouldn’t be there… you know, why not make the change?

Paul
Yeah!

In whatever small way, too. Usually the exclusion that people feel from these types of words isn’t a slap in the face immediately. It’s often death by 10,000 papercuts.

Erin
Yeah, it’s like you get an invitation to the company Christmas party, and it says you can bring your wife. I’m like, “Ok!”

Paul
(laughs)
“Maybe I will.”

Erin
I’m going to have to make some significant lifestyle changes for that to happen, but you know, all right.

You know that big campaign that went on a couple of weeks ago? This is what an engineer looks like. #ILookLikeAnEngineer.

Paul
Oh, that was super cool.

Erin
I saw this great Tweet, and I’d have to dig it up, but it was something like, “If you don’t think an engineer looks like me, then you have an insufficiently well developed model of engineer.”

Paul
Nice.

Erin
Maybe what’s causing a lot of this kind of push back is people being uncomfortable. Not being the center of universe, and the default. It IS uncomfortable not being the default.

But, you grow a lot more, and you learn a lot more when you look at things from outside your own point of view.

Paul
Yup, the uncomfortable things and the most useful things tend to live in that same set. Uncomfortable and useful overlaps pretty heavily, I find.

Just to sum up your recommendations, there are two good angles to look through for whether a thing is worth renaming.

  1. How difficult is it for you to switch? (e.g. Guys to Folks)
  2. How big of an impact does it have on the world around you, potentially?

It’s not the impact that it has on every person, it’s the potential impact. You know, 50% of the people you interface with is a pretty big deal through that lens.

The reality is a small subset is actually influenced. But, small subsets add up over time.

Erin
Yes, and also you have to think about the overlap of subsets. So, let’s say that I have a lot of…

Actually there are some terms in English, where red-headedness is treated as a proxy for wrongness. Like being treated like a red-headed step child. Right?

I think most people with red hair today would not necessarily consider that a slur. But, when you use terms that singles people out for what they are instead of what they do, anybody who is in anyway different thinks, “Oh, ok… what are they saying when I’m not around?”

I think in general, keep away from terms that are about what people are rather than what people do.

Paul
That’s a good rubric for method names, as well.

Erin
Yes! I mean, philosophically at the end of the day we only are what we do, right?

Paul
This is getting very existential.

Erin
Just in general, if you have the choice to be a jerk or not be a jerk… you might as well, not.

Life is too short to be a jerk.

Paul
Agreed.

To close, what’s the worst offender you’ve run across in computing? The worst word for describing something?

Erin
Oh, that’s a tough question.

Honestly, I feel like the mental model for the callback messed me up for a long time.

I don’t see a lot of people that are like, “callbacks came down from the mount on tablets, and we have to keep that forever.”Erin McKean

Paul
That’s a big one!

Erin
It just didn’t match up with my mental model. I tend to think of functions as spitting their output into other functions. Kind of like leaping fish. But a callback? Ugh.

That’s why I love promises as a mental model. I think people understand a promise more.

Paul
Oh yeah it fits perfectly.

Erin
They understand the delayed asynchronous is just ‘later’… Unless they’re toddlers, which do not understand ‘later’. People understand the output of a promise more than they do a callback.

Paul
Callback is interesting because these phrases around callbacks have crept up. Like, Callback Hell. Which kind of says something.

Erin
Mm-hmm.

You know Javascript takes a lot of guff for stuff like that. I know that it was originally done as like, an all nighter. There were a lot of pressures around the creation. But, that one messed me up for a long time.

Paul
Right.

Erin
I don’t see, maybe I’m not looking in the right place, but I don’t see a lot of people that are like, “callbacks came down from the mount on tablets, and we have to keep that forever.”

Paul
Yeah, most people seem quite happy that Promises are a core part of ECMAscript 6.

Erin
Yeah! I think the promise of promises is a nice one.

Paul
Cool, anything else you’d like to say as we wrap up?

Erin
I don’t think you can have it both ways. I don’t think you can say words don’t really matter, and then make a fuss when someone asks you to change words.

Paul
Right on. Well thanks! This is super useful.

Erin
You’re welcome!

Leave a Comment





This site uses Akismet to reduce spam. Learn how your comment data is processed.