Monday, May 25, 2015

git: handy alias to find the repository root

To quickly move to the root of the current git repository, I set up this alias:

git config --global alias.home 'rev-parse --show-toplevel'

Now,  git home prints the full path to the root directory of the current project.
To go there, type (Mac/Linux only)

cd `git home`

Notice the backticks. They're not single quotes. This executes the command and then uses its output as the argument to cd.

This trick is particularly useful in Scala, where I have to get to the project root to run sbt compile. (Things that make me miss Clojure!)

BONUS: handy alias to find the current branch

git config --global alias.whereami "rev-parse --abbrev-ref HEAD"

As in,

git push -u origin `git whereami`

Saturday, May 2, 2015

Fitting in v. Belonging

In your team, do you feel like you fit in? Do you have a feeling of belonging?

These are very different questions.[2] When I fit in, it's because everyone is sufficiently alike. We have inside jokes, TV shows or sports we talk about, opinions we share and common targets of ridicule. New people can fit in by adopting these opinions and following these sports.

When I belong, it's because everyone wants me to be there, because the group wouldn't be the same without me. We value each other for our differences. We have values that we share, and opinions we discuss. New people are integrated as we come to know and appreciate each other.

"Fitting in," that superficial team culture of common interests and inside jokes, is much easier to establish. And it's easier to hire for, because we can base choices on appearances and social cues. Hoodies and quotes from The Princess Bride. But it doesn't get us a strong team. On a strong team, people share ideas, they pull from their varied perspectives, they emphasize their differences because that's their unique contribution. This weaving together of various strengths, respect for the unexpected -- this is how a team can be stronger than its parts, this is where novel solutions come from. It emerges from feelings of belonging, which come from the group's deeper culture. That's much harder to establish.

On a wholehearted team, we show up as our whole selves and put all our creativity into the team's goals. How can we achieve this? Hire for value fit, not culture fit. Don't settle for the comfort of "fitting in" - aim for the safety of belonging.

I had this kind of team at my last job, at Outpace. We loved each other as people and respected each other as developers. And this was a remote team - we didn't fall back on physical proximity as appearance of teamwork. We shared goals, discussed them and evolved them. We shared our frustrations, both work and personal. When opinions clashed, we asked why, and learned. On this team, I explored ideas like the sea map. We grew individually and together.

That feeling of belonging makes it safe to express ideas and to run with them. And to take ideas from others and expand on them. Poof: innovation. Without that feeling of belonging, when the aim is to fit in, we express agreement with dominant voices.[1] Superficial cultural fit actively represses new ideas.

How can we move our teams toward a greater sense of belonging? Ask people about their interests that you don't share. Respect each person's experiences and opinions, especially when these are unique among the group. Instead of "We all agree, so we must be right," say, "We all agree. This is dangerous; can we find another view?" When pair programming, if you think your pair has the wrong idea, try it anyway. When someone says something dumb, their perspective differs; respond with curiosity, not judgement. Cherish our differences, not superficial similarities. Sacrifice the comfort of fitting in for the safety to be ourselves.

[1] Research has shown that teams of similar-looking people emphasize similarities. They're driven toward groupthink, quiet silencing of dissent. When someone breaks the uniformity, the not-obviously-different people starts expressing the parts of them that are unique. (I can't find the reference, anyone know it?)

[2] The dichotomy between fitting-in and belonging comes from BrenĂ© Brown's book, Daring Greatly.