The trap of wanting to appear successful

The first company I worked for out of college had a lot of politics*.

“Maybe politics is inevitable. And part of having a job is learning how to navigate people and make your contributions visible so that you can get promoted.”

I thought. So of course, I spent considerable effort on making my contributions visible. While I accepted the fact, I was frustrated and believed there ought to be a better way. I realized I felt as if I needed to appear successful because there wasn’t a clear definition of success. Our teams had no OKRs or systems for decision-making. Because there wasn’t a clear definition of how an employee is promoted, I thought I could get there by schmoozing with the C-suite instead of finishing the mock-ups for our next product.

When success is poorly defined, people find ways to achieve the appearance of success.

When I asked K at Uber whether people were ever promoted because they were good at appearing successful, but didn’t have the skill. She replied, “No, if they didn’t have the skill, they would be fired.” She explained that at Uber, each team and individual knew their definition of success, and if they didn’t meet that criteria, they would not advance.

When success is clearly defined, people are no longer making decisions based on how others will react, but rather, on what they genuinely think will help reach the team’s set goals, moving the company forward.

* Politics is defined as when people choose their words and actions based on how others to react rather than based on what they really think (Lencioni).

When top performers leave your company

Some companies try to keep their top performers and pressure them into staying. This response can create uncomfortable social pressure and cause the employee stay for the wrong reasons.
H told me he’ll have conversations with his manager where, while they highly value him, will talk about, “Where should H go next?” Does it make sense for him to join a nonprofit? Start a new company? Because his manager shows genuine investment in his growth, whether its with the org or not, he continues to stay on and want to learn from her.
Other companies, like BCG, accept that their top performers will stay for two years, and then leave and do something else. These companies that accept the high turnover rate are building a natural forcing mechanism for sustainability. Because they know that their top performers will only be contributing for two years, they must prepare themselves for long-term sustainability by putting structures in place, like documentation and training, to enable new employees to rapidly learn and contribute to the organization.

A formula for deciding what to build

I’ve noticed making high-level decisions at a mid-stage company is trying. Prioritizing at a startup is easier, because you have less groups clamoring for your attention. But when marketing asks for more money for ad campaigns and the engineering team complains about how they’re overworked and need another developer — how do you know which ones to select and execute on?

One way is to draft a list of all these priorities and ask everyone to vote. This approach democratizes decision-making, which, if done too much, can lead to a company without a clear product drive.

Another way is to ask two questions. Everything boils down to numbers.

Question 1: What are the inputs?
For example, if you want a marketing campaign, do you need more money for Google ads (external) ? Do you need to a month of engineering time (internal)? Often people think about external costs, but forget about the cost of internal company resources, which are just as valuable.

Question 2: What are the outputs?
All businesses have 3 goals. So these inputs must be manipulated in some way to generate output into one or more of these company goals:

  • (1) Revenue
  • (2) Cost savings
  • (3) Market growth

Thus, the decision about what to build becomes simple. You make the decision based on the input/output ratio.

Troubleshooting OAuth

When I first started implementing OAuth, I thought it would be difficult, but I realized with all the libraries and documentation now a days, implementing would be very manageable. While I thought using libraries to help would speed up the implementation — in hindsight, implementing OAuth with rauth, a Python OAuth wrapper library, unnecessarily abstracted away both logic and understanding.

OAuth consists of 5 components:

  1. Present user to webpage
  2. Page redirect to facebook
  3. Get code
  4. Exchange code for an access token that you store
  5. Use that access token to access user data with API

The complications usually lie in the details. The common problems I ran into were:

1. This authorization code has already been used.
I was calling the authorization code twice, when I should have exchanged the code for an auth token and called the auth token twice.

2. Incorrect access token
I had already exchanged the code for a token with rauth, and was trying to do it manually:

def facebook_authorized():
  code = request.args.get('code')
  if not code:
    return redirect(url_for('index'))
  data = dict(code=code, redirect_uri=get_redirect_uri())

  # rauth request
  fb_session = get_facebook().get_auth_session(
    data=data,
    decoder=lambda x: json.loads(x.decode())
  )
  me = fb_session.get('me?fields=id,email,name').json()

  # manual request
  res = requests.get('https://graph.facebook.com/oauth/access_token', params=token_params)
  access_token = res.content.access.token

To get the access code from rauth, I can use

access_token = fb_session.access_token

 

Meta-principles

Documentation is better than StackOverflow
With documentation, you can figure out the first principles by yourself and troubleshoot your specific use case. Sometimes, StackOverflow can shortcut this for you, but more often than not you’ll solve the symptom but not the problem.

Don’t overoptimize too early.
I made the mistake of abstracting my OAuth functions into classes and started running into errors — the abstracted data structures made it difficult to pinpoint what the problem actually was.

Understand principles before jumping to the code
Rather than copying and pasting coding that you don’t understand, first understand how it works manually (i.e. the 5 steps above) and try to replicate that yourself.

Explaining Information Entropy to a 5 year old

Suppose there are 8 numbers. I choose one, but you don’t know which number it is. Your task is to guess which number. You can ask yes or no questions. What is the minimum number of questions you would need to ask to guess the number?

1
2
3
4
5
6
7
8

All have an equal chance of occurring (P(any number) = 1/8).

What would be your approach for asking questions?

Start at the mid-way point and asking if the number is less than 5.  Suppose the answer is yes. Now you know the number must be

