Distributed Teams: On the non-Universality of “Not it!”

I’ve surprisingly not written a lot over here about working on a distributed team in a distributed organization. Mozilla is about 60% people who work in MoLos (office workers) and 40% people who don’t (remotees). My team is 50/50: I’m remote near Toronto, one works from his home in Italy, and the other two sit in the Berlin office most days.

If I expand to encompass one extra level of organization, I work with people in Toronto, San Francisco, Poland, Iowa, Illinois, more Berlin, Nova Scotia… well, you get the idea. For the past two and a half years I’ve been working with people from all over the world and I have been learning how that’s different from the rather-more-monocultural experience I had working in offices for the previous 8-10.

So today when I shouted “Not it!” into the IRC channel in response to the dawning realization that someone would have to investigate and take ownership of some test bustage, I followed it up within the minute with a cultural note:

09:35 <chutten> (Actually, that's a cultural thing that may need
 explanation. As kids, usually at summer sleep-away camp, if there
 is an undesirable thing that needs to be done by one person in
 the cabin the last person to say "Not it" is "It" and thus, has
 to do the undesirable thing.)

“Not it” is cultural. I think. I’ve been able to find surprisingly little about its origins in the usual places. It seems to share some heritage with the game of Tag. It seems to be an evolution of the game “Nose Goes,” but it’s hard to tell exactly where any of it started. Wikipedia can’t find an origin earlier than the 1979 Canadian film “Meatballs” where the nose game was already assumed to be a part of camp life.

Regardless of origin, I can’t assume it’s shared amongst my team. Thus my little note. Lucky for me, they seem to enjoy learning things like this. Even luckier, they enjoy sharing back. For instance, :gfritzsche once said his thumbs were pressed that we’d get something done by week’s end… what?

There were at least two things I didn’t understand about that: the first was what he meant, the second was how one pressed one’s thumbs. I mean, do you put them in your fist and squeeze, or do you press them on the outside of your fist and pretend you’re having a Thumb War (yet another cultural artefact)?

First, it means hoping for good luck. Second, it’s with thumbs inside your fist, not outside. I’m very lucky there’s a similar behaviour and expression that I’m already familiar with (“fingers crossed”). This will not always be the case, and it won’t ever be an even exchange…

All four of my team members speak the language I spoke at home while I was growing up. A lot of my culture is exported by the US via Hollywood, embedding it into the brains of the people with whom I work. I have a huge head-start on understanding and being understood, and I need to remain mindful of it.

Hopefully I’ll be able to catch some of my more egregious references before I need to explain camp songs, cringe-worthy 90s slang, or just how many hours I spent in a minivan with my siblings looking for the letter X on a license plate.

Or, then again, maybe those explanations are just part of being a distributed team?

:chutten

Advertisements

Elections Canada as a Mental Health Initiative

While discussing Electoral Reform (and a certain federal party‘s failure to do what they’d promised about it), my fellow Canadian made an interesting point. He mentioned that one knock-on benefit of the existing multi-party first-past-the-post system might be psychological.

The more I think about it, the more I think he might have a point.

One criticism of first-past-the-post is that it encourages “tactical voting” or “vote not for the party you most agree with, but with the party most likely to win that you can most tolerate.”

An example: Given three choices Orange, Red, and Blue, you agree most with Orange’s platform and disagree most with Blue’s platform. Red is fine, you guess. Unfortunately, you live in a riding where Orange has little support. So you can vote for Orange, but only knowing that you’re “wasting your vote” by casting it for a party that will likely not win. So, instead, you might vote for Red because it has the best chance of defeating Blue, whose platform you disagree with most.

My fellow Canadian’s point is that this tactical voting might have a small, secret benefit.

The idea is that, by strategically voting for Red (the party with the most tolerable platform that is most likely to win in your riding), you have pre-emptively made your peace with a more likely future and have signified your tolerance of a more likely platform. So if Red wins the seat, you have more buy-in to the result and have already developed the compromising mindset that makes you more accepting of Red’s platform. Also, it is unlikely that your minority preference for Orange would ever be successful in the system, so by forcing you to abandon it early it encourages you to prepare for the more likely outcomes earlier.

This could make a voter less upset with the result, teach them how to compromise for a greater good, feel more in control of their government, and possibly even feel more engaged with the process as a whole.

I’m not 100% behind this idea, mind you. For one, it hand-waves over the resentment you feel that your preferred party was unelectable in the system as it stands and the belief that it would be different if the system were changed. Also, I could find no study of this effect (if present) and I would assume there would be if there were evidence. There’s a lot of money and feeling invested in the current system (and the cynical among you might believe that to be a contributing reason why certain campaign promises haven’t been kept) so I’d expect research to exist and be aimed in a supportive direction if it had merit.

And even if we’re extremely generous about this effect even existing let alone being beneficial, it can’t overcome the drawbacks of FPTP which include actively excluding minorities and women from legislature.

However, it’s the system we in Canada are stuck with so I find it interesting that there could be a small benefit hidden in an electoral system other successful democracies ditched a century ago.

I still want my ranked ballot, though.

TIL: C++ character constants aren’t created equal

arrPtrTerm

When reviewing a patchset involving files, strings, timers, and multiple threads (essentially all the “tough to review” checkboxes right there), a comment from :froydnj caught my eye:

> +const char* kPersistenceFileName = "gv_measurements.json";
> +const char* kPersistenceFileNameNoExt = "gv_measurements";

Please make these `const char kPersistence...[] = "..."`, which is slightly smaller on all of our usual systems.

Why? Aren’t C arrays just pointers to the first element? Don’t we treat char[] and char* identically when logging or appending them to higher-order string objects?

Influenced by :Dexter and :jan-erik, I tried this out myself. I made two small C programs arr.c and ptr.c where the only difference was that one had a const char* and the other a const char[].

I compiled them both with gcc and then checked their sizes in bytes.arrPtrSizes

Sure enough, though ptr.c was smaller by one byte (* is one character and [] is two), after being compiled ptr was larger by a whole 8 bytes!

This is because C arrays aren’t identical to pointers to the first element. Instead they are identifiers that are (most of the time) implicitly converted to be pointers to the first element. For instance, if you’re calling a function void foo(char c[]), inside the function `c` is implicitly a char* and its size is that of a pointer, but outside of the function c could be an array with its size being the length of the array. As an example:

void foo(char c[]) {
  printf("sizeof(c): %d\n", sizeof c);
}
int main(void) {
  char arr[] = "a";
  printf("sizeof(arr): %d\n", sizeof arr);
  return 0;
}

Prints:

sizeof(arr): 2
sizeof(c): 8

Another way to think about this is that the char* form allocates two things: the actual string of four (“abc” plus “\0”) characters, and a pointer called ptr that contains the address of the place the ‘a’ character is stored.

This is in contrast to the char[] form which allocates just the four-character string and allows you to use the name arr to refer to the place the ‘a’ character is stored.

So, in conclusion, if you want to save yourself a pointer’s width on your constant strings, you may wish to declare them as char[] instead of char*.

:chutten

(( :glandium wrote a much deeper look at this problem if you’d like to see how much worse this can actually get thanks to relocations and symbol exporting ))

(( :bsmedberg wrote in to mention that you almost never want const char* for a constant anyway as the pointer isn’t const, only the data is. ))