Six Million Lines of Code

2012 July 13 11:30 AM

Lets say you have one thought per minute and that each thought represents one line of code. Lets say you work ten hour days. This means you have the capacity to write 600 lines of code per day, 3000 lines of code per week, or around six million lines of code over a 40 year career.

“Wait a minute,” you exclaim, “I write way more than a line of code per minute when I really get going!” Sure, I do too. But lets be honest: you are not going to write six million lines of code in your lifetime. Think of the numerous factors that conspire to reduce our programming output: meetings, status updates, unit tests, documentation, hacker news, problems at home. They take a toll. A massive one. So lets be generous and say you are an extraordinarily brilliant programmer, operating at 50% efficiency - better than most natural systems.

You have three million lines of code in you. What are you going to do with them?

The possibilities are limited by one key factor: those three million lines of code also must not only provide for you and your family, but also for your retirement. So if you earn anything less than $1 per line of code (total compensation), or about $30/hr, you are in serious trouble. And if you live in silicon valley, well, you know that you need to earn quite a bit more than that to get by. And don’t forget retirement! Given improving lifespans, its not unreasonable to assume you will live 40 years beyond retirement.


If you want to get good, don't gamify - workify!

2012 July 12 11:30 AM

Recently, while watching the original The Karate Kid, I was struck by how the Mr. Miyagi’s teaching process contradicts modern conventional wisdom.

The Kid wants to learn karate. How does Mr. Miyagi teach him? Does he develop a gamified point system to keep The Kid’s interest? No. Does he break the process down into a series of small goals to create reinforcing patterns and build confidence? No.

Mr. Miyagi tells The Kid to wax a bunch of Mr. Miyagi’s old cars. And then sand Mr. Miyagi’s huge patio and fence. And then paint Mr. Miyago’s fence. And then paint Mr. Miyagi’s house. Each time, The Kid is told to perform the task with a specific hand motion.

We’ll avoid discussing leftist queasiness with unpaid internships.

Instead of focusing on the direct fun thing (learning karate), which is the easy gamified approach, Mr. Miyagi “workifies” the whole process. He makes it harder and not fun. Because The Kid needs to develop so many other skills to properly master karate - build muscle, build endurance, build calluses, build muscle memory, and so forth.

And I couldn’t agree more with this approach. If you really want to learn something through and through, you can’t take the easy way. You need workify it so that you build all the ancillary skills required.

This is why I am not at all interested in efforts like Codeacademy. It takes time to master a new skill, and directly learning that skill is just about the least effective way to do so (Consider Peter Norvig’s famous essay Teach Yourself Programming in Ten Years). You need to constantly practice and apply the skill, because there is no other way to discovering and mastering all the ancillary skills required.

If you really want to master programming, do it the hard way so that you get exposed to all the fundamental concepts. For example, if you want to build a website, do it in straight c using the mongoose library. It will be hard and you will struggle. But you will come out of with a solid understanding of pointers, memory management, maybe even recursion.


A Startup is like Fishing in an Empty Pond

2012 July 11 09:30 PM

A few months ago, I went fishing in a remote Mississippi pond.

It was my first time fishing.

I was told told that I probably wouldn’t catch any fish because the pond hadn’t been restocked in a long time.

But that didn’t matter, I wanted to learn how to cast a fishing pole.

I was told that if the pond contained some fish, it would a kind that could be caught with certain type of lure that floats near the surface.

I was told that it was about the perfect time to catch this certain fish, around noon.

I spent about two hours casting the fishing pole, to no avail.

Of course, I got better at casting. Soon, I was able to pick a spot to cast to and the line stopped getting tangled.

I was told it was time to go. The fish weren’t biting that day.

Then I felt a tug on the line. It felt heavier than what I was told it would feel like.

I reeled it in.

And it was a catfish.

Catfish swim near the ground, so I had been using the wrong kind of lure.

Catfish are nocturnal, so it had been the wrong time of day.

Catfish weren’t supposed to be in this pond, it had never been stocked with them.

Against all odds.

It doesn’t matter what the environment is. It doesn’t matter what the market says. It doesn’t matter what feedback you get.

You learn. You work. You endure. You persevere. And with a modicum of luck, you succeed.

Picture of live fresh-caught catfish on grass.


The Genius of the Facebook IPO

2012 May 22 01:30 PM

There is a lot of misguided chatter about how the FB IPO has gone horribly wrong. The situation is in fact the opposite: FB IPO is the most successful IPO in history.

Contrary to popular myth, the purpose of an IPO is not to enrich wall street investment banks. The purpose of an IPO is to raise capital for the company, fueling rapid expansion without the downsides of incurring debt. The success of an IPO is determined by how well it meets this purpose.

Unfortunately, most companies kowtow to wall street, reducing the amount of capital raised, for various reasons:

  1. They company is unable to generate sufficient demand and so is forced to lower its wholesale share price. This price is what the investment banks pay for the stock, and they profit by selling it at a higher price to the public. Of course, they are performing a vital function, but they often have enormous leverage in negotiating the wholesale/retail spread. Note that as the spread widens, the company raises less capital and the benefits of IPO accrue to the investment banks in increasing proportion.

  2. The founders/internal shareholders want to cash out as much as anyone. They may agree to a wider spread in order to win terms that enable them to make more money at launch.

  3. Founders/Internal shareholders need the price of the stock to jump so they can keep their jobs. Typically, by the time of IPO, founders hold less than 20% of corporate stock.