1
2
3
4

Do the same thing and ask if the number is less than 3. Suppose the answer is yes again. Now you know the number must be

1
2

Now you ask whether the number is 1, and if the answer is no, then you know the number is 2. You have guessed the number in 3 questions.

3 is the minimum number of bits you would need to use to encode the probability distribution of these 8 numbers. This algorithm is at the core of how we are all able to send emails, pictures, and videos so quickly now. Before the father of information theory Claude Shannon had invented this algorithm, it was unthinkable to send a picture — even a voice message, across the globe. There was simply no efficient way to send it. Nobody knew how many bytes it would take to encode the message, or even how to encode the message.

Next question: What if the numbers did not have an equal chance of occurring?

The Basics of Fourier Transforms: a Conversation with a Random Dude

I’ve been doing a lot of signal processing lately (Python tutorial on analyzing .wav files to come) and came upon this nice metaphor for Fourier Transforms, which can help extract information from sound.

Random dude: I need to know how many 7’s there are in 49.

High school algebra student: Duh, just divide 49 by 7. There are seven 7’s in 49.

Random dude: I need to know how many x’s there are in y.

High school algebra student: Duh, just divide y by x. There are y/x x’s in y.

Random dude: I need to know how much of the frequency 23Hz there is in my signal x(t).

High school algebra student: Duh, just divide x(t) by 23Hz. There is x(t)/23Hz amount of 23Hz in your signal.

via dmorris at TechHouse

Relationship Questions

For troubleshooting.

  1. What would you tell your younger self about love?
  2. Which of your flaws do you want to be treated with more generously?
  3. Is there anything I have done in the past that may have unknowingly hurt you?
  4. What are the main stressors in your life and how can I help?
  5. When I am anxious in our relationship, I tend to …
  6. What scares you about our relationship?

Headache-Free Installation: How to set up a virtual environment

One of the most irritating things about learning a new framework or switching to a new computer is often not learning the different nuances in syntax or even debugging — is installing the darn thing. I can recount the numerous dependency and version management errors I was met with upon when forking my friend’s Django project or deciding to pick up Flask, both Python web frameworks.

When I discovered virtual environments, a lot of these headaches disappeared. Virtual environments allow you to compartmentalize your framework and package installations into the clean slate, separate from the rest of your computer.

Why a virtual environment?

When people type ‘sudo’ before attempting to install something, I fret at the amount of trouble they may be causing themselves later down the line. Installing something globally will inevitably lead to version management problems and other clashes down the line.

What to install globally

  • Python (usually comes installed)
    • Easy_install (comes with Python)
  • Pip (Python package manager)

What to NOT install globally

  • Packages
    • OK: sudo easy_install pip
    • May lead to problems: sudo pip install django

How to install a virtualenv.

Assuming you already have Python installed:

  1. Install Pip.
    sudo easy_install pip
  2. Use Pip to install virtualenv
    sudo pip install virtualenv
  3. Change directories into the folder where you want the virtual environment installed.
    cd ~/Desktop/projects/my_app
  4. Create your virtual env
    virtualenv env
  5. Activate your virtual environment
    source env/bin/activate

Now your command line will include the virtual environment:

And you can install frameworks like django and packages in this new environment as necessary.

Notes

  • Your environment will only exist when you activate it. Notice that if you open a new terminal window, it disappears.
  • You can deactivate the environment by typing
    exit
    Or closing the terminal window.

Two Inflection Points on Love

One

I’ve decided that if I’m going to love, I’m going to love. hard.

I’ve noticed a phenomenon where someone will have a bad break up, and then will try to prevent the pain in the future by being more guarded about who they let into their heart.

But there is a flaw in this way of being — the person is conflating emotional investment with open communication. “If I had just been less invested in the person, I could have avoided all this pain.” I think people are deluding themselves. Two reasons:

(1) It wasn’t emotional investment that lead to them being hurt — it was a lack of open communication — consistent transparency about each other’s pulse on the relationship and trusting each other enough to be vulnerable about thoughts and emotions.

If you had just openly communicated in the first place, then you would’ve been able to exchange quick feedback loops and adjust your speedometer accordingly.

It’s when these pulses are not in sync and people begin to leave things (addictingly!) ambiguous, that signals get crossed and people end up being hurt.

(2) There’s nothing wrong with being hurt. I can be less hurt by being more guarded about who I give my heart to, but what is the fun in that.

To feel emotion is to be human. And you can never fully live out what it means to be human without living intensely.

Two

I’m going to prioritize the person over the relationship.

A lot of times, when just entering the rush of a new intimate relationship, we get worried about defining the relationship – what it should be, whether or not we’re boyfriend/girlfriend, whether or not he’s seeing someone else. These thought patterns make it difficult to live in the moment, to appreciate the person for who they are, and savor the time when you’re with them.

It’s the prioritization of the relationship over the person that creates bad outcomes. Things start to become binary — we’re either exclusive or we’re not friends at all — and power dynamics come into play — he took 5 hours to respond to my text, is the ball in his court or mine? We’re no longer happy with the time we spend with them, rather, we suddenly build up expectations and want more.

Few people are worth your EQ. When you meet someone you believe is worth emotionally investing in, instead of trying to put them into a hole and asking, “Is he the one?” why not ask, “Am I building something amazing with this person? What else do I want to build with them?”