Lately I’ve been posting on Medium rather than this page. You can follow me @aveshcsingh.
An Early Engineer's Guide to Early Exercise
Welcome, bright-eyed engineer, to the world of early-stage startups! Hopefully you’ve met the team, gotten your first_name@ email address, submitted your first pull request, and frantically reverted your first pull request. You’re now faced with the most consequential financial decision of your life to date: Should you early-exercise your stock options?
...
I'm moving my blog to Medium. To continue reading, click here.
Leaving Google for Cardiogram
Friends, I am excited to tell you that I’ve left Google to join Cardiogram, a startup applying deep learning to detect heart disease using consumer devices like the Apple Watch.
I came to Google straight after graduating and spent 2.5 years there. It was challenging and interesting and rewarding. It was where I learned how an effective team operates, and how to quickly validate or disprove a hypothesis. Google was also where I learned to run fast, and where I made my first friends post-college.
It wasn’t an easy decision to leave.
An early stage startup offers benefits that Google could not. Not money or free food or massages. Impact. As one of a team of four, you get to do everything. In the past month I’ve worked on machine learning, hiring, backend systems, and product. Soon I’ll try iOS development and technical writing. Not only do you work on everything, you’re on the hook for everything. You’ve got to complete your experiments before the paper deadline, and must decide which open source framework is best for your company’s first distributed system. And if production goes down, you wake up.
It’s a crazy crash course, and it can feel like stitching together your parachute as the ground comes rushing up to you. For me, it’s the best way to learn.
Cardiogram is really special, and that’s why I joined the team. Our founders are senior Xooglers with ML backgrounds, one with a prior successful startup. We’re working on a big problem. Since 1930, heart disease has been the number one killer in America. By detecting it early, we can save lives.
If you want to chat more about startups, Google, or Cardiogram, hit me up.
The team, left to right: Brandon, Avesh, Johnson, Kai.
Why I'm Selling My Google Stock Grant.
Dan and I are headed down to Carmel for the weekend. We're cruising down Route 1, windows down, the brisk Pacific air flows in. The car feels hot and stifling, however, as our intense argument continues.
We're both CMU SCS '14 grads. We both joined big companies upon graduation. And we both get our first stock grants in September, after our one year cliff.
We're debating what to do with the stock. Dan tells me that he plans to hold on to his Facebook shares. He's going to sit on the nest egg while it grows and matures. He'll slowly nourish it with solid technical contributions until it turns to a small fortune. Facebook, he says, is valued at a small fraction of what it will be in 5 years.
And this may be true. It may also be true that Google's (or should I say Alphabet's) value will only increase as the company dominates new fields. But that's irrelevant.
If you receive a stock grant from your publicly traded company, you should sell it. Immediately.
Why, you ask? One word: risk.
Imagine that tomorrow the Department of Justice files an antitrust lawsuit against Google. The company is forced to split off into a dozen shards. My entire department is eliminated to cut costs, and I'm without a job. My life savings, held in large part in Google stock, pretty much disappears. The tech sector is in a recession, so I can't find a new job that pays enough to cover rent. My nest egg, my safety blanket, is gone.
By investing money in the company you work for, you're putting all of your eggs in one basket. One data breach, one SEC filing, one natural disaster, and you could have the rug pulled out from under you.
Now you might think of the stock grants as "fun money" that you don't really need to think about --a gift from your company. You're free to manage it how you want, and because you're a busy person you might as well just keep sitting on this growing gift, right? No! This is terrible logic! Your stock grant is laid out in your offer letter. It's part of your contractual compensation. And, in many cases, it's a significant portion of your income. You should think of the grant as cash compensation. If you decide to not sell the stock immediately, this is equivalent to taking out a portion of your paycheck to buy stock in your company.
You might also think that your company has some awesome stuff in store, or that everyone working there is a genius. And that's great. That's why you work there. But there are a myriad of reasons why you shouldn't invest in the company based on this logic:
(a) You're probably drinking a bit of the Kool-Aid.
(b) Your trading is restricted due to insider trading rules.
(c) Most important of all: You are exposing yourself to too much risk.
And what about taxes? Did you hear that you should keep the stock for a year to avoid short term capital gains? Well as it turns out, RSUs are taxed as income when they first vest. After that, any *gains* (or losses) are taxed as short term or long term gains depending on how long you hold onto the stock for. So if you sell immediately, you pay no capital gains. Note that this is NOT true of stock options, or any other weird financial vehicles your company pays you in (mortgage backed securities, anyone?).
So what should you do? Well first, sell the stock. As quickly as you possibly can. Then find some stock or mutual funds that are not correlated with the performance of your company, and put the money in there instead. Preferably in a tax sheltered account like your 401(k). If you don't care much about this financial markets bullshit, just dump it in the S&P 500, a large index fund that roughly tracks the performance of the stock market overall.
I'm writing this post because many of my Class of '14 friends are about to receive their first stock grants. My advice: Sell! Sell! Sell!
Hacking my Econ Midterm
It's my Junior year at Carnegie Mellon. Professor Goodfriend, an esteemed policy advisor from the Federal Bank of Richmond, walks into our first lecture of International Money and Finance. He runs through the syllabus, emphasizing the extensive readings required for the class.
Your exams are open-note and open-readings, and will consist primarily of quote-finding.
Quote-finding? Yeah, it's what you think it is: A line from a required reading is given on the exam, and we must find the passage and page number where the line resides.
I was reminded of that game elementary school teachers play with their class to pass the time. The first student to flip to Section 14.3 gets a sticker!
Slumping down in my chair, I felt screwed. I have a terrible memory, and didn't have the time to re-read everything multiple times.
So I didn't. In fact, I found the readings so boring that I only half-read most of them. Instead, I built an inverted index.
Inverted Indexes
Sites like Google and Bing are powered by inverted indexes. Starting with a bunch of webpages, extract all the words from each webpage to create a mapping from webpage to list of words in the webpage. Then, invert this site->word index to form a mapping from each word to all of the pages that include this word. This is called an inverted index.
That way, Google can serve the query "Banana Pancakes" by finding the set of all webpages containing "banana" and the set of all webpages containing "pancakes" and intersecting the two to find only webpages containing both "banana" and "pancakes".
[Aside: Of course, Google and Bing do tons more in conjunction with this to build great search engines]
I hadn't heard of inverted indexes at the time, but ended up building a similar system.
Building the Inverted Index
I wrote a Ruby script to extract the words from each pdf using OCR and generate the inverted index, a mapping from word to a list of (document, page) occurrences. After filtering out some super-frequent words and very short words, I generated a pdf document. It was filled mainly with the long-tails (words which occur 1-2 times) like 'offshore'. These words enabled very fast quote lookup, so I kept them in despite the massive space they took up --the inverted index took up 90 pages.
What I ended up with looked like this:
official: {"MonCong.pdf"=>[36, 36]}
offsets: {"LimitCommit.pdf"=>[12], "MoneyStock.pdf"=>[2], "NNS.pdf"=>[7]}
offsetting: {"LimitCommit.pdf"=>[23], "MonCong.pdf"=>[33], "MoneyMarkets.pdf"=>[15], "NNS.pdf"=>[4, 6, 19]}
offshore: {"MoneyMarkets.pdf"=>[5]}
To find the [fake] quote "Officials offset the effect of OPEC sanctions", I would intersect the sets for "officials" and "offsetting", resulting in the document "LimitCommit".
Exam Day
I had a Machine Learning project due the day of the exam, so I didn't study much. Just printed out my inverted index.
First quote: 'Consider an aggressive reduction in the funds rate to encourage real growth. Initially, funds rate actions taken to fight recession pull the long rate down too.'
Let's see... aggressive maps to {"IndepBank.pdf"=>[6], "InflationScares.pdf"=>[4, 7, 7, 7, 7, 8, 8, 8, 10, 10, 10, 11, 11, 11, 11, 11, 12, 13, 13, 15, 16, 16, 16, 16, 16, 16], "LimitCommit.pdf"=>[22], "Testimony.pdf"=>[2]}.
Recession maps to {"CreditTurmoil.pdf"=>[2, 8], "IndepBank.pdf"=>[4, 5, 6], "InflationScares.pdf"=>[7, 7, 8, 11, 14, 15, 17, 17, 17], "LimitCommit.pdf"=>[23, 23], "NNS.pdf"=>[20, 21, 21, 21], "Testimony.pdf"=>[2, 2, 2, 2]}.
That leaves InflationScares page 7, 8, or 15, or Testimony page 2. Now let's do a manual search on these pages...
And time's up.
The plan failed. Faulty OCR caused some (document, word) pairs to not show up in the inverted index, and the set intersection and manual search was far too time consuming for a 1 hour exam.
I failed the exam, and dropped the class. I have no regrets.
What does it mean?
It means that liberal arts professors need to be aware of what technology is capable of doing. The skills that were useful 20 years ago to a lawyer or an economist aren't very useful today because computers have automated many tasks.
Last week, Charles Schwab left me a voicemail with my account information. They couldn't email, text, or mail it to me, but they could leave the number as a voicemail protected only by my 4-digit PIN. In any case, all of my voicemails are transcribed to text and emailed to me. Some Senator on the Banking Committee has no idea how digital information works.
Teachers must stop giving spelling tests, science professors must eliminate rote memorization, and investment bankers need to spend less of their time copy-pasting excel spreadsheets. The world has changed; get with the picture.