Facebook didn’t face any of these problems, and so they were able to raise the maximum amount of capital to fuel growth - capital that, in a standard IPO, would be used for investment banker bonuses:

  1. You would be insane to bet against Facebook. They have employed the very best individuals to build their future, and they are starting from a base of close to one billion users. One Billion Users.

  2. Mark Zuckerberg has repeatedly stated that he takes the long view and is uninterested in short term payouts. And thanks to secondary markets and tertiary investment rounds, internals shareholders have already been afforded the opportunity to cash out to whatever degree they desire.

  3. Mark Zuckerberg holds well over half the voting rights in FB, meaning that investors have no option to fire him, short of an extremely expensive civil case.

I expect there to be a lot of fallout from this IPO.

  1. Wall street executives have extensive connections in the political world. They will almost certainly seek new regulatory rules that will protect their profits, for example by mandating a minimum spread between wholesale/retail prices. Of course, they will lobby in the name of protecting ordinary investors, even though only large institutions capable of participating in the pre-IPO process will benefit.

  2. Wall street will lobby to adopt European-style rules where multiple-class stock structures are illegal. The FB IPO absolutely could not have happened if Mark Zuckerberg didn’t possess super-voting founder stock.

  3. Founder’s will do their best to push for similar IPO structures, because the benefits to the company and employees vastly outweigh any perception problems. Sure, the stock may suffer a little bit because retail investors have a herd-like mentality and want to invest in winners. But, the additional capital should help the company grow better than it otherwise could have, meaning the perception problems will resolve themselves in the medium term.


Capital Gains Tax Rates and Antisemitism

2012 April 17 10:55 AM

It started when a friend of mine asked the question:

Question for those more financially savvy than I am: what is the economic logic behind taxing capital gains at a lower rate than regular income? It seems like the lower tax rate is intended to foster economic growth by encouraging investors to hold onto the asset(s) in question for longer, thus reducing market churn and encouraging long-term investment. Is that the sole reason?

What disturbed me about the ensuing discussion is a sentiment that comes up frequently when discussing Wall Street, “speculation”, high-frequency trading, banking, and just about any other finance related activity, industry, and profession.

One person expressed it this way:

Today [the capital gains tax rate] is also applied to short sells and other casino-like behavior where the asset is bought and resold in a matter of days or even hours and there is absolutely no justification for that.

Another person said it like this:

If you take money you have saved and invest it in a new company, like a VC investing in a new technology startup, this actually creates new jobs. This money should be taxed differently than plunking money down long term on something like…betting oil futures rise in the next year.

The problem is that our tax law treats the two the same. One reinvests capital into the economy to create jobs (good) the other shuffles it around (usually with insider information) to make sure that gains outpace infaltion. The other side effect of investing like this is that it ties capital up in a way that ensures no new jobs get created (bad).

For thousands of years, people have displayed open hostility to those who make money through finance. This has most frequently manifested itself through antisemitism and marxist anticapitalism, resulting in the murder of tens of millions across the globe.

Murder is out of fashion now, so it’s popular to advocate that certain undesirable individuals/professions be taxed to death. But the thinking is the same: if we could just stop certain people from trading in a certain way, all our economic woes would go away. History shows that this has never worked. And there is no reason to believe it ever will work.

Just because you don’t understand something doesn’t mean it doesn’t provide a ton of value. And just because you can’t see the effects of a policy or course of action doesn’t mean there aren’t any.

Anyway, here is my response to the original question:

  1. Encourage investment. The lower the tax rate, the lower the returns need to be for a given investment to make sense. Warren Buffet has talked extensively about this.

    Thus the ideal capital gains tax rate is zero, which would lead to significant job creation over time (with the caveat of point number 5 below). This means that it is entirely plausible that a zero capital gains rate would actually increase total government tax receipts as a result of income taxes on new jobs.

  2. Avoid multiple taxation. In order to make investment income, all of these things must happens: a person must make money (which is taxed), invest that money in a corporation, the corporation must make money (which is taxed), the corporation must issue dividends to the individual (which is taxed). Thus, capital gains taxes actually represent triple taxation. Some will say this is fair because a small portion of people in this country have never worked and should pay through the nose. But it’s unfair to the overwhelming majority of people - think anyone who is on the verge of retirement and has dutifully contributed to retirement accounts for decades.

    In a very narrow set of circumstances, the second tax (corporate tax) can be avoided, but that is very uncommon and not relevant to the original question.

  3. Inflation. Lets say you invested $1,000 in Microsoft 10 years ago at about ~$25/share and you sold it today ~$31 for a total of $1240. Unfortunately, you just lost money because of inflation - according to the BLS , $1000 ten years ago is the same as $1275 today, resulting in a de fact loss of $35. Even more unfortunate, the federal government doesn’t care - you pay 15% tax on the raw $240 “profit”. This results in increasing your loss from $35 to $71.

    It is easy to imagine situations where the capital gains tax could turn even a modest real gain into a real loss.

  4. Capital gains disproportionately hurts seniors. Young people typically have very little investment income, but they can work long and hard and make money. Old people can’t and have to rely on whatever provision they made earlier in their lives.

  5. All of that said, it doesn’t really matter in terms of institutional investment. There is an enormous body of work showing that temporary, whether actually temporary or perceived transience due to political volatility, tax rate cuts have almost no impact on invest decision making. Our current political/economic environment, where raising the capital gains tax is even merely discussed, is enough to massively deter investment. The only way to stimulate investment is through credibly permanent tax cuts.