-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Properly) fix potentially inconsiderate naming #218
Conversation
Primary/replica works well for Django where it refers to database replication. But this test deals with one thread coordinating another. There's no replication involved. |
I see, will have to find a better fitting thingy then, maybe. |
Why can't we just call it 'Doer' and 'AlsoDoer' and call it a day? :) |
To quote Katie Mack, "This is not a change we make for the people it doesn't matter to.". Feel free to ignore these kinds of changes if they don't interest you. |
I think you're on to something, @batmuffino. Looking over the test, I see no structured relationship between the threads at all. Doing away with the enum altogether and just marking them as |
@jrose-apple that's why I mentioned using the most simple names with least connotation. As a german, master/slave sounds less inconsiderate than leader/follower. But since it's basically just as @jckarter says one could also just call it primary/secondary or sth. |
I like "primary/secondary". That's a minimal change from what's there. No objections to just using an Int, though. |
@cwillmor By the same logic, wouldn't @batmuffino But the connotation is what's important. The denotational meaning of these words is already out the window. We're using words to refer to programming concepts by analogy. We're squarely and entirely in the realm of connotation here. The question is, how can we pick names with connotations that allow users to quickly grok. But, let's actually look at what makes a good name, because I don't think For reference, from Wikipedia: "Master/slave is a model of communication where one device or process has unidirectional control over one or more other devices.". Makes a fair amount of sense. But, if this is going to be changed, it should be changed to something that is maximally either directly or metaphorically descriptive. And if we can offend less people in the process, that's cool. While I propose
The only problem, of course, is that because there's only one |
I was thinking the same as @DylanLukes. In the context of threading/processes it's already common wording that people are familiar with. |
@landaire Good point on confusion. Might be worth grepping the repository for usages of any suggested terms. Whatever is picked, it shouldn't already be in use in with a different meaning. Inconsistent signifieds are even worse than inconsistent signifiers. |
In this test case, the threads aren't actually in a parent/child relationship. There's one that goes first, and one that goes second, but the "parent" thread is the main thread. (See the full file.) |
|
On further consideration, agreed. |
Some other alternatives that I haven't seen mentioned here are: Master/Follower, , Leader/Follower, Coordinator/Worker, Dispatcher/Runner, Queen/Worker (bees, anyone?). |
@nbulous Or, just integers. It's just a test case. All that really matters is that someone can read this and understand what's going on in the event that the test fails, or if they're reading tests to grok functionality. |
Leader/Follower is just odd. Please stick to programming terminology: Master/Slave, Parent/Child, etc. Code is confusing enough to not need to worry about this waste of time. There is nothing "bad" about a slave/child process/test/thread. Honestly Leader/Follower makes no sense. |
How about |
Just because it is standard programming terminology doesn't mean it should be. Does it affect you and me? No. Is it something super important to change? Perhaps not. But if someone cares and puts in the effort to propose something not as awfully connotated as master/slave, why not? +1 to Primary/Secondary in this case. |
+1 for Primary/Secondary. |
If they're just two peer threads coordinating in an attempt to wreak havoc, let's call them RobinHood and FriarTuck. Or Fred and George. Or anything that doesn't annoy people. (I don't like integers for this purpose; there are exactly two threads, not N threads.) |
@brentdax: Interesting. Personally in that case I'd be concerned about another PR popping up someday (not from me, but someone) because both names are male or something. Just covering all the bases. |
We're deep in Wadler's law territory at this point. |
Thanks @Inari-Whitebear! |
Change language in test case to more accurately describe peer relationship of threads
So I don't mind master/slave terminology, but if you're going to fix it, at least end up with something others chose too. See django which ended up with Primary/Replica (after first adopting Leader/Follower in django/django#2692) in django/django#2694 (which was just closed, but still changed in django/django@beec056 )
The only thing I personally have against Leader/Follower is that it is a bit odd as a german (and seems I'm not alone in that feeling). Though I wouldn't mind that had it not already been changed from master/slave anyway. Just want it changed "properly" if it gets changed at all. It also seems to be used in literature already from what I was told.