diff --git a/.DS_Store b/.DS_Store index 2e16271..fa34f1c 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/data/.DS_Store b/data/.DS_Store index 904c60e..155ab9a 100644 Binary files a/data/.DS_Store and b/data/.DS_Store differ diff --git a/data/PaulGrahamEssayMedium/.DS_Store b/data/PaulGrahamEssayMedium/.DS_Store new file mode 100644 index 0000000..960006c Binary files /dev/null and b/data/PaulGrahamEssayMedium/.DS_Store differ diff --git a/data/PaulGrahamEssayMedium/fr.txt b/data/PaulGrahamEssayMedium/fr.txt new file mode 100644 index 0000000..0c21b42 --- /dev/null +++ b/data/PaulGrahamEssayMedium/fr.txt @@ -0,0 +1,923 @@ + + +Want to start a startup? Get funded by +Y Combinator. + + + + +September 2013Most startups that raise money do it more than once. A typical +trajectory might be (1) to get started with a few tens of thousands +from something like Y Combinator or individual angels, then +(2) raise a few hundred thousand to a few million to build the company, +and then (3) once the company is clearly succeeding, raise one or +more later rounds to accelerate growth.Reality can be messier. Some companies raise money twice in phase +2. Others skip phase 1 and go straight to phase 2. And at Y Combinator +we get an increasing number of companies that have already +raised amounts in the hundreds of thousands. But the three phase +path is at least the one about which individual startups' paths +oscillate.This essay focuses on phase 2 fundraising. That's the type the +startups we fund are doing on Demo Day, and this essay is the advice +we give them. +ForcesFundraising is hard in both senses: hard like lifting a heavy weight, +and hard like solving a puzzle. It's hard like lifting a weight +because it's intrinsically hard to convince people to part with +large sums of money. That problem is irreducible; it should be +hard. But much of the other kind of difficulty can be eliminated. +Fundraising only seems a puzzle because it's an alien world to most +founders, and I hope to fix that by supplying a map through it.To founders, the behavior of investors is often opaque — partly +because their motivations are obscure, but partly because they +deliberately mislead you. And the misleading ways of investors +combine horribly with the wishful thinking of inexperienced founders. +At YC we're always warning founders about this danger, and investors +are probably more circumspect with YC startups than with other +companies they talk to, and even so we witness a constant series +of explosions as these two volatile components combine. +[1]If you're an inexperienced founder, the only way to survive is by +imposing external constraints on yourself. You can't trust your +intuitions. I'm going to give you a set of rules here that will +get you through this process if anything will. At certain moments +you'll be tempted to ignore them. So rule number zero is: these +rules exist for a reason. You wouldn't need a rule to keep you +going in one direction if there weren't powerful forces pushing you +in another.The ultimate source of the forces acting on you are the forces +acting on investors. Investors are pinched between two kinds of +fear: fear of investing in startups that fizzle, and fear of missing +out on startups that take off. The cause of all this fear is the +very thing that makes startups such attractive investments: the +successful ones grow very fast. But that fast growth means investors +can't wait around. If you wait till a startup is obviously a +success, it's too late. To get the really high returns, you have +to invest in startups when it's still unclear how they'll do. But +that in turn makes investors nervous they're about to invest in a +flop. As indeed they often are.What investors would like to do, if they could, is wait. When a +startup is only a few months old, every week that passes gives you +significantly more information about them. But if you wait too +long, other investors might take the deal away from you. And of +course the other investors are all subject to the same forces. So +what tends to happen is that they all wait as long as they can, +then when some act the rest have to. +Don't raise money unless you want it and it wants you.Such a high proportion of successful startups raise money that it +might seem fundraising is one of the defining qualities of a startup. +Actually it isn't. Rapid growth is what +makes a company a startup. Most companies in a position to grow +rapidly find that (a) taking outside money helps them grow faster, +and (b) their growth potential makes it easy to attract such money. +It's so common for both (a) and (b) to be true of a successful +startup that practically all do raise outside money. But there may +be cases where a startup either wouldn't want to grow faster, or +outside money wouldn't help them to, and if you're one of them, +don't raise money.The other time not to raise money is when you won't be able to. If +you try to raise money before you can convince +investors, you'll not only waste your time, but also burn your +reputation with those investors. +Be in fundraising mode or not.One of the things that surprises founders most about fundraising +is how distracting it is. When you start fundraising, everything +else grinds to a halt. The problem is not the time fundraising +consumes but that it becomes the top idea in +your mind. A startup can't endure that level of distraction +for long. An early stage startup grows mostly because the founders +make it grow, and if the founders look away, +growth usually drops sharply.Because fundraising is so distracting, a startup should either be +in fundraising mode or not. And when you do decide to raise money, +you should focus your whole attention on it so you can get it done +quickly and get back to work. +[2]You can take money from investors when you're not in fundraising +mode. You just can't expend any attention on it. There are two +things that take attention: convincing investors, and negotiating +with them. So when you're not in fundraising mode, you should take +money from investors only if they require no convincing, and are +willing to invest on terms you'll take without negotiation. For +example, if a reputable investor is willing to invest on a convertible +note, using standard paperwork, that is either uncapped or capped +at a good valuation, you can take that without having to think. +[3] +The terms will be whatever they turn out to be in your next +equity round. And "no convincing" means just that: zero time spent +meeting with investors or preparing materials for them. If an +investor says they're ready to invest, but they need you to come +in for one meeting to meet some of the partners, tell them no, if +you're not in fundraising mode, because that's fundraising. +[4] +Tell them politely; tell them you're focusing on the company right +now, and that you'll get back to them when you're fundraising; but +do not get sucked down the slippery slope.Investors will try to lure you into fundraising when you're not. +It's great for them if they can, because they can thereby get a +shot at you before everyone else. They'll send you emails saying +they want to meet to learn more about you. If you get cold-emailed +by an associate at a VC firm, you shouldn't meet even if you are +in fundraising mode. Deals don't happen that way. +[5] +But even +if you get an email from a partner you should try to delay meeting +till you're in fundraising mode. They may say they just want to +meet and chat, but investors never just want to meet and chat. What +if they like you? What if they start to talk about giving you +money? Will you be able to resist having that conversation? Unless +you're experienced enough at fundraising to have a casual conversation +with investors that stays casual, it's safer to tell them that you'd +be happy to later, when you're fundraising, but that right now you +need to focus on the company. +[6]Companies that are successful at raising money in phase 2 sometimes +tack on a few investors after leaving fundraising mode. This is +fine; if fundraising went well, you'll be able to do it without +spending time convincing them or negotiating about terms. +Get introductions to investors.Before you can talk to investors, you have to be introduced to them. +If you're presenting at a Demo Day, you'll be introduced to a whole +bunch simultaneously. But even if you are, you should supplement +these with intros you collect yourself.Do you have to be introduced? In phase 2, yes. Some investors +will let you email them a business plan, but you can tell from the +way their sites are organized that they don't really want startups +to approach them directly.Intros vary greatly in effectiveness. The best type of intro is +from a well-known investor who has just invested in you. So when +you get an investor to commit, ask them to introduce you to other +investors they respect. +[7] +The next best type of intro is from a +founder of a company they've funded. You can also get intros from +other people in the startup community, like lawyers and reporters.There are now sites like AngelList, FundersClub, and WeFunder that +can introduce you to investors. We recommend startups treat them +as auxiliary sources of money. Raise money first from leads you +get yourself. Those will on average be better investors. Plus +you'll have an easier time raising money on these sites once you +can say you've already raised some from well-known investors. +Hear no till you hear yes.Treat investors as saying no till they unequivocally say yes, in +the form of a definite offer with no contingencies.I mentioned earlier that investors prefer to wait if they can. +What's particularly dangerous for founders is the way they wait. +Essentially, they lead you on. They seem like they're about to +invest right up till the moment they say no. If they even say no. +Some of the worse ones never actually do say no; they just stop +replying to your emails. They hope that way to get a free option +on investing. If they decide later that they want to invest — usually +because they've heard you're a hot deal — they can pretend they +just got distracted and then restart the conversation as if they'd +been about to. +[8]That's not the worst thing investors will do. Some will use language +that makes it sound as if they're committing, but which doesn't +actually commit them. And wishful thinking founders are happy to +meet them half way. +[9]Fortunately, the next rule is a tactic for neutralizing this behavior. +But to work it depends on you not being tricked by the no that +sounds like yes. It's so common for founders to be misled/mistaken +about this that we designed a protocol to fix the +problem. If you believe an investor has committed, get them to +confirm it. If you and they have different views of reality, whether +the source of the discrepancy is their sketchiness or your wishful +thinking, the prospect of confirming a commitment in writing will +flush it out. And till they confirm, regard them as saying no. +Do breadth-first search weighted by expected value.When you talk to investors your m.o. should be breadth-first search, +weighted by expected value. You should always talk to investors +in parallel rather than serially. You can't afford the time it +takes to talk to investors serially, plus if you only talk to one +investor at a time, they don't have the pressure of other investors +to make them act. But you shouldn't pay the same attention to every +investor, because some are more promising prospects than others. +The optimal solution is to talk to all potential investors in +parallel, but give higher priority to the more promising ones. +[10]Expected value = how likely an investor is to say yes, multiplied +by how good it would be if they did. So for example, an eminent +investor who would invest a lot, but will be hard to convince, might +have the same expected value as an obscure angel who won't invest +much, but will be easy to convince. Whereas an obscure angel who +will only invest a small amount, and yet needs to meet multiple +times before making up his mind, has very low expected value. Meet +such investors last, if at all. +[11]Doing breadth-first search weighted by expected value will save you +from investors who never explicitly say no but merely drift away, +because you'll drift away from them at the same rate. It protects +you from investors who flake in much the same way that a distributed +algorithm protects you from processors that fail. If some investor +isn't returning your emails, or wants to have lots of meetings but +isn't progressing toward making you an offer, you automatically +focus less on them. But you have to be disciplined about assigning +probabilities. You can't let how much you want an investor influence +your estimate of how much they want you. +Know where you stand.How do you judge how well you're doing with an investor, when +investors habitually seem more positive than they are? By looking +at their actions rather than their words. Every investor has some +track they need to move along from the first conversation to wiring +the money, and you should always know what that track consists of, +where you are on it, and how fast you're moving forward.Never leave a meeting with an investor without asking what happens +next. What more do they need in order to decide? Do they need +another meeting with you? To talk about what? And how soon? Do +they need to do something internally, like talk to their partners, +or investigate some issue? How long do they expect it to take? +Don't be too pushy, but know where you stand. If investors are +vague or resist answering such questions, assume the worst; investors +who are seriously interested in you will usually be happy to talk +about what has to happen between now and wiring the money, because +they're already running through that in their heads. +[12]If you're experienced at negotiations, you already know how to ask +such questions. +[13] +If you're not, there's a trick you can use +in this situation. Investors know you're inexperienced at raising +money. Inexperience there doesn't make you unattractive. Being a +noob at technology would, if you're starting a technology startup, +but not being a noob at fundraising. Larry and Sergey were noobs +at fundraising. So you can just confess that you're inexperienced +at this and ask how their process works and where you are in it. +[14] +Get the first commitment.The biggest factor in most investors' opinions of you is the opinion +of other investors. Once you start getting +investors to commit, it becomes increasingly easy to get more to. +But the other side of this coin is that it's often hard to get the +first commitment.Getting the first substantial offer can be half the total difficulty +of fundraising. What counts as a substantial offer depends on who +it's from and how much it is. Money from friends and family doesn't +usually count, no matter how much. But if you get $50k from a well +known VC firm or angel investor, that will usually be enough to set +things rolling. +[15] +Close committed money.It's not a deal till the money's in the bank. I often hear +inexperienced founders say things like "We've raised $800,000," +only to discover that zero of it is in the bank so far. Remember +the twin fears that torment investors? The fear of missing out +that makes them jump early, and the fear of jumping onto a turd +that results? This is a market where people are exceptionally prone +to buyer's remorse. And it's also one that furnishes them plenty +of excuses to gratify it. The public markets snap startup investing +around like a whip. If the Chinese economy blows up tomorrow, all +bets are off. But there are lots of surprises for individual +startups too, and they tend to be concentrated around fundraising. +Tomorrow a big competitor could appear, or you could get C&Ded, or +your cofounder could quit. +[16]Even a day's delay can bring news that causes an investor to change +their mind. So when someone commits, get the money. Knowing where +you stand doesn't end when they say they'll invest. After they say +yes, know what the timetable is for getting the money, and then +babysit that process till it happens. Institutional investors have +people in charge of wiring money, but you may have to hunt angels +down in person to collect a check.Inexperienced investors are the ones most likely to get buyer's +remorse. Established ones have learned to treat saying yes as like +diving off a diving board, and they also have more brand to preserve. +But I've heard of cases of even top-tier VC firms welching on deals. +Avoid investors who don't "lead."Since getting the first offer is most of the difficulty of fundraising, +that should be part of your calculation of expected value when you +start. You have to estimate not just the probability that an +investor will say yes, but the probability that they'd be the first +to say yes, and the latter is not simply a constant fraction of the +former. Some investors are known for deciding quickly, and those +are extra valuable early on.Conversely, an investor who will only invest once other investors +have is worthless initially. And while most investors are influenced +by how interested other investors are in you, there are some who +have an explicit policy of only investing after other investors +have. You can recognize this contemptible subspecies of investor +because they often talk about "leads." They say that they don't +lead, or that they'll invest once you have a lead. Sometimes they +even claim to be willing to lead themselves, by which they mean +they won't invest till you get $x from other investors. (It's great +if by "lead" they mean they'll invest unilaterally, and in addition +will help you raise more. What's lame is when they use the term +to mean they won't invest unless you can raise more elsewhere.) +[17]Where does this term "lead" come from? Up till a few years ago, +startups raising money in phase 2 would usually raise equity rounds +in which several investors invested at the same time using the same +paperwork. You'd negotiate the terms with one "lead" investor, and +then all the others would sign the same documents and all the money +change hands at the closing.Series A rounds still work that way, but things now work differently +for most fundraising prior to the series A. Now there are rarely +actual rounds before the A round, or leads for them. Now startups +simply raise money from investors one at a time till they feel they +have enough.Since there are no longer leads, why do investors use that term? +Because it's a more legitimate-sounding way of saying what they +really mean. All they really mean is that their interest in you +is a function of other investors' interest in you. I.e. the spectral +signature of all mediocre investors. But when phrased in terms of +leads, it sounds like there is something structural and therefore +legitimate about their behavior.When an investor tells you "I want to invest in you, but I don't +lead," translate that in your mind to "No, except yes if you turn +out to be a hot deal." And since that's the default opinion of any +investor about any startup, they've essentially just told you +nothing.When you first start fundraising, the expected value of an investor +who won't "lead" is zero, so talk to such investors last if at all. +Have multiple plans.Many investors will ask how much you're planning to raise. This +question makes founders feel they should be planning to raise a +specific amount. But in fact you shouldn't. It's a mistake to +have fixed plans in an undertaking as unpredictable as fundraising.So why do investors ask how much you plan to raise? For much the +same reasons a salesperson in a store will ask "How much were you +planning to spend?" if you walk in looking for a gift for a friend. +You probably didn't have a precise amount in mind; you just want +to find something good, and if it's inexpensive, so much the better. +The salesperson asks you this not because you're supposed to have +a plan to spend a specific amount, but so they can show you only +things that cost the most you'll pay.Similarly, when investors ask how much you plan to raise, it's not +because you're supposed to have a plan. It's to see whether you'd +be a suitable recipient for the size of investment they like to +make, and also to judge your ambition, reasonableness, and how far +you are along with fundraising.If you're a wizard at fundraising, you can say "We plan to raise +a $7 million series A round, and we'll be accepting termsheets next +tuesday." I've known a handful of founders who could pull that off +without having VCs laugh in their faces. But if you're in the +inexperienced but earnest majority, the solution is analogous to +the solution I recommend for pitching +your startup: do the right thing and then just tell investors what +you're doing.And the right strategy, in fundraising, is to have multiple plans +depending on how much you can raise. Ideally you should be able +to tell investors something like: we can make it to profitability +without raising any more money, but if we raise a few hundred +thousand we can hire one or two smart friends, and if we raise a +couple million, we can hire a whole engineering team, etc.Different plans match different investors. If you're talking to a +VC firm that only does series A rounds (though there are few of +those left), it would be a waste of time talking about any but your +most expensive plan. Whereas if you're talking to an angel who +invests $20k at a time and you haven't raised any money yet, you +probably want to focus on your least expensive plan.If you're so fortunate as to have to think about the upper limit +on what you should raise, a good rule of thumb is to multiply the +number of people you want to hire times $15k times 18 months. In +most startups, nearly all the costs are a function of the number +of people, and $15k per month is the conventional total cost +(including benefits and even office space) per person. $15k per +month is high, so don't actually spend that much. But it's ok to +use a high estimate when fundraising to add a margin for error. If +you have additional expenses, like manufacturing, add in those at +the end. Assuming you have none and you think you might hire 20 +people, the most you'd want to raise is 20 x $15k x 18 = $5.4 +million. +[18] +Underestimate how much you want.Though you can focus on different plans when talking to different +types of investors, you should on the whole err on the side of +underestimating the amount you hope to raise.For example, if you'd like to raise $500k, it's better to say +initially that you're trying to raise $250k. Then when you reach +$150k you're more than half done. That sends two useful signals +to investors: that you're doing well, and that they have to decide +quickly because you're running out of room. Whereas if you'd said +you were raising $500k, you'd be less than a third done at $150k. +If fundraising stalled there for an appreciable time, you'd start +to read as a failure.Saying initially that you're raising $250k doesn't limit you to +raising that much. When you reach your initial target and you still +have investor interest, you can just decide to raise more. Startups +do that all the time. In fact, most startups that are very successful +at fundraising end up raising more than they originally intended.I'm not saying you should lie, but that you should lower your +expectations initially. There is almost no downside in starting +with a low number. It not only won't cap the amount you raise, but +will on the whole tend to increase it.A good metaphor here is angle of attack. If you try to fly at too +steep an angle of attack, you just stall. If you say right out of +the gate that you want to raise a $5 million series A round, unless +you're in a very strong position, you not only won't get that but +won't get anything. Better to start at a low angle of attack, build +up speed, and then gradually increase the angle if you want. +Be profitable if you can.You will be in a much stronger position if your collection of plans +includes one for raising zero dollars — i.e. if you can make +it to profitability without raising any additional money. Ideally +you want to be able to say to investors "We'll succeed no matter +what, but raising money will help us do it faster."There are many analogies between fundraising and dating, and this +is one of the strongest. No one wants you if you seem desperate. +And the best way not to seem desperate is not to be desperate. +That's one reason we urge startups during YC to keep expenses low +and to try to make it to ramen +profitability before Demo Day. Though it sounds slightly +paradoxical, if you want to raise money, the best thing you can do +is get yourself to the point where you don't need to.There are almost two distinct modes of fundraising: one in which +founders who need money knock on doors seeking it, knowing that +otherwise the company will die or at the very least people will +have to be fired, and one in which founders who don't need money +take some to grow faster than they could merely on their own revenues. +To emphasize the distinction I'm going to name them: type A fundraising +is when you don't need money, and type B fundraising is when you +do.Inexperienced founders read about famous startups doing what was +type A fundraising, and decide they should raise money too, since +that seems to be how startups work. Except when they raise money +they don't have a clear path to profitability and are thus doing +type B fundraising. And they are then surprised how difficult and +unpleasant it is.Of course not all startups can make it to ramen profitability in a +few months. And some that don't still manage to have the upper +hand over investors, if they have some other advantage like +extraordinary growth numbers or exceptionally formidable founders. +But as time passes it gets increasingly difficult to fundraise from +a position of strength without being profitable. +[19] +Don't optimize for valuation.When you raise money, what should your valuation be? The most +important thing to understand about valuation is that it's not that +important.Founders who raise money at high valuations tend to be unduly proud +of it. Founders are often competitive people, and since valuation +is usually the only visible number attached to a startup, they end +up competing to raise money at the highest valuation. This is +stupid, because fundraising is not the test that matters. The real +test is revenue. Fundraising is just a means to that end. Being +proud of how well you did at fundraising is like being proud of +your college grades.Not only is fundraising not the test that matters, valuation is not +even the thing to optimize about fundraising. The number one thing +you want from phase 2 fundraising is to get the money you need, so +you can get back to focusing on the real test, the success of your +company. Number two is good investors. Valuation is at best third.The empirical evidence shows just how unimportant it is. Dropbox +and Airbnb are the most successful companies we've funded so far, +and they raised money after Y Combinator at premoney valuations of +$4 million and $2.6 million respectively. Prices are so much higher +now that if you can raise money at all you'll probably raise it at +higher valuations than Dropbox and Airbnb. So let that satisfy +your competitiveness. You're doing better than Dropbox and Airbnb! +At a test that doesn't matter.When you start fundraising, your initial valuation (or valuation +cap) will be set by the deal you make with the first investor who +commits. You can increase the price for later investors, if you +get a lot of interest, but by default the valuation you got from +the first investor becomes your asking price.So if you're raising money from multiple investors, as most companies +do in phase 2, you have to be careful to avoid raising the first +from an over-eager investor at a price you won't be able to +sustain. You can of course lower your price if you need to (in +which case you should give the same terms to investors who invested +earlier at a higher price), but you may lose a bunch of leads in +the process of realizing you need to do this.What you can do if you have eager first investors is raise money +from them on an uncapped convertible note with an MFN clause. This +is essentially a way of saying that the valuation cap of the note +will be determined by the next investors you raise money from.It will be easier to raise money at a lower valuation. It shouldn't +be, but it is. Since phase 2 prices vary at most 10x and the big +successes generate returns of at least 100x, investors should pick +startups entirely based on their estimate of the probability that +the company will be a big success and hardly at all on price. But +although it's a mistake for investors to care about price, a +significant number do. A startup that investors seem to like but +won't invest in at a cap of $x will have an easier time at $x/2. +[20] +Yes/no before valuation.Some investors want to know what your valuation is before they even +talk to you about investing. If your valuation has already been +set by a prior investment at a specific valuation or cap, you can +tell them that number. But if it isn't set because you haven't +closed anyone yet, and they try to push you to name a price, resist +doing so. If this would be the first investor you've closed, then +this could be the tipping point of fundraising. That means closing +this investor is the first priority, and you need to get the +conversation onto that instead of being dragged sideways into a +discussion of price.Fortunately there is a way to avoid naming a price in this situation. +And it is not just a negotiating trick; it's how you (both) should +be operating. Tell them that valuation is not the most important +thing to you and that you haven't thought much about it, that you +are looking for investors you want to partner with and who want to +partner with you, and that you should talk first about whether they +want to invest at all. Then if they decide they do want to invest, +you can figure out a price. But first things first.Since valuation isn't that important and getting fundraising rolling +is, we usually tell founders to give the first investor who commits +as low a price as they need to. This is a safe technique so long +as you combine it with the next one. +[21] +Beware "valuation sensitive" investors.Occasionally you'll encounter investors who describe themselves as +"valuation sensitive." What this means in practice is that they +are compulsive negotiators who will suck up a lot of your time +trying to push your price down. You should therefore never approach +such investors first. While you shouldn't chase high valuations, +you also don't want your valuation to be set artificially low because +the first investor who committed happened to be a compulsive +negotiator. Some such investors have value, but the time to approach +them is near the end of fundraising, when you're in a position to +say "this is the price everyone else has paid; take it or leave it" +and not mind if they leave it. This way, you'll not only get market +price, but it will also take less time.Ideally you know which investors have a reputation for being +"valuation sensitive" and can postpone dealing with them till last, +but occasionally one you didn't know about will pop up early on. +The rule of doing breadth first search weighted by expected value +already tells you what to do in this case: slow down your interactions +with them.There are a handful of investors who will try to invest at a lower +valuation even when your price has already been set. Lowering your +price is a backup plan you resort to when you discover you've let +the price get set too high to close all the money you need. So +you'd only want to talk to this sort of investor if you were about +to do that anyway. But since investor meetings have to be arranged +at least a few days in advance and you can't predict when you'll +need to resort to lowering your price, this means in practice that +you should approach this type of investor last if at all.If you're surprised by a lowball offer, treat it as a backup offer +and delay responding to it. When someone makes an offer in good +faith, you have a moral obligation to respond in a reasonable time. +But lowballing you is a dick move that should be met with the +corresponding countermove. +Accept offers greedily.I'm a little leery of using the term "greedily" when writing about +fundraising lest non-programmers misunderstand me, but a greedy +algorithm is simply one that doesn't try to look into the future. +A greedy algorithm takes the best of the options in front of it +right now. And that is how startups should approach fundraising +in phases 2 and later. Don't try to look into the future because +(a) the future is unpredictable, and indeed in this business you're +often being deliberately misled about it and (b) your first priority +in fundraising should be to get it finished and get back to work +anyway.If someone makes you an acceptable offer, take it. If you have +multiple incompatible offers, take the best. Don't reject an +acceptable offer in the hope of getting a better one in the future.These simple rules cover a wide variety of cases. If you're raising +money from many investors, roll them up as they say yes. As you +start to feel you've raised enough, the threshold for acceptable +will start to get higher.In practice offers exist for stretches of time, not points. So +when you get an acceptable offer that would be incompatible with +others (e.g. an offer to invest most of the money you need), you +can tell the other investors you're talking to that you have an +offer good enough to accept, and give them a few days to make their +own. This could lose you some that might have made an offer if +they had more time. But by definition you don't care; the initial +offer was acceptable.Some investors will try to prevent others from having time to decide +by giving you an "exploding" offer, meaning one that's only valid +for a few days. Offers from the very best investors explode less +frequently and less rapidly — Fred Wilson never gives exploding +offers, for example — because they're confident you'll pick +them. But lower-tier investors sometimes give offers with very +short fuses, because they believe no one who had other options would +choose them. A deadline of three working days is acceptable. You +shouldn't need more than that if you've been talking to investors +in parallel. But a deadline any shorter is a sign you're dealing +with a sketchy investor. You can usually call their bluff, and you +may need to. +[22]It might seem that instead of accepting offers greedily, your goal +should be to get the best investors as partners. That is certainly +a good goal, but in phase 2 "get the best investors" only rarely +conflicts with "accept offers greedily," because the best investors +don't usually take any longer to decide than the others. The only +case where the two strategies give conflicting advice is when you +have to forgo an offer from an acceptable investor to see if you'll +get an offer from a better one. If you talk to investors in parallel +and push back on exploding offers with excessively short deadlines, +that will almost never happen. But if it does, "get the best +investors" is in the average case bad advice. The best investors +are also the most selective, because they get their pick of all the +startups. They reject nearly everyone they talk to, which means +in the average case it's a bad trade to exchange a definite offer +from an acceptable investor for a potential offer from a better +one.(The situation is different in phase 1. You can't apply to all the +incubators in parallel, because some offset their schedules to +prevent this. In phase 1, "accept offers greedily" and "get the +best investors" do conflict, so if you want to apply to multiple +incubators, you should do it in such a way that the ones you want +most decide first.)Sometimes when you're raising money from multiple investors, a +series A will emerge out of those conversations, and these rules +even cover what to do in that case. When an investor starts to +talk to you about a series A, keep taking smaller investments till +they actually give you a termsheet. There's no practical difficulty. +If the smaller investments are on convertible notes, they'll just +convert into the series A round. The series A investor won't like +having all these other random investors as bedfellows, but if it +bothers them so much they should get on with giving you a termsheet. +Till they do, you don't know for sure they will, and the greedy +algorithm tells you what to do. +[23] +Don't sell more than 25% in phase 2.If you do well, you will probably raise a series A round eventually. +I say probably because things are changing with series A rounds. +Startups may start to skip them. But only one company we've funded +has so far, so tentatively assume the path to huge passes through +an A round. +[24]Which means you should avoid doing things in earlier rounds that +will mess up raising an A round. For example, if you've sold more +than about 40% of your company total, it starts to get harder to +raise an A round, because VCs worry there will not be enough stock +left to keep the founders motivated.Our rule of thumb is not to sell more than 25% in phase 2, on top +of whatever you sold in phase 1, which should be less than 15%. If +you're raising money on uncapped notes, you'll have to guess what +the eventual equity round valuation might be. Guess conservatively.(Since the goal of this rule is to avoid messing up the series A, +there's obviously an exception if you end up raising a series A in +phase 2, as a handful of startups do.) +Have one person handle fundraising.If you have multiple founders, pick one to handle fundraising so +the other(s) can keep working on the company. And since the danger +of fundraising is not the time taken up by the actual meetings but +that it becomes the top idea in your mind, the founder who handles +fundraising should make a conscious effort to insulate the other +founder(s) from the details of the process. +[25](If the founders mistrust one another, this could cause some friction. +But if the founders mistrust one another, you have worse problems +to worry about than how to organize fundraising.)The founder who handles fundraising should be the CEO, who should +in turn be the most formidable of the founders. Even if the CEO +is a programmer and another founder is a salesperson? Yes. If you +happen to be that type of founding team, you're effectively a single +founder when it comes to fundraising.It's ok to bring all the founders to meet an investor who will +invest a lot, and who needs this meeting as the final step before +deciding. But wait till that point. Introducing an investor to +your cofounder(s) should be like introducing a girl/boyfriend to +your parents — something you do only when things reach a certain +stage of seriousness.Even if there are still one or more founders focusing on the company +during fundraising, growth will slow. But try to get as much growth +as you can, because fundraising is a segment of time, not a point, +and what happens to the company during that time affects the outcome. +If your numbers grow significantly between two investor meetings, +investors will be hot to close, and if your numbers are flat or +down they'll start to get cold feet. +You'll need an executive summary and (maybe) a deck.Traditionally phase 2 fundraising consists of presenting a slide +deck in person to investors. Sequoia describes what such a deck +should contain, and +since they're the customer you can take their word for it.I say "traditionally" because I'm ambivalent about decks, and (though +perhaps this is wishful thinking) they seem to be on the way out. +A lot of the most successful startups we fund never make decks in +phase 2. They just talk to investors and explain what they plan +to do. Fundraising usually takes off fast for the startups that +are most successful at it, and they're thus able to excuse themselves +by saying that they haven't had time to make a deck.You'll also want an executive summary, which should be no more than +a page long and describe in the most matter of fact language what +you plan to do, why it's a good idea, and what progress you've made +so far. The point of the summary is to remind the investor (who +may have met many startups that day) what you talked about.Assume that if you give someone a copy of your deck or executive +summary, it will be passed on to whoever you'd least like to have +it. But don't refuse on that account to give copies to investors +you meet. You just have to treat such leaks as a cost of doing +business. In practice it's not that high a cost. Though founders +are rightly indignant when their plans get leaked to competitors, +I can't think of a startup whose outcome has been affected by it.Sometimes an investor will ask you to send them your deck and/or +executive summary before they decide whether to meet with you. I +wouldn't do that. It's a sign they're not really interested. +Stop fundraising when it stops working.When do you stop fundraising? Ideally when you've raised enough. +But what if you haven't raised as much as you'd like? When do you +give up?It's hard to give general advice about this, because there have +been cases of startups that kept trying to raise money even when +it seemed hopeless, and miraculously succeeded. But what I usually +tell founders is to stop fundraising when you start to get a lot +of air in the straw. When you're drinking through a straw, you can +tell when you get to the end of the liquid because you start to get +a lot of air in the straw. When your fundraising options run out, +they usually run out in the same way. Don't keep sucking on the +straw if you're just getting air. It's not going to get better. +Don't get addicted to fundraising.Fundraising is a chore for most founders, but some find it more +interesting than working on their startup. The work at an early +stage startup often consists of unglamorous schleps. Whereas fundraising, when it's +going well, can be quite the opposite. Instead of sitting in your +grubby apartment listening to users complain about bugs in your +software, you're being offered millions of dollars by famous investors +over lunch at a nice restaurant. +[26]The danger of fundraising is particularly acute for people who are +good at it. It's always fun to work on something you're good at. +If you're one of these people, beware. Fundraising is not what +will make your company successful. Listening to users complain +about bugs in your software is what will make you successful. And +the big danger of getting addicted to fundraising is not merely +that you'll spend too long on it or raise too much money. It's +that you'll start to think of yourself as being already successful, +and lose your taste for the schleps you need to undertake to actually +be successful. Startups can be destroyed by this.When I see a startup with young founders that is fabulously successful +at fundraising, I mentally decrease my estimate of the probability +that they'll succeed. The press may be writing about them as if +they'd been anointed as the next Google, but I'm thinking "this is +going to end badly." +Don't raise too much.Though only a handful of startups have to worry about this, it is +possible to raise too much. The dangers of raising too much are +subtle but insidious. One is that it will set impossibly high +expectations. If you raise an excessive amount of money, it will +be at a high valuation, and the danger of raising money at too high +a valuation is that you won't be able to increase it sufficiently +the next time you raise money.A company's valuation is expected to rise each time it raises money. +If not it's a sign of a company in trouble, which makes you +unattractive to investors. So if you raise money in phase 2 at a +post-money valuation of $30 million, the pre-money valuation of +your next round, if you want to raise one, is going to have to be +at least $50 million. And you have to be doing really, really well +to raise money at $50 million.It's very dangerous to let the competitiveness of your current round +set the performance threshold you have to meet to raise your next +one, because the two are only loosely coupled.But the money itself may be more dangerous than the valuation. The +more you raise, the more you spend, and spending a lot of money can +be disastrous for an early stage startup. Spending a lot makes it +harder to become profitable, and perhaps even worse, it makes you +more rigid, because the main way to spend money is people, and the +more people you have, the harder it is to change directions. So +if you do raise a huge amount of money, don't spend it. (You will +find that advice almost impossible to follow, so hot will be the +money burning a hole in your pocket, but I feel obliged at least +to try.) +Be nice.Startups raising money occasionally alienate investors by seeming +arrogant. Sometimes because they are arrogant, and sometimes because +they're noobs clumsily attempting to mimic the toughness they've +observed in experienced founders.It's a mistake to behave arrogantly to investors. While there are +certain situations in which certain investors like certain kinds +of arrogance, investors vary greatly in this respect, and a flick +of the whip that will bring one to heel will make another roar with +indignation. The only safe strategy is never to seem arrogant at +all.That will require some diplomacy if you follow the advice I've given +here, because the advice I've given is essentially how to play +hardball back. When you refuse to meet an investor because you're +not in fundraising mode, or slow down your interactions with an +investor who moves too slow, or treat a contingent offer as the no +it actually is and then, by accepting offers greedily, end up leaving +that investor out, you're going to be doing things investors don't +like. So you must cushion the blow with soft words. At YC we tell +startups they can blame us. And now that I've written this, everyone +else can blame me if they want. That plus the inexperience card +should work in most situations: sorry, we think you're great, but +PG said startups shouldn't ___, and since we're new to fundraising, +we feel like we have to play it safe.The danger of behaving arrogantly is greatest when you're doing +well. When everyone wants you, it's hard not to let it go to your +head. Especially if till recently no one wanted you. But restrain +yourself. The startup world is a small place, and startups have +lots of ups and downs. This is a domain where it's more true than +usual that pride goeth before a fall. +[27]Be nice when investors reject you as well. The best investors are +not wedded to their initial opinion of you. If they reject you in +phase 2 and you end up doing well, they'll often invest in phase +3. In fact investors who reject you are some of your warmest leads +for future fundraising. Any investor who spent significant time +deciding probably came close to saying yes. Often you have some +internal champion who only needs a little more evidence to convince +the skeptics. So it's wise not merely to be nice to investors who +reject you, but (unless they behaved badly) to treat it as the +beginning of a relationship. +The bar will be higher next time.Assume the money you raise in phase 2 will be the last you ever +raise. You must make it to profitability on this money if you can.Over the past several years, the investment community has evolved +from a strategy of anointing a small number of winners early and +then supporting them for years to a strategy of spraying money at +early stage startups and then ruthlessly culling them at the next +stage. This is probably the optimal strategy for investors. It's +too hard to pick winners early on. Better to let the market do it +for you. But it often comes as a surprise to startups how much +harder it is to raise money in phase 3.When your company is only a couple months old, all it has to be is +a promising experiment that's worth funding to see how it turns +out. The next time you raise money, the experiment has to have +worked. You have to be on a trajectory that leads to going public. +And while there are some ideas where the proof that the experiment +worked might consist of e.g. query response times, usually the proof +is profitability. Usually phase 3 fundraising has to be type A +fundraising.In practice there are two ways startups hose themselves between +phases 2 and 3. Some are just too slow to become profitable. They +raise enough money to last for two years. There doesn't seem any +particular urgency to be profitable. So they don't make any effort +to make money for a year. But by that time, not making money has +become habitual. When they finally decide to try, they find they +can't.The other way companies hose themselves is by letting their expenses +grow too fast. Which almost always means hiring too many people. +You usually shouldn't go out and hire 8 people as soon as you raise +money at phase 2. Usually you want to wait till you have growth +(and thus usually revenues) to justify them. A lot of VCs will +encourage you to hire aggressively. VCs generally tell you to spend +too much, partly because as money people they err on the side of +solving problems by spending money, and partly because they want +you to sell them more of your company in subsequent rounds. Don't +listen to them. +Don't make things complicated.I realize it may seem odd to sum up this huge treatise by saying +that my overall advice is not to make fundraising too complicated, +but if you go back and look at this list you'll see it's basically +a simple recipe with a lot of implications and edge cases. Avoid +investors till you decide to raise money, and then when you do, +talk to them all in parallel, prioritized by expected value, and +accept offers greedily. That's fundraising in one sentence. Don't +introduce complicated optimizations, and don't let investors introduce +complications either.Fundraising is not what will make you successful. It's just a means +to an end. Your primary goal should be to get it over with and get +back to what will make you successful — making things and talking +to users — and the path I've described will for most startups +be the surest way to that destination.Be good, take care of yourselves, and don't leave the path. +Notes[1] +The worst explosions happen when unpromising-seeming startups +encounter mediocre investors. Good investors don't lead startups +on; their reputations are too valuable. And startups that seem +promising can usually get enough money from good investors that +they don't have to talk to mediocre ones. It is the unpromising-seeming +startups that have to resort to raising money from mediocre investors. +And it's particularly damaging when these investors flake, because +unpromising-seeming startups are usually more desperate for money.(Not all unpromising-seeming startups do badly. Some are merely +ugly ducklings in the sense that they violate current startup +fashions.)[2] +One YC founder told me: + + I think in general we've done ok at fundraising, but I managed + to screw up twice at the exact same thing — trying to focus + on building the company and fundraising at the same time. + +[3] +There is one subtle danger you have to watch out for here, which +I warn about later: beware of getting too high a valuation from an +eager investor, lest that set an impossibly high target when raising +additional money.[4] +If they really need a meeting, then they're not ready to invest, +regardless of what they say. They're still deciding, which means +you're being asked to come in and convince them. Which is fundraising.[5] +Associates at VC firms regularly cold email startups. Naive +founders think "Wow, a VC is interested in us!" But an associate +is not a VC. They have no decision-making power. And while they +may introduce startups they like to partners at their firm, the +partners discriminate against deals that come to them this way. I +don't know of a single VC investment that began with an associate +cold-emailing a startup. If you want to approach a specific firm, +get an intro to a partner from someone they respect.It's ok to talk to an associate if you get an intro to a VC firm +or they see you at a Demo Day and they begin by having an associate +vet you. That's not a promising lead and should therefore get low +priority, but it's not as completely worthless as a cold email.Because the title "associate" has gotten a bad reputation, a few +VC firms have started to give their associates the title "partner," +which can make things very confusing. If you're a YC startup you +can ask us who's who; otherwise you may have to do some research +online. There may be a special title for actual partners. If +someone speaks for the firm in the press or a blog on the firm's +site, they're probably a real partner. If they're on boards of +directors they're probably a real partner.There are titles between "associate" and "partner," including +"principal" and "venture partner." The meanings of these titles +vary too much to generalize.[6] +For similar reasons, avoid casual conversations with potential +acquirers. They can lead to distractions even more dangerous than +fundraising. Don't even take a meeting with a potential acquirer +unless you want to sell your company right now.[7] +Joshua Reeves specifically suggests asking each investor to +intro you to two more investors.Don't ask investors who say no for introductions to other investors. +That will in many cases be an anti-recommendation.[8] +This is not always as deliberate as its sounds. A lot of the +delays and disconnects between founders and investors are induced +by the customs of the venture business, which have evolved the way +they have because they suit investors' interests.[9] +One YC founder who read a draft of this essay wrote: + + This is the most important section. I think it might bear stating + even more clearly. "Investors will deliberately affect more + interest than they have to preserve optionality. If an investor + seems very interested in you, they still probably won't invest. + The solution for this is to assume the worst — that an investor + is just feigning interest — until you get a definite commitment." + +[10] +Though you should probably pack investor meetings as closely +as you can, Jeff Byun mentions one reason not to: if you pack +investor meetings too closely, you'll have less time for your pitch +to evolve.Some founders deliberately schedule a handful of lame investors +first, to get the bugs out of their pitch.[11] +There is not an efficient market in this respect. Some of the +most useless investors are also the highest maintenance.[12] +Incidentally, this paragraph is sales 101. If you want to see +it in action, go talk to a car dealer.[13] +I know one very smooth founder who used to end investor meetings +with "So, can I count you in?" delivered as if it were "Can you +pass the salt?" Unless you're very smooth (if you're not sure...), +do not do this yourself. There is nothing more unconvincing, for +an investor, than a nerdy founder trying to deliver the lines meant +for a smooth one.Investors are fine with funding nerds. So if you're a nerd, just +try to be a good nerd, rather than doing a bad imitation of a smooth +salesman.[14] +Ian Hogarth suggests a good way to tell how serious potential +investors are: the resources they expend on you after the first +meeting. An investor who's seriously interested will already be +working to help you even before they've committed.[15] +In principle you might have to think about so-called "signalling +risk." If a prestigious VC makes a small seed investment in you, +what if they don't want to invest the next time you raise money? +Other investors might assume that the VC knows you well, since +they're an existing investor, and if they don't want to invest in +your next round, that must mean you suck. The reason I say "in +principle" is that in practice signalling hasn't been much of a +problem so far. It rarely arises, and in the few cases where it +does, the startup in question usually is doing badly and is doomed +anyway.If you have the luxury of choosing among seed investors, you can +play it safe by excluding VC firms. But it isn't critical to.[16] +Sometimes a competitor will deliberately threaten you with a +lawsuit just as you start fundraising, because they know you'll +have to disclose the threat to potential investors and they hope +this will make it harder for you to raise money. If this happens +it will probably frighten you more than investors. Experienced +investors know about this trick, and know the actual lawsuits rarely +happen. So if you're attacked in this way, be forthright with +investors. They'll be more alarmed if you seem evasive than if you +tell them everything.[17] +A related trick is to claim that they'll only invest contingently +on other investors doing so because otherwise you'd be "undercapitalized." +This is almost always bullshit. They can't estimate your minimum +capital needs that precisely.[18] +You won't hire all those 20 people at once, and you'll probably +have some revenues before 18 months are out. But those too are +acceptable or at least accepted additions to the margin for error.[19] +Type A fundraising is so much better that it might even be +worth doing something different if it gets you there sooner. One +YC founder told me that if he were a first-time founder again he'd +"leave ideas that are up-front capital intensive to founders with +established reputations."[20] +I don't know whether this happens because they're innumerate, +or because they believe they have zero ability to predict startup +outcomes (in which case this behavior at least wouldn't be irrational). +In either case the implications are similar.[21] +If you're a YC startup and you have an investor who for some +reason insists that you decide the price, any YC partner can estimate +a market price for you.[22] +You should respond in kind when investors behave upstandingly +too. When an investor makes you a clean offer with no deadline, +you have a moral obligation to respond promptly.[23] +Tell the investors talking to you about an A round about the +smaller investments you raise as you raise them. You owe them such +updates on your cap table, and this is also a good way to pressure +them to act. They won't like you raising other money and may +pressure you to stop, but they can't legitimately ask you to commit +to them till they also commit to you. If they want you to stop +raising money, the way to do it is to give you a series A termsheet +with a no-shop clause.You can relent a little if the potential series A investor has a +great reputation and they're clearly working fast to get you a +termsheet, particularly if a third party like YC is involved to +ensure there are no misunderstandings. But be careful.[24] +The company is Weebly, which made it to profitability on a +seed investment of $650k. They did try to raise a series A in the +fall of 2008 but (no doubt partly because it was the fall of 2008) +the terms they were offered were so bad that they decided to skip +raising an A round.[25] +Another advantage of having one founder take fundraising +meetings is that you never have to negotiate in real time, which +is something inexperienced founders should avoid. One YC founder +told me: + + Investors are professional negotiators and can negotiate on the + spot very easily. If only one founder is in the room, you can + say "I need to circle back with my co-founder" before making any + commitments. I used to do this all the time. + +[26] +You'll be lucky if fundraising feels pleasant enough to become +addictive. More often you have to worry about the other +extreme — becoming demoralized when investors reject you. As +one (very successful) YC founder wrote after reading a draft of +this: + + It's hard to mentally deal with the sheer scale of rejection in + fundraising and if you are not in the right mindset you will fail. + Users may love you but these supposedly smart investors may not + understand you at all. At this point for me, rejection still + rankles but I've come to accept that investors are just not super + thoughtful for the most part and you need to play the game according + to certain somewhat depressing rules (many of which you are + listing) in order to win. + +[27] +The actual sentence in the King James Bible is "Pride goeth +before destruction, and an haughty spirit before a fall."Thanks to Slava Akhmechet, Sam Altman, Nate Blecharczyk, +Adora Cheung, Bill Clerico, John Collison, Patrick Collison, Parker +Conrad, Ron Conway, Travis Deyle, Jason Freedman, Joe Gebbia, Mattan +Griffel, Kevin Hale, Jacob Heller, Ian Hogarth, Justin Kan, Professor +Moriarty, Nikhil Nirmel, David Petersen, Geoff Ralston, Joshua +Reeves, Yuri Sagalov, Emmett Shear, Rajat Suri, Garry Tan, and Nick +Tomarello for reading drafts of this. \ No newline at end of file diff --git a/data/PaulGrahamEssayMedium/guidetoinvestors.txt b/data/PaulGrahamEssayMedium/guidetoinvestors.txt new file mode 100644 index 0000000..5794634 --- /dev/null +++ b/data/PaulGrahamEssayMedium/guidetoinvestors.txt @@ -0,0 +1,481 @@ +April 2007(This essay is derived from a keynote talk at the 2007 ASES Summit +at Stanford.)The world of investors is a foreign one to most hackers—partly +because investors are so unlike hackers, and partly because they +tend to operate in secret. I've been dealing with this world for +many years, both as a founder and an investor, and I still don't +fully understand it.In this essay I'm going to list some of the more surprising things +I've learned about investors. Some I only learned in the past year.Teaching hackers how to deal with investors is probably the second +most important thing we do at Y Combinator. The most important +thing for a startup is to make something good. But everyone knows +that's important. The dangerous thing about investors is that +hackers don't know how little they know about this strange world.1. The investors are what make a startup hub.About a year ago I tried to figure out what you'd need to reproduce +Silicon Valley. I decided the +critical ingredients were rich people +and nerds—investors and founders. People are all you need to +make technology, and all the other people will move.If I had to narrow that down, I'd say investors are the limiting +factor. Not because they contribute more to the startup, but simply +because they're least willing to move. They're rich. They're not +going to move to Albuquerque just because there are some smart +hackers there they could invest in. Whereas hackers will move to +the Bay Area to find investors.2. Angel investors are the most critical.There are several types of investors. The two main categories are +angels and VCs: VCs invest other people's money, and angels invest +their own.Though they're less well known, the angel investors are probably +the more critical ingredient in creating a silicon valley. Most +companies that VCs invest in would never have made it that far if angels +hadn't invested first. VCs say between half and three quarters of +companies that raise series A rounds have taken some outside +investment already. +[1]Angels are willing to fund riskier projects than VCs. They also +give valuable advice, because (unlike VCs) many have been startup +founders themselves.Google's story shows the key role angels play. A lot of people know +Google raised money from Kleiner and Sequoia. What most don't realize +is how late. That VC round was a series B round; the premoney +valuation was $75 million. Google was already a successful company +at that point. Really, Google was funded with angel money.It may seem odd that the canonical Silicon Valley startup was funded +by angels, but this is not so surprising. Risk is always proportionate +to reward. So the most successful startup of all is likely to have +seemed an extremely risky bet at first, and that is exactly the +kind VCs won't touch.Where do angel investors come from? From other startups. So startup +hubs like Silicon Valley benefit from something like the marketplace +effect, but shifted in time: startups are there because startups +were there.3. Angels don't like publicity.If angels are so important, why do we hear more about VCs? Because +VCs like publicity. They need to market themselves to the investors +who are their "customers"—the endowments and pension funds and +rich families whose money they invest—and also to founders who +might come to them for funding.Angels don't need to market themselves to investors because they +invest their own money. Nor do they want to market themselves to +founders: they don't want random people pestering them with business +plans. Actually, neither do VCs. Both angels and VCs get deals +almost exclusively through personal introductions. +[2]The reason VCs want a strong brand is not to draw in more business +plans over the transom, but so they win deals when competing +against other VCs. Whereas angels are rarely in direct competition, +because (a) they do fewer deals, (b) they're happy to split them, +and (c) they invest at a point where the stream is broader.4. Most investors, especially VCs, are not like founders.Some angels are, or were, hackers. But most VCs are a different +type of people: they're dealmakers.If you're a hacker, here's a thought experiment you can run to +understand why there are basically no hacker VCs: How would you +like a job where you never got to make anything, but instead spent +all your time listening to other people pitch (mostly terrible) +projects, deciding whether to fund them, and sitting on their boards +if you did? That would not be fun for most hackers. Hackers like +to make things. This would be like being an administrator.Because most VCs are a different species of people from +founders, it's hard to know what they're thinking. If you're a +hacker, the last time you had to deal with these guys was in high +school. Maybe in college you walked past their fraternity on your +way to the lab. But don't underestimate them. They're as expert +in their world as you are in yours. What they're good at is reading +people, and making deals work to their advantage. Think twice +before you try to beat them at that.5. Most investors are momentum investors.Because most investors are dealmakers rather than technology people, +they generally don't understand what you're doing. I knew as a +founder that most VCs didn't get technology. I also knew some made +a lot of money. And yet it never occurred to me till recently to +put those two ideas together and ask "How can VCs make money by +investing in stuff they don't understand?"The answer is that they're like momentum investors. You can (or +could once) make a lot of money by noticing sudden changes in stock +prices. When a stock jumps upward, you buy, and when it suddenly +drops, you sell. In effect you're insider trading, without knowing +what you know. You just know someone knows something, and that's +making the stock move.This is how most venture investors operate. They don't try to look +at something and predict whether it will take off. They win by +noticing that something is taking off a little sooner than everyone +else. That generates almost as good returns as actually being able +to pick winners. They may have to pay a little more than they would +if they got in at the very beginning, but only a little.Investors always say what they really care about is the team. +Actually what they care most about is your traffic, then what other +investors think, then the team. If you don't yet have any traffic, +they fall back on number 2, what other investors think. And this, +as you can imagine, produces wild oscillations in the "stock price" +of a startup. One week everyone wants you, and they're begging not +to be cut out of the deal. But all it takes is for one big investor +to cool on you, and the next week no one will return your phone +calls. We regularly have startups go from hot to cold or cold to +hot in a matter of days, and literally nothing has changed.There are two ways to deal with this phenomenon. If you're feeling +really confident, you can try to ride it. You can start by asking +a comparatively lowly VC for a small amount of money, and then after +generating interest there, ask more prestigious VCs for larger +amounts, stirring up a crescendo of buzz, and then "sell" at the +top. This is extremely risky, and takes months even if you succeed. +I wouldn't try it myself. My advice is to err on the side of safety: +when someone offers you a decent deal, just take it and get on with +building the company. Startups win or lose based on the quality +of their product, not the quality of their funding deals.6. Most investors are looking for big hits.Venture investors like companies that could go public. That's where +the big returns are. They know the odds of any individual startup +going public are small, but they want to invest in those that at +least have a chance of going public.Currently the way VCs seem to operate is to invest in a bunch of +companies, most of which fail, and one of which is Google. Those +few big wins compensate for losses on their other investments. What this +means is that most VCs will only invest in you if you're a potential +Google. They don't care about companies that are a safe bet to be +acquired for $20 million. There needs to be a chance, however +small, of the company becoming really big.Angels are different in this respect. They're happy to invest in +a company where the most likely outcome is a $20 million acquisition +if they can do it at a low enough valuation. But of course they +like companies that could go public too. So having an ambitious +long-term plan pleases everyone.If you take VC money, you have to mean it, because the structure +of VC deals prevents early acquisitions. If you take VC money, +they won't let you sell early.7. VCs want to invest large amounts.The fact that they're running investment funds makes VCs want to +invest large amounts. A typical VC fund is now hundreds of millions +of dollars. If $400 million has to be invested by 10 partners, +they have to invest $40 million each. VCs usually sit on the boards +of companies they fund. If the average deal size was $1 million, +each partner would have to sit on 40 boards, which would not be +fun. So they prefer bigger deals, where they can put a lot of money +to work at once.VCs don't regard you as a bargain if you don't need a lot of money. +That may even make you less attractive, because it means their +investment creates less of a barrier to entry for competitors.Angels are in a different position because they're investing their +own money. They're happy to invest small amounts—sometimes as +little as $20,000—as long as the potential returns look good +enough. So if you're doing something inexpensive, go to angels.8. Valuations are fiction.VCs admit that valuations are an artifact. They decide how much +money you need and how much of the company they want, and those two +constraints yield a valuation.Valuations increase as the size of the investment does. A company +that an angel is willing to put $50,000 into at a valuation of a +million can't take $6 million from VCs at that valuation. That +would leave the founders less than a seventh of the company between +them (since the option pool would also come out of that seventh). +Most VCs wouldn't want that, which is why you never hear of deals +where a VC invests $6 million at a premoney valuation of $1 million.If valuations change depending on the amount invested, that shows +how far they are from reflecting any kind of value of the company.Since valuations are made up, founders shouldn't care too much about +them. That's not the part to focus on. In fact, a high valuation +can be a bad thing. If you take funding at a premoney valuation +of $10 million, you won't be selling the company for 20. You'll +have to sell for over 50 for the VCs to get even a 5x return, which +is low to them. More likely they'll want you to hold out for 100. +But needing to get a high price decreases the chance of getting +bought at all; many companies can buy you for $10 million, but only +a handful for 100. And since a startup is like a pass/fail course +for the founders, what you want to optimize is your chance of a +good outcome, not the percentage of the company you keep.So why do founders chase high valuations? They're tricked by +misplaced ambition. They feel they've achieved more if they get a +higher valuation. They usually know other founders, and if they +get a higher valuation they can say "mine is bigger than yours." +But funding is not the real test. The real test is the final outcome +for the founder, and getting too high a valuation may just make a +good outcome less likely.The one advantage of a high valuation is that you get less dilution. +But there is another less sexy way to achieve that: just take less +money.9. Investors look for founders like the current stars.Ten years ago investors were looking for the next Bill Gates. This +was a mistake, because Microsoft was a very anomalous startup. They +started almost as a contract programming operation, and the reason +they became huge was that IBM happened to drop the PC standard in +their lap.Now all the VCs are looking for the next Larry and Sergey. This +is a good trend, because Larry and Sergey are closer to the ideal +startup founders.Historically investors thought it was important for a founder to +be an expert in business. So they were willing to fund teams of +MBAs who planned to use the money to pay programmers to build their +product for them. This is like funding Steve Ballmer in the hope +that the programmer he'll hire is Bill Gates—kind of backward, +as the events of the Bubble showed. Now most VCs know they should +be funding technical guys. This is more pronounced among the very +top funds; the lamer ones still want to fund MBAs.If you're a hacker, it's good news that investors are looking for +Larry and Sergey. The bad news is, the only investors who can do +it right are the ones who knew them when they were a +couple of CS grad students, not the confident media stars they are +today. What investors still don't get is how clueless and tentative +great founders can seem at the very beginning.10. The contribution of investors tends to be underestimated.Investors do more for startups than give them money. They're helpful +in doing deals and arranging introductions, and some of the smarter +ones, particularly angels, can give good advice about the product.In fact, I'd say what separates the great investors from the mediocre +ones is the quality of their advice. Most investors give advice, +but the top ones give good advice.Whatever help investors give a startup tends to be underestimated. +It's to everyone's advantage to let the world think the founders +thought of everything. The goal of the investors is for the company +to become valuable, and the company seems more valuable if it seems +like all the good ideas came from within.This trend is compounded by the obsession that the press has with +founders. In a company founded by two people, 10% of the ideas +might come from the first guy they hire. Arguably they've done a +bad job of hiring otherwise. And yet this guy will be almost +entirely overlooked by the press.I say this as a founder: the contribution of founders is always +overestimated. The danger here is that new founders, looking at +existing founders, will think that they're supermen that one couldn't +possibly equal oneself. Actually they have a hundred different +types of support people just offscreen making the whole show possible. +[3]11. VCs are afraid of looking bad.I've been very surprised to discover how timid most VCs are. They +seem to be afraid of looking bad to their partners, and perhaps +also to the limited partners—the people whose money they invest.You can measure this fear in how much less risk VCs are willing to +take. You can tell they won't make investments for their fund that +they might be willing to make themselves as angels. Though it's +not quite accurate to say that VCs are less willing to take risks. +They're less willing to do things that might look bad. That's not +the same thing.For example, most VCs would be very reluctant to invest in a startup +founded by a pair of 18 year old hackers, no matter how brilliant, +because if the startup failed their partners could turn on them and +say "What, you invested $x million of our money in a pair of 18 +year olds?" Whereas if a VC invested in a startup founded by +three former banking executives in their 40s who planned to outsource +their product development—which to my mind is actually a lot +riskier than investing in a pair of really smart 18 year olds—he +couldn't be faulted, if it failed, for making such an apparently +prudent investment.As a friend of mine said, "Most VCs can't do anything that would +sound bad to the kind of doofuses who run pension funds." Angels +can take greater risks because they don't have to answer to anyone.12. Being turned down by investors doesn't mean much.Some founders are quite dejected when they get turned down by +investors. They shouldn't take it so much to heart. To start with, +investors are often wrong. It's hard to think of a successful +startup that wasn't turned down by investors at some point. Lots +of VCs rejected Google. So obviously the reaction of investors is +not a very meaningful test.Investors will often reject you for what seem to be superficial +reasons. I read of one VC who +turned +down a startup simply because +they'd given away so many little bits of stock that the deal required +too many signatures to close. +[4] +The reason investors can get away +with this is that they see so many deals. It doesn't matter if +they underestimate you because of some surface imperfection, because +the next best deal will be almost as good. +Imagine picking out +apples at a grocery store. You grab one with a little bruise. +Maybe it's just a surface bruise, but why even bother checking when +there are so many other unbruised apples to choose from?Investors would be the first to admit they're often wrong. So when +you get rejected by investors, don't think "we suck," but instead +ask "do we suck?" Rejection is a question, not an answer.13. Investors are emotional.I've been surprised to discover how emotional investors can be. +You'd expect them to be cold and calculating, or at least businesslike, +but often they're not. I'm not sure if it's their position of power +that makes them this way, or the large sums of money involved, but +investment negotiations can easily turn personal. If you offend +investors, they'll leave in a huff.A while ago an eminent VC firm offered a series A round to a startup +we'd seed funded. Then they heard a rival VC firm was also interested. +They were so afraid that they'd be rejected in favor of this other +firm that they gave the startup what's known as an "exploding +termsheet." They had, I think, 24 hours to say yes or no, or the +deal was off. Exploding termsheets are a somewhat dubious device, +but not uncommon. What surprised me was their reaction when I +called to talk about it. I asked if they'd still be interested in +the startup if the rival VC didn't end up making an offer, and they +said no. What rational basis could they have had for saying that? +If they thought the startup was worth investing in, what difference +should it make what some other VC thought? Surely it was their +duty to their limited partners simply to invest in the best +opportunities they found; they should be delighted if the other VC +said no, because it would mean they'd overlooked a good opportunity. +But of course there was no rational basis for their decision. They +just couldn't stand the idea of taking this rival firm's rejects.In this case the exploding termsheet was not (or not only) a tactic +to pressure the startup. It was more like the high school trick +of breaking up with someone before they can break up with you. In +an earlier essay I said that VCs were a lot like high school girls. +A few VCs have joked about that characterization, but none have +disputed it.14. The negotiation never stops till the closing.Most deals, for investment or acquisition, happen in two phases. +There's an initial phase of negotiation about the big questions. +If this succeeds you get a termsheet, so called because it outlines +the key terms of a deal. A termsheet is not legally binding, +but it is a definite step. It's supposed to mean that a +deal is going to happen, once the lawyers work out all the details. +In theory these details are minor ones; by definition all the +important points are supposed to be covered in the termsheet.Inexperience and wishful thinking combine to make founders feel +that when they have a termsheet, they have a deal. They want there +to be a deal; everyone acts like they have a deal; so there must +be a deal. But there isn't and may not be for several months. A +lot can change for a startup in several months. It's not uncommon +for investors and acquirers to get buyer's remorse. So you have +to keep pushing, keep selling, all the way to the close. Otherwise +all the "minor" details left unspecified in the termsheet will be +interpreted to your disadvantage. The other side may even break +the deal; if they do that, they'll usually seize on some technicality +or claim you misled them, rather than admitting they changed their +minds.It can be hard to keep the pressure on an investor or acquirer all +the way to the closing, because the most effective pressure is +competition from other investors or acquirers, and these tend to +drop away when you get a termsheet. You should try to stay as close +friends as you can with these rivals, but the most important thing +is just to keep up the momentum in your startup. The investors or +acquirers chose you because you seemed hot. Keep doing whatever +made you seem hot. Keep releasing new features; keep getting new +users; keep getting mentioned in the press and in blogs.15. Investors like to co-invest.I've been surprised how willing investors are to split deals. You +might think that if they found a good deal they'd want it all to +themselves, but they seem positively eager to syndicate. This is +understandable with angels; they invest on a smaller scale and don't +like to have too much money tied up in any one deal. But VCs also +share deals a lot. Why?Partly I think this is an artifact of the rule I quoted earlier: +after traffic, VCs care most what other VCs think. A deal that has +multiple VCs interested in it is more likely to close, so of deals +that close, more will have multiple investors.There is one rational reason to want multiple VCs in a deal: Any +investor who co-invests with you is one less investor who could +fund a competitor. Apparently Kleiner and Sequoia didn't like +splitting the Google deal, but it did at least have the advantage, +from each one's point of view, that there probably wouldn't be a +competitor funded by the other. Splitting deals thus has similar +advantages to confusing paternity.But I think the main reason VCs like splitting deals is the fear +of looking bad. If another firm shares the deal, then in the event +of failure it will seem to have been a prudent choice—a consensus +decision, rather than just the whim of an individual partner.16. Investors collude.Investing is not covered by antitrust law. At least, it better not +be, because investors regularly do things that would be illegal +otherwise. I know personally of cases where one investor has talked +another out of making a competitive offer, using the promise of +sharing future deals.In principle investors are all competing for the same deals, but +the spirit of cooperation is stronger than the spirit of competition. +The reason, again, is that there are so many deals. Though a +professional investor may have a closer relationship with a founder +he invests in than with other investors, his relationship with the +founder is only going to last a couple years, whereas his relationship +with other firms will last his whole career. There isn't so much +at stake in his interactions with other investors, but there will +be a lot of them. Professional investors are constantly trading +little favors.Another reason investors stick together is to preserve the power +of investors as a whole. So you will not, as of this writing, be +able to get investors into an auction for your series A round. +They'd rather lose the deal than establish a precedent of VCs +competitively bidding against one another. An efficient startup +funding market may be coming in the distant future; things tend to +move in that direction; but it's certainly not here now. +17. Large-scale investors care about their portfolio, not any +individual company.The reason startups work so well is that everyone with power also +has equity. The only way any of them can succeed is if they all +do. This makes everyone naturally pull in the same direction, +subject to differences of opinion about tactics.The problem is, larger scale investors don't have exactly the same +motivation. Close, but not identical. They don't need any given +startup to succeed, like founders do, just their portfolio as a +whole to. So in borderline cases the rational thing for them to +do is to sacrifice unpromising startups.Large-scale investors tend to put startups in three categories: +successes, failures, and the "living dead"—companies that are +plugging along but don't seem likely in the immediate future to get +bought or go public. To the founders, "living dead" sounds harsh. +These companies may be far from failures by ordinary standards. But +they might as well be from a venture investor's point of view, and +they suck up just as much time and attention as the successes. So +if such a company has two possible strategies, a conservative one +that's slightly more likely to work in the end, or a risky one that +within a short time will either yield a giant success or kill the +company, VCs will push for the kill-or-cure option. To them the +company is already a write-off. Better to have resolution, one way +or the other, as soon as possible.If a startup gets into real trouble, instead of trying to save it +VCs may just sell it at a low price to another of their portfolio +companies. Philip Greenspun said in Founders at Work that Ars Digita's VCs did this to them.18. Investors have different risk profiles from founders.Most people would rather a 100% chance of $1 million than a 20% +chance of $10 million. Investors are rich enough to be rational +and prefer the latter. So they'll always tend to encourage founders +to keep rolling the dice. If a company is doing well, investors +will want founders to turn down most acquisition offers. And indeed, +most startups that turn down acquisition offers ultimately do better. +But it's still hair-raising for the founders, because they might +end up with nothing. When someone's offering to buy you for a price +at which your stock is worth $5 million, saying no is equivalent +to having $5 million and betting it all on one spin of the roulette +wheel.Investors will tell you the company is worth more. And they may +be right. But that doesn't mean it's wrong to sell. Any financial +advisor who put all his client's assets in the stock of a single, +private company would probably lose his license for it.More and more, investors are letting founders cash out partially. +That should correct the problem. Most founders have such low standards +that they'll feel rich with a sum that doesn't seem huge to investors. +But this custom is spreading too slowly, because VCs are afraid of +seeming irresponsible. No one wants to be the first VC to give +someone fuck-you money and then actually get told "fuck you." But +until this does start to happen, we know VCs are being too conservative.19. Investors vary greatly.Back when I was a founder I used to think all VCs were the same. +And in fact they do all look +the same. They're all what hackers +call "suits." But since I've been dealing with VCs more I've learned +that some suits are smarter than others.They're also in a business where winners tend to keep winning and +losers to keep losing. When a VC firm has been successful in the +past, everyone wants funding from them, so they get the pick of all +the new deals. The self-reinforcing nature of the venture funding +market means that the top ten firms live in a completely different +world from, say, the hundredth. As well as being smarter, they +tend to be calmer and more upstanding; they don't need to do iffy +things to get an edge, and don't want to because they have more +brand to protect.There are only two kinds of VCs you want to take money from, if you +have the luxury of choosing: the "top tier" VCs, meaning about the +top 20 or so firms, plus a few new ones that are not among the top +20 only because they haven't been around long enough.It's particularly important to raise money from a top firm if you're +a hacker, because they're more confident. That means they're less +likely to stick you with a business guy as CEO, like VCs used to +do in the 90s. If you seem smart and want to do it, they'll let +you run the company.20. Investors don't realize how much it costs to raise money from +them.Raising money is a huge time suck at just the point where startups +can least afford it. It's not unusual for it to take five or six +months to close a funding round. Six weeks is fast. And raising +money is not just something you can leave running as a background +process. When you're raising money, it's inevitably the main focus +of the company. Which means building the product isn't.Suppose a Y Combinator company starts talking to VCs after demo +day, and is successful in raising money from them, closing the deal +after a comparatively short 8 weeks. Since demo day occurs after +10 weeks, the company is now 18 weeks old. Raising money, rather +than working on the product, has been the company's main focus for +44% of its existence. And mind you, this an example where things +turned out well.When a startup does return to working on the product after a funding +round finally closes, it's as if they were returning to work after +a months-long illness. They've lost most of their momentum.Investors have no idea how much they damage the companies they +invest in by taking so long to do it. But companies do. So there +is a big opportunity here for a new kind of venture fund that invests +smaller amounts at lower valuations, but promises to either close +or say no very quickly. If there were such a firm, I'd recommend +it to startups in preference to any other, no matter how prestigious. +Startups live on speed and momentum.21. Investors don't like to say no.The reason funding deals take so long to close is mainly that +investors can't make up their minds. VCs are not big companies; +they can do a deal in 24 hours if they need to. But they usually +let the initial meetings stretch out over a couple weeks. The +reason is the selection algorithm I mentioned earlier. Most don't +try to predict whether a startup will win, but to notice quickly +that it already is winning. They care what the market thinks of +you and what other VCs think of you, and they can't judge those +just from meeting you.Because they're investing in things that (a) change fast and (b) +they don't understand, a lot of investors will reject you in a way +that can later be claimed not to have been a rejection. Unless you +know this world, you may not even realize you've been rejected. +Here's a VC saying no: + + We're really excited about your project, and we want to keep in + close touch as you develop it further. + +Translated into more straightforward language, this means: We're +not investing in you, but we may change our minds if it looks like +you're taking off. Sometimes they're more candid and say explicitly +that they need to "see some traction." They'll invest in you if +you start to get lots of users. But so would any VC. So all they're +saying is that you're still at square 1.Here's a test for deciding whether a VC's response was yes or no. +Look down at your hands. Are you holding a termsheet?22. You need investors.Some founders say "Who needs investors?" Empirically the answer +seems to be: everyone who wants to succeed. Practically every +successful startup takes outside investment at some point.Why? What the people who think they don't need investors forget is +that they will have competitors. The question is not whether you +need outside investment, but whether it could help you at all. +If the answer is yes, and you don't take investment, then competitors +who do will have an advantage over you. And in the startup world +a little advantage can expand into a lot.Mike Moritz famously said that he invested in Yahoo because he +thought they had a few weeks' lead over their competitors. That +may not have mattered quite so much as he thought, because Google +came along three years later and kicked Yahoo's ass. But there is +something in what he said. Sometimes a small lead can grow into +the yes half of a binary choice.Maybe as it gets cheaper to start a startup, it will start to be +possible to succeed in a competitive market without outside funding. +There are certainly +costs to raising money. But as of this writing the empirical +evidence says it's a net win.23. Investors like it when you don't need them.A lot of founders approach investors as if they needed their +permission to start a company—as if it were like getting into +college. But you don't need investors to start most companies; +they just make it easier.And in fact, investors greatly prefer it if you don't need them. +What excites them, both consciously and unconsciously, is the sort +of startup that approaches them saying "the train's leaving the +station; are you in or out?" not the one saying "please can we have +some money to start a company?"Most investors are "bottoms" in the sense that the startups they +like most are those that are rough with them. When Google stuck +Kleiner and Sequoia with a $75 million premoney valuation, their +reaction was probably "Ouch! That feels so good." And they were +right, weren't they? That deal probably made them more than any +other they've done.The thing is, VCs are pretty good at reading people. So don't try +to act tough with them unless you really are the next Google, or +they'll see through you in a second. Instead of acting tough, what +most startups should do is simply always have a backup plan. Always +have some alternative plan for getting started if any given investor +says no. Having one is the best insurance against needing one.So you shouldn't start a startup that's expensive to start, because +then you'll be at the mercy of investors. If you ultimately want +to do something that will cost a lot, start by doing a cheaper +subset of it, and expand your ambitions when and if you raise more +money.Apparently the most likely animals to be left alive after a nuclear +war are cockroaches, because they're so hard to kill. That's what +you want to be as a startup, initially. Instead of a beautiful +but fragile flower that needs to have its stem in a plastic tube +to support itself, better to be small, ugly, and indestructible.Notes[1] +I may be underestimating VCs. They may play some behind the scenes +role in IPOs, which you ultimately need if you want to create a silicon +valley.[2] +A few VCs have an email address you can send your business +plan to, but the number of startups that get funded this way is +basically zero. You should always get a personal introduction—and +to a partner, not an associate.[3] +Several people have told us that the most valuable thing about +startup school +was that they got to see famous startup founders and realized +they were just ordinary guys. Though we're happy to provide this +service, this is not generally the way we pitch startup school to +potential speakers.[4] +Actually this sounds to me like a VC who got buyer's remorse, +then used a technicality to get out of the deal. But it's telling +that it even seemed a plausible excuse.Thanks to Sam Altman, Paul Buchheit, Hutch Fishman, and Robert +Morris for reading drafts of +this, and to Kenneth King of ASES for inviting me to speak. +Comment on this essay. \ No newline at end of file diff --git a/data/PaulGrahamEssayMedium/mit.txt b/data/PaulGrahamEssayMedium/mit.txt new file mode 100644 index 0000000..e57ca4f --- /dev/null +++ b/data/PaulGrahamEssayMedium/mit.txt @@ -0,0 +1,539 @@ + + +Want to start a startup? Get funded by +Y Combinator. + + + + +October 2006(This essay is derived from a talk at MIT.)Till recently graduating seniors had two choices: get a job or go +to grad school. I think there will increasingly be a third option: +to start your own startup. But how common will that be?I'm sure the default will always be to get a job, but starting a +startup could well become as popular as grad school. In the late +90s my professor friends used to complain that they couldn't get +grad students, because all the undergrads were going to work for +startups. I wouldn't be surprised if that situation returns, but +with one difference: this time they'll be starting their own +instead of going to work for other people's.The most ambitious students will at this point be asking: Why wait +till you graduate? Why not start a startup while you're in college? +In fact, why go to college at all? Why not start a startup instead?A year and a half ago I gave a talk +where I said that the average age of the founders of +Yahoo, Google, and Microsoft was 24, and that if grad students could +start startups, why not undergrads? I'm glad I phrased that as a +question, because now I can pretend it wasn't merely a rhetorical +one. At the time I couldn't imagine why there should be any lower +limit for the age of startup founders. Graduation is a bureaucratic +change, not a biological one. And certainly there are undergrads +as competent technically as most grad students. So why shouldn't +undergrads be able to start startups as well as grad students?I now realize that something does change at graduation: you lose a +huge excuse for failing. Regardless of how complex your life is, +you'll find that everyone else, including your family and friends, +will discard all the low bits and regard you as having a single +occupation at any given time. If you're in college and have a +summer job writing software, you still read as a student. Whereas +if you graduate and get a job programming, you'll be instantly +regarded by everyone as a programmer.The problem with starting a startup while you're still in school +is that there's a built-in escape hatch. If you start a startup +in the summer between your junior and senior year, it reads to +everyone as a summer job. +So if it goes nowhere, big deal; you return to school in the +fall with all the other seniors; no one regards you as a failure, +because your occupation is student, and you didn't fail at that. +Whereas if you start a startup just one year later, after you +graduate, as long as you're not accepted to grad school in the fall +the startup reads to everyone as your occupation. You're +now a startup founder, so you have to do well at that.For nearly everyone, the opinion of one's peers is the most powerful +motivator of all—more powerful even than the nominal goal of most +startup founders, getting rich. +[1] +About a month into each funding +cycle we have an event called Prototype Day where each startup +presents to the others what they've got so far. You might think +they wouldn't need any more motivation. They're working on their +cool new idea; they have funding for the immediate future; and +they're playing a game with only two outcomes: wealth or failure. +You'd think that would be motivation enough. And yet the prospect +of a demo pushes most of them into a +rush of activity.Even if you start a startup explicitly to get rich, the money you +might get seems pretty theoretical most of the time. What drives +you day to day is not wanting to look bad.You probably can't change that. Even if you could, I don't think +you'd want to; someone who really, truly doesn't care what his peers +think of him is probably a psychopath. So the best you can do is +consider this force like a wind, and set up your boat accordingly. +If you know your peers are going to push you in some direction, +choose good peers, and position yourself so they push you in a +direction you like.Graduation changes the prevailing winds, and those make a difference. +Starting a startup is so hard +that it's a close call even for the ones that succeed. However +high a startup may be flying now, it probably has a few leaves stuck +in the landing gear from those trees it barely cleared at the end +of the runway. In such a close game, the smallest increase in the +forces against you can be enough to flick you over the edge into +failure.When we first started Y Combinator +we encouraged people to start +startups while they were still in college. That's partly because +Y Combinator began as a kind of summer program. We've kept the +program shape—all of us having dinner together once a week turns +out to be a good idea—but we've decided now +that the party line should be to tell people to wait till they +graduate.Does that mean you can't start a startup in college? Not at all. +Sam Altman, the co-founder of Loopt, +had just finished his sophomore year when we funded them, and Loopt +is probably the most promising of all the startups we've funded so +far. But Sam Altman is a very unusual guy. Within about three +minutes of meeting him, I remember thinking "Ah, so this is what +Bill Gates must have been like when he was 19."If it can work to start a startup during college, why do +we tell people not to? For the same reason that the probably +apocryphal violinist, whenever he was asked to judge someone's +playing, would always say they didn't have enough talent to make +it as a pro. Succeeding as a musician takes determination as well +as talent, so this answer works out to be the right advice for +everyone. The ones who are uncertain believe it and give up, and +the ones who are sufficiently determined think "screw that, I'll +succeed anyway."So our official policy now is only to fund undergrads we can't talk +out of it. And frankly, if you're not certain, you should wait. +It's not as if all the opportunities to start companies are going +to be gone if you don't do it now. Maybe the window will close on +some idea you're working on, but that won't be the last idea you'll +have. For every idea that times out, new ones become feasible. +Historically the opportunities to start startups have only increased +with time.In that case, you might ask, why not wait longer? Why not go work +for a while, or go to grad school, and then start a startup? And +indeed, that might be a good idea. If I had to pick the sweet spot +for startup founders, based on who we're most excited to see +applications from, I'd say it's probably the mid-twenties. Why? +What advantages does someone in their mid-twenties have over someone +who's 21? And why isn't it older? What can 25 year olds do that +32 year olds can't? Those turn out to be questions worth examining.PlusIf you start a startup soon after college, you'll be a young founder +by present standards, so you should know what the relative advantages +of young founders are. They're not what you might think. As a +young founder your strengths are: stamina, poverty, rootlessness, +colleagues, and ignorance.The importance of stamina shouldn't be surprising. If you've heard +anything about startups you've probably heard about the long hours. +As far as I can tell these are universal. I can't think of any +successful startups whose founders worked 9 to 5. And it's +particularly necessary for younger founders to work long hours +because they're probably not as efficient as they'll be later.Your second advantage, poverty, might not sound like an advantage, +but it is a huge one. Poverty implies you can live cheaply, +and this is critically important for startups. Nearly every startup +that fails, fails by running out of money. It's a little misleading +to put it this way, because there's usually some other underlying +cause. But regardless of the source of your problems, a low burn +rate gives you more opportunity to recover from them. And since +most startups make all kinds of mistakes at first, room to recover +from mistakes is a valuable thing to have.Most startups end up doing something different than they planned. +The way the successful ones find something that works is by trying +things that don't. So the worst thing you can do in a startup is +to have a rigid, pre-ordained plan and then start spending a lot +of money to implement it. Better to operate cheaply and give your +ideas time to evolve.Recent grads can live on practically nothing, and this gives you +an edge over older founders, because the main cost in software +startups is people. The guys with kids and mortgages are at a +real disadvantage. This is one reason I'd bet on the 25 year old +over the 32 year old. The 32 year old probably is a better programmer, +but probably also has a much more expensive life. Whereas a 25 +year old has some work experience (more on that later) but can live +as cheaply as an undergrad.Robert Morris and I were 29 and 30 respectively when we started +Viaweb, but fortunately we still lived like 23 year olds. We both had +roughly zero assets. I would have loved to have a mortgage, +since that would have meant I had a house. But in retrospect +having nothing turned out to be convenient. I wasn't tied down and +I was used to living cheaply.Even more important than living cheaply, though, is thinking cheaply. +One reason the Apple II was so popular was that it was cheap. The +computer itself was cheap, and it used cheap, off-the-shelf peripherals +like a cassette tape recorder for data storage and a TV as a monitor. +And you know why? Because Woz designed this computer for himself, +and he couldn't afford anything more.We benefitted from the same phenomenon. Our prices were +daringly low for the time. The top level of service was +$300 a month, which was an order of magnitude below the norm. In +retrospect this was a smart move, but we didn't do it because we +were smart. $300 a month seemed like a lot of money to us. Like +Apple, we created something inexpensive, and therefore popular, +simply because we were poor.A lot of startups have that form: someone comes along and makes +something for a tenth or a hundredth of what it used to cost, and +the existing players can't follow because they don't even want to +think about a world in which that's possible. Traditional long +distance carriers, for example, didn't even want to think about +VoIP. (It was coming, all the same.) Being poor helps in this +game, because your own personal bias points in the same direction +technology evolves in.The advantages of rootlessness are similar to those of poverty. +When you're young you're more mobile—not just because you don't +have a house or much stuff, but also because you're less likely to +have serious relationships. This turns out to be important, because +a lot of startups involve someone moving.The founders of Kiko, for example, are now en route to the Bay Area +to start their next startup. It's a better place for what they +want to do. And it was easy for them to decide to go, because +neither as far as I know has a serious girlfriend, and everything +they own will fit in one car—or more precisely, will either fit +in one car or is crappy enough that they don't mind leaving it +behind.They at least were in Boston. What if they'd been in Nebraska, +like Evan Williams was at their age? Someone wrote recently that +the drawback of Y Combinator was that you had to move to participate. +It couldn't be any other way. The kind of conversations we have +with founders, we have to have in person. We fund a dozen startups +at a time, and we can't be in a dozen places at once. But even if +we could somehow magically save people from moving, we wouldn't. +We wouldn't be doing founders a favor by letting them stay in +Nebraska. Places that aren't +startup hubs are toxic to startups. +You can tell that from indirect evidence. You can tell how hard +it must be to start a startup in Houston or Chicago or Miami from +the microscopically small number, per capita, that succeed +there. I don't know exactly what's suppressing all the startups in these +towns—probably a hundred subtle little things—but something +must be. +[2]Maybe this will change. Maybe the increasing cheapness of startups +will mean they'll be able to survive anywhere, instead of only in +the most hospitable environments. Maybe 37signals is the pattern +for the future. But maybe not. Historically there have always +been certain towns that were centers for certain industries, and +if you weren't in one of them you were at a disadvantage. So my +guess is that 37signals is an anomaly. We're looking at a pattern +much older than "Web 2.0" here.Perhaps the reason more startups per capita happen in the Bay Area +than Miami is simply that there are more founder-type people there. +Successful startups are almost never started by one person. Usually +they begin with a conversation in which someone mentions that +something would be a good idea for a company, and his friend says, +"Yeah, that is a good idea, let's try it." If you're missing that +second person who says "let's try it," the startup never happens. +And that is another area where undergrads have an edge. They're +surrounded by people willing to say that. At a good college you're +concentrated together with a lot of other ambitious and technically +minded people—probably more concentrated than you'll ever be +again. If your nucleus spits out a neutron, there's a good chance +it will hit another nucleus.The number one question people ask us at Y Combinator is: Where can +I find a co-founder? That's the biggest problem for someone starting +a startup at 30. When they were in school they knew a lot of good +co-founders, but by 30 they've either lost touch with them or these +people are tied down by jobs they don't want to leave.Viaweb was an anomaly in this respect too. Though we were comparatively +old, we weren't tied down by impressive jobs. I was trying to be +an artist, which is not very constraining, and Robert, though 29, +was still in grad school due to a little interruption in his academic +career back in 1988. So arguably the Worm made Viaweb possible. +Otherwise Robert would have been a junior professor at that age, +and he wouldn't have had time to work on crazy speculative projects +with me.Most of the questions people ask Y Combinator we have some kind of +answer for, but not the co-founder question. There is no good +answer. Co-founders really should be people you already know. And +by far the best place to meet them is school. You have a large +sample of smart people; you get to compare how they all perform on +identical tasks; and everyone's life is pretty fluid. A lot of +startups grow out of schools for this reason. Google, Yahoo, and +Microsoft, among others, were all founded by people who met in +school. (In Microsoft's case, it was high school.)Many students feel they should wait and get a little more experience +before they start a company. All other things being equal, they +should. But all other things are not quite as equal as they look. +Most students don't realize how rich they are in the scarcest +ingredient in startups, co-founders. If you wait too long, you may +find that your friends are now involved in some project they don't +want to abandon. The better they are, the more likely this is to +happen.One way to mitigate this problem might be to actively plan your +startup while you're getting those n years of experience. Sure, +go off and get jobs or go to grad school or whatever, but get +together regularly to scheme, so the idea of starting a startup +stays alive in everyone's brain. I don't know if this works, but +it can't hurt to try.It would be helpful just to realize what an advantage you have as +students. Some of your classmates are probably going to be successful +startup founders; at a great technical university, that is a near +certainty. So which ones? If I were you I'd look for the people +who are not just smart, but incurable +builders. +Look +for the people who keep starting projects, and finish at least some +of them. That's what we look for. Above all else, above academic +credentials and even the idea you apply with, we look for people +who build things.The other place co-founders meet is at work. Fewer do than at +school, but there are things you can do to improve the odds. The +most important, obviously, is to work somewhere that has a lot of +smart, young people. Another is to work for a company located in +a startup hub. It will be easier to talk a co-worker into quitting +with you in a place where startups are happening all around you.You might also want to look at the employment agreement you sign +when you get hired. Most will say that any ideas you think of while +you're employed by the company belong to them. In practice it's +hard for anyone to prove what ideas you had when, so the line gets +drawn at code. If you're going to start a startup, don't write any +of the code while you're still employed. Or at least discard any +code you wrote while still employed and start over. It's not so +much that your employer will find out and sue you. It won't come +to that; investors or acquirers or (if you're so lucky) underwriters +will nail you first. Between t = 0 and when you buy that yacht, +someone is going to ask if any of your code legally belongs +to anyone else, and you need to be able to say no. +[3]The most overreaching employee agreement I've seen so far is Amazon's. +In addition to the usual clauses about owning your ideas, you also +can't be a founder of a startup that has another founder who worked +at Amazon—even if you didn't know them or even work there at the +same time. I suspect they'd have a hard time enforcing this, but +it's a bad sign they even try. There are plenty of other places +to work; you may as well choose one that keeps more of your options +open.Speaking of cool places to work, there is of course Google. But I +notice something slightly frightening about Google: zero startups +come out of there. In that respect it's a black hole. People seem +to like working at Google too much to leave. So if you hope to start +a startup one day, the evidence so far suggests you shouldn't work +there.I realize this seems odd advice. If they make your life so good +that you don't want to leave, why not work there? Because, in +effect, you're probably getting a local maximum. You need a certain +activation energy to start a startup. So an employer who's fairly +pleasant to work for can lull you into staying indefinitely, even +if it would be a net win for you to leave. +[4]The best place to work, if you want to start a startup, is probably +a startup. In addition to being the right sort of experience, one +way or another it will be over quickly. You'll either end up rich, +in which case problem solved, or the startup will get bought, in +which case it it will start to suck to work there and it will be +easy to leave, or most likely, the thing will blow up and you'll +be free again.Your final advantage, ignorance, may not sound very useful. I +deliberately used a controversial word for it; you might equally +call it innocence. But it seems to be a powerful force. My Y +Combinator co-founder Jessica Livingston is just about to publish +a book of interviews +with startup founders, and I noticed a remarkable pattern in them. +One after another said that if they'd known how hard it would be, +they would have been too intimidated to start.Ignorance can be useful when it's a counterweight to other forms +of stupidity. It's useful in starting startups because you're +capable of more than you realize. Starting startups is harder than +you expect, but you're also capable of more than you expect, so +they balance out.Most people look at a company like Apple and think, how could I +ever make such a thing? Apple is an institution, and I'm just a +person. But every institution was at one point just a handful of +people in a room deciding to start something. Institutions are +made up, and made up by people no different from you.I'm not saying everyone could start a startup. I'm sure most people +couldn't; I don't know much about the population at large. When +you get to groups I know well, like hackers, I can say more precisely. +At the top schools, I'd guess as many as a quarter of the CS majors +could make it as startup founders if they wanted.That "if they wanted" is an important qualification—so important +that it's almost cheating to append it like that—because once you +get over a certain threshold of intelligence, which most CS majors +at top schools are past, the deciding factor in whether you succeed +as a founder is how much you want to. You don't have to be that +smart. If you're not a genius, just start a startup in some unsexy +field where you'll have less competition, like software for human +resources departments. I picked that example at random, but I feel +safe in predicting that whatever they have now, it wouldn't take +genius to do better. There are a lot of people out there working +on boring stuff who are desperately in need of better software, so +however short you think you fall of Larry and Sergey, you can ratchet +down the coolness of the idea far enough to compensate.As well as preventing you from being intimidated, ignorance can +sometimes help you discover new ideas. Steve Wozniak +put this very strongly: + + All the best things that I did at Apple came from (a) not having + money and (b) not having done it before, ever. Every single thing + that we came out with that was really great, I'd never once done + that thing in my life. + +When you know nothing, you have to reinvent stuff for yourself, and +if you're smart your reinventions may be better than what preceded +them. This is especially true in fields where the rules change. +All our ideas about software were developed in a time when processors +were slow, and memories and disks were tiny. Who knows what obsolete +assumptions are embedded in the conventional wisdom? And the way +these assumptions are going to get fixed is not by explicitly +deallocating them, but by something more akin to garbage collection. +Someone ignorant but smart will come along and reinvent everything, +and in the process simply fail to reproduce certain existing ideas.MinusSo much for the advantages of young founders. What about the +disadvantages? I'm going to start with what goes wrong and try to +trace it back to the root causes.What goes wrong with young founders is that they build stuff that +looks like class projects. It was only recently that we figured +this out ourselves. We noticed a lot of similarities between the +startups that seemed to be falling behind, but we couldn't figure +out how to put it into words. Then finally we realized what it +was: they were building class projects.But what does that really mean? What's wrong with class projects? +What's the difference between a class project and a real startup? +If we could answer that question it would be useful not just to +would-be startup founders but to students in general, because we'd +be a long way toward explaining the mystery of the so-called real +world.There seem to be two big things missing in class projects: (1) an +iterative definition of a real problem and (2) intensity.The first is probably unavoidable. Class projects will inevitably +solve fake problems. For one thing, real problems are rare and +valuable. If a professor wanted to have students solve real problems, +he'd face the same paradox as someone trying to give an example of +whatever "paradigm" might succeed the Standard Model of physics. +There may well be something that does, but if you could think of +an example you'd be entitled to the Nobel Prize. Similarly, good +new problems are not to be had for the asking.In technology the difficulty is compounded by the fact that real +startups tend to discover the problem they're solving by a process +of evolution. Someone has an idea for something; they build it; +and in doing so (and probably only by doing so) they realize +the problem they should be solving is another one. Even if the +professor let you change your project description on the fly, there +isn't time enough to do that in a college class, or a market to +supply evolutionary pressures. So class +projects are mostly about implementation, which is the least +of your problems in a startup.It's not just that in a startup you work on the idea as well as +implementation. The very implementation is different. Its main +purpose is to refine the idea. Often the only value of most of the +stuff you build in the first six months is that it proves your +initial idea was mistaken. And that's extremely valuable. If +you're free of a misconception that everyone else still shares, +you're in a powerful position. But you're not thinking that way +about a class project. Proving your initial plan was mistaken would +just get you a bad grade. Instead of building stuff to throw away, +you tend to want every line of code to go toward that final goal +of showing you did a lot of work.That leads to our second difference: the way class projects are +measured. Professors will tend to judge you by the distance between +the starting point and where you are now. If someone has achieved +a lot, they should get a good grade. But customers will judge you +from the other direction: the distance remaining between where you +are now and the features they need. The market doesn't give a shit +how hard you worked. Users just want your software to do what they +need, and you get a zero otherwise. That is one of the most +distinctive differences between school and the real world: there +is no reward for putting in a good effort. In fact, the whole +concept of a "good effort" is a fake idea adults invented to encourage +kids. It is not found in nature.Such lies seem to be helpful to kids. But unfortunately when you +graduate they don't give you a list of all the lies they told you +during your education. You have to get them beaten out of you by +contact with the real world. And this is why so many jobs want +work experience. I couldn't understand that when I was in college. +I knew how to program. In fact, I could tell I knew how to program +better than most people doing it for a living. So what was this +mysterious "work experience" and why did I need it?Now I know what it is, and part of the confusion is grammatical. +Describing it as "work experience" implies it's like experience +operating a certain kind of machine, or using a certain programming +language. But really what work experience refers to is not some +specific expertise, but the elimination of certain habits left over +from childhood.One of the defining qualities of kids is that they flake. When +you're a kid and you face some hard test, you can cry and say "I +can't" and they won't make you do it. Of course, no one can make +you do anything in the grownup world either. What they do instead +is fire you. And when motivated by that +you find you can do a lot more than you realized. So one of the +things employers expect from someone with "work experience" is the +elimination of the flake reflex—the ability to get things done, +with no excuses.The other thing you get from work experience is an understanding +of what work is, and in particular, how intrinsically horrible it +is. Fundamentally the equation is a brutal one: you have to spend +most of your waking hours doing stuff someone else wants, or starve. +There are a few places where the work is so interesting that this +is concealed, because what other people want done happens to coincide +with what you want to work on. But you only have to imagine what +would happen if they diverged to see the underlying reality.It's not so much that adults lie to kids about this as never explain +it. They never explain what the deal is with money. You know from +an early age that you'll have some sort of job, because everyone +asks what you're going to "be" when you grow up. What they +don't tell you is that as a kid you're sitting on the shoulders of +someone else who's treading water, and that starting working means +you get thrown into the water on your own, and have to start treading +water yourself or sink. "Being" something is incidental; the +immediate problem is not to drown.The relationship between work and money tends to dawn on you only +gradually. At least it did for me. One's first thought tends to +be simply "This sucks. I'm in debt. Plus I have to get up on monday +and go to work." Gradually you realize that these two things are +as tightly connected as only a market can make them.So the most important advantage 24 year old founders have over 20 +year old founders is that they know what they're trying to avoid. +To the average undergrad the idea of getting rich translates into +buying Ferraris, or being admired. To someone who has learned from +experience about the relationship between money and work, it +translates to something way more important: it means you get to opt +out of the brutal equation that governs the lives of 99.9% of people. +Getting rich means you can stop treading water.Someone who gets this will work much harder at making a startup +succeed—with the proverbial energy of a drowning man, in fact. +But understanding the relationship between money and work also +changes the way you work. You don't get money just for working, +but for doing things other people want. Someone who's figured that +out will automatically focus more on the user. And that cures the +other half of the class-project syndrome. After you've been working +for a while, you yourself tend to measure what you've done the same +way the market does.Of course, you don't have to spend years working to learn this +stuff. If you're sufficiently perceptive you can grasp these things +while you're still in school. Sam Altman did. He must have, because +Loopt is no class project. And as his example suggests, this can +be valuable knowledge. At a minimum, if you get this stuff, you +already have most of what you gain from the "work experience" +employers consider so desirable. But of course if you really get +it, you can use this information in a way that's more valuable to +you than that.NowSo suppose you think you might start a startup at some point, either +when you graduate or a few years after. What should you do now? +For both jobs and grad school, there are ways to prepare while +you're in college. If you want to get a job when you graduate, you +should get summer jobs at places you'd like to work. If you want +to go to grad school, it will help to work on research projects as +an undergrad. What's the equivalent for startups? How do you keep +your options maximally open?One thing you can do while you're still in school is to learn how +startups work. Unfortunately that's not easy. Few if any colleges +have classes about startups. There may be business school classes +on entrepreneurship, as they call it over there, but these are +likely to be a waste of time. Business schools like to talk about +startups, but philosophically they're at the opposite end of the +spectrum. Most books on startups also seem to be useless. I've +looked at a few and none get it right. Books in most fields are +written by people who know the subject from experience, but for +startups there's a unique problem: by definition the founders of +successful startups don't need to write books to make money. As a +result most books on the subject end up being written by people who +don't understand it.So I'd be skeptical of classes and books. The way to learn about +startups is by watching them in action, preferably by working at +one. How do you do that as an undergrad? Probably by sneaking in +through the back door. Just hang around a lot and gradually start +doing things for them. Most startups are (or should be) very +cautious about hiring. Every hire increases the burn rate, and bad +hires early on are hard to recover from. However, startups usually +have a fairly informal atmosphere, and there's always a lot that +needs to be done. If you just start doing stuff for them, many +will be too busy to shoo you away. You can thus gradually work +your way into their confidence, and maybe turn it into an official +job later, or not, whichever you prefer. This won't work for all +startups, but it would work for most I've known.Number two, make the most of the great advantage of school: the +wealth of co-founders. Look at the people around you and ask +yourself which you'd like to work with. When you apply that test, +you may find you get surprising results. You may find you'd prefer +the quiet guy you've mostly ignored to someone who seems impressive +but has an attitude to match. I'm not suggesting you suck up to +people you don't really like because you think one day they'll be +successful. Exactly the opposite, in fact: you should only start +a startup with someone you like, because a startup will put your +friendship through a stress test. I'm just saying you should think +about who you really admire and hang out with them, instead of +whoever circumstances throw you together with.Another thing you can do is learn skills that will be useful to you +in a startup. These may be different from the skills you'd learn +to get a job. For example, thinking about getting a job will make +you want to learn programming languages you think employers want, +like Java and C++. Whereas if you start a startup, you get to pick +the language, so you have to think about which will actually let +you get the most done. If you use that test you might end up +learning Ruby or Python instead. +But the most important skill for a startup founder isn't a programming +technique. It's a knack for understanding users and figuring out +how to give them what they want. I know I repeat this, but that's +because it's so important. And it's a skill you can learn, though +perhaps habit might be a better word. Get into the habit of thinking +of software as having users. What do those users want? What would +make them say wow?This is particularly valuable for undergrads, because the concept +of users is missing from most college programming classes. The way +you get taught programming in college would be like teaching writing +as grammar, without mentioning that its purpose is to communicate +something to an audience. Fortunately an audience for software is +now only an http request away. So in addition to the programming +you do for your classes, why not build some kind of website people +will find useful? At the very least it will teach you how to write +software with users. In the best case, it might not just be +preparation for a startup, but the startup itself, like it was for +Yahoo and Google.Notes[1] +Even the desire to protect one's children seems weaker, judging +from things people have historically done to their kids +rather than risk their community's disapproval. (I assume we still +do things that will be regarded in the future as barbaric, but +historical abuses are easier for us to see.)[2] +Worrying that Y Combinator makes founders move for 3 months +also suggests one underestimates how hard it is to start a startup. +You're going to have to put up with much greater inconveniences than +that.[3] +Most employee agreements +say that any idea relating to the company's present or potential +future business belongs to them. Often as not the second clause could +include any possible startup, and anyone doing due diligence for an +investor or acquirer will assume the worst.To be safe either (a) don't use code written while you +were still employed in your previous job, or (b) get your employer to +renounce, in writing, any claim to the code you write for your side +project. Many will consent to (b) rather than +lose a prized employee. The downside is that you'll have to tell them +exactly what your project does.[4] +Geshke and Warnock only founded Adobe because Xerox ignored +them. If Xerox had used what they built, they would probably +never have left PARC.Thanks to Jessica Livingston and Robert Morris for reading +drafts of this, and to Jeff Arnold and the SIPB for inviting me to +speak. + +Comment on this essay. \ No newline at end of file diff --git a/data/PaulGrahamEssayMedium/notnot.txt b/data/PaulGrahamEssayMedium/notnot.txt new file mode 100644 index 0000000..2034c0a --- /dev/null +++ b/data/PaulGrahamEssayMedium/notnot.txt @@ -0,0 +1,486 @@ + + +Want to start a startup? Get funded by +Y Combinator. + + + + +March 2007(This essay is derived from talks at the 2007 +Startup School and the Berkeley CSUA.)We've now been doing Y Combinator long enough to have some data +about success rates. Our first batch, in the summer of 2005, had +eight startups in it. Of those eight, it now looks as if at least +four succeeded. Three have been acquired: +Reddit was a merger of +two, Reddit and Infogami, and a third was acquired that we can't +talk about yet. Another from that batch was +Loopt, which is doing +so well they could probably be acquired in about ten minutes if +they wanted to.So about half the founders from that first summer, less than two +years ago, are now rich, at least by their standards. (One thing +you learn when you get rich is that there are many degrees of it.)I'm not ready to predict our success rate will stay as high as 50%. +That first batch could have been an anomaly. But we should be able +to do better than the oft-quoted (and probably made +up) standard figure of 10%. I'd feel safe aiming at 25%.Even the founders who fail don't seem to have such a bad time. Of +those first eight startups, three are now probably dead. In two +cases the founders just went on to do other things at the end of +the summer. I don't think they were traumatized by the experience. +The closest to a traumatic failure was Kiko, whose founders kept +working on their startup for a whole year before being squashed by +Google Calendar. But they ended up happy. They sold their software +on eBay for a quarter of a million dollars. After they paid back +their angel investors, they had about a year's salary each. +[1] +Then they immediately went on to start a new and much more exciting +startup, Justin.TV.So here is an even more striking statistic: 0% of that first batch +had a terrible experience. They had ups and downs, like every +startup, but I don't think any would have traded it for a job in a +cubicle. And that statistic is probably not an anomaly. Whatever +our long-term success rate ends up being, I think the rate of people +who wish they'd gotten a regular job will stay close to 0%.The big mystery to me is: why don't more people start startups? If +nearly everyone who does it prefers it to a regular job, and a +significant percentage get rich, why doesn't everyone want to do +this? A lot of people think we get thousands of applications for +each funding cycle. In fact we usually only get several hundred. +Why don't more people apply? And while it must seem to anyone +watching this world that startups are popping up like crazy, the +number is small compared to the number of people with the necessary +skills. The great majority of programmers still go straight from +college to cubicle, and stay there.It seems like people are not acting in their own interest. What's +going on? Well, I can answer that. Because of Y Combinator's +position at the very start of the venture funding process, we're +probably the world's leading experts on the psychology of people +who aren't sure if they want to start a company.There's nothing wrong with being unsure. If you're a hacker thinking +about starting a startup and hesitating before taking the leap, +you're part of a grand tradition. Larry and Sergey seem to have +felt the same before they started Google, and so did Jerry and Filo +before they started Yahoo. In fact, I'd guess the most successful +startups are the ones started by uncertain hackers rather than +gung-ho business guys.We have some evidence to support this. Several of the most successful +startups we've funded told us later that they only decided to apply +at the last moment. Some decided only hours before the deadline.The way to deal with uncertainty is to analyze it into components. +Most people who are reluctant to do something have about eight +different reasons mixed together in their heads, and don't know +themselves which are biggest. Some will be justified and some +bogus, but unless you know the relative proportion of each, you +don't know whether your overall uncertainty is mostly justified or +mostly bogus.So I'm going to list all the components of people's reluctance to +start startups, and explain which are real. Then would-be founders +can use this as a checklist to examine their own feelings.I admit my goal is to increase your self-confidence. But there are +two things different here from the usual confidence-building exercise. +One is that I'm motivated to be honest. Most people in the +confidence-building business have already achieved their goal when +you buy the book or pay to attend the seminar where they tell you +how great you are. Whereas if I encourage people to start startups +who shouldn't, I make my own life worse. If I encourage too many +people to apply to Y Combinator, it just means more work for me, +because I have to read all the applications.The other thing that's going to be different is my approach. Instead +of being positive, I'm going to be negative. Instead of telling +you "come on, you can do it" I'm going to consider all the reasons +you aren't doing it, and show why most (but not all) should be +ignored. We'll start with the one everyone's born with.1. Too youngA lot of people think they're too young to start a startup. Many +are right. The median age worldwide is about 27, so probably a +third of the population can truthfully say they're too young.What's too young? One of our goals with Y Combinator was to discover +the lower bound on the age of startup founders. It always seemed +to us that investors were too conservative here—that they wanted +to fund professors, when really they should be funding grad students +or even undergrads.The main thing we've discovered from pushing the edge of this +envelope is not where the edge is, but how fuzzy it is. The outer +limit may be as low as 16. We don't look beyond 18 because people +younger than that can't legally enter into contracts. But the most +successful founder we've funded so far, Sam Altman, was 19 at the +time.Sam Altman, however, is an outlying data point. When he was 19, +he seemed like he had a 40 year old inside him. There are other +19 year olds who are 12 inside.There's a reason we have a distinct word "adult" for people over a +certain age. There is a threshold you cross. It's conventionally +fixed at 21, but different people cross it at greatly varying ages. +You're old enough to start a startup if you've crossed this threshold, +whatever your age.How do you tell? There are a couple tests adults use. I realized +these tests existed after meeting Sam Altman, actually. I noticed +that I felt like I was talking to someone much older. Afterward I +wondered, what am I even measuring? What made him seem older?One test adults use is whether you still have the kid flake reflex. +When you're a little kid and you're asked to do something hard, you +can cry and say "I can't do it" and the adults will probably let +you off. As a kid there's a magic button you can press by saying +"I'm just a kid" that will get you out of most difficult situations. +Whereas adults, by definition, are not allowed to flake. They still +do, of course, but when they do they're ruthlessly pruned.The other way to tell an adult is by how they react to a challenge. +Someone who's not yet an adult will tend to respond to a challenge +from an adult in a way that acknowledges their dominance. If an +adult says "that's a stupid idea," a kid will either crawl away +with his tail between his legs, or rebel. But rebelling presumes +inferiority as much as submission. The adult response to +"that's a stupid idea," is simply to look the other person in the +eye and say "Really? Why do you think so?"There are a lot of adults who still react childishly to challenges, +of course. What you don't often find are kids who react to challenges +like adults. When you do, you've found an adult, whatever their +age.2. Too inexperiencedI once wrote that startup founders should be at least 23, and that +people should work for another company for a few years before +starting their own. I no longer believe that, and what changed my +mind is the example of the startups we've funded.I still think 23 is a better age than 21. But the best way to get +experience if you're 21 is to start a startup. So, paradoxically, +if you're too inexperienced to start a startup, what you should do +is start one. That's a way more efficient cure for inexperience +than a normal job. In fact, getting a normal job may actually make +you less able to start a startup, by turning you into a tame animal +who thinks he needs an office to work in and a product manager to +tell him what software to write.What really convinced me of this was the Kikos. They started a +startup right out of college. Their inexperience caused them to +make a lot of mistakes. But by the time we funded their second +startup, a year later, they had become extremely formidable. They +were certainly not tame animals. And there is no way they'd have +grown so much if they'd spent that year working at Microsoft, or +even Google. They'd still have been diffident junior programmers.So now I'd advise people to go ahead and start startups right out +of college. There's no better time to take risks than when you're +young. Sure, you'll probably fail. But even failure will get you +to the ultimate goal faster than getting a job.It worries me a bit to be saying this, because in effect we're +advising people to educate themselves by failing at our expense, +but it's the truth.3. Not determined enoughYou need a lot of determination to succeed as a startup founder. +It's probably the single best predictor of success.Some people may not be determined enough to make it. It's +hard for me to say for sure, because I'm so determined that I can't +imagine what's going on in the heads of people who aren't. But I +know they exist.Most hackers probably underestimate their determination. I've seen +a lot become visibly more determined as they get used to running a +startup. I can think of +several we've funded who would have been delighted at first to be +bought for $2 million, but are now set on world domination.How can you tell if you're determined enough, when Larry and Sergey +themselves were unsure at first about starting a company? I'm +guessing here, but I'd say the test is whether you're sufficiently +driven to work on your own projects. Though they may have been +unsure whether they wanted to start a company, it doesn't seem as +if Larry and Sergey were meek little research assistants, obediently +doing their advisors' bidding. They started projects of their own. +4. Not smart enoughYou may need to be moderately smart to succeed as a startup founder. +But if you're worried about this, you're probably mistaken. If +you're smart enough to worry that you might not be smart enough to +start a startup, you probably are.And in any case, starting a startup just doesn't require that much +intelligence. Some startups do. You have to be good at math to +write Mathematica. But most companies do more mundane stuff where +the decisive factor is effort, not brains. Silicon Valley can warp +your perspective on this, because there's a cult of smartness here. +People who aren't smart at least try to act that way. But if you +think it takes a lot of intelligence to get rich, try spending a +couple days in some of the fancier bits of New York or LA.If you don't think you're smart enough to start a startup doing +something technically difficult, just write enterprise software. +Enterprise software companies aren't technology companies, they're +sales companies, and sales depends mostly on effort.5. Know nothing about businessThis is another variable whose coefficient should be zero. You +don't need to know anything about business to start a startup. The +initial focus should be the product. All you need to know in this +phase is how to build things people want. If you succeed, you'll +have to think about how to make money from it. But this is so easy +you can pick it up on the fly.I get a fair amount of flak for telling founders just to make +something great and not worry too much about making money. And yet +all the empirical evidence points that way: pretty much 100% of +startups that make something popular manage to make money from it. +And acquirers tell me privately that revenue is not what they buy +startups for, but their strategic value. Which means, because they +made something people want. Acquirers know the rule holds for them +too: if users love you, you can always make money from that somehow, +and if they don't, the cleverest business model in the world won't +save you.So why do so many people argue with me? I think one reason is that +they hate the idea that a bunch of twenty year olds could get rich +from building something cool that doesn't make any money. They +just don't want that to be possible. But how possible it is doesn't +depend on how much they want it to be.For a while it annoyed me to hear myself described as some kind of +irresponsible pied piper, leading impressionable young hackers down +the road to ruin. But now I realize this kind of controversy is a +sign of a good idea.The most valuable truths are the ones most people don't believe. +They're like undervalued stocks. If you start with them, you'll +have the whole field to yourself. So when you find an idea you +know is good but most people disagree with, you should not +merely ignore their objections, but push aggressively in that +direction. In this case, that means you should seek out ideas that +would be popular but seem hard to make money from.We'll bet a seed round you can't make something popular that we +can't figure out how to make money from.6. No cofounderNot having a cofounder is a real problem. A startup is too much +for one person to bear. And though we differ from other investors +on a lot of questions, we all agree on this. All investors, without +exception, are more likely to fund you with a cofounder than without.We've funded two single founders, but in both cases we suggested +their first priority should be to find a cofounder. Both did. But +we'd have preferred them to have cofounders before they applied. +It's not super hard to get a cofounder for a project that's just +been funded, and we'd rather have cofounders committed enough to +sign up for something super hard.If you don't have a cofounder, what should you do? Get one. It's +more important than anything else. If there's no one where you +live who wants to start a startup with you, move where there are +people who do. If no one wants to work with you on your current +idea, switch to an idea people want to work on.If you're still in school, you're surrounded by potential cofounders. +A few years out it gets harder to find them. Not only do you have +a smaller pool to draw from, but most already have jobs, and perhaps +even families to support. So if you had friends in college you +used to scheme about startups with, stay in touch with them as well +as you can. That may help keep the dream alive.It's possible you could meet a cofounder through something like a +user's group or a conference. But I wouldn't be too optimistic. +You need to work with someone to know whether you want them as a +cofounder. +[2]The real lesson to draw from this is not how to find a cofounder, +but that you should start startups when you're young and there are +lots of them around.7. No ideaIn a sense, it's not a problem if you don't have a good idea, because +most startups change their idea anyway. In the average Y Combinator +startup, I'd guess 70% of the idea is new at the end of the +first three months. Sometimes it's 100%.In fact, we're so sure the founders are more important than the +initial idea that we're going to try something new this funding +cycle. We're going to let people apply with no idea at all. If you +want, you can answer the question on the application form that asks +what you're going to do with "We have no idea." If you seem really +good we'll accept you anyway. We're confident we can sit down with +you and cook up some promising project.Really this just codifies what we do already. We put little weight +on the idea. We ask mainly out of politeness. The kind of question +on the application form that we really care about is the one where +we ask what cool things you've made. If what you've made is version +one of a promising startup, so much the better, but the main thing +we care about is whether you're good at making things. Being lead +developer of a popular open source project counts almost as much.That solves the problem if you get funded by Y Combinator. What +about in the general case? Because in another sense, it is a problem +if you don't have an idea. If you start a startup with no idea, +what do you do next?So here's the brief recipe for getting startup ideas. Find something +that's missing in your own life, and supply that need—no matter +how specific to you it seems. Steve Wozniak built himself a computer; +who knew so many other people would want them? A need that's narrow +but genuine is a better starting point than one that's broad but +hypothetical. So even if the problem is simply that you don't have +a date on Saturday night, if you can think of a way to fix that by +writing software, you're onto something, because a lot of other +people have the same problem.8. No room for more startupsA lot of people look at the ever-increasing number of startups and +think "this can't continue." Implicit in their thinking is a +fallacy: that there is some limit on the number of startups there +could be. But this is false. No one claims there's any limit on +the number of people who can work for salary at 1000-person companies. +Why should there be any limit on the number who can work for equity +at 5-person companies? +[3]Nearly everyone who works is satisfying some kind of need. Breaking +up companies into smaller units doesn't make those needs go away. +Existing needs would probably get satisfied more efficiently by a +network of startups than by a few giant, hierarchical organizations, +but I don't think that would mean less opportunity, because satisfying +current needs would lead to more. Certainly this tends to be the +case in individuals. Nor is there anything wrong with that. We +take for granted things that medieval kings would have considered +effeminate luxuries, like whole buildings heated to spring temperatures +year round. And if things go well, our descendants will take for +granted things we would consider shockingly luxurious. There is +no absolute standard for material wealth. Health care is a component +of it, and that alone is a black hole. For the foreseeable future, +people will want ever more material wealth, so there is no limit +to the amount of work available for companies, and for startups in +particular.Usually the limited-room fallacy is not expressed directly. Usually +it's implicit in statements like "there are only so many startups +Google, Microsoft, and Yahoo can buy." Maybe, though the list of +acquirers is a lot longer than that. And whatever you think of +other acquirers, Google is not stupid. The reason big companies +buy startups is that they've created something valuable. And why +should there be any limit to the number of valuable startups companies +can acquire, any more than there is a limit to the amount of wealth +individual people want? Maybe there would be practical limits on +the number of startups any one acquirer could assimilate, but if +there is value to be had, in the form of upside that founders are +willing to forgo in return for an immediate payment, acquirers will +evolve to consume it. Markets are pretty smart that way.9. Family to supportThis one is real. I wouldn't advise anyone with a family to start +a startup. I'm not saying it's a bad idea, just that I don't want +to take responsibility for advising it. I'm willing to take +responsibility for telling 22 year olds to start startups. So what +if they fail? They'll learn a lot, and that job at Microsoft will +still be waiting for them if they need it. But I'm not prepared +to cross moms.What you can do, if you have a family and want to start a startup, +is start a consulting business you can then gradually turn into a +product business. Empirically the chances of pulling that off seem +very small. You're never going to produce Google this way. But at +least you'll never be without an income.Another way to decrease the risk is to join an existing startup +instead of starting your own. Being one of the first employees of +a startup is a lot like being a founder, in both the good ways and +the bad. You'll be roughly 1/n^2 founder, where n is your employee +number.As with the question of cofounders, the real lesson here is to start +startups when you're young.10. Independently wealthyThis is my excuse for not starting a startup. Startups are stressful. +Why do it if you don't need the money? For every "serial entrepreneur," +there are probably twenty sane ones who think "Start another +company? Are you crazy?"I've come close to starting new startups a couple times, but I +always pull back because I don't want four years of my life to be +consumed by random schleps. I know this business well enough to +know you can't do it half-heartedly. What makes a good startup +founder so dangerous is his willingness to endure infinite schleps.There is a bit of a problem with retirement, though. Like a lot +of people, I like to work. And one of the many weird little problems +you discover when you get rich is that a lot of the interesting +people you'd like to work with are not rich. They need to work at +something that pays the bills. Which means if you want to have +them as colleagues, you have to work at something that pays the +bills too, even though you don't need to. I think this is what +drives a lot of serial entrepreneurs, actually.That's why I love working on Y Combinator so much. It's an excuse +to work on something interesting with people I like.11. Not ready for commitmentThis was my reason for not starting a startup for most of my twenties. +Like a lot of people that age, I valued freedom most of all. I was +reluctant to do anything that required a commitment of more than a +few months. Nor would I have wanted to do anything that completely +took over my life the way a startup does. And that's fine. If you +want to spend your time travelling around, or playing in a band, +or whatever, that's a perfectly legitimate reason not to start a +company.If you start a startup that succeeds, it's going to consume at least +three or four years. (If it fails, you'll be done a lot quicker.) +So you shouldn't do it if you're not ready for commitments on that +scale. Be aware, though, that if you get a regular job, you'll +probably end up working there for as long as a startup would take, +and you'll find you have much less spare time than you might expect. +So if you're ready to clip on that ID badge and go to that orientation +session, you may also be ready to start that startup.12. Need for structureI'm told there are people who need structure in their lives. This +seems to be a nice way of saying they need someone to tell them +what to do. I believe such people exist. There's plenty of empirical +evidence: armies, religious cults, and so on. They may even be the +majority.If you're one of these people, you probably shouldn't start a +startup. In fact, you probably shouldn't even go to work for one. +In a good startup, you don't get told what to do very much. There +may be one person whose job title is CEO, but till the company has +about twelve people no one should be telling anyone what to do. +That's too inefficient. Each person should just do what they need +to without anyone telling them.If that sounds like a recipe for chaos, think about a soccer team. +Eleven people manage to work together in quite complicated ways, +and yet only in occasional emergencies does anyone tell anyone else +what to do. A reporter once asked David Beckham if there were any +language problems at Real Madrid, since the players were from about +eight different countries. He said it was never an issue, because +everyone was so good they never had to talk. They all just did the +right thing.How do you tell if you're independent-minded enough to start a +startup? If you'd bristle at the suggestion that you aren't, then +you probably are.13. Fear of uncertaintyPerhaps some people are deterred from starting startups because +they don't like the uncertainty. If you go to work for Microsoft, +you can predict fairly accurately what the next few years will be +like—all too accurately, in fact. If you start a startup, anything +might happen.Well, if you're troubled by uncertainty, I can solve that problem +for you: if you start a startup, it will probably fail. Seriously, +though, this is not a bad way to think +about the whole experience. Hope for the best, but expect the +worst. In the worst case, it will at least be interesting. In the +best case you might get rich.No one will blame you if the startup tanks, so long as you made a +serious effort. There may once have been a time when employers +would regard that as a mark against you, but they wouldn't now. I +asked managers at big companies, and they all said they'd prefer +to hire someone who'd tried to start a startup and failed over +someone who'd spent the same time working at a big company.Nor will investors hold it against you, as long as you didn't fail +out of laziness or incurable stupidity. I'm told there's a lot +of stigma attached to failing in other places—in Europe, for +example. Not here. In America, companies, like practically +everything else, are disposable.14. Don't realize what you're avoidingOne reason people who've been out in the world for a year or two +make better founders than people straight from college is that they +know what they're avoiding. If their startup fails, they'll have +to get a job, and they know how much jobs suck.If you've had summer jobs in college, you may think you know what +jobs are like, but you probably don't. Summer jobs at technology +companies are not real jobs. If you get a summer job as a waiter, +that's a real job. Then you have to carry your weight. But software +companies don't hire students for the summer as a source of cheap +labor. They do it in the hope of recruiting them when they graduate. +So while they're happy if you produce, they don't expect you to.That will change if you get a real job after you graduate. Then +you'll have to earn your keep. And since most of what big companies +do is boring, you're going to have to work on boring stuff. Easy, +compared to college, but boring. At first it may seem cool to get +paid for doing easy stuff, after paying to do hard stuff in college. +But that wears off after a few months. Eventually it gets demoralizing +to work on dumb stuff, even if it's easy and you get paid a lot.And that's not the worst of it. The thing that really sucks about +having a regular job is the expectation that you're supposed to be +there at certain times. Even Google is afflicted with this, +apparently. And what this means, as everyone who's had a regular +job can tell you, is that there are going to be times when you have +absolutely no desire to work on anything, and you're going to have +to go to work anyway and sit in front of your screen and pretend +to. To someone who likes work, as most good hackers do, this is +torture.In a startup, you skip all that. There's no concept of office hours +in most startups. Work and life just get mixed together. But the +good thing about that is that no one minds if you have a life at +work. In a startup you can do whatever you want most of the time. +If you're a founder, what you want to do most of the time is work. +But you never have to pretend to.If you took a nap in your office in a big company, it would seem +unprofessional. But if you're starting a startup and you fall +asleep in the middle of the day, your cofounders will just assume +you were tired.15. Parents want you to be a doctorA significant number of would-be startup founders are probably +dissuaded from doing it by their parents. I'm not going to say you +shouldn't listen to them. Families are entitled to their own +traditions, and who am I to argue with them? But I will give you +a couple reasons why a safe career might not be what your parents +really want for you.One is that parents tend to be more conservative for their kids +than they would be for themselves. This is actually a rational +response to their situation. Parents end up sharing more of their +kids' ill fortune than good fortune. Most parents don't mind this; +it's part of the job; but it does tend to make them excessively +conservative. And erring on the side of conservatism is still +erring. In almost everything, reward is proportionate to risk. So +by protecting their kids from risk, parents are, without realizing +it, also protecting them from rewards. If they saw that, they'd +want you to take more risks.The other reason parents may be mistaken is that, like generals, +they're always fighting the last war. If they want you to be a +doctor, odds are it's not just because they want you to help the +sick, but also because it's a prestigious and lucrative career. +[4] +But not so lucrative or prestigious as it was when their +opinions were formed. When I was a kid in the seventies, a doctor +was the thing to be. There was a sort of golden triangle involving +doctors, Mercedes 450SLs, and tennis. All three vertices now seem +pretty dated.The parents who want you to be a doctor may simply not realize how +much things have changed. Would they be that unhappy if you were +Steve Jobs instead? So I think the way to deal with your parents' +opinions about what you should do is to treat them like feature +requests. Even if your only goal is to please them, the way to do +that is not simply to give them what they ask for. Instead think +about why they're asking for something, and see if there's a better +way to give them what they need.16. A job is the defaultThis leads us to the last and probably most powerful reason people +get regular jobs: it's the default thing to do. Defaults are +enormously powerful, precisely because they operate without any +conscious choice.To almost everyone except criminals, it seems an axiom that if you +need money, you should get a job. Actually this tradition is not +much more than a hundred years old. Before that, the default way +to make a living was by farming. It's a bad plan to treat something +only a hundred years old as an axiom. By historical standards, +that's something that's changing pretty rapidly.We may be seeing another such change right now. I've read a lot +of economic history, and I understand the startup world pretty well, +and it now seems to me fairly likely that we're seeing the beginning +of a change like the one from farming to manufacturing.And you know what? If you'd been around when that change began +(around 1000 in Europe) it would have seemed to nearly everyone +that running off to the city to make your fortune was a crazy thing +to do. Though serfs were in principle forbidden to leave their +manors, it can't have been that hard to run away to a city. There +were no guards patrolling the perimeter of the village. What +prevented most serfs from leaving was that it seemed insanely risky. +Leave one's plot of land? Leave the people you'd spent your whole +life with, to live in a giant city of three or four thousand complete +strangers? How would you live? How would you get food, if you +didn't grow it?Frightening as it seemed to them, it's now the default with us to +live by our wits. So if it seems risky to you to start a startup, +think how risky it once seemed to your ancestors to live as we do +now. Oddly enough, the people who know this best are the very ones +trying to get you to stick to the old model. How can Larry and +Sergey say you should come work as their employee, when they didn't +get jobs themselves?Now we look back on medieval peasants and wonder how they stood it. +How grim it must have been to till the same fields your whole life +with no hope of anything better, under the thumb of lords and priests +you had to give all your surplus to and acknowledge as your masters. +I wouldn't be surprised if one day people look back on what we +consider a normal job in the same way. How grim it would be to +commute every day to a cubicle in some soulless office complex, and +be told what to do by someone you had to acknowledge as a boss—someone +who could call you into their office and say "take a seat," +and you'd sit! Imagine having to ask permission to release +software to users. Imagine being sad on Sunday afternoons because +the weekend was almost over, and tomorrow you'd have to get up and +go to work. How did they stand it?It's exciting to think we may be on the cusp of another shift like +the one from farming to manufacturing. That's why I care about +startups. Startups aren't interesting just because they're a way +to make a lot of money. I couldn't care less about other ways to +do that, like speculating in securities. At most those are interesting +the way puzzles are. There's more going on with startups. They +may represent one of those rare, historic shifts in the way +wealth is created.That's ultimately what drives us to work on Y Combinator. We want +to make money, if only so we don't have to stop doing it, but that's +not the main goal. There have only been a handful of these great +economic shifts in human history. It would be an amazing hack to +make one happen faster. +Notes[1] +The only people who lost were us. The angels had convertible +debt, so they had first claim on the proceeds of the auction. Y +Combinator only got 38 cents on the dollar.[2] +The best kind of organization for that might be an open source +project, but those don't involve a lot of face to face meetings. +Maybe it would be worth starting one that did.[3] +There need to be some number of big companies to acquire the +startups, so the number of big companies couldn't decrease to zero.[4] +Thought experiment: If doctors did the same work, but as +impoverished outcasts, which parents would still want their kids +to be doctors?Thanks to Trevor Blackwell, Jessica Livingston, and Robert +Morris for reading drafts of this, to the founders of Zenter +for letting me use their web-based PowerPoint killer even though +it isn't launched yet, and to Ming-Hay Luk +of the Berkeley CSUA for inviting me to speak. +Comment on this essay. \ No newline at end of file diff --git a/data/PaulGrahamEssayMedium/popular.txt b/data/PaulGrahamEssayMedium/popular.txt new file mode 100644 index 0000000..3539f59 --- /dev/null +++ b/data/PaulGrahamEssayMedium/popular.txt @@ -0,0 +1,602 @@ +May 2001(This article was written as a kind of business plan for a +new language. +So it is missing (because it takes for granted) the most important +feature of a good programming language: very powerful abstractions.)A friend of mine once told an eminent operating systems +expert that he wanted to design a really good +programming language. The expert told him that it would be a +waste of time, that programming languages don't become popular +or unpopular based on their merits, and so no matter how +good his language was, no one would use it. At least, that +was what had happened to the language he had designed.What does make a language popular? Do popular +languages deserve their popularity? Is it worth trying to +define a good programming language? How would you do it?I think the answers to these questions can be found by looking +at hackers, and learning what they want. Programming +languages are for hackers, and a programming language +is good as a programming language (rather than, say, an +exercise in denotational semantics or compiler design) +if and only if hackers like it.1 The Mechanics of PopularityIt's true, certainly, that most people don't choose programming +languages simply based on their merits. Most programmers are told +what language to use by someone else. And yet I think the effect +of such external factors on the popularity of programming languages +is not as great as it's sometimes thought to be. I think a bigger +problem is that a hacker's idea of a good programming language is +not the same as most language designers'.Between the two, the hacker's opinion is the one that matters. +Programming languages are not theorems. They're tools, designed +for people, and they have to be designed to suit human strengths +and weaknesses as much as shoes have to be designed for human feet. +If a shoe pinches when you put it on, it's a bad shoe, however +elegant it may be as a piece of sculpture.It may be that the majority of programmers can't tell a good language +from a bad one. But that's no different with any other tool. It +doesn't mean that it's a waste of time to try designing a good +language. Expert hackers +can tell a good language when they see +one, and they'll use it. Expert hackers are a tiny minority, +admittedly, but that tiny minority write all the good software, +and their influence is such that the rest of the programmers will +tend to use whatever language they use. Often, indeed, it is not +merely influence but command: often the expert hackers are the very +people who, as their bosses or faculty advisors, tell the other +programmers what language to use.The opinion of expert hackers is not the only force that determines +the relative popularity of programming languages — legacy software +(Cobol) and hype (Ada, Java) also play a role — but I think it is +the most powerful force over the long term. Given an initial critical +mass and enough time, a programming language probably becomes about +as popular as it deserves to be. And popularity further separates +good languages from bad ones, because feedback from real live users +always leads to improvements. Look at how much any popular language +has changed during its life. Perl and Fortran are extreme cases, +but even Lisp has changed a lot. Lisp 1.5 didn't have macros, for +example; these evolved later, after hackers at MIT had spent a +couple years using Lisp to write real programs. [1]So whether or not a language has to be good to be popular, I think +a language has to be popular to be good. And it has to stay popular +to stay good. The state of the art in programming languages doesn't +stand still. And yet the Lisps we have today are still pretty much +what they had at MIT in the mid-1980s, because that's the last time +Lisp had a sufficiently large and demanding user base.Of course, hackers have to know about a language before they can +use it. How are they to hear? From other hackers. But there has to +be some initial group of hackers using the language for others even +to hear about it. I wonder how large this group has to be; how many +users make a critical mass? Off the top of my head, I'd say twenty. +If a language had twenty separate users, meaning twenty users who +decided on their own to use it, I'd consider it to be real.Getting there can't be easy. I would not be surprised if it is +harder to get from zero to twenty than from twenty to a thousand. +The best way to get those initial twenty users is probably to use +a trojan horse: to give people an application they want, which +happens to be written in the new language.2 External FactorsLet's start by acknowledging one external factor that does affect +the popularity of a programming language. To become popular, a +programming language has to be the scripting language of a popular +system. Fortran and Cobol were the scripting languages of early +IBM mainframes. C was the scripting language of Unix, and so, later, +was Perl. Tcl is the scripting language of Tk. Java and Javascript +are intended to be the scripting languages of web browsers.Lisp is not a massively popular language because it is not the +scripting language of a massively popular system. What popularity +it retains dates back to the 1960s and 1970s, when it was the +scripting language of MIT. A lot of the great programmers of the +day were associated with MIT at some point. And in the early 1970s, +before C, MIT's dialect of Lisp, called MacLisp, was one of the +only programming languages a serious hacker would want to use.Today Lisp is the scripting language of two moderately popular +systems, Emacs and Autocad, and for that reason I suspect that most +of the Lisp programming done today is done in Emacs Lisp or AutoLisp.Programming languages don't exist in isolation. To hack is a +transitive verb — hackers are usually hacking something — and in +practice languages are judged relative to whatever they're used to +hack. So if you want to design a popular language, you either have +to supply more than a language, or you have to design your language +to replace the scripting language of some existing system.Common Lisp is unpopular partly because it's an orphan. It did +originally come with a system to hack: the Lisp Machine. But Lisp +Machines (along with parallel computers) were steamrollered by the +increasing power of general purpose processors in the 1980s. Common +Lisp might have remained popular if it had been a good scripting +language for Unix. It is, alas, an atrociously bad one.One way to describe this situation is to say that a language isn't +judged on its own merits. Another view is that a programming language +really isn't a programming language unless it's also the scripting +language of something. This only seems unfair if it comes as a +surprise. I think it's no more unfair than expecting a programming +language to have, say, an implementation. It's just part of what +a programming language is.A programming language does need a good implementation, of course, +and this must be free. Companies will pay for software, but individual +hackers won't, and it's the hackers you need to attract.A language also needs to have a book about it. The book should be +thin, well-written, and full of good examples. K&R is the ideal +here. At the moment I'd almost say that a language has to have a +book published by O'Reilly. That's becoming the test of mattering +to hackers.There should be online documentation as well. In fact, the book +can start as online documentation. But I don't think that physical +books are outmoded yet. Their format is convenient, and the de +facto censorship imposed by publishers is a useful if imperfect +filter. Bookstores are one of the most important places for learning +about new languages.3 BrevityGiven that you can supply the three things any language needs — a +free implementation, a book, and something to hack — how do you +make a language that hackers will like?One thing hackers like is brevity. Hackers are lazy, in the same +way that mathematicians and modernist architects are lazy: they +hate anything extraneous. It would not be far from the truth to +say that a hacker about to write a program decides what language +to use, at least subconsciously, based on the total number of +characters he'll have to type. If this isn't precisely how hackers +think, a language designer would do well to act as if it were.It is a mistake to try to baby the user with long-winded expressions +that are meant to resemble English. Cobol is notorious for this +flaw. A hacker would consider being asked to writeadd x to y giving zinstead ofz = x+yas something between an insult to his intelligence and a sin against +God.It has sometimes been said that Lisp should use first and rest +instead of car and cdr, because it would make programs easier to +read. Maybe for the first couple hours. But a hacker can learn +quickly enough that car means the first element of a list and cdr +means the rest. Using first and rest means 50% more typing. And +they are also different lengths, meaning that the arguments won't +line up when they're called, as car and cdr often are, in successive +lines. I've found that it matters a lot how code lines up on the +page. I can barely read Lisp code when it is set in a variable-width +font, and friends say this is true for other languages too.Brevity is one place where strongly typed languages lose. All other +things being equal, no one wants to begin a program with a bunch +of declarations. Anything that can be implicit, should be.The individual tokens should be short as well. Perl and Common Lisp +occupy opposite poles on this question. Perl programs can be almost +cryptically dense, while the names of built-in Common Lisp operators +are comically long. The designers of Common Lisp probably expected +users to have text editors that would type these long names for +them. But the cost of a long name is not just the cost of typing +it. There is also the cost of reading it, and the cost of the space +it takes up on your screen.4 HackabilityThere is one thing more important than brevity to a hacker: being +able to do what you want. In the history of programming languages +a surprising amount of effort has gone into preventing programmers +from doing things considered to be improper. This is a dangerously +presumptuous plan. How can the language designer know what the +programmer is going to need to do? I think language designers would +do better to consider their target user to be a genius who will +need to do things they never anticipated, rather than a bumbler +who needs to be protected from himself. The bumbler will shoot +himself in the foot anyway. You may save him from referring to +variables in another package, but you can't save him from writing +a badly designed program to solve the wrong problem, and taking +forever to do it.Good programmers often want to do dangerous and unsavory things. +By unsavory I mean things that go behind whatever semantic facade +the language is trying to present: getting hold of the internal +representation of some high-level abstraction, for example. Hackers +like to hack, and hacking means getting inside things and second +guessing the original designer.Let yourself be second guessed. When you make any tool, people use +it in ways you didn't intend, and this is especially true of a +highly articulated tool like a programming language. Many a hacker +will want to tweak your semantic model in a way that you never +imagined. I say, let them; give the programmer access to as much +internal stuff as you can without endangering runtime systems like +the garbage collector.In Common Lisp I have often wanted to iterate through the fields +of a struct — to comb out references to a deleted object, for example, +or find fields that are uninitialized. I know the structs are just +vectors underneath. And yet I can't write a general purpose function +that I can call on any struct. I can only access the fields by +name, because that's what a struct is supposed to mean.A hacker may only want to subvert the intended model of things once +or twice in a big program. But what a difference it makes to be +able to. And it may be more than a question of just solving a +problem. There is a kind of pleasure here too. Hackers share the +surgeon's secret pleasure in poking about in gross innards, the +teenager's secret pleasure in popping zits. [2] For boys, at least, +certain kinds of horrors are fascinating. Maxim magazine publishes +an annual volume of photographs, containing a mix of pin-ups and +grisly accidents. They know their audience.Historically, Lisp has been good at letting hackers have their way. +The political correctness of Common Lisp is an aberration. Early +Lisps let you get your hands on everything. A good deal of that +spirit is, fortunately, preserved in macros. What a wonderful thing, +to be able to make arbitrary transformations on the source code.Classic macros are a real hacker's tool — simple, powerful, and +dangerous. It's so easy to understand what they do: you call a +function on the macro's arguments, and whatever it returns gets +inserted in place of the macro call. Hygienic macros embody the +opposite principle. They try to protect you from understanding what +they're doing. I have never heard hygienic macros explained in one +sentence. And they are a classic example of the dangers of deciding +what programmers are allowed to want. Hygienic macros are intended +to protect me from variable capture, among other things, but variable +capture is exactly what I want in some macros.A really good language should be both clean and dirty: cleanly +designed, with a small core of well understood and highly orthogonal +operators, but dirty in the sense that it lets hackers have their +way with it. C is like this. So were the early Lisps. A real hacker's +language will always have a slightly raffish character.A good programming language should have features that make the kind +of people who use the phrase "software engineering" shake their +heads disapprovingly. At the other end of the continuum are languages +like Ada and Pascal, models of propriety that are good for teaching +and not much else.5 Throwaway ProgramsTo be attractive to hackers, a language must be good for writing +the kinds of programs they want to write. And that means, perhaps +surprisingly, that it has to be good for writing throwaway programs.A throwaway program is a program you write quickly for some limited +task: a program to automate some system administration task, or +generate test data for a simulation, or convert data from one format +to another. The surprising thing about throwaway programs is that, +like the "temporary" buildings built at so many American universities +during World War II, they often don't get thrown away. Many evolve +into real programs, with real features and real users.I have a hunch that the best big programs begin life this way, +rather than being designed big from the start, like the Hoover Dam. +It's terrifying to build something big from scratch. When people +take on a project that's too big, they become overwhelmed. The +project either gets bogged down, or the result is sterile and +wooden: a shopping mall rather than a real downtown, Brasilia rather +than Rome, Ada rather than C.Another way to get a big program is to start with a throwaway +program and keep improving it. This approach is less daunting, and +the design of the program benefits from evolution. I think, if one +looked, that this would turn out to be the way most big programs +were developed. And those that did evolve this way are probably +still written in whatever language they were first written in, +because it's rare for a program to be ported, except for political +reasons. And so, paradoxically, if you want to make a language that +is used for big systems, you have to make it good for writing +throwaway programs, because that's where big systems come from.Perl is a striking example of this idea. It was not only designed +for writing throwaway programs, but was pretty much a throwaway +program itself. Perl began life as a collection of utilities for +generating reports, and only evolved into a programming language +as the throwaway programs people wrote in it grew larger. It was +not until Perl 5 (if then) that the language was suitable for +writing serious programs, and yet it was already massively popular.What makes a language good for throwaway programs? To start with, +it must be readily available. A throwaway program is something that +you expect to write in an hour. So the language probably must +already be installed on the computer you're using. It can't be +something you have to install before you use it. It has to be there. +C was there because it came with the operating system. Perl was +there because it was originally a tool for system administrators, +and yours had already installed it.Being available means more than being installed, though. An +interactive language, with a command-line interface, is more +available than one that you have to compile and run separately. A +popular programming language should be interactive, and start up +fast.Another thing you want in a throwaway program is brevity. Brevity +is always attractive to hackers, and never more so than in a program +they expect to turn out in an hour.6 LibrariesOf course the ultimate in brevity is to have the program already +written for you, and merely to call it. And this brings us to what +I think will be an increasingly important feature of programming +languages: library functions. Perl wins because it has large +libraries for manipulating strings. This class of library functions +are especially important for throwaway programs, which are often +originally written for converting or extracting data. Many Perl +programs probably begin as just a couple library calls stuck +together.I think a lot of the advances that happen in programming languages +in the next fifty years will have to do with library functions. I +think future programming languages will have libraries that are as +carefully designed as the core language. Programming language design +will not be about whether to make your language strongly or weakly +typed, or object oriented, or functional, or whatever, but about +how to design great libraries. The kind of language designers who +like to think about how to design type systems may shudder at this. +It's almost like writing applications! Too bad. Languages are for +programmers, and libraries are what programmers need.It's hard to design good libraries. It's not simply a matter of +writing a lot of code. Once the libraries get too big, it can +sometimes take longer to find the function you need than to write +the code yourself. Libraries need to be designed using a small set +of orthogonal operators, just like the core language. It ought to +be possible for the programmer to guess what library call will do +what he needs.Libraries are one place Common Lisp falls short. There are only +rudimentary libraries for manipulating strings, and almost none +for talking to the operating system. For historical reasons, Common +Lisp tries to pretend that the OS doesn't exist. And because you +can't talk to the OS, you're unlikely to be able to write a serious +program using only the built-in operators in Common Lisp. You have +to use some implementation-specific hacks as well, and in practice +these tend not to give you everything you want. Hackers would think +a lot more highly of Lisp if Common Lisp had powerful string +libraries and good OS support.7 SyntaxCould a language with Lisp's syntax, or more precisely, lack of +syntax, ever become popular? I don't know the answer to this +question. I do think that syntax is not the main reason Lisp isn't +currently popular. Common Lisp has worse problems than unfamiliar +syntax. I know several programmers who are comfortable with prefix +syntax and yet use Perl by default, because it has powerful string +libraries and can talk to the os.There are two possible problems with prefix notation: that it is +unfamiliar to programmers, and that it is not dense enough. The +conventional wisdom in the Lisp world is that the first problem is +the real one. I'm not so sure. Yes, prefix notation makes ordinary +programmers panic. But I don't think ordinary programmers' opinions +matter. Languages become popular or unpopular based on what expert +hackers think of them, and I think expert hackers might be able to +deal with prefix notation. Perl syntax can be pretty incomprehensible, +but that has not stood in the way of Perl's popularity. If anything +it may have helped foster a Perl cult.A more serious problem is the diffuseness of prefix notation. For +expert hackers, that really is a problem. No one wants to write +(aref a x y) when they could write a[x,y].In this particular case there is a way to finesse our way out of +the problem. If we treat data structures as if they were functions +on indexes, we could write (a x y) instead, which is even shorter +than the Perl form. Similar tricks may shorten other types of +expressions.We can get rid of (or make optional) a lot of parentheses by making +indentation significant. That's how programmers read code anyway: +when indentation says one thing and delimiters say another, we go +by the indentation. Treating indentation as significant would +eliminate this common source of bugs as well as making programs +shorter.Sometimes infix syntax is easier to read. This is especially true +for math expressions. I've used Lisp my whole programming life and +I still don't find prefix math expressions natural. And yet it is +convenient, especially when you're generating code, to have operators +that take any number of arguments. So if we do have infix syntax, +it should probably be implemented as some kind of read-macro.I don't think we should be religiously opposed to introducing syntax +into Lisp, as long as it translates in a well-understood way into +underlying s-expressions. There is already a good deal of syntax +in Lisp. It's not necessarily bad to introduce more, as long as no +one is forced to use it. In Common Lisp, some delimiters are reserved +for the language, suggesting that at least some of the designers +intended to have more syntax in the future.One of the most egregiously unlispy pieces of syntax in Common Lisp +occurs in format strings; format is a language in its own right, +and that language is not Lisp. If there were a plan for introducing +more syntax into Lisp, format specifiers might be able to be included +in it. It would be a good thing if macros could generate format +specifiers the way they generate any other kind of code.An eminent Lisp hacker told me that his copy of CLTL falls open to +the section format. Mine too. This probably indicates room for +improvement. It may also mean that programs do a lot of I/O.8 EfficiencyA good language, as everyone knows, should generate fast code. But +in practice I don't think fast code comes primarily from things +you do in the design of the language. As Knuth pointed out long +ago, speed only matters in certain critical bottlenecks. And as +many programmers have observed since, one is very often mistaken +about where these bottlenecks are.So, in practice, the way to get fast code is to have a very good +profiler, rather than by, say, making the language strongly typed. +You don't need to know the type of every argument in every call in +the program. You do need to be able to declare the types of arguments +in the bottlenecks. And even more, you need to be able to find out +where the bottlenecks are.One complaint people have had with Lisp is that it's hard to tell +what's expensive. This might be true. It might also be inevitable, +if you want to have a very abstract language. And in any case I +think good profiling would go a long way toward fixing the problem: +you'd soon learn what was expensive.Part of the problem here is social. Language designers like to +write fast compilers. That's how they measure their skill. They +think of the profiler as an add-on, at best. But in practice a good +profiler may do more to improve the speed of actual programs written +in the language than a compiler that generates fast code. Here, +again, language designers are somewhat out of touch with their +users. They do a really good job of solving slightly the wrong +problem.It might be a good idea to have an active profiler — to push +performance data to the programmer instead of waiting for him to +come asking for it. For example, the editor could display bottlenecks +in red when the programmer edits the source code. Another approach +would be to somehow represent what's happening in running programs. +This would be an especially big win in server-based applications, +where you have lots of running programs to look at. An active +profiler could show graphically what's happening in memory as a +program's running, or even make sounds that tell what's happening.Sound is a good cue to problems. In one place I worked, we had a +big board of dials showing what was happening to our web servers. +The hands were moved by little servomotors that made a slight noise +when they turned. I couldn't see the board from my desk, but I +found that I could tell immediately, by the sound, when there was +a problem with a server.It might even be possible to write a profiler that would automatically +detect inefficient algorithms. I would not be surprised if certain +patterns of memory access turned out to be sure signs of bad +algorithms. If there were a little guy running around inside the +computer executing our programs, he would probably have as long +and plaintive a tale to tell about his job as a federal government +employee. I often have a feeling that I'm sending the processor on +a lot of wild goose chases, but I've never had a good way to look +at what it's doing.A number of Lisps now compile into byte code, which is then executed +by an interpreter. This is usually done to make the implementation +easier to port, but it could be a useful language feature. It might +be a good idea to make the byte code an official part of the +language, and to allow programmers to use inline byte code in +bottlenecks. Then such optimizations would be portable too.The nature of speed, as perceived by the end-user, may be changing. +With the rise of server-based applications, more and more programs +may turn out to be i/o-bound. It will be worth making i/o fast. +The language can help with straightforward measures like simple, +fast, formatted output functions, and also with deep structural +changes like caching and persistent objects.Users are interested in response time. But another kind of efficiency +will be increasingly important: the number of simultaneous users +you can support per processor. Many of the interesting applications +written in the near future will be server-based, and the number of +users per server is the critical question for anyone hosting such +applications. In the capital cost of a business offering a server-based +application, this is the divisor.For years, efficiency hasn't mattered much in most end-user +applications. Developers have been able to assume that each user +would have an increasingly powerful processor sitting on their +desk. And by Parkinson's Law, software has expanded to use the +resources available. That will change with server-based applications. +In that world, the hardware and software will be supplied together. +For companies that offer server-based applications, it will make +a very big difference to the bottom line how many users they can +support per server.In some applications, the processor will be the limiting factor, +and execution speed will be the most important thing to optimize. +But often memory will be the limit; the number of simultaneous +users will be determined by the amount of memory you need for each +user's data. The language can help here too. Good support for +threads will enable all the users to share a single heap. It may +also help to have persistent objects and/or language level support +for lazy loading.9 TimeThe last ingredient a popular language needs is time. No one wants +to write programs in a language that might go away, as so many +programming languages do. So most hackers will tend to wait until +a language has been around for a couple years before even considering +using it.Inventors of wonderful new things are often surprised to discover +this, but you need time to get any message through to people. A +friend of mine rarely does anything the first time someone asks +him. He knows that people sometimes ask for things that they turn +out not to want. To avoid wasting his time, he waits till the third +or fourth time he's asked to do something; by then, whoever's asking +him may be fairly annoyed, but at least they probably really do +want whatever they're asking for.Most people have learned to do a similar sort of filtering on new +things they hear about. They don't even start paying attention +until they've heard about something ten times. They're perfectly +justified: the majority of hot new whatevers do turn out to be a +waste of time, and eventually go away. By delaying learning VRML, +I avoided having to learn it at all.So anyone who invents something new has to expect to keep repeating +their message for years before people will start to get it. We +wrote what was, as far as I know, the first web-server based +application, and it took us years to get it through to people that +it didn't have to be downloaded. It wasn't that they were stupid. +They just had us tuned out.The good news is, simple repetition solves the problem. All you +have to do is keep telling your story, and eventually people will +start to hear. It's not when people notice you're there that they +pay attention; it's when they notice you're still there.It's just as well that it usually takes a while to gain momentum. +Most technologies evolve a good deal even after they're first +launched — programming languages especially. Nothing could be better, +for a new techology, than a few years of being used only by a small +number of early adopters. Early adopters are sophisticated and +demanding, and quickly flush out whatever flaws remain in your +technology. When you only have a few users you can be in close +contact with all of them. And early adopters are forgiving when +you improve your system, even if this causes some breakage.There are two ways new technology gets introduced: the organic +growth method, and the big bang method. The organic growth method +is exemplified by the classic seat-of-the-pants underfunded garage +startup. A couple guys, working in obscurity, develop some new +technology. They launch it with no marketing and initially have +only a few (fanatically devoted) users. They continue to improve +the technology, and meanwhile their user base grows by word of +mouth. Before they know it, they're big.The other approach, the big bang method, is exemplified by the +VC-backed, heavily marketed startup. They rush to develop a product, +launch it with great publicity, and immediately (they hope) have +a large user base.Generally, the garage guys envy the big bang guys. The big bang +guys are smooth and confident and respected by the VCs. They can +afford the best of everything, and the PR campaign surrounding the +launch has the side effect of making them celebrities. The organic +growth guys, sitting in their garage, feel poor and unloved. And +yet I think they are often mistaken to feel sorry for themselves. +Organic growth seems to yield better technology and richer founders +than the big bang method. If you look at the dominant technologies +today, you'll find that most of them grew organically.This pattern doesn't only apply to companies. You see it in sponsored +research too. Multics and Common Lisp were big-bang projects, and +Unix and MacLisp were organic growth projects.10 Redesign"The best writing is rewriting," wrote E. B. White. Every good +writer knows this, and it's true for software too. The most important +part of design is redesign. Programming languages, especially, +don't get redesigned enough.To write good software you must simultaneously keep two opposing +ideas in your head. You need the young hacker's naive faith in +his abilities, and at the same time the veteran's skepticism. You +have to be able to think +how hard can it be? with one half of +your brain while thinking +it will never work with the other.The trick is to realize that there's no real contradiction here. +You want to be optimistic and skeptical about two different things. +You have to be optimistic about the possibility of solving the +problem, but skeptical about the value of whatever solution you've +got so far.People who do good work often think that whatever they're working +on is no good. Others see what they've done and are full of wonder, +but the creator is full of worry. This pattern is no coincidence: +it is the worry that made the work good.If you can keep hope and worry balanced, they will drive a project +forward the same way your two legs drive a bicycle forward. In the +first phase of the two-cycle innovation engine, you work furiously +on some problem, inspired by your confidence that you'll be able +to solve it. In the second phase, you look at what you've done in +the cold light of morning, and see all its flaws very clearly. But +as long as your critical spirit doesn't outweigh your hope, you'll +be able to look at your admittedly incomplete system, and think, +how hard can it be to get the rest of the way?, thereby continuing +the cycle.It's tricky to keep the two forces balanced. In young hackers, +optimism predominates. They produce something, are convinced it's +great, and never improve it. In old hackers, skepticism predominates, +and they won't even dare to take on ambitious projects.Anything you can do to keep the redesign cycle going is good. Prose +can be rewritten over and over until you're happy with it. But +software, as a rule, doesn't get redesigned enough. Prose has +readers, but software has users. If a writer rewrites an essay, +people who read the old version are unlikely to complain that their +thoughts have been broken by some newly introduced incompatibility.Users are a double-edged sword. They can help you improve your +language, but they can also deter you from improving it. So choose +your users carefully, and be slow to grow their number. Having +users is like optimization: the wise course is to delay it. Also, +as a general rule, you can at any given time get away with changing +more than you think. Introducing change is like pulling off a +bandage: the pain is a memory almost as soon as you feel it.Everyone knows that it's not a good idea to have a language designed +by a committee. Committees yield bad design. But I think the worst +danger of committees is that they interfere with redesign. It is +so much work to introduce changes that no one wants to bother. +Whatever a committee decides tends to stay that way, even if most +of the members don't like it.Even a committee of two gets in the way of redesign. This happens +particularly in the interfaces between pieces of software written +by two different people. To change the interface both have to agree +to change it at once. And so interfaces tend not to change at all, +which is a problem because they tend to be one of the most ad hoc +parts of any system.One solution here might be to design systems so that interfaces +are horizontal instead of vertical — so that modules are always +vertically stacked strata of abstraction. Then the interface will +tend to be owned by one of them. The lower of two levels will either +be a language in which the upper is written, in which case the +lower level will own the interface, or it will be a slave, in which +case the interface can be dictated by the upper level.11 LispWhat all this implies is that there is hope for a new Lisp. There +is hope for any language that gives hackers what they want, including +Lisp. I think we may have made a mistake in thinking that hackers +are turned off by Lisp's strangeness. This comforting illusion may +have prevented us from seeing the real problem with Lisp, or at +least Common Lisp, which is that it sucks for doing what hackers +want to do. A hacker's language needs powerful libraries and +something to hack. Common Lisp has neither. A hacker's language is +terse and hackable. Common Lisp is not.The good news is, it's not Lisp that sucks, but Common Lisp. If we +can develop a new Lisp that is a real hacker's language, I think +hackers will use it. They will use whatever language does the job. +All we have to do is make sure this new Lisp does some important +job better than other languages.History offers some encouragement. Over time, successive new +programming languages have taken more and more features from Lisp. +There is no longer much left to copy before the language you've +made is Lisp. The latest hot language, Python, is a watered-down +Lisp with infix syntax and no macros. A new Lisp would be a natural +step in this progression.I sometimes think that it would be a good marketing trick to call +it an improved version of Python. That sounds hipper than Lisp. To +many people, Lisp is a slow AI language with a lot of parentheses. +Fritz Kunze's official biography carefully avoids mentioning the +L-word. But my guess is that we shouldn't be afraid to call the +new Lisp Lisp. Lisp still has a lot of latent respect among the +very best hackers — the ones who took 6.001 and understood it, for +example. And those are the users you need to win.In "How to Become a Hacker," Eric Raymond describes Lisp as something +like Latin or Greek — a language you should learn as an intellectual +exercise, even though you won't actually use it: + + Lisp is worth learning for the profound enlightenment experience + you will have when you finally get it; that experience will make + you a better programmer for the rest of your days, even if you + never actually use Lisp itself a lot. + +If I didn't know Lisp, reading this would set me asking questions. +A language that would make me a better programmer, if it means +anything at all, means a language that would be better for programming. +And that is in fact the implication of what Eric is saying.As long as that idea is still floating around, I think hackers will +be receptive enough to a new Lisp, even if it is called Lisp. But +this Lisp must be a hacker's language, like the classic Lisps of +the 1970s. It must be terse, simple, and hackable. And it must have +powerful libraries for doing what hackers want to do now.In the matter of libraries I think there is room to beat languages +like Perl and Python at their own game. A lot of the new applications +that will need to be written in the coming years will be +server-based +applications. There's no reason a new Lisp shouldn't have string +libraries as good as Perl, and if this new Lisp also had powerful +libraries for server-based applications, it could be very popular. +Real hackers won't turn up their noses at a new tool that will let +them solve hard problems with a few library calls. Remember, hackers +are lazy.It could be an even bigger win to have core language support for +server-based applications. For example, explicit support for programs +with multiple users, or data ownership at the level of type tags.Server-based applications also give us the answer to the question +of what this new Lisp will be used to hack. It would not hurt to +make Lisp better as a scripting language for Unix. (It would be +hard to make it worse.) But I think there are areas where existing +languages would be easier to beat. I think it might be better to +follow the model of Tcl, and supply the Lisp together with a complete +system for supporting server-based applications. Lisp is a natural +fit for server-based applications. Lexical closures provide a way +to get the effect of subroutines when the ui is just a series of +web pages. S-expressions map nicely onto html, and macros are good +at generating it. There need to be better tools for writing +server-based applications, and there needs to be a new Lisp, and +the two would work very well together.12 The Dream LanguageBy way of summary, let's try describing the hacker's dream language. +The dream language is +beautiful, clean, and terse. It has an +interactive toplevel that starts up fast. You can write programs +to solve common problems with very little code. Nearly all the +code in any program you write is code that's specific to your +application. Everything else has been done for you.The syntax of the language is brief to a fault. You never have to +type an unnecessary character, or even to use the shift key much.Using big abstractions you can write the first version of a program +very quickly. Later, when you want to optimize, there's a really +good profiler that tells you where to focus your attention. You +can make inner loops blindingly fast, even writing inline byte code +if you need to.There are lots of good examples to learn from, and the language is +intuitive enough that you can learn how to use it from examples in +a couple minutes. You don't need to look in the manual much. The +manual is thin, and has few warnings and qualifications.The language has a small core, and powerful, highly orthogonal +libraries that are as carefully designed as the core language. The +libraries all work well together; everything in the language fits +together like the parts in a fine camera. Nothing is deprecated, +or retained for compatibility. The source code of all the libraries +is readily available. It's easy to talk to the operating system +and to applications written in other languages.The language is built in layers. The higher-level abstractions are +built in a very transparent way out of lower-level abstractions, +which you can get hold of if you want.Nothing is hidden from you that doesn't absolutely have to be. The +language offers abstractions only as a way of saving you work, +rather than as a way of telling you what to do. In fact, the language +encourages you to be an equal participant in its design. You can +change everything about it, including even its syntax, and anything +you write has, as much as possible, the same status as what comes +predefined.Notes[1] Macros very close to the modern idea were proposed by Timothy +Hart in 1964, two years after Lisp 1.5 was released. What was +missing, initially, were ways to avoid variable capture and multiple +evaluation; Hart's examples are subject to both.[2] In When the Air Hits Your Brain, neurosurgeon Frank Vertosick +recounts a conversation in which his chief resident, Gary, talks +about the difference between surgeons and internists ("fleas"): + + Gary and I ordered a large pizza and found an open booth. The + chief lit a cigarette. "Look at those goddamn fleas, jabbering + about some disease they'll see once in their lifetimes. That's + the trouble with fleas, they only like the bizarre stuff. They + hate their bread and butter cases. That's the difference between + us and the fucking fleas. See, we love big juicy lumbar disc + herniations, but they hate hypertension...." + +It's hard to think of a lumbar disc herniation as juicy (except +literally). And yet I think I know what they mean. I've often had +a juicy bug to track down. Someone who's not a programmer would +find it hard to imagine that there could be pleasure in a bug. +Surely it's better if everything just works. In one way, it is. +And yet there is undeniably a grim satisfaction in hunting down +certain sorts of bugs. \ No newline at end of file diff --git a/data/PaulGrahamEssayMedium/re.txt b/data/PaulGrahamEssayMedium/re.txt new file mode 100644 index 0000000..e62ab36 --- /dev/null +++ b/data/PaulGrahamEssayMedium/re.txt @@ -0,0 +1,627 @@ +January 2016One advantage of being old is that you can see change happen in +your lifetime. A lot of the change I've seen is fragmentation. US +politics is much more polarized than it used to be. Culturally we +have ever less common ground. The creative class flocks to a handful +of happy cities, abandoning the rest. And increasing economic +inequality means the spread between rich and poor is growing too. +I'd like to propose a hypothesis: that all these trends are instances +of the same phenomenon. And moreover, that the cause is not some +force that's pulling us apart, but rather the erosion of forces +that had been pushing us together.Worse still, for those who worry about these trends, the forces +that were pushing us together were an anomaly, a one-time combination +of circumstances that's unlikely to be repeated — and indeed, that +we would not want to repeat.The two forces were war (above all World War II), and the rise of +large corporations.The effects of World War II were both economic and social. +Economically, it decreased variation in income. Like all modern +armed forces, America's were socialist economically. From each +according to his ability, to each according to his need. More or +less. Higher ranking members of the military got more (as higher +ranking members of socialist societies always do), but what they +got was fixed according to their rank. And the flattening effect +wasn't limited to those under arms, because the US economy was +conscripted too. Between 1942 and 1945 all wages were set by the +National War Labor Board. Like the military, they defaulted to +flatness. And this national standardization of wages was so pervasive +that its effects could still be seen years after the war ended. +[1]Business owners weren't supposed to be making money either. FDR +said "not a single war millionaire" would be permitted. To ensure +that, any increase in a company's profits over prewar levels was +taxed at 85%. And when what was left after corporate taxes reached +individuals, it was taxed again at a marginal rate of 93%. +[2]Socially too the war tended to decrease variation. Over 16 million +men and women from all sorts of different backgrounds were brought +together in a way of life that was literally uniform. Service rates +for men born in the early 1920s approached 80%. And working toward +a common goal, often under stress, brought them still closer together.Though strictly speaking World War II lasted less than 4 years for +the US, its effects lasted longer. Wars make central governments +more powerful, and World War II was an extreme case of this. In +the US, as in all the other Allied countries, the federal government +was slow to give up the new powers it had acquired. Indeed, in +some respects the war didn't end in 1945; the enemy just switched +to the Soviet Union. In tax rates, federal power, defense spending, +conscription, and nationalism, the decades after the war looked more +like wartime than prewar peacetime. +[3] +And the social effects +lasted too. The kid pulled into the army from behind a mule team +in West Virginia didn't simply go back to the farm afterward. +Something else was waiting for him, something that looked a lot +like the army.If total war was the big political story of the 20th century, the +big economic story was the rise of a new kind of company. And this +too tended to produce both social and economic cohesion. +[4]The 20th century was the century of the big, national corporation. +General Electric, General Foods, General Motors. Developments in +finance, communications, transportation, and manufacturing enabled +a new type of company whose goal was above all scale. Version 1 +of this world was low-res: a Duplo world of a few giant companies +dominating each big market. +[5]The late 19th and early 20th centuries had been a time of consolidation, +led especially by J. P. Morgan. Thousands of companies run by their +founders were merged into a couple hundred giant ones run by +professional managers. Economies of scale ruled the day. It seemed +to people at the time that this was the final state of things. John +D. Rockefeller said in 1880 + + The day of combination is here to stay. Individualism has gone, + never to return. + +He turned out to be mistaken, but he seemed right for the next +hundred years.The consolidation that began in the late 19th century continued for +most of the 20th. By the end of World War II, as Michael Lind +writes, "the major sectors of the economy were either organized +as government-backed cartels or dominated by a few oligopolistic +corporations."For consumers this new world meant the same choices everywhere, but +only a few of them. When I grew up there were only 2 or 3 of most +things, and since they were all aiming at the middle of the market +there wasn't much to differentiate them.One of the most important instances of this phenomenon was in TV. +Here there were 3 choices: NBC, CBS, and ABC. Plus public TV for +eggheads and communists. The programs that the 3 networks offered were +indistinguishable. In fact, here there was a triple pressure toward +the center. If one show did try something daring, local affiliates +in conservative markets would make them stop. Plus since TVs were +expensive, whole families watched the same shows together, so they +had to be suitable for everyone.And not only did everyone get the same thing, they got it at the +same time. It's difficult to imagine now, but every night tens of +millions of families would sit down together in front of their TV +set watching the same show, at the same time, as their next door +neighbors. What happens now with the Super Bowl used to happen +every night. We were literally in sync. +[6]In a way mid-century TV culture was good. The view it gave of the +world was like you'd find in a children's book, and it probably had +something of the effect that (parents hope) children's books have +in making people behave better. But, like children's books, TV was +also misleading. Dangerously misleading, for adults. In his +autobiography, Robert MacNeil talks of seeing gruesome images that +had just come in from Vietnam and thinking, we can't show these to +families while they're having dinner.I know how pervasive the common culture was, because I tried to opt +out of it, and it was practically impossible to find alternatives. +When I was 13 I realized, more from internal evidence than any +outside source, that the ideas we were being fed on TV were crap, +and I stopped watching it. +[7] +But it wasn't just TV. It seemed +like everything around me was crap. The politicians all saying the +same things, the consumer brands making almost identical products +with different labels stuck on to indicate how prestigious they +were meant to be, the balloon-frame houses with fake "colonial" +skins, the cars with several feet of gratuitous metal on each end +that started to fall apart after a couple years, the "red delicious" +apples that were red but only nominally +apples. And in retrospect, it was crap. +[8]But when I went looking for alternatives to fill this void, I found +practically nothing. There was no Internet then. The only place +to look was in the chain bookstore in our local shopping mall. +[9] +There I found a copy of The Atlantic. I wish I could say it became +a gateway into a wider world, but in fact I found it boring and +incomprehensible. Like a kid tasting whisky for the first time and +pretending to like it, I preserved that magazine as carefully as +if it had been a book. I'm sure I still have it somewhere. But +though it was evidence that there was, somewhere, a world that +wasn't red delicious, I didn't find it till college.It wasn't just as consumers that the big companies made us similar. +They did as employers too. Within companies there were powerful +forces pushing people toward a single model of how to look and act. +IBM was particularly notorious for this, but they were only a little +more extreme than other big companies. And the models of how to +look and act varied little between companies. Meaning everyone +within this world was expected to seem more or less the same. And +not just those in the corporate world, but also everyone who aspired +to it — which in the middle of the 20th century meant most people +who weren't already in it. For most of the 20th century, working-class +people tried hard to look middle class. You can see it in old +photos. Few adults aspired to look dangerous in 1950.But the rise of national corporations didn't just compress us +culturally. It compressed us economically too, and on both ends.Along with giant national corporations, we got giant national labor +unions. And in the mid 20th century the corporations cut deals +with the unions where they paid over market price for labor. Partly +because the unions were monopolies. +[10] +Partly because, as +components of oligopolies themselves, the corporations knew they +could safely pass the cost on to their customers, because their +competitors would have to as well. And partly because in mid-century +most of the giant companies were still focused on finding new ways +to milk economies of scale. Just as startups rightly pay AWS a +premium over the cost of running their own servers so they can focus +on growth, many of the big national corporations were willing to +pay a premium for labor. +[11]As well as pushing incomes up from the bottom, by overpaying unions, +the big companies of the 20th century also pushed incomes down at +the top, by underpaying their top management. Economist J. K. +Galbraith wrote in 1967 that "There are few corporations in which +it would be suggested that executive salaries are at a maximum." +[12]To some extent this was an illusion. Much of the de facto pay of +executives never showed up on their income tax returns, because it +took the form of perks. The higher the rate of income tax, the +more pressure there was to pay employees upstream of it. (In the +UK, where taxes were even higher than in the US, companies would +even pay their kids' private school tuitions.) One of the most +valuable things the big companies of the mid 20th century gave their +employees was job security, and this too didn't show up in tax +returns or income statistics. So the nature of employment in these +organizations tended to yield falsely low numbers about economic +inequality. But even accounting for that, the big companies paid +their best people less than market price. There was no market; the +expectation was that you'd work for the same company for decades +if not your whole career. +[13]Your work was so illiquid there was little chance of getting market +price. But that same illiquidity also encouraged you not to seek +it. If the company promised to employ you till you retired and +give you a pension afterward, you didn't want to extract as much +from it this year as you could. You needed to take care of the +company so it could take care of you. Especially when you'd been +working with the same group of people for decades. If you tried +to squeeze the company for more money, you were squeezing the +organization that was going to take care of them. Plus if +you didn't put the company first you wouldn't be promoted, and if +you couldn't switch ladders, promotion on this one was the only way +up. +[14]To someone who'd spent several formative years in the armed forces, +this situation didn't seem as strange as it does to us now. From +their point of view, as big company executives, they were high-ranking +officers. They got paid a lot more than privates. They got to +have expense account lunches at the best restaurants and fly around +on the company's Gulfstreams. It probably didn't occur to most of +them to ask if they were being paid market price.The ultimate way to get market price is to work for yourself, by +starting your own company. That seems obvious to any ambitious +person now. But in the mid 20th century it was an alien concept. +Not because starting one's own company seemed too ambitious, but +because it didn't seem ambitious enough. Even as late as the 1970s, +when I grew up, the ambitious plan was to get lots of education at +prestigious institutions, and then join some other prestigious +institution and work one's way up the hierarchy. Your prestige was +the prestige of the institution you belonged to. People did start +their own businesses of course, but educated people rarely did, +because in those days there was practically zero concept of starting +what we now call a startup: +a business that starts small and grows +big. That was much harder to do in the mid 20th century. Starting +one's own business meant starting a business that would start small +and stay small. Which in those days of big companies often meant +scurrying around trying to avoid being trampled by elephants. It +was more prestigious to be one of the executive class riding the +elephant.By the 1970s, no one stopped to wonder where the big prestigious +companies had come from in the first place. It seemed like they'd +always been there, like the chemical elements. And indeed, there +was a double wall between ambitious kids in the 20th century and +the origins of the big companies. Many of the big companies were +roll-ups that didn't have clear founders. And when they did, the +founders didn't seem like us. Nearly all of them had been uneducated, +in the sense of not having been to college. They were what Shakespeare +called rude mechanicals. College trained one to be a member of the +professional classes. Its graduates didn't expect to do the sort +of grubby menial work that Andrew Carnegie or Henry Ford started +out doing. +[15]And in the 20th century there were more and more college graduates. +They increased from about 2% of the population in 1900 to about 25% +in 2000. In the middle of the century our two big forces intersect, +in the form of the GI Bill, which sent 2.2 million World War II +veterans to college. Few thought of it in these terms, but the +result of making college the canonical path for the ambitious was +a world in which it was socially acceptable to work for Henry Ford, +but not to be Henry Ford. +[16]I remember this world well. I came of age just as it was starting +to break up. In my childhood it was still dominant. Not quite so +dominant as it had been. We could see from old TV shows and yearbooks +and the way adults acted that people in the 1950s and 60s had been +even more conformist than us. The mid-century model was already +starting to get old. But that was not how we saw it at the time. +We would at most have said that one could be a bit more daring in +1975 than 1965. And indeed, things hadn't changed much yet.But change was coming soon. And when the Duplo economy started to +disintegrate, it disintegrated in several different ways at once. +Vertically integrated companies literally dis-integrated because +it was more efficient to. Incumbents faced new competitors as (a) +markets went global and (b) technical innovation started to trump +economies of scale, turning size from an asset into a liability. +Smaller companies were increasingly able to survive as formerly +narrow channels to consumers broadened. Markets themselves started +to change faster, as whole new categories of products appeared. And +last but not least, the federal government, which had previously +smiled upon J. P. Morgan's world as the natural state of things, +began to realize it wasn't the last word after all.What J. P. Morgan was to the horizontal axis, Henry Ford was to the +vertical. He wanted to do everything himself. The giant plant he +built at River Rouge between 1917 and 1928 literally took in iron +ore at one end and sent cars out the other. 100,000 people worked +there. At the time it seemed the future. But that is not how car +companies operate today. Now much of the design and manufacturing +happens in a long supply chain, whose products the car companies +ultimately assemble and sell. The reason car companies operate +this way is that it works better. Each company in the supply chain +focuses on what they know best. And they each have to do it well +or they can be swapped out for another supplier.Why didn't Henry Ford realize that networks of cooperating companies +work better than a single big company? One reason is that supplier +networks take a while to evolve. In 1917, doing everything himself +seemed to Ford the only way to get the scale he needed. And the +second reason is that if you want to solve a problem using a network +of cooperating companies, you have to be able to coordinate their +efforts, and you can do that much better with computers. Computers +reduce the transaction costs that Coase argued are the raison d'etre +of corporations. That is a fundamental change.In the early 20th century, big companies were synonymous with +efficiency. In the late 20th century they were synonymous with +inefficiency. To some extent this was because the companies +themselves had become sclerotic. But it was also because our +standards were higher.It wasn't just within existing industries that change occurred. +The industries themselves changed. It became possible to make lots +of new things, and sometimes the existing companies weren't the +ones who did it best.Microcomputers are a classic example. The market was pioneered by +upstarts like Apple. When it got big enough, IBM decided it was +worth paying attention to. At the time IBM completely dominated +the computer industry. They assumed that all they had to do, now +that this market was ripe, was to reach out and pick it. Most +people at the time would have agreed with them. But what happened +next illustrated how much more complicated the world had become. +IBM did launch a microcomputer. Though quite successful, it did +not crush Apple. But even more importantly, IBM itself ended up +being supplanted by a supplier coming in from the side — from +software, which didn't even seem to be the same business. IBM's +big mistake was to accept a non-exclusive license for DOS. It must +have seemed a safe move at the time. No other computer manufacturer +had ever been able to outsell them. What difference did it make if +other manufacturers could offer DOS too? The result of that +miscalculation was an explosion of inexpensive PC clones. Microsoft +now owned the PC standard, and the customer. And the microcomputer +business ended up being Apple vs Microsoft.Basically, Apple bumped IBM and then Microsoft stole its wallet. +That sort of thing did not happen to big companies in mid-century. +But it was going to happen increasingly often in the future.Change happened mostly by itself in the computer business. In other +industries, legal obstacles had to be removed first. Many of the +mid-century oligopolies had been anointed by the federal government +with policies (and in wartime, large orders) that kept out competitors. +This didn't seem as dubious to government officials at the time as +it sounds to us. They felt a two-party system ensured sufficient +competition in politics. It ought to work for business too.Gradually the government realized that anti-competitive policies +were doing more harm than good, and during the Carter administration +it started to remove them. The word used for this process was +misleadingly narrow: deregulation. What was really happening was +de-oligopolization. It happened to one industry after another. +Two of the most visible to consumers were air travel and long-distance +phone service, which both became dramatically cheaper after +deregulation.Deregulation also contributed to the wave of hostile takeovers in +the 1980s. In the old days the only limit on the inefficiency of +companies, short of actual bankruptcy, was the inefficiency of their +competitors. Now companies had to face absolute rather than relative +standards. Any public company that didn't generate sufficient +returns on its assets risked having its management replaced with +one that would. Often the new managers did this by breaking companies +up into components that were more valuable separately. +[17]Version 1 of the national economy consisted of a few big blocks +whose relationships were negotiated in back rooms by a handful of +executives, politicians, regulators, and labor leaders. Version 2 +was higher resolution: there were more companies, of more different +sizes, making more different things, and their relationships changed +faster. In this world there were still plenty of back room negotiations, +but more was left to market forces. Which further accelerated the +fragmentation.It's a little misleading to talk of versions when describing a +gradual process, but not as misleading as it might seem. There was +a lot of change in a few decades, and what we ended up with was +qualitatively different. The companies in the S&P 500 in 1958 had +been there an average of 61 years. By 2012 that number was 18 years. +[18]The breakup of the Duplo economy happened simultaneously with the +spread of computing power. To what extent were computers a precondition? +It would take a book to answer that. Obviously the spread of computing +power was a precondition for the rise of startups. I suspect it +was for most of what happened in finance too. But was it a +precondition for globalization or the LBO wave? I don't know, but +I wouldn't discount the possibility. It may be that the refragmentation +was driven by computers in the way the industrial revolution was +driven by steam engines. Whether or not computers were a precondition, +they have certainly accelerated it.The new fluidity of companies changed people's relationships with +their employers. Why climb a corporate ladder that might be yanked +out from under you? Ambitious people started to think of a career +less as climbing a single ladder than as a series of jobs that might +be at different companies. More movement (or even potential movement) +between companies introduced more competition in salaries. Plus +as companies became smaller it became easier to estimate how much +an employee contributed to the company's revenue. Both changes +drove salaries toward market price. And since people vary dramatically +in productivity, paying market price meant salaries started to +diverge.By no coincidence it was in the early 1980s that the term "yuppie" +was coined. That word is not much used now, because the phenomenon +it describes is so taken for granted, but at the time it was a label +for something novel. Yuppies were young professionals who made lots +of money. To someone in their twenties today, this wouldn't seem +worth naming. Why wouldn't young professionals make lots of money? +But until the 1980s, being underpaid early in your career was part +of what it meant to be a professional. Young professionals were +paying their dues, working their way up the ladder. The rewards +would come later. What was novel about yuppies was that they wanted +market price for the work they were doing now.The first yuppies did not work for startups. That was still in the +future. Nor did they work for big companies. They were professionals +working in fields like law, finance, and consulting. But their example +rapidly inspired their peers. Once they saw that new BMW 325i, they +wanted one too.Underpaying people at the beginning of their career only works if +everyone does it. Once some employer breaks ranks, everyone else +has to, or they can't get good people. And once started this process +spreads through the whole economy, because at the beginnings of +people's careers they can easily switch not merely employers but +industries.But not all young professionals benefitted. You had to produce to +get paid a lot. It was no coincidence that the first yuppies worked +in fields where it was easy to measure that.More generally, an idea was returning whose name sounds old-fashioned +precisely because it was so rare for so long: that you could make +your fortune. As in the past there were multiple ways to do it. +Some made their fortunes by creating wealth, and others by playing +zero-sum games. But once it became possible to make one's fortune, +the ambitious had to decide whether or not to. A physicist who +chose physics over Wall Street in 1990 was making a sacrifice that +a physicist in 1960 didn't have to think about.The idea even flowed back into big companies. CEOs of big companies +make more now than they used to, and I think much of the reason is +prestige. In 1960, corporate CEOs had immense prestige. They were +the winners of the only economic game in town. But if they made as +little now as they did then, in real dollar terms, they'd seem like +small fry compared to professional athletes and whiz kids making +millions from startups and hedge funds. They don't like that idea, +so now they try to get as much as they can, which is more than they +had been getting. +[19]Meanwhile a similar fragmentation was happening at the other end +of the economic scale. As big companies' oligopolies became less +secure, they were less able to pass costs on to customers and thus +less willing to overpay for labor. And as the Duplo world of a few +big blocks fragmented into many companies of different sizes — some +of them overseas — it became harder for unions to enforce their +monopolies. As a result workers' wages also tended toward market +price. Which (inevitably, if unions had been doing their job) tended +to be lower. Perhaps dramatically so, if automation had decreased +the need for some kind of work.And just as the mid-century model induced social as well as economic +cohesion, its breakup brought social as well as economic fragmentation. +People started to dress and act differently. Those who would later +be called the "creative class" became more mobile. People who didn't +care much for religion felt less pressure to go to church for +appearances' sake, while those who liked it a lot opted for +increasingly colorful forms. Some switched from meat loaf to tofu, +and others to Hot Pockets. Some switched from driving Ford sedans +to driving small imported cars, and others to driving SUVs. Kids +who went to private schools or wished they did started to dress +"preppy," and kids who wanted to seem rebellious made a conscious +effort to look disreputable. In a hundred ways people spread apart. +[20]Almost four decades later, fragmentation is still increasing. Has +it been net good or bad? I don't know; the question may be +unanswerable. Not entirely bad though. We take for granted the +forms of fragmentation we like, and worry only about the ones we +don't. But as someone who caught the tail end of mid-century +conformism, +I can tell you it was no utopia. +[21]My goal here is not to say whether fragmentation has been good or +bad, just to explain why it's happening. With the centripetal +forces of total war and 20th century oligopoly mostly gone, what +will happen next? And more specifically, is it possible to reverse +some of the fragmentation we've seen?If it is, it will have to happen piecemeal. You can't reproduce +mid-century cohesion the way it was originally produced. It would +be insane to go to war just to induce more national unity. And +once you understand the degree to which the economic history of the +20th century was a low-res version 1, it's clear you can't reproduce +that either.20th century cohesion was something that happened at least in a +sense naturally. The war was due mostly to external forces, and +the Duplo economy was an evolutionary phase. If you want cohesion +now, you'd have to induce it deliberately. And it's not obvious +how. I suspect the best we'll be able to do is address the symptoms +of fragmentation. But that may be enough.The form of fragmentation people worry most about lately is economic inequality, and if you want to eliminate +that you're up against a truly formidable headwind that has +been in operation since the stone age. Technology.Technology is +a lever. It magnifies work. And the lever not only grows increasingly +long, but the rate at which it grows is itself increasing.Which in turn means the variation in the amount of wealth people +can create has not only been increasing, but accelerating. The +unusual conditions that prevailed in the mid 20th century masked +this underlying trend. The ambitious had little choice but to join +large organizations that made them march in step with lots of other +people — literally in the case of the armed forces, figuratively +in the case of big corporations. Even if the big corporations had +wanted to pay people proportionate to their value, they couldn't +have figured out how. But that constraint has gone now. Ever since +it started to erode in the 1970s, we've seen the underlying forces +at work again. +[22]Not everyone who gets rich now does it by creating wealth, certainly. +But a significant number do, and the Baumol Effect means all their +peers get dragged along too. +[23] +And as long as it's possible to +get rich by creating wealth, the default tendency will be for +economic inequality to increase. Even if you eliminate all the +other ways to get rich. You can mitigate this with subsidies at +the bottom and taxes at the top, but unless taxes are high enough +to discourage people from creating wealth, you're always going to +be fighting a losing battle against increasing variation in +productivity. +[24]That form of fragmentation, like the others, is here to stay. Or +rather, back to stay. Nothing is forever, but the tendency toward +fragmentation should be more forever than most things, precisely +because it's not due to any particular cause. It's simply a reversion +to the mean. When Rockefeller said individualism was gone, he was +right for a hundred years. It's back now, and that's likely to be +true for longer.I worry that if we don't acknowledge this, we're headed for trouble. +If we think 20th century cohesion disappeared because of few policy +tweaks, we'll be deluded into thinking we can get it back (minus +the bad parts, somehow) with a few countertweaks. And then we'll +waste our time trying to eliminate fragmentation, when we'd be +better off thinking about how to mitigate its consequences. +Notes[1] +Lester Thurow, writing in 1975, said the wage differentials +prevailing at the end of World War II had become so embedded that +they "were regarded as 'just' even after the egalitarian pressures +of World War II had disappeared. Basically, the same differentials +exist to this day, thirty years later." But Goldin and Margo think +market forces in the postwar period also helped preserve the wartime +compression of wages — specifically increased demand for unskilled +workers, and oversupply of educated ones.(Oddly enough, the American custom of having employers pay for +health insurance derives from efforts by businesses to circumvent +NWLB wage controls in order to attract workers.)[2] +As always, tax rates don't tell the whole story. There were +lots of exemptions, especially for individuals. And in World War +II the tax codes were so new that the government had little acquired +immunity to tax avoidance. If the rich paid high taxes during the +war it was more because they wanted to than because they had to.After the war, federal tax receipts as a percentage of GDP were +about the same as they are now. In fact, for the entire period since +the war, tax receipts have stayed close to 18% of GDP, despite +dramatic changes in tax rates. The lowest point occurred when +marginal income tax rates were highest: 14.1% in 1950. Looking at +the data, it's hard to avoid the conclusion that tax rates have had +little effect on what people actually paid.[3] +Though in fact the decade preceding the war had been a time +of unprecedented federal power, in response to the Depression. +Which is not entirely a coincidence, because the Depression was one +of the causes of the war. In many ways the New Deal was a sort of +dress rehearsal for the measures the federal government took during +wartime. The wartime versions were much more drastic and more +pervasive though. As Anthony Badger wrote, "for many Americans the +decisive change in their experiences came not with the New Deal but +with World War II."[4] +I don't know enough about the origins of the world wars to +say, but it's not inconceivable they were connected to the rise of +big corporations. If that were the case, 20th century cohesion would +have a single cause.[5] +More precisely, there was a bimodal economy consisting, in +Galbraith's words, of "the world of the technically dynamic, massively +capitalized and highly organized corporations on the one hand and +the hundreds of thousands of small and traditional proprietors on +the other." Money, prestige, and power were concentrated in the +former, and there was near zero crossover.[6] +I wonder how much of the decline in families eating together +was due to the decline in families watching TV together afterward.[7] +I know when this happened because it was the season Dallas +premiered. Everyone else was talking about what was happening on +Dallas, and I had no idea what they meant.[8] +I didn't realize it till I started doing research for this +essay, but the meretriciousness of the products I grew up with is +a well-known byproduct of oligopoly. When companies can't compete +on price, they compete on tailfins.[9] +Monroeville Mall was at the time of its completion in 1969 +the largest in the country. In the late 1970s the movie Dawn of +the Dead was shot there. Apparently the mall was not just the +location of the movie, but its inspiration; the crowds of shoppers +drifting through this huge mall reminded George Romero of zombies. +My first job was scooping ice cream in the Baskin-Robbins.[10] +Labor unions were exempted from antitrust laws by the Clayton +Antitrust Act in 1914 on the grounds that a person's work is not +"a commodity or article of commerce." I wonder if that means service +companies are also exempt.[11] +The relationships between unions and unionized companies can +even be symbiotic, because unions will exert political pressure to +protect their hosts. According to Michael Lind, when politicians +tried to attack the A&P supermarket chain because it was putting +local grocery stores out of business, "A&P successfully defended +itself by allowing the unionization of its workforce in 1938, thereby +gaining organized labor as a constituency." I've seen this phenomenon +myself: hotel unions are responsible for more of the political +pressure against Airbnb than hotel companies.[12] +Galbraith was clearly puzzled that corporate executives would +work so hard to make money for other people (the shareholders) +instead of themselves. He devoted much of The New Industrial +State to trying to figure this out.His theory was that professionalism had replaced money as a motive, +and that modern corporate executives were, like (good) scientists, +motivated less by financial rewards than by the desire to do good +work and thereby earn the respect of their peers. There is something +in this, though I think lack of movement between companies combined +with self-interest explains much of observed behavior.[13] +Galbraith (p. 94) says a 1952 study of the 800 highest paid +executives at 300 big corporations found that three quarters of +them had been with their company for more than 20 years.[14] +It seems likely that in the first third of the 20th century +executive salaries were low partly because companies then were more +dependent on banks, who would have disapproved if executives got +too much. This was certainly true in the beginning. The first big +company CEOs were J. P. Morgan's hired hands.Companies didn't start to finance themselves with retained earnings +till the 1920s. Till then they had to pay out their earnings in +dividends, and so depended on banks for capital for expansion. +Bankers continued to sit on corporate boards till the Glass-Steagall +act in 1933.By mid-century big companies funded 3/4 of their growth from earnings. +But the early years of bank dependence, reinforced by the financial +controls of World War II, must have had a big effect on social +conventions about executive salaries. So it may be that the lack +of movement between companies was as much the effect of low salaries +as the cause.Incidentally, the switch in the 1920s to financing growth with +retained earnings was one cause of the 1929 crash. The banks now +had to find someone else to lend to, so they made more margin loans.[15] +Even now it's hard to get them to. One of the things I find +hardest to get into the heads of would-be startup founders is how +important it is to do certain kinds of menial work early in the +life of a company. Doing things that don't +scale is to how Henry Ford got started as a high-fiber diet is +to the traditional peasant's diet: they had no choice but to do the +right thing, while we have to make a conscious effort.[16] +Founders weren't celebrated in the press when I was a kid. +"Our founder" meant a photograph of a severe-looking man with a +walrus mustache and a wing collar who had died decades ago. The +thing to be when I was a kid was an executive. If you weren't +around then it's hard to grasp the cachet that term had. The fancy +version of everything was called the "executive" model.[17] +The wave of hostile takeovers in the 1980s was enabled by a +combination of circumstances: court decisions striking down state +anti-takeover laws, starting with the Supreme Court's 1982 decision +in Edgar v. MITE Corp.; the Reagan administration's comparatively +sympathetic attitude toward takeovers; the Depository Institutions +Act of 1982, which allowed banks and savings and loans to buy +corporate bonds; a new SEC rule issued in 1982 (rule 415) that made +it possible to bring corporate bonds to market faster; the creation +of the junk bond business by Michael Milken; a vogue for conglomerates +in the preceding period that caused many companies to be combined +that never should have been; a decade of inflation that left many +public companies trading below the value of their assets; and not +least, the increasing complacency of managements.[18] +Foster, Richard. "Creative Destruction Whips through Corporate +America." Innosight, February 2012.[19] +CEOs of big companies may be overpaid. I don't know enough +about big companies to say. But it is certainly not impossible for +a CEO to make 200x as much difference to a company's revenues as +the average employee. Look at what Steve Jobs did for Apple when +he came back as CEO. It would have been a good deal for the board +to give him 95% of the company. Apple's market cap the day Steve +came back in July 1997 was 1.73 billion. 5% of Apple now (January +2016) would be worth about 30 billion. And it would not be if Steve +hadn't come back; Apple probably wouldn't even exist anymore.Merely including Steve in the sample might be enough to answer the +question of whether public company CEOs in the aggregate are overpaid. +And that is not as facile a trick as it might seem, because the +broader your holdings, the more the aggregate is what you care +about.[20] +The late 1960s were famous for social upheaval. But that was +more rebellion (which can happen in any era if people are provoked +sufficiently) than fragmentation. You're not seeing fragmentation +unless you see people breaking off to both left and right.[21] +Globally the trend has been in the other direction. While +the US is becoming more fragmented, the world as a whole is becoming +less fragmented, and mostly in good ways.[22] +There were a handful of ways to make a fortune in the mid +20th century. The main one was drilling for oil, which was open +to newcomers because it was not something big companies could +dominate through economies of scale. How did individuals accumulate +large fortunes in an era of such high taxes? Giant tax loopholes +defended by two of the most powerful men in Congress, Sam Rayburn +and Lyndon Johnson.But becoming a Texas oilman was not in 1950 something one could +aspire to the way starting a startup or going to work on Wall Street +were in 2000, because (a) there was a strong local component and +(b) success depended so much on luck.[23] +The Baumol Effect induced by startups is very visible in +Silicon Valley. Google will pay people millions of dollars a year +to keep them from leaving to start or join startups.[24] +I'm not claiming variation in productivity is the only cause +of economic inequality in the US. But it's a significant cause, and +it will become as big a cause as it needs to, in the sense that if +you ban other ways to get rich, people who want to get rich will +use this route instead.Thanks to Sam Altman, Trevor Blackwell, Paul Buchheit, Patrick +Collison, Ron Conway, Chris Dixon, Benedict Evans, Richard Florida, +Ben Horowitz, Jessica Livingston, Robert Morris, Tim O'Reilly, Geoff +Ralston, Max Roser, Alexia Tsotsis, and Qasar Younis for reading +drafts of this. Max also told me about several valuable sources.BibliographyAllen, Frederick Lewis. The Big Change. Harper, 1952.Averitt, Robert. The Dual Economy. Norton, 1968.Badger, Anthony. The New Deal. Hill and Wang, 1989.Bainbridge, John. The Super-Americans. Doubleday, 1961.Beatty, Jack. Collossus. Broadway, 2001.Brinkley, Douglas. Wheels for the World. Viking, 2003.Brownleee, W. Elliot. Federal Taxation in America. Cambridge, 1996.Chandler, Alfred. The Visible Hand. Harvard, 1977.Chernow, Ron. The House of Morgan. Simon & Schuster, 1990.Chernow, Ron. Titan: The Life of John D. Rockefeller. Random House, +1998.Galbraith, John. The New Industrial State. Houghton Mifflin, 1967.Goldin, Claudia and Robert A. Margo. "The Great Compression: The +Wage Structure in the United States at Mid-Century." NBER Working +Paper 3817, 1991.Gordon, John. An Empire of Wealth. HarperCollins, 2004.Klein, Maury. The Genesis of Industrial America, 1870-1920. Cambridge, +2007.Lind, Michael. Land of Promise. HarperCollins, 2012.Mickelthwaite, John, and Adrian Wooldridge. The Company. Modern +Library, 2003.Nasaw, David. Andrew Carnegie. Penguin, 2006.Sobel, Robert. The Age of Giant Corporations. Praeger, 1993.Thurow, Lester. Generating Inequality: Mechanisms of Distribution. +Basic Books, 1975.Witte, John. The Politics and Development of the Federal Income +Tax. Wisconsin, 1985.Related: \ No newline at end of file diff --git a/data/PaulGrahamEssayMedium/road.txt b/data/PaulGrahamEssayMedium/road.txt new file mode 100644 index 0000000..2d2ee27 --- /dev/null +++ b/data/PaulGrahamEssayMedium/road.txt @@ -0,0 +1,992 @@ +September 2001 +(This article explains why much of the next generation of software +may be server-based, what that will mean for programmers, +and why this new kind of software is a great opportunity for startups. +It's derived from a talk at BBN Labs.) +In the summer of 1995, my friend Robert Morris and I decided to +start a startup. The PR campaign leading up to Netscape's IPO was +running full blast then, and there was a lot of talk in the press +about online commerce. At the time there might have been thirty +actual stores on the Web, all made by hand. If there were going +to be a lot of online stores, there would need to be software for making +them, so we decided to write some.For the first week or so we intended to make this an ordinary +desktop application. Then one day we had the idea of making the +software run on our Web server, using the browser as an +interface. We tried rewriting the software to work over +the Web, and it was clear that this was the way to go. +If we wrote our software to run on the server, it would be a lot easier +for the users and for us as well.This turned out to be a good plan. Now, as +Yahoo Store, this +software is the most popular online store builder, with +about 14,000 users.When we started Viaweb, hardly anyone understood what we meant when +we said that the software ran on the server. It was not until +Hotmail was launched a year later that people started to get it. +Now everyone knows that this is a valid approach. There is +a name now for what we were: an Application Service Provider, +or ASP.I think that a lot of the next generation of software will be +written on this model. Even Microsoft, who have the most to +lose, seem to see the inevitablity of moving some things off +the desktop. If software moves +off the desktop and onto servers, it will mean a very different +world for developers. This article describes the surprising +things we saw, as some of the first visitors to this new world. +To the extent software does move onto +servers, what I'm describing here is the future.The Next Thing?When we look back on the desktop software era, I think we'll marvel +at the inconveniences people put up with, just as we marvel now at +what early car owners put up with. For the first twenty or thirty +years, you had to be a car expert to own a car. But cars were such +a big win that lots of people who weren't car experts wanted to +have them as well.Computers are in this phase now. When you own a desktop computer, +you end up learning a lot more than you wanted to know about what's +happening inside it. But more than half the households in the US +own one. My mother has a computer that she uses for email and for +keeping accounts. About a year ago she was alarmed to receive a +letter from Apple, offering her a discount on a new version of the +operating system. There's something wrong when a sixty-five year +old woman who wants to use a computer for email and accounts has +to think about installing new operating systems. Ordinary users +shouldn't even know the words "operating system," much less "device +driver" or "patch."There is now another way to deliver software that will save users +from becoming system administrators. Web-based applications are +programs that run on Web servers and use Web pages as the user +interface. For the average user this new kind of software will be +easier, cheaper, more mobile, more reliable, and often more powerful +than desktop software.With Web-based software, most users won't have to think about +anything except the applications they use. All the messy, changing +stuff will be sitting on a server somewhere, maintained by the kind +of people who are good at that kind of thing. And so you won't +ordinarily need a computer, per se, to use software. All you'll +need will be something with a keyboard, a screen, and a Web browser. +Maybe it will have wireless Internet access. Maybe it will also +be your cell phone. Whatever it is, it will be consumer electronics: +something that costs about $200, and that people choose mostly +based on how the case looks. You'll pay more for Internet services +than you do for the hardware, just as you do now with telephones. [1]It will take about a tenth of a second for a click to get to the +server and back, so users of heavily interactive software, like +Photoshop, will still want to have the computations happening on +the desktop. But if you look at the kind of things most people +use computers for, a tenth of a second latency would not be a +problem. My mother doesn't really need a desktop computer, and +there are a lot of people like her.The Win for UsersNear my house there is a car with a bumper sticker that reads "death +before inconvenience." Most people, most of the time, will take +whatever choice requires least work. If Web-based software wins, +it will be because it's more convenient. And it looks as if it +will be, for users and developers both.To use a purely Web-based application, all you need is a browser +connected to the Internet. So you can use a Web-based application +anywhere. When you install software on your desktop computer, you +can only use it on that computer. Worse still, your files are +trapped on that computer. The inconvenience of this model becomes +more and more evident as people get used to networks.The thin end of the wedge here was Web-based email. Millions of +people now realize that you should have access to email messages +no matter where you are. And if you can see your email, why not +your calendar? +If you can discuss a document with your colleagues, +why can't you edit it? Why should any of your data be trapped on +some computer sitting on a faraway desk?The whole idea of "your computer" is going away, and being replaced +with "your data." You should be able to get at your data from any +computer. Or rather, any client, and a client doesn't have to be +a computer.Clients shouldn't store data; they should be like telephones. In +fact they may become telephones, or vice versa. And as clients +get smaller, you have another reason not to keep your data on them: +something you carry around with you can be lost or stolen. Leaving +your PDA in a taxi is like a disk crash, except that your data is +handed to someone else +instead of being vaporized.With purely Web-based software, neither your data nor the applications +are kept on the client. So you don't have to install anything to +use it. And when there's no installation, you don't have to worry +about installation going wrong. There can't be incompatibilities +between the application and your operating system, because the +software doesn't run on your operating system.Because it needs no installation, it will be easy, and common, to +try Web-based software before you "buy" it. You should expect to +be able to test-drive any Web-based application for free, just by +going to the site where it's offered. At Viaweb our whole site +was like a big arrow pointing users to the test drive.After trying the demo, signing up for the service should require +nothing more than filling out a brief form (the briefer the better). +And that should be the last work the user has to do. With Web-based +software, you should get new releases without paying extra, or +doing any work, or possibly even knowing about it.Upgrades won't be the big shocks they are now. Over time applications +will quietly grow more powerful. This will take some effort on +the part of the developers. They will have to design software so +that it can be updated without confusing the users. That's a new +problem, but there are ways to solve it.With Web-based applications, everyone uses the same version, and +bugs can be fixed as soon as they're discovered. So Web-based +software should have far fewer bugs than desktop software. At +Viaweb, I doubt we ever had ten known bugs at any one time. That's +orders of magnitude better than desktop software.Web-based applications can be used by several people at the same +time. This is an obvious win for collaborative applications, but +I bet users will start to want this in most applications once they +realize it's possible. It will often be useful to let two people +edit the same document, for example. Viaweb let multiple users +edit a site simultaneously, more because that was the right way to +write the software than because we expected users to want to, but +it turned out that many did.When you use a Web-based application, your data will be safer. +Disk crashes won't be a thing of the past, but users won't hear +about them anymore. They'll happen within server farms. And +companies offering Web-based applications will actually do backups-- +not only because they'll have real system administrators worrying +about such things, but because an ASP that does lose people's data +will be in big, big trouble. When people lose their own data in +a disk crash, they can't get that mad, because they only have +themselves to be mad at. When a company loses their data for them, +they'll get a lot madder.Finally, Web-based software should be less vulnerable to viruses. +If the client doesn't run anything except a browser, there's less +chance of running viruses, and no data locally to damage. And a +program that attacked the servers themselves should find them very +well defended. [2]For users, Web-based software will be less stressful. I think if +you looked inside the average Windows user you'd find a huge and +pretty much untapped desire for software meeting that description. +Unleashed, it could be a powerful force.City of CodeTo developers, the most conspicuous difference between Web-based +and desktop software is that a Web-based application is not a single +piece of code. It will be a collection of programs of different +types rather than a single big binary. And so designing Web-based +software is like desiging a city rather than a building: as well +as buildings you need roads, street signs, utilities, police and +fire departments, and plans for both growth and various kinds of +disasters.At Viaweb, software included fairly big applications that users +talked to directly, programs that those programs used, programs +that ran constantly in the background looking for problems, programs +that tried to restart things if they broke, programs that ran +occasionally to compile statistics or build indexes for searches, +programs we ran explicitly to garbage-collect resources or to move +or restore data, programs that pretended to be users (to measure +performance or expose bugs), programs for diagnosing network +troubles, programs for doing backups, interfaces to outside services, +software that drove an impressive collection of dials displaying +real-time server statistics (a hit with visitors, but indispensable +for us too), modifications (including bug fixes) to open-source +software, and a great many configuration files and settings. Trevor +Blackwell wrote a spectacular program for moving stores to new +servers across the country, without shutting them down, after we +were bought by Yahoo. Programs paged us, sent faxes and email to +users, conducted transactions with credit card processors, and +talked to one another through sockets, pipes, http requests, ssh, +udp packets, shared memory, and files. Some of Viaweb even consisted +of the absence of programs, since one of the keys to Unix security +is not to run unnecessary utilities that people might use to break +into your servers.It did not end with software. We spent a lot of time thinking +about server configurations. We built the servers ourselves, from +components-- partly to save money, and partly to get exactly what +we wanted. We had to think about whether our upstream ISP had fast +enough connections to all the backbones. We serially +dated +RAID suppliers.But hardware is not just something to worry about. When you control +it you can do more for users. With a desktop application, you can +specify certain minimum hardware, but you can't add more. If you +administer the servers, you can in one step enable all your users +to page people, or send faxes, or send commands by phone, or process +credit cards, etc, just by installing the relevant hardware. We +always looked for new ways to add features with hardware, not just +because it pleased users, but also as a way to distinguish ourselves +from competitors who (either because they sold desktop software, +or resold Web-based applications through ISPs) didn't have direct +control over the hardware.Because the software in a Web-based application will be a collection +of programs rather than a single binary, it can be written in any +number of different languages. When you're writing desktop software, +you're practically forced to write the application in the same +language as the underlying operating system-- meaning C and C++. +And so these languages (especially among nontechnical people like +managers and VCs) got to be considered as the languages for "serious" +software development. But that was just an artifact of the way +desktop software had to be delivered. For server-based software +you can use any language you want. [3] Today a lot of the top +hackers are using languages far removed from C and C++: Perl, +Python, and even Lisp.With server-based software, no one can tell you what language to +use, because you control the whole system, right down to the +hardware. Different languages are good for different tasks. You +can use whichever is best for each. And when you have competitors, +"you can" means "you must" (we'll return to this later), because +if you don't take advantage of this possibility, your competitors +will.Most of our competitors used C and C++, and this made their software +visibly inferior because (among other things), they had no way +around the statelessness of CGI scripts. If you were going to +change something, all the changes had to happen on one page, with +an Update button at the bottom. As I've written elsewhere, by +using Lisp, which many people still consider +a research language, +we could make the Viaweb editor behave more like desktop software.ReleasesOne of the most important changes in this new world is the way you +do releases. In the desktop software business, doing a release is +a huge trauma, in which the whole company sweats and strains to +push out a single, giant piece of code. Obvious comparisons suggest +themselves, both to the process and the resulting product.With server-based software, you can make changes almost as you +would in a program you were writing for yourself. You release +software as a series of incremental changes instead of an occasional +big explosion. A typical desktop software company might do one or +two releases a year. At Viaweb we often did three to five releases +a day.When you switch to this new model, you realize how much software +development is affected by the way it is released. Many of the +nastiest problems you see in the desktop software business are due +to catastrophic nature of releases.When you release only one new version a year, you tend to deal with +bugs wholesale. Some time before the release date you assemble a +new version in which half the code has been torn out and replaced, +introducing countless bugs. Then a squad of QA people step in and +start counting them, and the programmers work down the list, fixing +them. They do not generally get to the end of the list, and indeed, +no one is sure where the end is. It's like fishing rubble out of +a pond. You never really know what's happening inside the software. +At best you end up with a statistical sort of correctness.With server-based software, most of the change is small and +incremental. That in itself is less likely to introduce bugs. It +also means you know what to test most carefully when you're about +to release software: the last thing you changed. You end up with +a much firmer grip on the code. As a general rule, you do know +what's happening inside it. You don't have the source code memorized, +of course, but when you read the source you do it like a pilot +scanning the instrument panel, not like a detective trying to +unravel some mystery.Desktop software breeds a certain fatalism about bugs. You know +that you're shipping something loaded with bugs, and you've even +set up mechanisms to compensate for it (e.g. patch releases). So +why worry about a few more? Soon you're releasing whole features +you know are broken. +Apple +did this earlier this year. They felt +under pressure to release their new OS, whose release date had +already slipped four times, but some of the software (support for +CDs and DVDs) wasn't ready. The solution? They released the OS +without the unfinished parts, and users will have to install them +later.With Web-based software, you never have to release software before +it works, and you can release it as soon as it does work.The industry veteran may be thinking, it's a fine-sounding idea to +say that you never have to release software before it works, but +what happens when you've promised to deliver a new version of your +software by a certain date? With Web-based software, you wouldn't +make such a promise, because there are no versions. Your software +changes gradually and continuously. Some changes might be bigger +than others, but the idea of versions just doesn't naturally fit +onto Web-based software.If anyone remembers Viaweb this might sound odd, because we were +always announcing new versions. This was done entirely for PR +purposes. The trade press, we learned, thinks in version numbers. +They will give you major coverage for a major release, meaning a +new first digit on the version number, and generally a paragraph +at most for a point release, meaning a new digit after the decimal +point.Some of our competitors were offering desktop software and actually +had version numbers. And for these releases, the mere fact of +which seemed to us evidence of their backwardness, they would get +all kinds of publicity. We didn't want to miss out, so we started +giving version numbers to our software too. When we wanted some +publicity, we'd make a list of all the features we'd added since +the last "release," stick a new version number on the software, +and issue a press release saying that the new version was available +immediately. Amazingly, no one ever called us on it.By the time we were bought, we had done this three times, so we +were on Version 4. Version 4.1 if I remember correctly. After +Viaweb became Yahoo Store, there was no longer such a desperate +need for publicity, so although the software continued to evolve, +the whole idea of version numbers was quietly dropped.BugsThe other major technical advantage of Web-based software is that +you can reproduce most bugs. You have the users' data right there +on your disk. If someone breaks your software, you don't have to +try to guess what's going on, as you would with desktop software: +you should be able to reproduce the error while they're on the +phone with you. You might even know about it already, if you have +code for noticing errors built into your application.Web-based software gets used round the clock, so everything you do +is immediately put through the wringer. Bugs turn up quickly.Software companies are sometimes accused of letting the users debug +their software. And that is just what I'm advocating. For Web-based +software it's actually a good plan, because the bugs are fewer and +transient. When you release software gradually you get far fewer +bugs to start with. And when you can reproduce errors and release +changes instantly, you can find and fix most bugs as soon as they +appear. We never had enough bugs at any one time to bother with +a formal bug-tracking system.You should test changes before you release them, of course, so no +major bugs should get released. Those few that inevitably slip +through will involve borderline cases and will only affect the few +users that encounter them before someone calls in to complain. As +long as you fix bugs right away, the net effect, for the average +user, is far fewer bugs. I doubt the average Viaweb user ever saw +a bug.Fixing fresh bugs is easier than fixing old ones. It's usually +fairly quick to find a bug in code you just wrote. When it turns +up you often know what's wrong before you even look at the source, +because you were already worrying about it subconsciously. Fixing +a bug in something you wrote six months ago (the average case if +you release once a year) is a lot more work. And since you don't +understand the code as well, you're more likely to fix it in an +ugly way, or even introduce more bugs. [4]When you catch bugs early, you also get fewer compound bugs. +Compound bugs are two separate bugs that interact: you trip going +downstairs, and when you reach for the handrail it comes off in +your hand. In software this kind of bug is the hardest to find, +and also tends to have the worst consequences. [5] The traditional +"break everything and then filter out the bugs" approach inherently +yields a lot of compound bugs. And software that's released in a +series of small changes inherently tends not to. The floors are +constantly being swept clean of any loose objects that might later +get stuck in something.It helps if you use a technique called functional programming. +Functional programming means avoiding side-effects. It's something +you're more likely to see in research papers than commercial +software, but for Web-based applications it turns out to be really +useful. It's hard to write entire programs as purely functional +code, but you can write substantial chunks this way. It makes +those parts of your software easier to test, because they have no +state, and that is very convenient in a situation where you are +constantly making and testing small modifications. I wrote much +of Viaweb's editor in this style, and we made our scripting language, +RTML, +a purely functional language.People from the desktop software business will find this hard to +credit, but at Viaweb bugs became almost a game. Since most released +bugs involved borderline cases, the users who encountered them were +likely to be advanced users, pushing the envelope. Advanced users +are more forgiving about bugs, especially since you probably +introduced them in the course of adding some feature they were +asking for. In fact, because bugs were rare and you had to be +doing sophisticated things to see them, advanced users were often +proud to catch one. They would call support in a spirit more of +triumph than anger, as if they had scored points off us.SupportWhen you can reproduce errors, it changes your approach to customer +support. At most software companies, support is offered as a way +to make customers feel better. They're either calling you about +a known bug, or they're just doing something wrong and you have to +figure out what. In either case there's not much you can learn +from them. And so you tend to view support calls as a pain in the +ass that you want to isolate from your developers as much as +possible.This was not how things worked at Viaweb. At Viaweb, support was +free, because we wanted to hear from customers. If someone had a +problem, we wanted to know about it right away so that we could +reproduce the error and release a fix.So at Viaweb the developers were always in close contact with +support. The customer support people were about thirty feet away +from the programmers, and knew that they could always interrupt +anything with a report of a genuine bug. We would leave a board +meeting to fix a serious bug.Our approach to support made everyone happier. The customers were +delighted. Just imagine how it would feel to call a support line +and be treated as someone bringing important news. The customer +support people liked it because it meant they could help the users, +instead of reading scripts to them. And the programmers liked it +because they could reproduce bugs instead of just hearing vague +second-hand reports about them.Our policy of fixing bugs on the fly changed the relationship +between customer support people and hackers. At most software +companies, support people are underpaid human shields, and hackers +are little copies of God the Father, creators of the world. Whatever +the procedure for reporting bugs, it is likely to be one-directional: +support people who hear about bugs fill out some form that eventually +gets passed on (possibly via QA) to programmers, who put it on +their list of things to do. It was very different at Viaweb. +Within a minute of hearing about a bug from a customer, the support +people could be standing next to a programmer hearing him say "Shit, +you're right, it's a bug." It delighted the support people to hear +that "you're right" from the hackers. They used to bring us bugs +with the same expectant air as a cat bringing you a mouse it has +just killed. It also made them more careful in judging the +seriousness of a bug, because now their honor was on the line.After we were bought by Yahoo, the customer support people were +moved far away from the programmers. It was only then that we +realized that they were effectively QA and to some extent marketing +as well. In addition to catching bugs, they were the keepers of +the knowledge of vaguer, buglike things, like features that confused +users. [6] They were also a kind of proxy focus group; we could +ask them which of two new features users wanted more, and they were +always right.MoraleBeing able to release software immediately is a big motivator. +Often as I was walking to work I would think of some change I wanted +to make to the software, and do it that day. This worked for bigger +features as well. Even if something was going to take two weeks +to write (few projects took longer), I knew I could see the effect +in the software as soon as it was done.If I'd had to wait a year for the next release, I would have shelved +most of these ideas, for a while at least. The thing about ideas, +though, is that they lead to more ideas. Have you ever noticed +that when you sit down to write something, half the ideas that end +up in it are ones you thought of while writing it? The same thing +happens with software. Working to implement one idea gives you +more ideas. So shelving an idea costs you not only that delay in +implementing it, but also all the ideas that implementing it would +have led to. In fact, shelving an idea probably even inhibits new +ideas: as you start to think of some new feature, you catch sight +of the shelf and think "but I already have a lot of new things I +want to do for the next release."What big companies do instead of implementing features is plan +them. At Viaweb we sometimes ran into trouble on this account. +Investors and analysts would ask us what we had planned for the +future. The truthful answer would have been, we didn't have any +plans. We had general ideas about things we wanted to improve, +but if we knew how we would have done it already. What were we +going to do in the next six months? Whatever looked like the biggest +win. I don't know if I ever dared give this answer, but that was +the truth. Plans are just another word for ideas on the shelf. +When we thought of good ideas, we implemented them.At Viaweb, as at many software companies, most code had one definite +owner. But when you owned something you really owned it: no one +except the owner of a piece of software had to approve (or even +know about) a release. There was no protection against breakage +except the fear of looking like an idiot to one's peers, and that +was more than enough. I may have given the impression that we just +blithely plowed forward writing code. We did go fast, but we +thought very carefully before we released software onto those +servers. And paying attention is more important to reliability +than moving slowly. Because he pays close attention, a Navy pilot +can land a 40,000 lb. aircraft at 140 miles per hour on a pitching +carrier deck, at night, more safely than the average teenager can +cut a bagel.This way of writing software is a double-edged sword of course. +It works a lot better for a small team of good, trusted programmers +than it would for a big company of mediocre ones, where bad ideas +are caught by committees instead of the people that had them.Brooks in ReverseFortunately, Web-based software does require fewer programmers. +I once worked for a medium-sized desktop software company that had +over 100 people working in engineering as a whole. Only 13 of +these were in product development. All the rest were working on +releases, ports, and so on. With Web-based software, all you need +(at most) are the 13 people, because there are no releases, ports, +and so on.Viaweb was written by just three people. [7] I was always under +pressure to hire more, because we wanted to get bought, and we knew +that buyers would have a hard time paying a high price for a company +with only three programmers. (Solution: we hired more, but created +new projects for them.)When you can write software with fewer programmers, it saves you +more than money. As Fred Brooks pointed out in The Mythical +Man-Month, adding people to a project tends to slow it down. The +number of possible connections between developers grows exponentially +with the size of the group. The larger the group, the more time +they'll spend in meetings negotiating how their software will work +together, and the more bugs they'll get from unforeseen interactions. +Fortunately, this process also works in reverse: as groups get +smaller, software development gets exponentially more efficient. +I can't remember the programmers at Viaweb ever having an actual +meeting. We never had more to say at any one time than we could +say as we were walking to lunch.If there is a downside here, it is that all the programmers have +to be to some degree system administrators as well. When you're +hosting software, someone has to be watching the servers, and in +practice the only people who can do this properly are the ones who +wrote the software. At Viaweb our system had so many components +and changed so frequently that there was no definite border between +software and infrastructure. Arbitrarily declaring such a border +would have constrained our design choices. And so although we were +constantly hoping that one day ("in a couple months") everything +would be stable enough that we could hire someone whose job was +just to worry about the servers, it never happened.I don't think it could be any other way, as long as you're still +actively developing the product. Web-based software is never going +to be something you write, check in, and go home. It's a live +thing, running on your servers right now. A bad bug might not just +crash one user's process; it could crash them all. If a bug in +your code corrupts some data on disk, you have to fix it. And so +on. We found that you don't have to watch the servers every minute +(after the first year or so), but you definitely want to keep an +eye on things you've changed recently. You don't release code late +at night and then go home.Watching UsersWith server-based software, you're in closer touch with your code. +You can also be in closer touch with your users. Intuit is famous +for introducing themselves to customers at retail stores and asking +to follow them home. If you've ever watched someone use your +software for the first time, you know what surprises must have +awaited them.Software should do what users think it will. But you can't have +any idea what users will be thinking, believe me, until you watch +them. And server-based software gives you unprecedented information +about their behavior. You're not limited to small, artificial +focus groups. You can see every click made by every user. You +have to consider carefully what you're going to look at, because +you don't want to violate users' privacy, but even the most general +statistical sampling can be very useful.When you have the users on your server, you don't have to rely on +benchmarks, for example. Benchmarks are simulated users. With +server-based software, you can watch actual users. To decide what +to optimize, just log into a server and see what's consuming all +the CPU. And you know when to stop optimizing too: we eventually +got the Viaweb editor to the point where it was memory-bound rather +than CPU-bound, and since there was nothing we could do to decrease +the size of users' data (well, nothing easy), we knew we might as +well stop there.Efficiency matters for server-based software, because you're paying +for the hardware. The number of users you can support per server +is the divisor of your capital cost, so if you can make your software +very efficient you can undersell competitors and still make a +profit. At Viaweb we got the capital cost per user down to about +$5. It would be less now, probably less than the cost of sending +them the first month's bill. Hardware is free now, if your software +is reasonably efficient.Watching users can guide you in design as well as optimization. +Viaweb had a scripting language called RTML that let advanced users +define their own page styles. We found that RTML became a kind of +suggestion box, because users only used it when the predefined page +styles couldn't do what they wanted. Originally the editor put +button bars across the page, for example, but after a number of +users used RTML to put buttons down the left +side, +we made that an +option (in fact the default) in the predefined page styles.Finally, by watching users you can often tell when they're in +trouble. And since the customer is always right, that's a sign of +something you need to fix. At Viaweb the key to getting users was +the online test drive. It was not just a series of slides built +by marketing people. In our test drive, users actually used the +software. It took about five minutes, and at the end of it they +had built a real, working store. +The test drive was the way we got nearly all our new users. I +think it will be the same for most Web-based applications. If +users can get through a test drive successfully, they'll like the +product. If they get confused or bored, they won't. So anything +we could do to get more people through the test drive would increase +our growth rate.I studied click trails of people taking the test drive and found +that at a certain step they would get confused and click on the +browser's Back button. (If you try writing Web-based applications, +you'll find that the Back button becomes one of your most interesting +philosophical problems.) So I added a message at that point, telling +users that they were nearly finished, and reminding them not to +click on the Back button. Another great thing about Web-based +software is that you get instant feedback from changes: the number +of people completing the test drive rose immediately from 60% to +90%. And since the number of new users was a function of the number +of completed test drives, our revenue growth increased by 50%, just +from that change.MoneyIn the early 1990s I read an article in which someone said that +software was a subscription business. At first this seemed a very +cynical statement. But later I realized that it reflects reality: +software development is an ongoing process. I think it's cleaner +if you openly charge subscription fees, instead of forcing people +to keep buying and installing new versions so that they'll keep +paying you. And fortunately, subscriptions are the natural way to +bill for Web-based applications.Hosting applications is an area where companies will play a role +that is not likely to be filled by freeware. Hosting applications +is a lot of stress, and has real expenses. No one is going to want +to do it for free.For companies, Web-based applications are an ideal source of revenue. +Instead of starting each quarter with a blank slate, you have a +recurring revenue stream. Because your software evolves gradually, +you don't have to worry that a new model will flop; there never +need be a new model, per se, and if you do something to the software +that users hate, you'll know right away. You have no trouble with +uncollectable bills; if someone won't pay you can just turn off +the service. And there is no possibility of piracy.That last "advantage" may turn out to be a problem. Some amount +of piracy is to the advantage of software companies. If some user +really would not have bought your software at any price, you haven't +lost anything if he uses a pirated copy. In fact you gain, because +he is one more user helping to make your software the standard-- +or who might buy a copy later, when he graduates from high school.When they can, companies like to do something called price +discrimination, which means charging each customer as much as they +can afford. [8] Software is particularly suitable for price +discrimination, because the marginal cost is close to zero. This +is why some software costs more to run on Suns than on Intel boxes: +a company that uses Suns is not interested in saving money and can +safely be charged more. Piracy is effectively the lowest tier of +price discrimination. I think that software companies understand +this and deliberately turn a blind eye to some kinds of piracy. [9] +With server-based software they are going to have to come up with +some other solution.Web-based software sells well, especially in comparison to desktop +software, because it's easy to buy. You might think that people +decide to buy something, and then buy it, as two separate steps. +That's what I thought before Viaweb, to the extent I thought about +the question at all. In fact the second step can propagate back +into the first: if something is hard to buy, people will change +their mind about whether they wanted it. And vice versa: you'll +sell more of something when it's easy to buy. I buy more books +because Amazon exists. Web-based software is just about the easiest +thing in the world to buy, especially if you have just done an +online demo. Users should not have to do much more than enter a +credit card number. (Make them do more at your peril.) +Sometimes Web-based software is offered through ISPs acting as +resellers. This is a bad idea. You have to be administering the +servers, because you need to be constantly improving both hardware +and software. If you give up direct control of the servers, you +give up most of the advantages of developing Web-based applications.Several of our competitors shot themselves in the foot this way-- +usually, I think, because they were overrun by suits who were +excited about this huge potential channel, and didn't realize that +it would ruin the product they hoped to sell through it. Selling +Web-based software through ISPs is like selling sushi through +vending machines.CustomersWho will the customers be? At Viaweb they were initially individuals +and smaller companies, and I think this will be the rule with +Web-based applications. These are the users who are ready to try +new things, partly because they're more flexible, and partly because +they want the lower costs of new technology.Web-based applications will often be the best thing for big companies +too (though they'll be slow to realize it). The best intranet is +the Internet. If a company uses true Web-based applications, the +software will work better, the servers will be better administered, +and employees will have access to the system from anywhere.The argument against this approach usually hinges on security: if +access is easier for employees, it will be for bad guys too. Some +larger merchants were reluctant to use Viaweb because they thought +customers' credit card information would be safer on their own +servers. It was not easy to make this point diplomatically, but +in fact the data was almost certainly safer in our hands than +theirs. Who can hire better people to manage security, a technology +startup whose whole business is running servers, or a clothing +retailer? Not only did we have better people worrying about +security, we worried more about it. If someone broke into the +clothing retailer's servers, it would affect at most one merchant, +could probably be hushed up, and in the worst case might get one +person fired. If someone broke into ours, it could affect thousands +of merchants, would probably end up as news on CNet, and could put +us out of business.If you want to keep your money safe, do you keep it under your +mattress at home, or put it in a bank? This argument applies to +every aspect of server administration: not just security, but +uptime, bandwidth, load management, backups, etc. Our existence +depended on doing these things right. Server problems were the +big no-no for us, like a dangerous toy would be for a toy maker, +or a salmonella outbreak for a food processor.A big company that uses Web-based applications is to that extent +outsourcing IT. Drastic as it sounds, I think this is generally +a good idea. Companies are likely to get better service this way +than they would from in-house system administrators. System +administrators can become cranky and unresponsive because they're +not directly exposed to competitive pressure: a salesman has to +deal with customers, and a developer has to deal with competitors' +software, but a system administrator, like an old bachelor, has +few external forces to keep him in line. [10] At Viaweb we had +external forces in plenty to keep us in line. The people calling +us were customers, not just co-workers. If a server got wedged, +we jumped; just thinking about it gives me a jolt of adrenaline, +years later.So Web-based applications will ordinarily be the right answer for +big companies too. They will be the last to realize it, however, +just as they were with desktop computers. And partly for the same +reason: it will be worth a lot of money to convince big companies +that they need something more expensive.There is always a tendency for rich customers to buy expensive +solutions, even when cheap solutions are better, because the people +offering expensive solutions can spend more to sell them. At Viaweb +we were always up against this. We lost several high-end merchants +to Web consulting firms who convinced them they'd be better off if +they paid half a million dollars for a custom-made online store on +their own server. They were, as a rule, not better off, as more +than one discovered when Christmas shopping season came around and +loads rose on their server. Viaweb was a lot more sophisticated +than what most of these merchants got, but we couldn't afford to +tell them. At $300 a month, we couldn't afford to send a team of +well-dressed and authoritative-sounding people to make presentations +to customers.A large part of what big companies pay extra for is the cost of +selling expensive things to them. (If the Defense Department pays +a thousand dollars for toilet seats, it's partly because it costs +a lot to sell toilet seats for a thousand dollars.) And this is +one reason intranet software will continue to thrive, even though +it is probably a bad idea. It's simply more expensive. There is +nothing you can do about this conundrum, so the best plan is to go +for the smaller customers first. The rest will come in time.Son of ServerRunning software on the server is nothing new. In fact it's the +old model: mainframe applications are all server-based. If +server-based software is such a good idea, why did it lose last +time? Why did desktop computers eclipse mainframes?At first desktop computers didn't look like much of a threat. The +first users were all hackers-- or hobbyists, as they were called +then. They liked microcomputers because they were cheap. For the +first time, you could have your own computer. The phrase "personal +computer" is part of the language now, but when it was first used +it had a deliberately audacious sound, like the phrase "personal +satellite" would today.Why did desktop computers take over? I think it was because they +had better software. And I think the reason microcomputer software +was better was that it could be written by small companies.I don't think many people realize how fragile and tentative startups +are in the earliest stage. Many startups begin almost by accident-- +as a couple guys, either with day jobs or in school, writing a +prototype of something that might, if it looks promising, turn into +a company. At this larval stage, any significant obstacle will stop +the startup dead in its tracks. Writing mainframe software required +too much commitment up front. Development machines were expensive, +and because the customers would be big companies, you'd need an +impressive-looking sales force to sell it to them. Starting a +startup to write mainframe software would be a much more serious +undertaking than just hacking something together on your Apple II +in the evenings. And so you didn't get a lot of startups writing +mainframe applications.The arrival of desktop computers inspired a lot of new software, +because writing applications for them seemed an attainable goal to +larval startups. Development was cheap, and the customers would +be individual people that you could reach through computer stores +or even by mail-order.The application that pushed desktop computers out into the mainstream +was VisiCalc, the +first spreadsheet. It was written by two guys +working in an attic, and yet did things no mainframe software could +do. [11] VisiCalc was such an advance, in its time, that people +bought Apple IIs just to run it. And this was the beginning of a +trend: desktop computers won because startups wrote software for +them.It looks as if server-based software will be good this time around, +because startups will write it. Computers are so cheap now that +you can get started, as we did, using a desktop computer as a +server. Inexpensive processors have eaten the workstation market +(you rarely even hear the word now) and are most of the way through +the server market; Yahoo's servers, which deal with loads as high +as any on the Internet, all have the same inexpensive Intel processors +that you have in your desktop machine. And once you've written +the software, all you need to sell it is a Web site. Nearly all +our users came direct to our site through word of mouth and references +in the press. [12]Viaweb was a typical larval startup. We were terrified of starting +a company, and for the first few months comforted ourselves by +treating the whole thing as an experiment that we might call off +at any moment. Fortunately, there were few obstacles except +technical ones. While we were writing the software, our Web server +was the same desktop machine we used for development, connected to +the outside world by a dialup line. Our only expenses in that +phase were food and rent.There is all the more reason for startups to write Web-based software +now, because writing desktop software has become a lot less fun. +If you want to write desktop software now you do it on Microsoft's +terms, calling their APIs and working around their buggy OS. And +if you manage to write something that takes off, you may find that +you were merely doing market research for Microsoft.If a company wants to make a platform that startups will build on, +they have to make it something that hackers themselves will want +to use. That means it has to be inexpensive and well-designed. +The Mac was popular with hackers when it first came out, and a lot +of them wrote software for it. [13] You see this less with Windows, +because hackers don't use it. The kind of people who are good at +writing software tend to be running Linux or FreeBSD now.I don't think we would have started a startup to write desktop +software, because desktop software has to run on Windows, and before +we could write software for Windows we'd have to use it. The Web +let us do an end-run around Windows, and deliver software running +on Unix direct to users through the browser. That is a liberating +prospect, a lot like the arrival of PCs twenty-five years ago.MicrosoftBack when desktop computers arrived, IBM was the giant that everyone +was afraid of. It's hard to imagine now, but I remember the feeling +very well. Now the frightening giant is Microsoft, and I don't +think they are as blind to the threat facing them as IBM was. +After all, Microsoft deliberately built their business in IBM's +blind spot.I mentioned earlier that my mother doesn't really need a desktop +computer. Most users probably don't. That's a problem for Microsoft, +and they know it. If applications run on remote servers, no one +needs Windows. What will Microsoft do? Will they be able to use +their control of the desktop to prevent, or constrain, this new +generation of software?My guess is that Microsoft will develop some kind of server/desktop +hybrid, where the operating system works together with servers they +control. At a minimum, files will be centrally available for users +who want that. I don't expect Microsoft to go all the way to the +extreme of doing the computations on the server, with only a browser +for a client, if they can avoid it. If you only need a browser for +a client, you don't need Microsoft on the client, and if Microsoft +doesn't control the client, they can't push users towards their +server-based applications.I think Microsoft will have a hard time keeping the genie in the +bottle. There will be too many different types of clients for them +to control them all. And if Microsoft's applications only work +with some clients, competitors will be able to trump them by offering +applications that work from any client. [14]In a world of Web-based applications, there is no automatic place +for Microsoft. They may succeed in making themselves a place, but +I don't think they'll dominate this new world as they did the world +of desktop applications.It's not so much that a competitor will trip them up as that they +will trip over themselves. With the rise of Web-based software, +they will be facing not just technical problems but their own +wishful thinking. What they need to do is cannibalize their existing +business, and I can't see them facing that. The same single-mindedness +that has brought them this far will now be working against them. +IBM was in exactly the same situation, and they could not master +it. IBM made a late and half-hearted entry into the microcomputer +business because they were ambivalent about threatening their cash +cow, mainframe computing. Microsoft will likewise be hampered by +wanting to save the desktop. A cash cow can be a damned heavy +monkey on your back.I'm not saying that no one will dominate server-based applications. +Someone probably will eventually. But I think that there will be +a good long period of cheerful chaos, just as there was in the +early days of microcomputers. That was a good time for startups. +Lots of small companies flourished, and did it by making cool +things.Startups but More SoThe classic startup is fast and informal, with few people and little +money. Those few people work very hard, and technology magnifies +the effect of the decisions they make. If they win, they win big.In a startup writing Web-based applications, everything you associate +with startups is taken to an extreme. You can write and launch a +product with even fewer people and even less money. You have to +be even faster, and you can get away with being more informal. +You can literally launch your product as three guys sitting in the +living room of an apartment, and a server collocated at an ISP. +We did.Over time the teams have gotten smaller, faster, and more informal. +In 1960, software development meant a roomful of men with horn +rimmed glasses and narrow black neckties, industriously writing +ten lines of code a day on IBM coding forms. In 1980, it was a +team of eight to ten people wearing jeans to the office and typing +into vt100s. Now it's a couple of guys sitting in a living room +with laptops. (And jeans turn out not to be the last word in +informality.)Startups are stressful, and this, unfortunately, is also taken to +an extreme with Web-based applications. +Many software companies, especially at the beginning, have periods +where the developers slept under their desks and so on. The alarming +thing about Web-based software is that there is nothing to prevent +this becoming the default. The stories about sleeping under desks +usually end: then at last we shipped it and we all went home and +slept for a week. Web-based software never ships. You can work +16-hour days for as long as you want to. And because you can, and +your competitors can, you tend to be forced to. You can, so you +must. It's Parkinson's Law running in reverse.The worst thing is not the hours but the responsibility. Programmers +and system administrators traditionally each have their own separate +worries. Programmers have to worry about bugs, and system +administrators have to worry about infrastructure. Programmers +may spend a long day up to their elbows in source code, but at some +point they get to go home and forget about it. System administrators +never quite leave the job behind, but when they do get paged at +4:00 AM, they don't usually have to do anything very complicated. +With Web-based applications, these two kinds of stress get combined. +The programmers become system administrators, but without the +sharply defined limits that ordinarily make the job bearable.At Viaweb we spent the first six months just writing software. We +worked the usual long hours of an early startup. In a desktop +software company, this would have been the part where we were +working hard, but it felt like a vacation compared to the next +phase, when we took users onto our server. The second biggest +benefit of selling Viaweb to Yahoo (after the money) was to be able +to dump ultimate responsibility for the whole thing onto the +shoulders of a big company.Desktop software forces users to become system administrators. +Web-based software forces programmers to. There is less stress in +total, but more for the programmers. That's not necessarily bad +news. If you're a startup competing with a big company, it's good +news. [15] Web-based applications offer a straightforward way to +outwork your competitors. No startup asks for more.Just Good EnoughOne thing that might deter you from writing Web-based applications +is the lameness of Web pages as a UI. That is a problem, I admit. +There were a few things we would have really liked to add to +HTML and HTTP. What matters, though, is that Web pages are just +good enough.There is a parallel here with the first microcomputers. The +processors in those machines weren't actually intended to be the +CPUs of computers. They were designed to be used in things like +traffic lights. But guys like Ed Roberts, who designed the +Altair, +realized that they were just good enough. You could combine one +of these chips with some memory (256 bytes in the first Altair), +and front panel switches, and you'd have a working computer. Being +able to have your own computer was so exciting that there were +plenty of people who wanted to buy them, however limited.Web pages weren't designed to be a UI for applications, but they're +just good enough. And for a significant number of users, software +that you can use from any browser will be enough of a win in itself +to outweigh any awkwardness in the UI. Maybe you can't write the +best-looking spreadsheet using HTML, but you can write a spreadsheet +that several people can use simultaneously from different locations +without special client software, or that can incorporate live data +feeds, or that can page you when certain conditions are triggered. +More importantly, you can write new kinds of applications that +don't even have names yet. VisiCalc was not merely a microcomputer +version of a mainframe application, after all-- it was a new type +of application.Of course, server-based applications don't have to be Web-based. +You could have some other kind of client. But I'm pretty sure +that's a bad idea. It would be very convenient if you could assume +that everyone would install your client-- so convenient that you +could easily convince yourself that they all would-- but if they +don't, you're hosed. Because Web-based software assumes nothing +about the client, it will work anywhere the Web works. That's a +big advantage already, and the advantage will grow as new Web +devices proliferate. Users will like you because your software +just works, and your life will be easier because you won't have to +tweak it for every new client. [16]I feel like I've watched the evolution of the Web as closely as +anyone, and I can't predict what's going to happen with clients. +Convergence is probably coming, but where? I can't pick a winner. +One thing I can predict is conflict between AOL and Microsoft. +Whatever Microsoft's .NET turns out to be, it will probably involve +connecting the desktop to servers. Unless AOL fights back, they +will either be pushed aside or turned into a pipe between Microsoft +client and server software. If Microsoft and AOL get into a client +war, the only thing sure to work on both will be browsing the Web, +meaning Web-based applications will be the only kind that work +everywhere.How will it all play out? I don't know. And you don't have to +know if you bet on Web-based applications. No one can break that +without breaking browsing. The Web may not be the only way to +deliver software, but it's one that works now and will continue to +work for a long time. Web-based applications are cheap to develop, +and easy for even the smallest startup to deliver. They're a lot +of work, and of a particularly stressful kind, but that only makes +the odds better for startups.Why Not?E. B. White was amused to learn from a farmer friend that many +electrified fences don't have any current running through them. +The cows apparently learn to stay away from them, and after that +you don't need the current. "Rise up, cows!" he wrote, "Take your +liberty while despots snore!"If you're a hacker who has thought of one day starting a startup, +there are probably two things keeping you from doing it. One is +that you don't know anything about business. The other is that +you're afraid of competition. Neither of these fences have any +current in them.There are only two things you have to know about business: build +something users love, and make more than you spend. If you get +these two right, you'll be ahead of most startups. You can figure +out the rest as you go.You may not at first make more than you spend, but as long as the +gap is closing fast enough you'll be ok. If you start out underfunded, +it will at least encourage a habit of frugality. The less you +spend, the easier it is to make more than you spend. Fortunately, +it can be very cheap to launch a Web-based application. We launched +on under $10,000, and it would be even cheaper today. We had to +spend thousands on a server, and thousands more to get SSL. (The +only company selling SSL software at the time was Netscape.) Now +you can rent a much more powerful server, with SSL included, for +less than we paid for bandwidth alone. You could launch a Web-based +application now for less than the cost of a fancy office chair.As for building something users love, here are some general tips. +Start by making something clean and simple that you would want to +use yourself. Get a version 1.0 out fast, then continue to improve +the software, listening closely to the users as you do. The customer +is always right, but different customers are right about different +things; the least sophisticated users show you what you need to +simplify and clarify, and the most sophisticated tell you what +features you need to add. The best thing software can be is easy, +but the way to do this is to get the defaults right, not to limit +users' choices. Don't get complacent if your competitors' software +is lame; the standard to compare your software to is what it could +be, not what your current competitors happen to have. Use your +software yourself, all the time. Viaweb was supposed to be an +online store builder, but we used it to make our own site too. +Don't listen to marketing people or designers or product managers +just because of their job titles. If they have good ideas, use +them, but it's up to you to decide; software has to be designed by +hackers who understand design, not designers who know a little +about software. If you can't design software as well as implement +it, don't start a startup.Now let's talk about competition. What you're afraid of is not +presumably groups of hackers like you, but actual companies, with +offices and business plans and salesmen and so on, right? Well, +they are more afraid of you than you are of them, and they're right. +It's a lot easier for a couple of hackers to figure out how to rent +office space or hire sales people than it is for a company of any +size to get software written. I've been on both sides, and I know. +When Viaweb was bought by Yahoo, I suddenly found myself working +for a big company, and it was like trying to run through waist-deep +water.I don't mean to disparage Yahoo. They had some good hackers, and +the top management were real butt-kickers. For a big company, they +were exceptional. But they were still only about a tenth as +productive as a small startup. No big company can do much better +than that. What's scary about Microsoft is that a company so +big can develop software at all. They're like a mountain that +can walk.Don't be intimidated. You can do as much that Microsoft can't as +they can do that you can't. And no one can stop you. You don't +have to ask anyone's permission to develop Web-based applications. +You don't have to do licensing deals, or get shelf space in retail +stores, or grovel to have your application bundled with the OS. +You can deliver software right to the browser, and no one can get +between you and potential users without preventing them from browsing +the Web.You may not believe it, but I promise you, Microsoft is scared of +you. The complacent middle managers may not be, but Bill is, +because he was you once, back in 1975, the last time a new way of +delivering software appeared.Notes[1] Realizing that much of the money is in the services, companies +building lightweight clients have usually tried to combine the +hardware with an +online service. + This approach has not worked +well, partly because you need two different kinds of companies to +build consumer electronics and to run an online service, and partly +because users hate the idea. Giving away the razor and making +money on the blades may work for Gillette, but a razor is much +smaller commitment than a Web terminal. Cell phone handset makers +are satisfied to sell hardware without trying to capture the service +revenue as well. That should probably be the model for Internet +clients too. If someone just sold a nice-looking little box with +a Web browser that you could use to connect through any ISP, every +technophobe in the country would buy one.[2] Security always depends more on not screwing up than any design +decision, but the nature of server-based software will make developers +pay more attention to not screwing up. Compromising a server could +cause such damage that ASPs (that want to stay in business) are +likely to be careful about security.[3] In 1995, when we started Viaweb, Java applets were supposed to +be the technology everyone was going to use to develop server-based +applications. Applets seemed to us an old-fashioned idea. Download +programs to run on the client? Simpler just to go all the way and +run the programs on the server. We wasted little time +on applets, but countless other startups must have been lured into +this tar pit. Few can have escaped alive, or Microsoft could not +have gotten away with dropping Java in the most recent version of +Explorer.[4] This point is due to Trevor Blackwell, who adds "the cost of +writing software goes up more than linearly with its size. Perhaps +this is mainly due to fixing old bugs, and the cost can be more +linear if all bugs are found quickly."[5] The hardest kind of bug to find may be a variant of compound +bug where one bug happens to compensate for another. When you fix +one bug, the other becomes visible. But it will seem as if the +fix is at fault, since that was the last thing you changed.[6] Within Viaweb we once had a contest to describe the worst thing +about our software. Two customer support people tied for first +prize with entries I still shiver to recall. We fixed both problems +immediately.[7] Robert Morris wrote the ordering system, which shoppers used +to place orders. Trevor Blackwell wrote the image generator and +the manager, which merchants used to retrieve orders, view statistics, +and configure domain names etc. I wrote the editor, which merchants +used to build their sites. The ordering system and image generator +were written in C and C++, the manager mostly in Perl, and the editor +in Lisp.[8] Price discrimination is so pervasive (how often have you heard +a retailer claim that their buying power meant lower prices for +you?) that I was surprised to find it was outlawed in the U.S. by +the Robinson-Patman Act of 1936. This law does not appear to be +vigorously enforced.[9] In No Logo, Naomi Klein says that clothing brands favored by +"urban youth" do not try too hard to prevent shoplifting because +in their target market the shoplifters are also the fashion leaders.[10] Companies often wonder what to outsource and what not to. +One possible answer: outsource any job that's not directly exposed +to competitive pressure, because outsourcing it will thereby expose +it to competitive pressure.[11] The two guys were Dan Bricklin and Bob Frankston. Dan wrote +a prototype in Basic in a couple days, then over the course of the +next year they worked together (mostly at night) to make a more +powerful version written in 6502 machine language. Dan was at +Harvard Business School at the time and Bob nominally had a day +job writing software. "There was no great risk in doing a business," +Bob wrote, "If it failed it failed. No big deal."[12] It's not quite as easy as I make it sound. It took a painfully +long time for word of mouth to get going, and we did not start to +get a lot of press coverage until we hired a +PR firm +(admittedly +the best in the business) for $16,000 per month. However, it was +true that the only significant channel was our own Web site.[13] If the Mac was so great, why did it lose? Cost, again. +Microsoft concentrated on the software business, and unleashed a +swarm of cheap component suppliers on Apple hardware. It did not +help, either, that suits took over during a critical period.[14] One thing that would help Web-based applications, and help +keep the next generation of software from being overshadowed by +Microsoft, would be a good open-source browser. Mozilla is +open-source but seems to have suffered from having been corporate +software for so long. A small, fast browser that was actively +maintained would be a great thing in itself, and would probably +also encourage companies to build little Web appliances.Among other things, a proper open-source browser would cause HTTP +and HTML to continue to evolve (as e.g. Perl has). It would help +Web-based applications greatly to be able to distinguish between +selecting a link and following it; all you'd need to do this would +be a trivial enhancement of HTTP, to allow multiple urls in a +request. Cascading menus would also be good.If you want to change the world, write a new Mosaic. Think it's +too late? In 1998 a lot of people thought it was too late to launch +a new search engine, but Google proved them wrong. There is always +room for something new if the current options suck enough. Make +sure it works on all the free OSes first-- new things start with +their users.[15] Trevor Blackwell, who probably knows more about this from +personal experience than anyone, writes:"I would go farther in saying that because server-based software +is so hard on the programmers, it causes a fundamental economic +shift away from large companies. It requires the kind of intensity +and dedication from programmers that they will only be willing to +provide when it's their own company. Software companies can hire +skilled people to work in a not-too-demanding environment, and can +hire unskilled people to endure hardships, but they can't hire +highly skilled people to bust their asses. Since capital is no +longer needed, big companies have little to bring to the table."[16] In the original version of this essay, I advised avoiding +Javascript. That was a good plan in 2001, but Javascript now works. +Thanks to Sarah Harlin, Trevor Blackwell, Robert Morris, Eric Raymond, Ken Anderson, +and Dan Giffin for reading drafts of this paper; to Dan Bricklin and +Bob Frankston for information about VisiCalc; and again to Ken Anderson +for inviting me to speak at BBN. + +You'll find this essay and 14 others in +Hackers & Painters. diff --git a/data/PaulGrahamEssayMedium/start.txt b/data/PaulGrahamEssayMedium/start.txt new file mode 100644 index 0000000..ebe2adf --- /dev/null +++ b/data/PaulGrahamEssayMedium/start.txt @@ -0,0 +1,761 @@ + + +Want to start a startup? Get funded by +Y Combinator. + + + + +March 2005(This essay is derived from a talk at the Harvard Computer +Society.)You need three things to create a successful startup: to start with +good people, to make something customers actually want, and to spend +as little money as possible. Most startups that fail do it because +they fail at one of these. A startup that does all three will +probably succeed.And that's kind of exciting, when you think about it, because all +three are doable. Hard, but doable. And since a startup that +succeeds ordinarily makes its founders rich, that implies getting +rich is doable too. Hard, but doable.If there is one message I'd like to get across about startups, +that's it. There is no magically difficult step that requires +brilliance to solve.The IdeaIn particular, you don't need a brilliant +idea to start a startup +around. The way a startup makes money is to offer people better +technology than they have now. But what people have now is often +so bad that it doesn't take brilliance to do better.Google's plan, for example, was simply to create a search site that +didn't suck. They had three new ideas: index more of the Web, use +links to rank search results, and have clean, simple web pages with +unintrusive keyword-based ads. Above all, they were determined to +make a site that was good to use. No doubt there are great technical +tricks within Google, but the overall plan was straightforward. +And while they probably have bigger ambitions now, this alone brings +them a billion dollars a year. [1]There are plenty of other areas that are just as backward as search +was before Google. I can think of several heuristics for generating +ideas for startups, but most reduce to this: look at something +people are trying to do, and figure out how to do it in a way that +doesn't suck.For example, dating sites currently suck far worse than search did +before Google. They all use the same simple-minded model. +They seem to have approached the problem by thinking about how to +do database matches instead of how dating works in the real world. +An undergrad could build something better as a class project. And +yet there's a lot of money at stake. Online dating is a valuable +business now, and it might be worth a hundred times as much if it +worked.An idea for a startup, however, is only a beginning. A lot of +would-be startup founders think the key to the whole process is the +initial idea, and from that point all you have to do is execute. +Venture capitalists know better. If you go to VC firms with a +brilliant idea that you'll tell them about if they sign a nondisclosure +agreement, most will tell you to get lost. That shows how much a +mere idea is worth. The market price is less than the inconvenience +of signing an NDA.Another sign of how little the initial idea is worth is the number +of startups that change their plan en route. Microsoft's original +plan was to make money selling programming languages, of all things. +Their current business model didn't occur to them until IBM dropped +it in their lap five years later.Ideas for startups are worth something, certainly, but the trouble +is, they're not transferrable. They're not something you could +hand to someone else to execute. Their value is mainly as starting +points: as questions for the people who had them to continue thinking +about.What matters is not ideas, but the people who have them. Good +people can fix bad ideas, but good ideas can't save bad people. +PeopleWhat do I mean by good people? One of the best tricks I learned +during our startup was a rule for deciding +who to hire. Could you +describe the person as an animal? It might be hard to translate +that into another language, but I think everyone in the US knows +what it means. It means someone who takes their work a little too +seriously; someone who does what they do so well that they pass +right through professional and cross over into obsessive.What it means specifically depends on the job: a salesperson who +just won't take no for an answer; a hacker who will stay up till +4:00 AM rather than go to bed leaving code with a bug in it; a PR +person who will cold-call New York Times reporters on their cell +phones; a graphic designer who feels physical pain when something +is two millimeters out of place.Almost everyone who worked for us was an animal at what they did. +The woman in charge of sales was so tenacious that I used to feel +sorry for potential customers on the phone with her. You could +sense them squirming on the hook, but you knew there would be no +rest for them till they'd signed up.If you think about people you know, you'll find the animal test is +easy to apply. Call the person's image to mind and imagine the +sentence "so-and-so is an animal." If you laugh, they're not. You +don't need or perhaps even want this quality in big companies, but +you need it in a startup.For programmers we had three additional tests. Was the person +genuinely smart? If so, could they actually get things done? And +finally, since a few good hackers have unbearable personalities, +could we stand to have them around?That last test filters out surprisingly few people. We could bear +any amount of nerdiness if someone was truly smart. What we couldn't +stand were people with a lot of attitude. But most of those weren't +truly smart, so our third test was largely a restatement of the +first.When nerds are unbearable it's usually because they're trying too +hard to seem smart. But the smarter they are, the less pressure +they feel to act smart. So as a rule you can recognize genuinely +smart people by their ability to say things like "I don't know," +"Maybe you're right," and "I don't understand x well enough."This technique doesn't always work, because people can be influenced +by their environment. In the MIT CS department, there seems to be +a tradition of acting like a brusque know-it-all. I'm told it derives +ultimately from Marvin Minsky, in the same way the classic airline +pilot manner is said to derive from Chuck Yeager. Even genuinely +smart people start to act this way there, so you have to make +allowances.It helped us to have Robert Morris, who is one of the readiest to +say "I don't know" of anyone I've met. (At least, he was before he +became a professor at MIT.) No one dared put on attitude around +Robert, because he was obviously smarter than they were and yet had +zero attitude himself.Like most startups, ours began with a group of friends, and it was +through personal contacts that we got most of the people we hired. +This is a crucial difference between startups and big companies. +Being friends with someone for even a couple days will tell you +more than companies could ever learn in interviews. [2]It's no coincidence that startups start around universities, because +that's where smart people meet. It's not what people learn in +classes at MIT and Stanford that has made technology companies +spring up around them. They could sing campfire songs in the classes +so long as admissions worked the same.If you start a startup, there's a good chance it will be with people +you know from college or grad school. So in theory you ought to +try to make friends with as many smart people as you can in school, +right? Well, no. Don't make a conscious effort to schmooze; that +doesn't work well with hackers.What you should do in college is work on your own projects. Hackers +should do this even if they don't plan to start startups, because +it's the only real way to learn how to program. In some cases you +may collaborate with other students, and this is the best way to +get to know good hackers. The project may even grow into a startup. +But once again, I wouldn't aim too directly at either target. Don't +force things; just work on stuff you like with people you like.Ideally you want between two and four founders. It would be hard +to start with just one. One person would find the moral weight of +starting a company hard to bear. Even Bill Gates, who seems to be +able to bear a good deal of moral weight, had to have a co-founder. +But you don't want so many founders that the company starts to look +like a group photo. Partly because you don't need a lot of people +at first, but mainly because the more founders you have, the worse +disagreements you'll have. When there are just two or three founders, +you know you have to resolve disputes immediately or perish. If +there are seven or eight, disagreements can linger and harden into +factions. You don't want mere voting; you need unanimity.In a technology startup, which most startups are, the founders +should include technical people. During the Internet Bubble there +were a number of startups founded by business people who then went +looking for hackers to create their product for them. This doesn't +work well. Business people are bad at deciding what to do with +technology, because they don't know what the options are, or which +kinds of problems are hard and which are easy. And when business +people try to hire hackers, they can't tell which ones are +good. +Even other hackers have a hard time doing that. +For business people it's roulette.Do the founders of a startup have to include business people? That +depends. We thought so when we started ours, and we asked several +people who were said to know about this mysterious thing called +"business" if they would be the president. But they all said no, +so I had to do it myself. And what I discovered was that business +was no great mystery. It's not something like physics or medicine +that requires extensive study. You just try to get people to pay +you for stuff.I think the reason I made such a mystery of business was that I was +disgusted by the idea of doing it. I wanted to work in the pure, +intellectual world of software, not deal with customers' mundane +problems. People who don't want to get dragged into some kind of +work often develop a protective incompetence at it. Paul Erdos was +particularly good at this. By seeming unable even to cut a grapefruit +in half (let alone go to the store and buy one), he forced other +people to do such things for him, leaving all his time free for +math. Erdos was an extreme case, but most husbands use the same +trick to some degree.Once I was forced to discard my protective incompetence, I found +that business was neither so hard nor so boring as I feared. There +are esoteric areas of business that are quite hard, like tax law +or the pricing of derivatives, but you don't need to know about +those in a startup. All you need to know about business to run a +startup are commonsense things people knew before there were business +schools, or even universities.If you work your way down the Forbes 400 making an x next to the +name of each person with an MBA, you'll learn something important +about business school. After Warren Buffett, you don't hit another +MBA till number 22, +Phil Knight, the CEO of Nike. There are only 5 MBAs in the top +50. What you notice in the Forbes 400 are a lot of people with +technical backgrounds. Bill Gates, Steve Jobs, Larry Ellison, +Michael Dell, Jeff Bezos, Gordon Moore. The rulers of the technology +business tend to come from technology, not business. So if you +want to invest two years in something that will help you succeed +in business, the evidence suggests you'd do better to learn how to +hack than get an MBA. [3]There is one reason you might want to include business people in a +startup, though: because you have to have at least one person willing +and able to focus on what customers want. Some believe only business +people can do this-- that hackers can implement software, but not +design it. That's nonsense. There's nothing about knowing how to +program that prevents hackers from understanding users, or about +not knowing how to program that magically enables business people +to understand them.If you can't understand users, however, you should either learn how +or find a co-founder who can. That is the single most important +issue for technology startups, and the rock that sinks more of them +than anything else.What Customers WantIt's not just startups that have to worry about this. I think most +businesses that fail do it because they don't give customers what +they want. Look at restaurants. A large percentage fail, about a +quarter in the first year. But can you think of one restaurant +that had really good food and went out of business?Restaurants with great food seem to prosper no matter what. A +restaurant with great food can be expensive, crowded, noisy, dingy, +out of the way, and even have bad service, and people will keep +coming. It's true that a restaurant with mediocre food can sometimes +attract customers through gimmicks. But that approach is very +risky. It's more straightforward just to make the food good.It's the same with technology. You hear all kinds of reasons why +startups fail. But can you think of one that had a massively popular +product and still failed?In nearly every failed startup, the real problem was that customers +didn't want the product. For most, the cause of death is listed +as "ran out of funding," but that's only the immediate cause. Why +couldn't they get more funding? Probably because the product was +a dog, or never seemed likely to be done, or both.When I was trying to think of the things every startup needed to +do, I almost included a fourth: get a version 1 out as soon as you +can. But I decided not to, because that's implicit in making +something customers want. The only way to make something customers +want is to get a prototype in front of them and refine it based on +their reactions.The other approach is what I call the "Hail Mary" strategy. You +make elaborate plans for a product, hire a team of engineers to +develop it (people who do this tend to use the term "engineer" for +hackers), and then find after a year that you've spent two million +dollars to develop something no one wants. This was not uncommon +during the Bubble, especially in companies run by business types, +who thought of software development as something terrifying that +therefore had to be carefully planned.We never even considered that approach. As a Lisp hacker, I come +from the tradition of rapid prototyping. I would not claim (at +least, not here) that this is the right way to write every program, +but it's certainly the right way to write software for a startup. +In a startup, your initial plans are almost certain to be wrong in +some way, and your first priority should be to figure out where. +The only way to do that is to try implementing them.Like most startups, we changed our plan on the fly. At first we +expected our customers to be Web consultants. But it turned out +they didn't like us, because our software was easy to use and we hosted +the site. It would be too easy for clients to fire them. We also +thought we'd be able to sign up a lot of catalog companies, because +selling online was a natural extension of their existing business. +But in 1996 that was a hard sell. The middle managers we talked +to at catalog companies saw the Web not as an opportunity, but as +something that meant more work for them.We did get a few of the more adventurous catalog companies. Among +them was Frederick's of Hollywood, which gave us valuable experience +dealing with heavy loads on our servers. But most of our users +were small, individual merchants who saw the Web as an opportunity +to build a business. Some had retail stores, but many only existed +online. And so we changed direction to focus on these users. +Instead of concentrating on the features Web consultants and catalog +companies would want, we worked to make the software easy to use.I learned something valuable from that. It's worth trying very, +very hard to make technology easy to use. Hackers are so used to +computers that they have no idea how horrifying software seems to +normal people. Stephen Hawking's editor told him that every equation +he included in his book would cut sales in half. When you work on +making technology easier to use, you're riding that curve up instead +of down. A 10% improvement in ease of use doesn't just increase +your sales 10%. It's more likely to double your sales.How do you figure out what customers want? Watch them. One of the +best places to do this was at trade shows. Trade shows didn't pay +as a way of getting new customers, but they were worth it as market +research. We didn't just give canned presentations at trade shows. +We used to show people how to build real, working stores. Which +meant we got to watch as they used our software, and talk to them +about what they needed.No matter what kind of startup you start, it will probably be a +stretch for you, the founders, to understand what users want. The +only kind of software you can build without studying users is the +sort for which you are the typical user. But this is just the kind +that tends to be open source: operating systems, programming +languages, editors, and so on. So if you're developing technology +for money, you're probably not going to be developing it for people +like you. Indeed, you can use this as a way to generate ideas for +startups: what do people who are not like you want from technology?When most people think of startups, they think of companies like +Apple or Google. Everyone knows these, because they're big consumer +brands. But for every startup like that, there are twenty more +that operate in niche markets or live quietly down in the infrastructure. +So if you start a successful startup, odds are you'll start one of +those.Another way to say that is, if you try to start the kind of startup +that has to be a big consumer brand, the odds against succeeding +are steeper. The best odds are in niche markets. Since startups +make money by offering people something better than they had before, +the best opportunities are where things suck most. And it would +be hard to find a place where things suck more than in corporate +IT departments. You would not believe the amount of money companies +spend on software, and the crap they get in return. This imbalance +equals opportunity.If you want ideas for startups, one of the most valuable things you +could do is find a middle-sized non-technology company and spend a +couple weeks just watching what they do with computers. Most good +hackers have no more idea of the horrors perpetrated in these places +than rich Americans do of what goes on in Brazilian slums.Start by writing software for smaller companies, because it's easier +to sell to them. It's worth so much to sell stuff to big companies +that the people selling them the crap they currently use spend a +lot of time and money to do it. And while you can outhack Oracle +with one frontal lobe tied behind your back, you can't outsell an +Oracle salesman. So if you want to win through better technology, +aim at smaller customers. [4]They're the more strategically valuable part of the market anyway. +In technology, the low end always eats the high end. It's easier +to make an inexpensive product more powerful than to make a powerful +product cheaper. So the products that start as cheap, simple options +tend to gradually grow more powerful till, like water rising in a +room, they squash the "high-end" products against the ceiling. Sun +did this to mainframes, and Intel is doing it to Sun. Microsoft +Word did it to desktop publishing software like Interleaf and +Framemaker. Mass-market digital cameras are doing it to the expensive +models made for professionals. Avid did it to the manufacturers +of specialized video editing systems, and now Apple is doing it to +Avid. Henry Ford did it to the car makers that preceded +him. If you build the simple, inexpensive option, you'll not only +find it easier to sell at first, but you'll also be in the best +position to conquer the rest of the market.It's very dangerous to let anyone fly under you. If you have the +cheapest, easiest product, you'll own the low end. And if you +don't, you're in the crosshairs of whoever does.Raising MoneyTo make all this happen, you're going to need money. Some startups +have been self-funding-- Microsoft for example-- but most aren't. +I think it's wise to take money from investors. To be self-funding, +you have to start as a consulting company, and it's hard to switch +from that to a product company.Financially, a startup is like a pass/fail course. The way to get +rich from a startup is to maximize the company's chances of succeeding, +not to maximize the amount of stock you retain. So if you can trade +stock for something that improves your odds, it's probably a smart +move.To most hackers, getting investors seems like a terrifying and +mysterious process. Actually it's merely tedious. I'll try to +give an outline of how it works.The first thing you'll need is a few tens of thousands of dollars +to pay your expenses while you develop a prototype. This is called +seed capital. Because so little money is involved, raising seed +capital is comparatively easy-- at least in the sense of getting a +quick yes or no.Usually you get seed money from individual rich people called +"angels." Often they're people who themselves got rich from technology. +At the seed stage, investors don't expect you to have an elaborate +business plan. Most know that they're supposed to decide quickly. +It's not unusual to get a check within a week based on a half-page +agreement.We started Viaweb with $10,000 of seed money from our friend Julian. +But he gave us a lot more than money. He's a former CEO and also +a corporate lawyer, so he gave us a lot of valuable advice about +business, and also did all the legal work of getting us set up as +a company. Plus he introduced us to one of the two +angel investors who supplied our next round of funding.Some angels, especially those with technology backgrounds, may be +satisfied with a demo and a verbal description of what you plan to +do. But many will want a copy of your business plan, if only to +remind themselves what they invested in.Our angels asked for one, and looking back, I'm amazed how much +worry it caused me. "Business plan" has that word "business" in +it, so I figured it had to be something I'd have to read a book +about business plans to write. Well, it doesn't. At this stage, +all most investors expect is a brief description of what you plan +to do and how you're going to make money from it, and the resumes +of the founders. If you just sit down and write out what you've +been saying to one another, that should be fine. It shouldn't take +more than a couple hours, and you'll probably find that writing it +all down gives you more ideas about what to do.For the angel to have someone to make the check out to, you're going +to have to have some kind of company. Merely incorporating yourselves +isn't hard. The problem is, for the company to exist, you have to +decide who the founders are, and how much stock they each have. If +there are two founders with the same qualifications who are both +equally committed to the business, that's easy. But if you have a +number of people who are expected to contribute in varying degrees, +arranging the proportions of stock can be hard. And once you've +done it, it tends to be set in stone.I have no tricks for dealing with this problem. All I can say is, +try hard to do it right. I do have a rule of thumb for recognizing +when you have, though. When everyone feels they're getting a +slightly bad deal, that they're doing more than they should for the +amount of stock they have, the stock is optimally apportioned.There is more to setting up a company than incorporating it, of +course: insurance, business license, unemployment compensation, +various things with the IRS. I'm not even sure what the list is, +because we, ah, skipped all that. When we got real funding near +the end of 1996, we hired a great CFO, who fixed everything +retroactively. It turns out that no one comes and arrests you if +you don't do everything you're supposed to when starting a company. +And a good thing too, or a lot of startups would never get started. +[5]It can be dangerous to delay turning yourself into a company, because +one or more of the founders might decide to split off and start +another company doing the same thing. This does happen. So when +you set up the company, as well as as apportioning the stock, you +should get all the founders to sign something agreeing that everyone's +ideas belong to this company, and that this company is going to be +everyone's only job.[If this were a movie, ominous music would begin here.]While you're at it, you should ask what else they've signed. One +of the worst things that can happen to a startup is to run into +intellectual property problems. We did, and it came closer to +killing us than any competitor ever did.As we were in the middle of getting bought, we discovered that one +of our people had, early on, been bound by an agreement that said +all his ideas belonged to the giant company that was paying for him +to go to grad school. In theory, that could have meant someone +else owned big chunks of our software. So the acquisition came to +a screeching halt while we tried to sort this out. The problem +was, since we'd been about to be acquired, we'd allowed ourselves +to run low on cash. Now we needed to raise more to keep going. +But it's hard to raise money with an IP cloud over your head, because +investors can't judge how serious it is.Our existing investors, knowing that we needed money and had nowhere +else to get it, at this point attempted certain gambits which I +will not describe in detail, except to remind readers that the word +"angel" is a metaphor. The founders thereupon proposed to walk +away from the company, after giving the investors a brief tutorial +on how to administer the servers themselves. And while this was +happening, the acquirers used the delay as an excuse to welch on +the deal.Miraculously it all turned out ok. The investors backed down; we +did another round of funding at a reasonable valuation; the giant +company finally gave us a piece of paper saying they didn't own our +software; and six months later we were bought by Yahoo for much +more than the earlier acquirer had agreed to pay. So we were happy +in the end, though the experience probably took several years off +my life.Don't do what we did. Before you consummate a startup, ask +everyone about their previous IP history.Once you've got a company set up, it may seem presumptuous to go +knocking on the doors of rich people and asking them to invest tens +of thousands of dollars in something that is really just a bunch +of guys with some ideas. But when you look at it from the rich +people's point of view, the picture is more encouraging. Most rich +people are looking for good investments. If you really think you +have a chance of succeeding, you're doing them a favor by letting +them invest. Mixed with any annoyance they might feel about being +approached will be the thought: are these guys the next Google?Usually angels are financially equivalent to founders. They get +the same kind of stock and get diluted the same amount in future +rounds. How much stock should they get? That depends on how +ambitious you feel. When you offer x percent of your company for +y dollars, you're implicitly claiming a certain value for the whole +company. Venture investments are usually described in terms of +that number. If you give an investor new shares equal to 5% of +those already outstanding in return for $100,000, then you've done +the deal at a pre-money valuation of $2 million.How do you decide what the value of the company should be? There +is no rational way. At this stage the company is just a bet. I +didn't realize that when we were raising money. Julian +thought we ought to value the company at several million +dollars. I thought it was preposterous to claim that a couple +thousand lines of code, which was all we had at the time, were worth +several million dollars. Eventually we settled on one million, +because Julian said no one would invest in a company with a valuation +any lower. [6]What I didn't grasp at the time was that the valuation wasn't just +the value of the code we'd written so far. It was also the value +of our ideas, which turned out to be right, and of all the future +work we'd do, which turned out to be a lot.The next round of funding is the one in which you might deal with +actual +venture capital firms. +But don't wait till you've burned +through your last round of funding to start approaching them. VCs are slow to +make up their minds. They can take months. You don't want to be +running out of money while you're trying to negotiate with them.Getting money from an actual VC firm is a bigger deal than getting +money from angels. The amounts of money involved are larger, millions +usually. So the deals take longer, dilute you more, and impose +more onerous conditions.Sometimes the VCs want to install a new CEO of their own choosing. +Usually the claim is that you need someone mature and experienced, +with a business background. Maybe in some cases this is true. And +yet Bill Gates was young and inexperienced and had no business +background, and he seems to have done ok. Steve Jobs got booted +out of his own company by someone mature and experienced, with a +business background, who then proceeded to ruin the company. So I +think people who are mature and experienced, with a business +background, may be overrated. We used to call these guys "newscasters," +because they had neat hair and spoke in deep, confident voices, and +generally didn't know much more than they read on the teleprompter.We talked to a number of VCs, but eventually we ended up financing +our startup entirely with angel money. The main reason was that +we feared a brand-name VC firm would stick us with a newscaster as +part of the deal. That might have been ok if he was content to +limit himself to talking to the press, but what if he wanted to +have a say in running the company? That would have led to disaster, +because our software was so complex. We were a company whose whole +m.o. was to win through better technology. The strategic decisions +were mostly decisions about technology, and we didn't need any help +with those.This was also one reason we didn't go public. Back in 1998 our CFO +tried to talk me into it. In those days you could go public as a +dogfood portal, so as a company with a real product and real revenues, +we might have done well. But I feared it would have meant taking +on a newscaster-- someone who, as they say, "can talk Wall Street's +language."I'm happy to see Google is bucking that trend. They didn't talk +Wall Street's language when they did their IPO, and Wall Street +didn't buy. And now Wall Street is collectively kicking itself. +They'll pay attention next time. Wall Street learns new languages +fast when money is involved.You have more leverage negotiating with VCs than you realize. The +reason is other VCs. I know a number of VCs now, and when you talk +to them you realize that it's a seller's market. Even now there +is too much money chasing too few good deals.VCs form a pyramid. At the top are famous ones like Sequoia and +Kleiner Perkins, but beneath those are a huge number you've never +heard of. What they all have in common is that a dollar from them +is worth one dollar. Most VCs will tell you that they don't just +provide money, but connections and advice. If you're talking to +Vinod Khosla or John Doerr or Mike Moritz, this is true. But such +advice and connections can come very expensive. And as you go down +the food chain the VCs get rapidly + +dumber. A few steps down from +the top you're basically talking to bankers who've picked up a few +new vocabulary words from reading Wired. (Does your product +use XML?) So I'd advise you to be skeptical about claims +of experience and connections. Basically, a VC is a source of +money. I'd be inclined to go with whoever offered the most money +the soonest with the least strings attached.You may wonder how much to tell VCs. And you should, because some +of them may one day be funding your competitors. I think the best +plan is not to be overtly secretive, but not to tell them everything +either. After all, as most VCs say, they're more interested in the +people than the ideas. The main reason they want to talk about +your idea is to judge you, not the idea. So as long as you seem +like you know what you're doing, you can probably keep a few things +back from them. [7]Talk to as many VCs as you can, even if you don't want their money, +because a) they may be on the board of someone who will buy you, +and b) if you seem impressive, they'll be discouraged from investing +in your competitors. The most efficient way to reach VCs, especially +if you only want them to know about you and don't want their money, +is at the conferences that are occasionally organized for startups +to present to them.Not Spending ItWhen and if you get an infusion of real money from investors, what +should you do with it? Not spend it, that's what. In nearly every +startup that fails, the proximate cause is running out of money. +Usually there is something deeper wrong. But even a proximate cause +of death is worth trying hard to avoid.During the Bubble many startups tried to "get big fast." Ideally +this meant getting a lot of customers fast. But it was easy for +the meaning to slide over into hiring a lot of people fast.Of the two versions, the one where you get a lot of customers fast +is of course preferable. But even that may be overrated. The idea +is to get there first and get all the users, leaving none for +competitors. But I think in most businesses the advantages of being +first to market are not so overwhelmingly great. Google is again +a case in point. When they appeared it seemed as if search was a +mature market, dominated by big players who'd spent millions to +build their brands: Yahoo, Lycos, Excite, Infoseek, Altavista, +Inktomi. Surely 1998 was a little late to arrive at the party.But as the founders of Google knew, brand is worth next to nothing +in the search business. You can come along at any point and make +something better, and users will gradually seep over to you. As +if to emphasize the point, Google never did any advertising. They're +like dealers; they sell the stuff, but they know better than to use +it themselves.The competitors Google buried would have done better to spend those +millions improving their software. Future startups should learn +from that mistake. Unless you're in a market where products are +as undifferentiated as cigarettes or vodka or laundry detergent, +spending a lot on brand advertising is a sign of breakage. And few +if any Web businesses are so undifferentiated. The dating sites +are running big ad campaigns right now, which is all the +more evidence they're ripe for the picking. (Fee, fie, fo, fum, I +smell a company run by marketing guys.)We were compelled by circumstances to grow slowly, and in retrospect +it was a good thing. The founders all learned to do every job in +the company. As well as writing software, I had to do sales and +customer support. At sales I was not very good. I was persistent, +but I didn't have the smoothness of a good salesman. My message +to potential customers was: you'd be stupid not to sell online, and +if you sell online you'd be stupid to use anyone else's software. +Both statements were true, but that's not the way to convince people.I was great at customer support though. Imagine talking to a +customer support person who not only knew everything about the +product, but would apologize abjectly if there was a bug, and then +fix it immediately, while you were on the phone with them. Customers +loved us. And we loved them, because when you're growing slow by +word of mouth, your first batch of users are the ones who were smart +enough to find you by themselves. There is nothing more valuable, +in the early stages of a startup, than smart users. If you listen +to them, they'll tell you exactly how to make a winning product. +And not only will they give you this advice for free, they'll pay +you.We officially launched in early 1996. By the end of that year we +had about 70 users. Since this was the era of "get big fast," I +worried about how small and obscure we were. But in fact we were +doing exactly the right thing. Once you get big (in users or +employees) it gets hard to change your product. That year was +effectively a laboratory for improving our software. By the end +of it, we were so far ahead of our competitors that they never had +a hope of catching up. And since all the hackers had spent many +hours talking to users, we understood online commerce way better +than anyone else.That's the key to success as a startup. There is nothing more +important than understanding your business. You might think that +anyone in a business must, ex officio, understand it. Far from it. +Google's secret +weapon was simply that they understood search. I was working for +Yahoo when Google appeared, and Yahoo didn't understand search. I +know because I once tried to convince the powers that be that we +had to make search better, and I got in reply what was then the +party line about it: that Yahoo was no longer a mere "search engine." +Search was now only a small percentage of our page views, less than +one month's growth, and now that we were established as a "media +company," or "portal," or whatever we were, search could safely be +allowed to wither and drop off, like an umbilical cord.Well, a small fraction of page views they may be, but they are an +important fraction, because they are the page views that Web sessions +start with. I think Yahoo gets that now.Google understands a few other things most Web companies still +don't. The most important is that you should put users before +advertisers, even though the advertisers are paying and users aren't. +One of my favorite bumper stickers reads "if the people lead, the +leaders will follow." Paraphrased for the Web, this becomes "get +all the users, and the advertisers will follow." More generally, +design your product to please users first, and then think about how +to make money from it. If you don't put users first, you leave a +gap for competitors who do.To make something users love, you have to understand them. And the +bigger you are, the harder that is. So I say "get big slow." The +slower you burn through your funding, the more time you have to +learn.The other reason to spend money slowly is to encourage a culture +of cheapness. That's something Yahoo did understand. David Filo's +title was "Chief Yahoo," but he was proud that his unofficial title +was "Cheap Yahoo." Soon after we arrived at Yahoo, we got an email +from Filo, who had been crawling around our directory hierarchy, +asking if it was really necessary to store so much of our data on +expensive RAID drives. I was impressed by that. Yahoo's market +cap then was already in the billions, and they were still worrying +about wasting a few gigs of disk space.When you get a couple million dollars from a VC firm, you tend to +feel rich. It's important to realize you're not. A rich company +is one with large revenues. This money isn't revenue. It's money +investors have given you in the hope you'll be able to generate +revenues. So despite those millions in the bank, you're still poor.For most startups the model should be grad student, not law firm. +Aim for cool and cheap, not expensive and impressive. For us the +test of whether a startup understood this was whether they had Aeron +chairs. The Aeron came out during the Bubble and was very popular +with startups. Especially the type, all too common then, that was +like a bunch of kids playing house with money supplied by VCs. We +had office chairs so cheap that the arms all fell off. This was +slightly embarrassing at the time, but in retrospect the grad-studenty +atmosphere of our office was another of those things we did right +without knowing it.Our offices were in a wooden triple-decker in Harvard Square. It +had been an apartment until about the 1970s, and there was still a +claw-footed bathtub in the bathroom. It must once have been inhabited +by someone fairly eccentric, because a lot of the chinks in the +walls were stuffed with aluminum foil, as if to protect against +cosmic rays. When eminent visitors came to see us, we were a bit +sheepish about the low production values. But in fact that place +was the perfect space for a startup. We felt like our role was to +be impudent underdogs instead of corporate stuffed shirts, and that +is exactly the spirit you want.An apartment is also the right kind of place for developing software. +Cube farms suck for that, as you've probably discovered if you've +tried it. Ever notice how much easier it is to hack at home than +at work? So why not make work more like home?When you're looking for space for a startup, don't feel that it has +to look professional. Professional means doing good work, not +elevators and glass walls. I'd advise most startups to avoid +corporate space at first and just rent an apartment. You want to +live at the office in a startup, so why not have a place designed +to be lived in as your office?Besides being cheaper and better to work in, apartments tend to be +in better locations than office buildings. And for a startup +location is very important. The key to productivity is for people +to come back to work after dinner. Those hours after the phone +stops ringing are by far the best for getting work done. Great +things happen when a group of employees go out to dinner together, +talk over ideas, and then come back to their offices to implement +them. So you want to be in a place where there are a lot of +restaurants around, not some dreary office park that's a wasteland +after 6:00 PM. Once a company shifts over into the model where +everyone drives home to the suburbs for dinner, however late, you've +lost something extraordinarily valuable. God help you if you +actually start in that mode.If I were going to start a startup today, there are only three +places I'd consider doing it: on the Red Line near Central, Harvard, +or Davis Squares (Kendall is too sterile); in Palo Alto on University +or California Aves; and in Berkeley immediately north or south of +campus. These are the only places I know that have the right kind +of vibe.The most important way to not spend money is by not hiring people. +I may be an extremist, but I think hiring people is the worst thing +a company can do. To start with, people are a recurring expense, +which is the worst kind. They also tend to cause you to grow out +of your space, and perhaps even move to the sort of uncool office +building that will make your software worse. But worst of all, +they slow you down: instead of sticking your head in someone's +office and checking out an idea with them, eight people have to +have a meeting about it. So the fewer people you can hire, the +better.During the Bubble a lot of startups had the opposite policy. They +wanted to get "staffed up" as soon as possible, as if you couldn't +get anything done unless there was someone with the corresponding +job title. That's big company thinking. Don't hire people to fill +the gaps in some a priori org chart. The only reason to hire someone +is to do something you'd like to do but can't.If hiring unnecessary people is expensive and slows you down, why +do nearly all companies do it? I think the main reason is that +people like the idea of having a lot of people working for them. +This weakness often extends right up to the CEO. If you ever end +up running a company, you'll find the most common question people +ask is how many employees you have. This is their way of weighing +you. It's not just random people who ask this; even reporters do. +And they're going to be a lot more impressed if the answer is a +thousand than if it's ten.This is ridiculous, really. If two companies have the same revenues, +it's the one with fewer employees that's more impressive. When +people used to ask me how many people our startup had, and I answered +"twenty," I could see them thinking that we didn't count for much. +I used to want to add "but our main competitor, whose ass we regularly +kick, has a hundred and forty, so can we have credit for the larger +of the two numbers?"As with office space, the number of your employees is a choice +between seeming impressive, and being impressive. Any of you who +were nerds in high school know about this +choice. Keep doing it when you start a company.Should You?But should you start a company? Are you the right sort of person +to do it? If you are, is it worth it?More people are the right sort of person to start a startup than +realize it. That's the main reason I wrote this. There could be +ten times more startups than there are, and that would probably be +a good thing.I was, I now realize, exactly the right sort of person to start a +startup. But the idea terrified me at first. I was forced into +it because I was a Lisp hacker. The company +I'd been consulting for seemed to be running into trouble, and there +were not a lot of other companies using Lisp. Since I couldn't +bear the thought of programming in another language (this was 1995, +remember, when "another language" meant C++) the only option seemed +to be to start a new company using Lisp.I realize this sounds far-fetched, but if you're a Lisp hacker +you'll know what I mean. And if the idea of starting a startup +frightened me so much that I only did it out of necessity, there +must be a lot of people who would be good at it but who are too +intimidated to try.So who should start a startup? Someone who is a good hacker, between +about 23 and 38, and who wants to solve the money problem in one +shot instead of getting paid gradually over a conventional working +life.I can't say precisely what a good hacker is. At a first rate +university this might include the top half of computer science +majors. Though of course you don't have to be a CS major to be a +hacker; I was a philosophy major in college.It's hard to tell whether you're a good hacker, especially when +you're young. Fortunately the process of starting startups tends +to select them automatically. What drives people to start startups +is (or should be) looking at existing technology and thinking, don't +these guys realize they should be doing x, y, and z? And that's +also a sign that one is a good hacker.I put the lower bound at 23 not because there's something that +doesn't happen to your brain till then, but because you need to see +what it's like in an existing business before you try running your +own. The business doesn't have to be a startup. I spent a year +working for a software company to pay off my college loans. It was +the worst year of my adult life, but I learned, without realizing +it at the time, a lot of valuable lessons about the software business. +In this case they were mostly negative lessons: don't have a lot +of meetings; don't have chunks of code that multiple people own; +don't have a sales guy running the company; don't make a high-end +product; don't let your code get too big; don't leave finding bugs +to QA people; don't go too long between releases; don't isolate +developers from users; don't move from Cambridge to Route 128; and +so on. [8] But negative lessons are just as valuable as positive +ones. Perhaps even more valuable: it's hard to repeat a brilliant +performance, but it's straightforward to avoid errors. [9]The other reason it's hard to start a company before 23 is that +people won't take you seriously. VCs won't trust you, and will try +to reduce you to a mascot as a condition of funding. Customers +will worry you're going to flake out and leave them stranded. Even +you yourself, unless you're very unusual, will feel your age to +some degree; you'll find it awkward to be the boss of someone much +older than you, and if you're 21, hiring only people younger rather +limits your options.Some people could probably start a company at 18 if they wanted to. +Bill Gates was 19 when he and Paul Allen started Microsoft. (Paul +Allen was 22, though, and that probably made a difference.) So if +you're thinking, I don't care what he says, I'm going to start a +company now, you may be the sort of person who could get away with +it.The other cutoff, 38, has a lot more play in it. One reason I put +it there is that I don't think many people have the physical stamina +much past that age. I used to work till 2:00 or 3:00 AM every +night, seven days a week. I don't know if I could do that now.Also, +startups are a big risk financially. If you try something that +blows up and leaves you broke at 26, big deal; a lot of 26 year +olds are broke. By 38 you can't take so many risks-- especially +if you have kids.My final test may be the most restrictive. Do you actually want +to start a startup? What it amounts to, economically, is compressing +your working life into the smallest possible space. Instead of +working at an ordinary rate for 40 years, you work like hell for +four. And maybe end up with nothing-- though in that case it +probably won't take four years.During this time you'll do little but work, because when you're not +working, your competitors will be. My only leisure activities were +running, which I needed to do to keep working anyway, and about +fifteen minutes of reading a night. I had a girlfriend for a total +of two months during that three year period. Every couple weeks I +would take a few hours off to visit a used bookshop or go to a +friend's house for dinner. I went to visit my family twice. +Otherwise I just worked.Working was often fun, because the people I worked with were some +of my best friends. Sometimes it was even technically interesting. +But only about 10% of the time. The best I can say for the other +90% is that some of it is funnier in hindsight than it seemed then. +Like the time the power went off in Cambridge for about six hours, +and we made the mistake of trying to start a gasoline powered +generator inside our offices. I won't try that again.I don't think the amount of bullshit you have to deal with in a +startup is more than you'd endure in an ordinary working life. It's +probably less, in fact; it just seems like a lot because it's +compressed into a short period. So mainly what a startup buys you +is time. That's the way to think about it if you're trying to +decide whether to start one. If you're the sort of person who would +like to solve the money problem once and for all instead of working +for a salary for 40 years, then a startup makes sense.For a lot of people the conflict is between startups and graduate +school. Grad students are just the age, and just the sort of people, +to start software startups. You may worry that if you do you'll +blow your chances of an academic career. But it's possible to be +part of a startup and stay in grad school, especially at first. +Two of our three original hackers were in grad school the whole +time, and both got their degrees. +There are few sources of energy +so powerful as a procrastinating grad student.If you do have to +leave grad school, in the worst case it won't be for too long. If +a startup fails, it will probably fail quickly enough that you can +return to academic life. And if it succeeds, you may find you no +longer have such a burning desire to be an assistant professor.If you want to do it, do it. Starting a startup is not the great +mystery it seems from outside. It's not something you have to know +about "business" to do. Build something users love, and spend less +than you make. How hard is that?Notes[1] Google's revenues are about two billion a year, but half comes +from ads on other sites.[2] One advantage startups have over established companies is that +there are no discrimination laws about starting businesses. For +example, I would be reluctant to start a startup with a woman +who had small children, or was likely to have them soon. But you're +not allowed to ask prospective employees if they plan to have kids +soon. Believe it or not, under current US law, you're not even +allowed to discriminate on the basis of intelligence. Whereas when +you're starting a company, you can discriminate on any basis you +want about who you start it with.[3] Learning to hack is a lot cheaper than business school, because +you can do it mostly on your own. For the price of a Linux box, a +copy of K&R, and a few hours of advice from your neighbor's fifteen +year old son, you'll be well on your way.[4] Corollary: Avoid starting a startup to sell things to the biggest +company of all, the government. Yes, there are lots of opportunities +to sell them technology. But let someone else start those startups.[5] A friend who started a company in Germany told me they do care +about the paperwork there, and that there's more of it. Which helps +explain why there are not more startups in Germany.[6] At the seed stage our valuation was in principle $100,000, because +Julian got 10% of the company. But this is a very misleading number, +because the money was the least important of the things Julian gave us.[7] The same goes for companies that seem to want to acquire you. +There will be a few that are only pretending to in order to pick +your brains. But you can never tell for sure which these are, so +the best approach is to seem entirely open, but to fail to mention +a few critical technical secrets.[8] I was as bad an employee as this place was a company. I +apologize to anyone who had to work with me there.[9] You could probably write a book about how to succeed in business +by doing everything in exactly the opposite way from the DMV.Thanks to Trevor Blackwell, Sarah Harlin, Jessica Livingston, +and Robert Morris for reading drafts of this essay, and to Steve +Melendez and Gregory Price for inviting me to speak. \ No newline at end of file diff --git a/data/PaulGrahamEssayMedium/startupfunding.txt b/data/PaulGrahamEssayMedium/startupfunding.txt new file mode 100644 index 0000000..787b8d7 --- /dev/null +++ b/data/PaulGrahamEssayMedium/startupfunding.txt @@ -0,0 +1,761 @@ + + +Want to start a startup? Get funded by +Y Combinator. + + + + +November 2005 +Venture funding works like gears. A typical startup goes through +several rounds of funding, and at each round you want to take just +enough money to reach the speed where you can shift into the next +gear.Few startups get it quite right. Many are underfunded. A few are +overfunded, which is like trying to start driving in third gear.I think it would help founders to understand funding better—not +just the mechanics of it, but what investors are thinking. I was +surprised recently when I realized that all the worst problems we +faced in our startup were due not to competitors, but investors. +Dealing with competitors was easy by comparison.I don't mean to suggest that our investors were nothing but a drag +on us. They were helpful in negotiating deals, for example. I +mean more that conflicts with investors are particularly nasty. +Competitors punch you in the jaw, but investors have you by the +balls.Apparently our situation was not unusual. And if trouble with +investors is one of the biggest threats to a startup, managing them +is one of the most important skills founders need to learn.Let's start by talking about the five sources of startup funding. +Then we'll trace the life of a hypothetical (very fortunate) startup +as it shifts gears through successive rounds.Friends and FamilyA lot of startups get their first funding from friends and family. +Excite did, for example: after the founders graduated from college, +they borrowed $15,000 from their parents to start a company. With +the help of some part-time jobs they made it last 18 months.If your friends or family happen to be rich, the line blurs between +them and angel investors. At Viaweb we got our first $10,000 of +seed money from our friend Julian, but he was sufficiently rich +that it's hard to say whether he should be classified as a friend +or angel. He was also a lawyer, which was great, because it meant +we didn't have to pay legal bills out of that initial small sum.The advantage of raising money from friends and family is that +they're easy to find. You already know them. There are three main +disadvantages: you mix together your business and personal life; +they will probably not be as well connected as angels or venture +firms; and they may not be accredited investors, which could +complicate your life later.The SEC defines an "accredited investor" as someone with over a +million dollars in liquid assets or an income of over $200,000 a +year. The regulatory burden is much lower if a company's shareholders +are all accredited investors. Once you take money from the general +public you're more restricted in what you can do. +[1]A startup's life will be more complicated, legally, if any of the +investors aren't accredited. In an IPO, it might not merely add +expense, but change the outcome. A lawyer I asked about it said: + + When the company goes public, the SEC will carefully study all + prior issuances of stock by the company and demand that it take + immediate action to cure any past violations of securities laws. + Those remedial actions can delay, stall or even kill the IPO. + +Of course the odds of any given startup doing an IPO are small. +But not as small as they might seem. A lot of startups that end up +going public didn't seem likely to at first. (Who could have guessed +that the company Wozniak and Jobs started in their spare time selling +plans for microcomputers would yield one of the biggest IPOs of the +decade?) Much of the value of a startup consists of that tiny +probability multiplied by the huge outcome.It wasn't because they weren't accredited investors that I didn't +ask my parents for seed money, though. When we were starting Viaweb, +I didn't know about the concept of an accredited investor, and +didn't stop to think about the value of investors' connections. +The reason I didn't take money from my parents was that I didn't +want them to lose it.ConsultingAnother way to fund a startup is to get a job. The best sort of +job is a consulting project in which you can build whatever software +you wanted to sell as a startup. Then you can gradually transform +yourself from a consulting company into a product company, and have +your clients pay your development expenses.This is a good plan for someone with kids, because it takes most +of the risk out of starting a startup. There never has to be a +time when you have no revenues. Risk and reward are usually +proportionate, however: you should expect a plan that cuts the risk +of starting a startup also to cut the average return. In this case, +you trade decreased financial risk for increased risk that your +company won't succeed as a startup.But isn't the consulting company itself a startup? No, not generally. +A company has to be more than small and newly founded to be a +startup. There are millions of small businesses in America, but +only a few thousand are startups. To be a startup, a company has +to be a product business, not a service business. By which I mean +not that it has to make something physical, but that it has to have +one thing it sells to many people, rather than doing custom work +for individual clients. Custom work doesn't scale. To be a startup +you need to be the band that sells a million copies of a song, not +the band that makes money by playing at individual weddings and bar +mitzvahs.The trouble with consulting is that clients have an awkward habit +of calling you on the phone. Most startups operate close to the +margin of failure, and the distraction of having to deal with clients +could be enough to put you over the edge. Especially if you have +competitors who get to work full time on just being a startup.So you have to be very disciplined if you take the consulting route. +You have to work actively to prevent your company growing into a +"weed tree," dependent on this source of easy but low-margin money. +[2]Indeed, the biggest danger of consulting may be that it gives you +an excuse for failure. In a startup, as in grad school, a lot of +what ends up driving you are the expectations of your family and +friends. Once you start a startup and tell everyone that's what +you're doing, you're now on a path labelled "get rich or bust." You +now have to get rich, or you've failed.Fear of failure is an extraordinarily powerful force. Usually it +prevents people from starting things, but once you publish some +definite ambition, it switches directions and starts working in +your favor. I think it's a pretty clever piece of jiujitsu to set +this irresistible force against the slightly less immovable object +of becoming rich. You won't have it driving you if your stated +ambition is merely to start a consulting company that you will one +day morph into a startup.An advantage of consulting, as a way to develop a product, is that +you know you're making something at least one customer wants. But +if you have what it takes to start a startup you should have +sufficient vision not to need this crutch.Angel InvestorsAngels are individual rich people. The word was first used +for backers of Broadway plays, but now applies to individual investors +generally. Angels who've made money in technology are preferable, +for two reasons: they understand your situation, and they're a +source of contacts and advice.The contacts and advice can be more important than the money. When +del.icio.us took money from investors, they took money from, among +others, Tim O'Reilly. The amount he put in was small compared to +the VCs who led the round, but Tim is a smart and influential guy +and it's good to have him on your side.You can do whatever you want with money from consulting or friends +and family. With angels we're now talking about venture funding +proper, so it's time to introduce the concept of exit strategy. +Younger would-be founders are often surprised that investors expect +them either to sell the company or go public. The reason is that +investors need to get their capital back. They'll only consider +companies that have an exit strategy—meaning companies that could +get bought or go public.This is not as selfish as it sounds. There are few large, private +technology companies. Those that don't fail all seem to get bought +or go public. The reason is that employees are investors too—of +their time—and they want just as much to be able to cash out. If +your competitors offer employees stock options that might make them +rich, while you make it clear you plan to stay private, your +competitors will get the best people. So the principle of an "exit" +is not just something forced on startups by investors, but part of +what it means to be a startup.Another concept we need to introduce now is valuation. When someone +buys shares in a company, that implicitly establishes a value for +it. If someone pays $20,000 for 10% of a company, the company is +in theory worth $200,000. I say "in theory" because in early stage +investing, valuations are voodoo. As a company gets more established, +its valuation gets closer to an actual market value. But in a newly +founded startup, the valuation number is just an artifact of the +respective contributions of everyone involved.Startups often "pay" investors who will help the company in some +way by letting them invest at low valuations. If I had a startup +and Steve Jobs wanted to invest in it, I'd give him the stock for +$10, just to be able to brag that he was an investor. Unfortunately, +it's impractical (if not illegal) to adjust the valuation of the +company up and down for each investor. Startups' valuations are +supposed to rise over time. So if you're going to sell cheap stock +to eminent angels, do it early, when it's natural for the company +to have a low valuation.Some angel investors join together in syndicates. Any city where +people start startups will have one or more of them. In Boston the +biggest is the Common +Angels. In the Bay Area it's the Band +of Angels. You can find groups near you through the Angel Capital Association. +[3] +However, most angel investors don't belong to these groups. In +fact, the more prominent the angel, the less likely they are to +belong to a group.Some angel groups charge you money to pitch your idea to them. +Needless to say, you should never do this.One of the dangers of taking investment from individual angels, +rather than through an angel group or investment firm, is that they +have less reputation to protect. A big-name VC firm will not screw +you too outrageously, because other founders would avoid them if +word got out. With individual angels you don't have this protection, +as we found to our dismay in our own startup. In many startups' +lives there comes a point when you're at the investors' +mercy—when you're out of money and the only place to get more is your +existing investors. When we got into such a scrape, our investors +took advantage of it in a way that a name-brand VC probably wouldn't +have.Angels have a corresponding advantage, however: they're also not +bound by all the rules that VC firms are. And so they can, for +example, allow founders to cash out partially in a funding round, +by selling some of their stock directly to the investors. I think +this will become more common; the average founder is eager to do +it, and selling, say, half a million dollars worth of stock will +not, as VCs fear, cause most founders to be any less committed to +the business.The same angels who tried to screw us also let us do this, and so +on balance I'm grateful rather than angry. (As in families, relations +between founders and investors can be complicated.)The best way to find angel investors is through personal introductions. +You could try to cold-call angel groups near you, but angels, like +VCs, will pay more attention to deals recommended by someone they +respect.Deal terms with angels vary a lot. There are no generally accepted +standards. Sometimes angels' deal terms are as fearsome as VCs'. +Other angels, particularly in the earliest stages, will invest based +on a two-page agreement.Angels who only invest occasionally may not themselves know what +terms they want. They just want to invest in this startup. What +kind of anti-dilution protection do they want? Hell if they know. +In these situations, the deal terms tend to be random: the angel +asks his lawyer to create a vanilla agreement, and the terms end +up being whatever the lawyer considers vanilla. Which in practice +usually means, whatever existing agreement he finds lying around +his firm. (Few legal documents are created from scratch.)These heaps o' boilerplate are a problem for small startups, because +they tend to grow into the union of all preceding documents. I +know of one startup that got from an angel investor what amounted +to a five hundred pound handshake: after deciding to invest, the +angel presented them with a 70-page agreement. The startup didn't +have enough money to pay a lawyer even to read it, let alone negotiate +the terms, so the deal fell through.One solution to this problem would be to have the startup's lawyer +produce the agreement, instead of the angel's. Some angels might +balk at this, but others would probably welcome it.Inexperienced angels often get cold feet when the time comes to +write that big check. In our startup, one of the two angels in the +initial round took months to pay us, and only did after repeated +nagging from our lawyer, who was also, fortunately, his lawyer.It's obvious why investors delay. Investing in startups is risky! +When a company is only two months old, every day you wait +gives you 1.7% more data about their trajectory. But the investor +is already being compensated for that risk in the low price of the +stock, so it is unfair to delay.Fair or not, investors do it if you let them. Even VCs do it. And +funding delays are a big distraction for founders, who ought to be +working on their company, not worrying about investors. What's a +startup to do? With both investors and acquirers, the only leverage +you have is competition. If an investor knows you have other +investors lined up, he'll be a lot more eager to close-- and not +just because he'll worry about losing the deal, but because if other +investors are interested, you must be worth investing in. It's the +same with acquisitions. No one wants to buy you till someone else +wants to buy you, and then everyone wants to buy you.The key to closing deals is never to stop pursuing alternatives. +When an investor says he wants to invest in you, or an acquirer +says they want to buy you, don't believe it till you get the +check. Your natural tendency when an investor says yes will +be to relax and go back to writing code. Alas, you can't; you have +to keep looking for more investors, if only to get this one to act. +[4]Seed Funding FirmsSeed firms are like angels in that they invest relatively small +amounts at early stages, but like VCs in that they're companies +that do it as a business, rather than individuals making occasional +investments on the side.Till now, nearly all seed firms have been so-called "incubators," +so Y Combinator gets called +one too, though the only thing we have in common is that we invest +in the earliest phase.According to the National Association of Business Incubators, there +are about 800 incubators in the US. This is an astounding number, +because I know the founders of a lot of startups, and I can't think +of one that began in an incubator.What is an incubator? I'm not sure myself. The defining quality +seems to be that you work in their space. That's where the name +"incubator" comes from. They seem to vary a great deal in other +respects. At one extreme is the sort of pork-barrel project where +a town gets money from the state government to renovate a vacant +building as a "high-tech incubator," as if it were merely lack of +the right sort of office space that had till now prevented the town +from becoming a +startup hub. +At the other extreme are places like +Idealab, which generates ideas for new startups internally and hires +people to work for them.The classic Bubble incubators, most of which now seem to be dead, +were like VC firms except that they took a much bigger role in the +startups they funded. In addition to working in their space, you +were supposed to use their office staff, lawyers, accountants, and +so on.Whereas incubators tend (or tended) to exert more control than VCs, +Y Combinator exerts less. +And we think it's better if startups operate out of their own +premises, however crappy, than the offices of their investors. So +it's annoying that we keep getting called an "incubator," but perhaps +inevitable, because there's only one of us so far and no word yet +for what we are. If we have to be called something, the obvious +name would be "excubator." (The name is more excusable if one +considers it as meaning that we enable people to escape cubicles.)Because seed firms are companies rather than individual people, +reaching them is easier than reaching angels. Just go to their web +site and send them an email. The importance of personal introductions +varies, but is less than with angels or VCs.The fact that seed firms are companies also means the investment +process is more standardized. (This is generally true with angel +groups too.) Seed firms will probably have set deal terms they use +for every startup they fund. The fact that the deal terms are +standard doesn't mean they're favorable to you, but if other startups +have signed the same agreements and things went well for them, it's +a sign the terms are reasonable.Seed firms differ from angels and VCs in that they invest exclusively +in the earliest phases—often when the company is still just an +idea. Angels and even VC firms occasionally do this, but they also +invest at later stages.The problems are different in the early stages. For example, in +the first couple months a startup may completely redefine their idea. So seed investors usually care less +about the idea than the people. This is true of all venture funding, +but especially so in the seed stage.Like VCs, one of the advantages of seed firms is the advice they +offer. But because seed firms operate in an earlier phase, they +need to offer different kinds of advice. For example, a seed firm +should be able to give advice about how to approach VCs, which VCs +obviously don't need to do; whereas VCs should be able to give +advice about how to hire an "executive team," which is not an issue +in the seed stage.In the earliest phases, a lot of the problems are technical, so +seed firms should be able to help with technical as well as business +problems.Seed firms and angel investors generally want to invest in the +initial phases of a startup, then hand them off to VC firms for the +next round. Occasionally startups go from seed funding direct to +acquisition, however, and I expect this to become increasingly +common.Google has been aggressively pursuing this route, and now Yahoo is too. Both +now compete directly with VCs. And this is a smart move. Why wait +for further funding rounds to jack up a startup's price? When a +startup reaches the point where VCs have enough information to +invest in it, the acquirer should have enough information to buy +it. More information, in fact; with their technical depth, the +acquirers should be better at picking winners than VCs.Venture Capital FundsVC firms are like seed firms in that they're actual companies, but +they invest other people's money, and much larger amounts of it. +VC investments average several million dollars. So they tend to +come later in the life of a startup, are harder to get, and come +with tougher terms.The word "venture capitalist" is sometimes used loosely for any +venture investor, but there is a sharp difference between VCs and +other investors: VC firms are organized as funds, much like +hedge funds or mutual funds. The fund managers, who are called +"general partners," get about 2% of the fund annually as a management +fee, plus about 20% of the fund's gains.There is a very sharp dropoff in performance among VC firms, because +in the VC business both success and failure are self-perpetuating. +When an investment scores spectacularly, as Google did for Kleiner +and Sequoia, it generates a lot of good publicity for the VCs. And +many founders prefer to take money from successful VC firms, because +of the legitimacy it confers. Hence a vicious (for the losers) +cycle: VC firms that have been doing badly will only get the deals +the bigger fish have rejected, causing them to continue to do badly.As a result, of the thousand or so VC funds in the US now, only +about 50 are likely to make money, and it is very hard for a new +fund to break into this group.In a sense, the lower-tier VC firms are a bargain for founders. +They may not be quite as smart or as well connected as the big-name +firms, but they are much hungrier for deals. This means you should +be able to get better terms from them.Better how? The most obvious is valuation: they'll take less of +your company. But as well as money, there's power. I think founders +will increasingly be able to stay on as CEO, and on terms that will +make it fairly hard to fire them later.The most dramatic change, I predict, +is that VCs will allow founders to +cash out partially by selling +some of their stock direct to the VC firm. VCs have traditionally +resisted letting founders get anything before the ultimate "liquidity +event." But they're also desperate for deals. And since I know +from my own experience that the rule against buying stock from +founders is a stupid one, this is a natural place for things to +give as venture funding becomes more and more a seller's market.The disadvantage of taking money from less known firms is that +people will assume, correctly or not, that you were turned down by +the more exalted ones. But, like where you went to college, the +name of your VC stops mattering once you have some performance to +measure. So the more confident you are, the less you need a +brand-name VC. We funded Viaweb entirely with angel money; it never +occurred to us that the backing of a well known VC firm would make +us seem more impressive. +[5]Another danger of less known firms is that, like angels, they have +less reputation to protect. I suspect it's the lower-tier firms +that are responsible for most of the tricks that have given VCs +such a bad reputation among hackers. They are doubly hosed: the +general partners themselves are less able, and yet they have harder +problems to solve, because the top VCs skim off all the best deals, +leaving the lower-tier firms exactly the startups that are likely +to blow up.For example, lower-tier firms are much more likely to pretend to +want to do a deal with you just to lock you up while they decide +if they really want to. One experienced CFO said: + + The better ones usually will not give a term sheet unless they + really want to do a deal. The second or third tier firms have a + much higher break rate—it could be as high as 50%. + +It's obvious why: the lower-tier firms' biggest fear, when chance +throws them a bone, is that one of the big dogs will notice and +take it away. The big dogs don't have to worry about that.Falling victim to this trick could really hurt you. As one +VC told me: + + If you were talking to four VCs, told three of them that you + accepted a term sheet, and then have to call them back to tell + them you were just kidding, you are absolutely damaged goods. + +Here's a partial solution: when a VC offers you a term sheet, ask +how many of their last 10 term sheets turned into deals. This will +at least force them to lie outright if they want to mislead you.Not all the people who work at VC firms are partners. Most firms +also have a handful of junior employees called something like +associates or analysts. If you get a call from a VC +firm, go to their web site and check whether the person you talked +to is a partner. Odds are it will be a junior person; they scour +the web looking for startups their bosses could invest in. The +junior people will tend to seem very positive about your company. +They're not pretending; they want to believe you're a hot +prospect, because it would be a huge coup for them if their firm +invested in a company they discovered. Don't be misled by this +optimism. It's the partners who decide, and they view things with +a colder eye.Because VCs invest large amounts, the money comes with more +restrictions. Most only come into effect if the company gets into +trouble. For example, VCs generally write it into the deal that +in any sale, they get their investment back first. So if the company +gets sold at a low price, the founders could get nothing. Some VCs +now require that in any sale they get 4x their investment back +before the common stock holders (that is, you) get anything, but +this is an abuse that should be resisted.Another difference with large investments is that the founders are +usually required to accept "vesting"—to surrender their stock and +earn it back over the next 4-5 years. VCs don't want to invest +millions in a company the founders could just walk away from. +Financially, vesting has little effect, but in some situations it +could mean founders will have less power. If VCs got de facto +control of the company and fired one of the founders, he'd lose any +unvested stock unless there was specific protection against this. +So vesting would in that situation force founders to toe the line.The most noticeable change when a startup takes serious funding is +that the founders will no longer have complete control. Ten years +ago VCs used to insist that founders step down as CEO and hand the +job over to a business guy they supplied. This is less the rule +now, partly because the disasters of the Bubble showed that generic +business guys don't make such great CEOs.But while founders will increasingly be able to stay on as CEO, +they'll have to cede some power, because the board of directors +will become more powerful. In the seed stage, the board is generally +a formality; if you want to talk to the other board members, you +just yell into the next room. This stops with VC-scale money. In +a typical VC funding deal, the board of directors might be composed +of two VCs, two founders, and one outside person acceptable to both. +The board will have ultimate power, which means the founders now +have to convince instead of commanding.This is not as bad as it sounds, however. Bill Gates is in the +same position; he doesn't have majority control of Microsoft; in +principle he also has to convince instead of commanding. And yet +he seems pretty commanding, doesn't he? As long as things are going +smoothly, boards don't interfere much. The danger comes when there's +a bump in the road, as happened to Steve Jobs at Apple.Like angels, VCs prefer to invest in deals that come to them through +people they know. So while nearly all VC funds have some address +you can send your business plan to, VCs privately admit the chance +of getting funding by this route is near zero. One recently told +me that he did not know a single startup that got funded this way.I suspect VCs accept business plans "over the transom" more as a +way to keep tabs on industry trends than as a source of deals. In +fact, I would strongly advise against mailing your business plan +randomly to VCs, because they treat this as evidence of laziness. +Do the extra work of getting personal introductions. As one VC put +it: + + I'm not hard to find. I know a lot of people. If you can't find + some way to reach me, how are you going to create a successful + company? + +One of the most difficult problems for startup founders is deciding +when to approach VCs. You really only get one chance, because they +rely heavily on first impressions. And you can't approach some and +save others for later, because (a) they ask who else you've talked +to and when and (b) they talk among themselves. If you're talking +to one VC and he finds out that you were rejected by another several +months ago, you'll definitely seem shopworn.So when do you approach VCs? When you can convince them. If the +founders have impressive resumes and the idea isn't hard to understand, +you could approach VCs quite early. Whereas if the founders are +unknown and the idea is very novel, you might have to launch the +thing and show that users loved it before VCs would be convinced.If several VCs are interested in you, they will sometimes be willing +to split the deal between them. They're more likely to do this if +they're close in the VC pecking order. Such deals may be a net win +for founders, because you get multiple VCs interested in your +success, and you can ask each for advice about the other. One +founder I know wrote: + + Two-firm deals are great. It costs you a little more equity, but + being able to play the two firms off each other (as well as ask + one if the other is being out of line) is invaluable. + +When you do negotiate with VCs, remember that they've done this a +lot more than you have. They've invested in dozens of startups, +whereas this is probably the first you've founded. But don't let +them or the situation intimidate you. The average founder is smarter +than the average VC. So just do what you'd do in any complex, +unfamiliar situation: proceed deliberately, and question anything +that seems odd.It is, unfortunately, common for VCs to put terms in an agreement +whose consequences surprise founders later, and also common for VCs +to defend things they do by saying that they're standard in the +industry. Standard, schmandard; the whole industry is only a few +decades old, and rapidly evolving. The concept of "standard" is a +useful one when you're operating on a small scale (Y Combinator +uses identical terms for every deal because for tiny seed-stage +investments it's not worth the overhead of negotiating individual +deals), but it doesn't apply at the VC level. On that scale, every +negotiation is unique.Most successful startups get money from more than one of the preceding +five sources. +[6] +And, confusingly, the names of funding sources +also tend to be used as the names of different rounds. The best +way to explain how it all works is to follow the case of a hypothetical +startup.Stage 1: Seed RoundOur startup begins when a group of three friends have an idea-- +either an idea for something they might build, or simply the idea +"let's start a company." Presumably they already have some source +of food and shelter. But if you have food and shelter, you probably +also have something you're supposed to be working on: either +classwork, or a job. So if you want to work full-time on a startup, +your money situation will probably change too.A lot of startup founders say they started the company without any +idea of what they planned to do. This is actually less common than +it seems: many have to claim they thought of the idea after quitting +because otherwise their former employer would own it.The three friends decide to take the leap. Since most startups are +in competitive businesses, you not only want to work full-time on +them, but more than full-time. So some or all of the friends quit +their jobs or leave school. (Some of the founders in a startup can +stay in grad school, but at least one has to make the company his +full-time job.)They're going to run the company out of one of their apartments at +first, and since they don't have any users they don't have to pay +much for infrastructure. Their main expenses are setting up the +company, which costs a couple thousand dollars in legal work and +registration fees, and the living expenses of the founders.The phrase "seed investment" covers a broad range. To some VC firms +it means $500,000, but to most startups it means several months' +living expenses. We'll suppose our group of friends start with +$15,000 from their friend's rich uncle, who they give 5% of the +company in return. There's only common stock at this stage. They +leave 20% as an options pool for later employees (but they set +things up so that they can issue this stock to themselves if they +get bought early and most is still unissued), and the three founders +each get 25%.By living really cheaply they think they can make the remaining +money last five months. When you have five months' runway left, +how soon do you need to start looking for your next round? Answer: +immediately. It takes time to find investors, and time (always +more than you expect) for the deal to close even after they say +yes. So if our group of founders know what they're doing they'll +start sniffing around for angel investors right away. But of course +their main job is to build version 1 of their software.The friends might have liked to have more money in this first phase, +but being slightly underfunded teaches them an important lesson. +For a startup, cheapness is power. The lower your costs, the more +options you have—not just at this stage, but at every point till +you're profitable. When you have a high "burn rate," you're always +under time pressure, which means (a) you don't have time for your +ideas to evolve, and (b) you're often forced to take deals you don't +like.Every startup's rule should be: spend little, and work fast.After ten weeks' work the three friends have built a prototype that +gives one a taste of what their product will do. It's not what +they originally set out to do—in the process of writing it, they +had some new ideas. And it only does a fraction of what the finished +product will do, but that fraction includes stuff that no one else +has done before.They've also written at least a skeleton business plan, addressing +the five fundamental questions: what they're going to do, why users +need it, how large the market is, how they'll make money, and who +the competitors are and why this company is going to beat them. +(That last has to be more specific than "they suck" or "we'll work +really hard.")If you have to choose between spending time on the demo or the +business plan, spend most on the demo. Software is not only more +convincing, but a better way to explore ideas.Stage 2: Angel RoundWhile writing the prototype, the group has been traversing their +network of friends in search of angel investors. They find some +just as the prototype is demoable. When they demo it, one of the +angels is willing to invest. Now the group is looking for more +money: they want enough to last for a year, and maybe to hire a +couple friends. So they're going to raise $200,000.The angel agrees to invest at a pre-money valuation of $1 million. +The company issues $200,000 worth of new shares to the angel; if +there were 1000 shares before the deal, this means 200 additional +shares. The angel now owns 200/1200 shares, or a sixth of the +company, and all the previous shareholders' percentage ownership +is diluted by a sixth. After the deal, the capitalization table +looks like this: + +shareholder shares percent +------------------------------- +angel 200 16.7 +uncle 50 4.2 +each founder 250 20.8 +option pool 200 16.7 + ---- ----- +total 1200 100 + +To keep things simple, I had the angel do a straight cash for stock +deal. In reality the angel might be more likely to make the +investment in the form of a convertible loan. A convertible loan +is a loan that can be converted into stock later; it works out the +same as a stock purchase in the end, but gives the angel more +protection against being squashed by VCs in future rounds.Who pays the legal bills for this deal? The startup, remember, +only has a couple thousand left. In practice this turns out to be +a sticky problem that usually gets solved in some improvised way. +Maybe the startup can find lawyers who will do it cheaply in the +hope of future work if the startup succeeds. Maybe someone has a +lawyer friend. Maybe the angel pays for his lawyer to represent +both sides. (Make sure if you take the latter route that the lawyer +is representing you rather than merely advising you, or his +only duty is to the investor.)An angel investing $200k would probably expect a seat on the board +of directors. He might also want preferred stock, meaning a special +class of stock that has some additional rights over the common stock +everyone else has. Typically these rights include vetoes over major +strategic decisions, protection against being diluted in future +rounds, and the right to get one's investment back first if the +company is sold.Some investors might expect the founders to accept vesting for a +sum this size, and others wouldn't. VCs are more likely to require +vesting than angels. At Viaweb we managed to raise $2.5 million +from angels without ever accepting vesting, largely because we were +so inexperienced that we were appalled at the idea. In practice +this turned out to be good, because it made us harder to push around.Our experience was unusual; vesting is the norm for amounts that +size. Y Combinator doesn't require vesting, because (a) we invest +such small amounts, and (b) we think it's unnecessary, and that the +hope of getting rich is enough motivation to keep founders at work. +But maybe if we were investing millions we would think differently.I should add that vesting is also a way for founders to protect +themselves against one another. It solves the problem of what to +do if one of the founders quits. So some founders impose it on +themselves when they start the company.The angel deal takes two weeks to close, so we are now three months +into the life of the company.The point after you get the first big chunk of angel money will +usually be the happiest phase in a startup's life. It's a lot like +being a postdoc: you have no immediate financial worries, and few +responsibilities. You get to work on juicy kinds of work, like +designing software. You don't have to spend time on bureaucratic +stuff, because you haven't hired any bureaucrats yet. Enjoy it +while it lasts, and get as much done as you can, because you will +never again be so productive.With an apparently inexhaustible sum of money sitting safely in the +bank, the founders happily set to work turning their prototype into +something they can release. They hire one of their friends—at +first just as a consultant, so they can try him out—and then a +month later as employee #1. They pay him the smallest salary he can +live on, plus 3% of the company in restricted stock, vesting over +four years. (So after this the option pool is down to 13.7%). +[7] +They also spend a little money on a freelance graphic designer.How much stock do you give early employees? That varies so much +that there's no conventional number. If you get someone really +good, really early, it might be wise to give him as much stock as +the founders. The one universal rule is that the amount of stock +an employee gets decreases polynomially with the age of the company. +In other words, you get rich as a power of how early you were. So +if some friends want you to come work for their startup, don't wait +several months before deciding.A month later, at the end of month four, our group of founders have +something they can launch. Gradually through word of mouth they +start to get users. Seeing the system in use by real users—people +they don't know—gives them lots of new ideas. Also they find +they now worry obsessively about the status of their server. (How +relaxing founders' lives must have been when startups wrote VisiCalc.)By the end of month six, the system is starting to have a solid +core of features, and a small but devoted following. People start +to write about it, and the founders are starting to feel like experts +in their field.We'll assume that their startup is one that could put millions more +to use. Perhaps they need to spend a lot on marketing, or build +some kind of expensive infrastructure, or hire highly paid salesmen. +So they decide to start talking to VCs. They get introductions to +VCs from various sources: their angel investor connects them with +a couple; they meet a few at conferences; a couple VCs call them +after reading about them.Step 3: Series A RoundArmed with their now somewhat fleshed-out business plan and able +to demo a real, working system, the founders visit the VCs they +have introductions to. They find the VCs intimidating and inscrutable. +They all ask the same question: who else have you pitched to? (VCs +are like high school girls: they're acutely aware of their position +in the VC pecking order, and their interest in a company is a +function of the interest other VCs show in it.)One of the VC firms says they want to invest and offers the founders +a term sheet. A term sheet is a summary of what the deal terms +will be when and if they do a deal; lawyers will fill in the details +later. By accepting the term sheet, the startup agrees to turn +away other VCs for some set amount of time while this firm does the +"due diligence" required for the deal. Due diligence is the corporate +equivalent of a background check: the purpose is to uncover any +hidden bombs that might sink the company later, like serious design +flaws in the product, pending lawsuits against the company, +intellectual property issues, and so on. VCs' legal and financial +due diligence is pretty thorough, but the technical due diligence +is generally a joke. +[8]The due diligence discloses no ticking bombs, and six weeks later +they go ahead with the deal. Here are the terms: a $2 million +investment at a pre-money valuation of $4 million, meaning that +after the deal closes the VCs will own a third of the company (2 / +(4 + 2)). The VCs also insist that prior to the deal the option +pool be enlarged by an additional hundred shares. So the total +number of new shares issued is 750, and the cap table becomes: + +shareholder shares percent +------------------------------- +VCs 650 33.3 +angel 200 10.3 +uncle 50 2.6 +each founder 250 12.8 +employee 36* 1.8 *unvested +option pool 264 13.5 + ---- ----- +total 1950 100 + +This picture is unrealistic in several respects. For example, while +the percentages might end up looking like this, it's unlikely that +the VCs would keep the existing numbers of shares. In fact, every +bit of the startup's paperwork would probably be replaced, as if +the company were being founded anew. Also, the money might come +in several tranches, the later ones subject to various +conditions—though this is apparently more common in deals with lower-tier VCs +(whose lot in life is to fund more dubious startups) than with the +top firms.And of course any VCs reading this are probably rolling on the floor +laughing at how my hypothetical VCs let the angel keep his 10.3 of +the company. I admit, this is the Bambi version; in simplifying +the picture, I've also made everyone nicer. In the real world, VCs +regard angels the way a jealous husband feels about his wife's +previous boyfriends. To them the company didn't exist before they +invested in it. +[9]I don't want to give the impression you have to do an angel round +before going to VCs. In this example I stretched things out to +show multiple sources of funding in action. Some startups could go +directly from seed funding to a VC round; several of the companies +we've funded have.The founders are required to vest their shares over four years, and +the board is now reconstituted to consist of two VCs, two founders, +and a fifth person acceptable to both. The angel investor cheerfully +surrenders his board seat.At this point there is nothing new our startup can teach us about +funding—or at least, nothing good. +[10] +The startup will almost +certainly hire more people at this point; those millions must be +put to work, after all. The company may do additional funding +rounds, presumably at higher valuations. They may if they are +extraordinarily fortunate do an IPO, which we should remember is +also in principle a round of funding, regardless of its de facto +purpose. But that, if not beyond the bounds of possibility, is +beyond the scope of this article.Deals Fall ThroughAnyone who's been through a startup will find the preceding portrait +to be missing something: disasters. If there's one thing all +startups have in common, it's that something is always going wrong. +And nowhere more than in matters of funding.For example, our hypothetical startup never spent more than half +of one round before securing the next. That's more ideal than +typical. Many startups—even successful ones—come close to +running out of money at some point. Terrible things happen to +startups when they run out of money, because they're designed for +growth, not adversity.But the most unrealistic thing about the series of deals I've +described is that they all closed. In the startup world, closing +is not what deals do. What deals do is fall through. If you're +starting a startup you would do well to remember that. Birds fly; +fish swim; deals fall through.Why? Partly the reason deals seem to fall through so often is that +you lie to yourself. You want the deal to close, so you start to +believe it will. But even correcting for this, startup deals fall +through alarmingly often—far more often than, say, deals to buy +real estate. The reason is that it's such a risky environment. +People about to fund or acquire a startup are prone to wicked cases +of buyer's remorse. They don't really grasp the risk they're taking +till the deal's about to close. And then they panic. And not just +inexperienced angel investors, but big companies too.So if you're a startup founder wondering why some angel investor +isn't returning your phone calls, you can at least take comfort in +the thought that the same thing is happening to other deals a hundred +times the size.The example of a startup's history that I've presented is like a +skeleton—accurate so far as it goes, but needing to be fleshed +out to be a complete picture. To get a complete picture, just add +in every possible disaster.A frightening prospect? In a way. And yet also in a way encouraging. +The very uncertainty of startups frightens away almost everyone. +People overvalue stability—especially young +people, who ironically need it least. And so in starting a startup, +as in any really bold undertaking, merely deciding to do it gets +you halfway there. On the day of the race, most of the other runners +won't show up. +Notes[1] +The aim of such regulations is to protect widows and orphans +from crooked investment schemes; people with a million dollars in +liquid assets are assumed to be able to protect themselves. +The unintended consequence is that the investments that generate +the highest returns, like hedge funds, are available only to the +rich.[2] +Consulting is where product companies go to die. IBM is the +most famous example. So starting as a consulting company is like +starting out in the grave and trying to work your way up into the +world of the living.[3] +If "near you" doesn't mean the Bay Area, Boston, or Seattle, +consider moving. It's not a coincidence you haven't heard of many +startups from Philadelphia.[4] +Investors are often compared to sheep. And they are like sheep, +but that's a rational response to their situation. Sheep act the +way they do for a reason. If all the other sheep head for a certain +field, it's probably good grazing. And when a wolf appears, is he +going to eat a sheep in the middle of the flock, or one near the +edge?[5] +This was partly confidence, and partly simple ignorance. We +didn't know ourselves which VC firms were the impressive ones. We +thought software was all that mattered. But that turned out to be +the right direction to be naive in: it's much better to overestimate +than underestimate the importance of making a good product.[6] +I've omitted one source: government grants. I don't think +these are even worth thinking about for the average startup. +Governments may mean well when they set up grant programs to encourage +startups, but what they give with one hand they take away with the +other: the process of applying is inevitably so arduous, and the +restrictions on what you can do with the money so burdensome, that +it would be easier to take a job to get the money. +You should be especially suspicious of grants whose purpose is some +kind of social engineering-- e.g. to encourage more startups to be +started in Mississippi. Free money to start a startup in a place +where few succeed is hardly free.Some government agencies run venture funding groups, which make +investments rather than giving grants. For example, the CIA runs +a venture fund called In-Q-Tel that is modelled on private sector +funds and apparently generates good returns. They would probably +be worth approaching—if you don't mind taking money from the CIA.[7] +Options have largely been replaced with restricted stock, which +amounts to the same thing. Instead of earning the right to buy +stock, the employee gets the stock up front, and earns the right +not to have to give it back. The shares set aside for this purpose +are still called the "option pool."[8] +First-rate technical people do not generally hire themselves +out to do due diligence for VCs. So the most difficult +part for startup founders is often responding politely to the inane +questions of the "expert" they send to look you over.[9] +VCs regularly wipe out angels by issuing arbitrary amounts of +new stock. They seem to have a standard piece of casuistry for +this situation: that the angels are no longer working to help the +company, and so don't deserve to keep their stock. This of course +reflects a willful misunderstanding of what investment means; like +any investor, the angel is being compensated for risks he took +earlier. By a similar logic, one could argue that the VCs should +be deprived of their shares when the company goes public.[10] +One new thing the company might encounter is a down +round, or a funding round at valuation lower than the previous +round. Down rounds are bad news; it is generally the common stock +holders who take the hit. Some of the most fearsome provisions in +VC deal terms have to do with down rounds—like "full ratchet +anti-dilution," which is as frightening as it sounds.Founders are tempted to ignore these clauses, because they think +the company will either be a big success or a complete bust. VCs +know otherwise: it's not uncommon for startups to have moments of +adversity before they ultimately succeed. So it's worth negotiating +anti-dilution provisions, even though you don't think you need to, +and VCs will try to make you feel that you're being gratuitously +troublesome.Thanks to Sam Altman, Hutch Fishman, Steve Huffman, Jessica +Livingston, Sesha Pratap, Stan Reiss, Andy Singleton, Zak Stone, +and Aaron Swartz for reading drafts of this. \ No newline at end of file diff --git a/data/PaulGrahamEssayMedium/startupideas.txt b/data/PaulGrahamEssayMedium/startupideas.txt new file mode 100644 index 0000000..66db403 --- /dev/null +++ b/data/PaulGrahamEssayMedium/startupideas.txt @@ -0,0 +1,610 @@ + + +Want to start a startup? Get funded by +Y Combinator. + + + + +November 2012The way to get startup ideas is not to try to think of startup +ideas. It's to look for problems, preferably problems you have +yourself.The very best startup ideas tend to have three things in common: +they're something the founders themselves want, that they themselves +can build, and that few others realize are worth doing. Microsoft, +Apple, Yahoo, Google, and Facebook all began this way. +ProblemsWhy is it so important to work on a problem you have? Among other +things, it ensures the problem really exists. It sounds obvious +to say you should only work on problems that exist. And yet by far +the most common mistake startups make is to solve problems no one +has.I made it myself. In 1995 I started a company to put art galleries +online. But galleries didn't want to be online. It's not how the +art business works. So why did I spend 6 months working on this +stupid idea? Because I didn't pay attention to users. I invented +a model of the world that didn't correspond to reality, and worked +from that. I didn't notice my model was wrong until I tried +to convince users to pay for what we'd built. Even then I took +embarrassingly long to catch on. I was attached to my model of the +world, and I'd spent a lot of time on the software. They had to +want it!Why do so many founders build things no one wants? Because they +begin by trying to think of startup ideas. That m.o. is doubly +dangerous: it doesn't merely yield few good ideas; it yields bad +ideas that sound plausible enough to fool you into working on them.At YC we call these "made-up" or "sitcom" startup ideas. Imagine +one of the characters on a TV show was starting a startup. The +writers would have to invent something for it to do. But coming +up with good startup ideas is hard. It's not something you can do +for the asking. So (unless they got amazingly lucky) the writers +would come up with an idea that sounded plausible, but was actually +bad.For example, a social network for pet owners. It doesn't sound +obviously mistaken. Millions of people have pets. Often they care +a lot about their pets and spend a lot of money on them. Surely +many of these people would like a site where they could talk to +other pet owners. Not all of them perhaps, but if just 2 or 3 +percent were regular visitors, you could have millions of users. +You could serve them targeted offers, and maybe charge for premium +features. +[1]The danger of an idea like this is that when you run it by your +friends with pets, they don't say "I would never use this." They +say "Yeah, maybe I could see using something like that." Even when +the startup launches, it will sound plausible to a lot of people. +They don't want to use it themselves, at least not right now, but +they could imagine other people wanting it. Sum that reaction +across the entire population, and you have zero users. +[2] +WellWhen a startup launches, there have to be at least some users who +really need what they're making — not just people who could see +themselves using it one day, but who want it urgently. Usually +this initial group of users is small, for the simple reason that +if there were something that large numbers of people urgently needed +and that could be built with the amount of effort a startup usually +puts into a version one, it would probably already exist. Which +means you have to compromise on one dimension: you can either build +something a large number of people want a small amount, or something +a small number of people want a large amount. Choose the latter. +Not all ideas of that type are good startup ideas, but nearly all +good startup ideas are of that type.Imagine a graph whose x axis represents all the people who might +want what you're making and whose y axis represents how much they +want it. If you invert the scale on the y axis, you can envision +companies as holes. Google is an immense crater: hundreds of +millions of people use it, and they need it a lot. A startup just +starting out can't expect to excavate that much volume. So you +have two choices about the shape of hole you start with. You can +either dig a hole that's broad but shallow, or one that's narrow +and deep, like a well.Made-up startup ideas are usually of the first type. Lots of people +are mildly interested in a social network for pet owners.Nearly all good startup ideas are of the second type. Microsoft +was a well when they made Altair Basic. There were only a couple +thousand Altair owners, but without this software they were programming +in machine language. Thirty years later Facebook had the same +shape. Their first site was exclusively for Harvard students, of +which there are only a few thousand, but those few thousand users +wanted it a lot.When you have an idea for a startup, ask yourself: who wants this +right now? Who wants this so much that they'll use it even when +it's a crappy version one made by a two-person startup they've never +heard of? If you can't answer that, the idea is probably bad. +[3]You don't need the narrowness of the well per se. It's depth you +need; you get narrowness as a byproduct of optimizing for depth +(and speed). But you almost always do get it. In practice the +link between depth and narrowness is so strong that it's a good +sign when you know that an idea will appeal strongly to a specific +group or type of user.But while demand shaped like a well is almost a necessary condition +for a good startup idea, it's not a sufficient one. If Mark +Zuckerberg had built something that could only ever have appealed +to Harvard students, it would not have been a good startup idea. +Facebook was a good idea because it started with a small market +there was a fast path out of. Colleges are similar enough that if +you build a facebook that works at Harvard, it will work at any +college. So you spread rapidly through all the colleges. Once you +have all the college students, you get everyone else simply by +letting them in.Similarly for Microsoft: Basic for the Altair; Basic for other +machines; other languages besides Basic; operating systems; +applications; IPO. +SelfHow do you tell whether there's a path out of an idea? How do you +tell whether something is the germ of a giant company, or just a +niche product? Often you can't. The founders of Airbnb didn't +realize at first how big a market they were tapping. Initially +they had a much narrower idea. They were going to let hosts rent +out space on their floors during conventions. They didn't foresee +the expansion of this idea; it forced itself upon them gradually. +All they knew at first is that they were onto something. That's +probably as much as Bill Gates or Mark Zuckerberg knew at first.Occasionally it's obvious from the beginning when there's a path +out of the initial niche. And sometimes I can see a path that's +not immediately obvious; that's one of our specialties at YC. But +there are limits to how well this can be done, no matter how much +experience you have. The most important thing to understand about +paths out of the initial idea is the meta-fact that these are hard +to see.So if you can't predict whether there's a path out of an idea, how +do you choose between ideas? The truth is disappointing but +interesting: if you're the right sort of person, you have the right +sort of hunches. If you're at the leading edge of a field that's +changing fast, when you have a hunch that something is worth doing, +you're more likely to be right.In Zen and the Art of Motorcycle Maintenance, Robert Pirsig says: + + You want to know how to paint a perfect painting? It's easy. Make + yourself perfect and then just paint naturally. + +I've wondered about that passage since I read it in high school. +I'm not sure how useful his advice is for painting specifically, +but it fits this situation well. Empirically, the way to have good +startup ideas is to become the sort of person who has them.Being at the leading edge of a field doesn't mean you have to be +one of the people pushing it forward. You can also be at the leading +edge as a user. It was not so much because he was a programmer +that Facebook seemed a good idea to Mark Zuckerberg as because he +used computers so much. If you'd asked most 40 year olds in 2004 +whether they'd like to publish their lives semi-publicly on the +Internet, they'd have been horrified at the idea. But Mark already +lived online; to him it seemed natural.Paul Buchheit says that people at the leading edge of a rapidly +changing field "live in the future." Combine that with Pirsig and +you get: + + Live in the future, then build what's missing. + +That describes the way many if not most of the biggest startups got +started. Neither Apple nor Yahoo nor Google nor Facebook were even +supposed to be companies at first. They grew out of things their +founders built because there seemed a gap in the world.If you look at the way successful founders have had their ideas, +it's generally the result of some external stimulus hitting a +prepared mind. Bill Gates and Paul Allen hear about the Altair and +think "I bet we could write a Basic interpreter for it." Drew Houston +realizes he's forgotten his USB stick and thinks "I really need to +make my files live online." Lots of people heard about the Altair. +Lots forgot USB sticks. The reason those stimuli caused those +founders to start companies was that their experiences had prepared +them to notice the opportunities they represented.The verb you want to be using with respect to startup ideas is not +"think up" but "notice." At YC we call ideas that grow naturally +out of the founders' own experiences "organic" startup ideas. The +most successful startups almost all begin this way.That may not have been what you wanted to hear. You may have +expected recipes for coming up with startup ideas, and instead I'm +telling you that the key is to have a mind that's prepared in the +right way. But disappointing though it may be, this is the truth. +And it is a recipe of a sort, just one that in the worst case takes +a year rather than a weekend.If you're not at the leading edge of some rapidly changing field, +you can get to one. For example, anyone reasonably smart can +probably get to an edge of programming (e.g. building mobile apps) +in a year. Since a successful startup will consume at least 3-5 +years of your life, a year's preparation would be a reasonable +investment. Especially if you're also looking for a cofounder. +[4]You don't have to learn programming to be at the leading edge of a +domain that's changing fast. Other domains change fast. But while +learning to hack is not necessary, it is for the forseeable future +sufficient. As Marc Andreessen put it, software is eating the world, +and this trend has decades left to run.Knowing how to hack also means that when you have ideas, you'll be +able to implement them. That's not absolutely necessary (Jeff Bezos +couldn't) but it's an advantage. It's a big advantage, when you're +considering an idea like putting a college facebook online, if +instead of merely thinking "That's an interesting idea," you can +think instead "That's an interesting idea. I'll try building an +initial version tonight." It's even better when you're both a +programmer and the target user, because then the cycle of generating +new versions and testing them on users can happen inside one head. +NoticingOnce you're living in the future in some respect, the way to notice +startup ideas is to look for things that seem to be missing. If +you're really at the leading edge of a rapidly changing field, there +will be things that are obviously missing. What won't be obvious +is that they're startup ideas. So if you want to find startup +ideas, don't merely turn on the filter "What's missing?" Also turn +off every other filter, particularly "Could this be a big company?" +There's plenty of time to apply that test later. But if you're +thinking about that initially, it may not only filter out lots +of good ideas, but also cause you to focus on bad ones.Most things that are missing will take some time to see. You almost +have to trick yourself into seeing the ideas around you.But you know the ideas are out there. This is not one of those +problems where there might not be an answer. It's impossibly +unlikely that this is the exact moment when technological progress +stops. You can be sure people are going to build things in the +next few years that will make you think "What did I do before x?"And when these problems get solved, they will probably seem flamingly +obvious in retrospect. What you need to do is turn off the filters +that usually prevent you from seeing them. The most powerful is +simply taking the current state of the world for granted. Even the +most radically open-minded of us mostly do that. You couldn't get +from your bed to the front door if you stopped to question everything.But if you're looking for startup ideas you can sacrifice some of +the efficiency of taking the status quo for granted and start to +question things. Why is your inbox overflowing? Because you get +a lot of email, or because it's hard to get email out of your inbox? +Why do you get so much email? What problems are people trying to +solve by sending you email? Are there better ways to solve them? +And why is it hard to get emails out of your inbox? Why do you +keep emails around after you've read them? Is an inbox the optimal +tool for that?Pay particular attention to things that chafe you. The advantage +of taking the status quo for granted is not just that it makes life +(locally) more efficient, but also that it makes life more tolerable. +If you knew about all the things we'll get in the next 50 years but +don't have yet, you'd find present day life pretty constraining, +just as someone from the present would if they were sent back 50 +years in a time machine. When something annoys you, it could be +because you're living in the future.When you find the right sort of problem, you should probably be +able to describe it as obvious, at least to you. When we started +Viaweb, all the online stores were built by hand, by web designers +making individual HTML pages. It was obvious to us as programmers +that these sites would have to be generated by software. +[5]Which means, strangely enough, that coming up with startup ideas +is a question of seeing the obvious. That suggests how weird this +process is: you're trying to see things that are obvious, and yet +that you hadn't seen.Since what you need to do here is loosen up your own mind, it may +be best not to make too much of a direct frontal attack on the +problem — i.e. to sit down and try to think of ideas. The best +plan may be just to keep a background process running, looking for +things that seem to be missing. Work on hard problems, driven +mainly by curiosity, but have a second self watching over your +shoulder, taking note of gaps and anomalies. +[6]Give yourself some time. You have a lot of control over the rate +at which you turn yours into a prepared mind, but you have less +control over the stimuli that spark ideas when they hit it. If +Bill Gates and Paul Allen had constrained themselves to come up +with a startup idea in one month, what if they'd chosen a month +before the Altair appeared? They probably would have worked on a +less promising idea. Drew Houston did work on a less promising +idea before Dropbox: an SAT prep startup. But Dropbox was a much +better idea, both in the absolute sense and also as a match for his +skills. +[7]A good way to trick yourself into noticing ideas is to work on +projects that seem like they'd be cool. If you do that, you'll +naturally tend to build things that are missing. It wouldn't seem +as interesting to build something that already existed.Just as trying to think up startup ideas tends to produce bad ones, +working on things that could be dismissed as "toys" often produces +good ones. When something is described as a toy, that means it has +everything an idea needs except being important. It's cool; users +love it; it just doesn't matter. But if you're living in the future +and you build something cool that users love, it may matter more +than outsiders think. Microcomputers seemed like toys when Apple +and Microsoft started working on them. I'm old enough to remember +that era; the usual term for people with their own microcomputers +was "hobbyists." BackRub seemed like an inconsequential science +project. The Facebook was just a way for undergrads to stalk one +another.At YC we're excited when we meet startups working on things that +we could imagine know-it-alls on forums dismissing as toys. To us +that's positive evidence an idea is good.If you can afford to take a long view (and arguably you can't afford +not to), you can turn "Live in the future and build what's missing" +into something even better: + + Live in the future and build what seems interesting. + +SchoolThat's what I'd advise college students to do, rather than trying +to learn about "entrepreneurship." "Entrepreneurship" is something +you learn best by doing it. The examples of the most successful +founders make that clear. What you should be spending your time +on in college is ratcheting yourself into the future. College is +an incomparable opportunity to do that. What a waste to sacrifice +an opportunity to solve the hard part of starting a startup — becoming +the sort of person who can have organic startup ideas — by +spending time learning about the easy part. Especially since +you won't even really learn about it, any more than you'd learn +about sex in a class. All you'll learn is the words for things.The clash of domains is a particularly fruitful source of ideas. +If you know a lot about programming and you start learning about +some other field, you'll probably see problems that software could +solve. In fact, you're doubly likely to find good problems in +another domain: (a) the inhabitants of that domain are not as likely +as software people to have already solved their problems with +software, and (b) since you come into the new domain totally ignorant, +you don't even know what the status quo is to take it for granted.So if you're a CS major and you want to start a startup, instead +of taking a class on entrepreneurship you're better off taking a +class on, say, genetics. Or better still, go work for a biotech +company. CS majors normally get summer jobs at computer hardware +or software companies. But if you want to find startup ideas, you +might do better to get a summer job in some unrelated field. +[8]Or don't take any extra classes, and just build things. It's no +coincidence that Microsoft and Facebook both got started in January. +At Harvard that is (or was) Reading Period, when students have no +classes to attend because they're supposed to be studying for finals. +[9]But don't feel like you have to build things that will become startups. That's +premature optimization. Just build things. Preferably with other +students. It's not just the classes that make a university such a +good place to crank oneself into the future. You're also surrounded +by other people trying to do the same thing. If you work together +with them on projects, you'll end up producing not just organic +ideas, but organic ideas with organic founding teams — and that, +empirically, is the best combination.Beware of research. If an undergrad writes something all his friends +start using, it's quite likely to represent a good startup idea. +Whereas a PhD dissertation is extremely unlikely to. For some +reason, the more a project has to count as research, the less likely +it is to be something that could be turned into a startup. +[10] +I think the reason is that the subset of ideas that count as research +is so narrow that it's unlikely that a project that satisfied that +constraint would also satisfy the orthogonal constraint of solving +users' problems. Whereas when students (or professors) build +something as a side-project, they automatically gravitate toward +solving users' problems — perhaps even with an additional energy +that comes from being freed from the constraints of research. +CompetitionBecause a good idea should seem obvious, when you have one you'll +tend to feel that you're late. Don't let that deter you. Worrying +that you're late is one of the signs of a good idea. Ten minutes +of searching the web will usually settle the question. Even if you +find someone else working on the same thing, you're probably not +too late. It's exceptionally rare for startups to be killed by +competitors — so rare that you can almost discount the possibility. +So unless you discover a competitor with the sort of lock-in that +would prevent users from choosing you, don't discard the idea.If you're uncertain, ask users. The question of whether you're too +late is subsumed by the question of whether anyone urgently needs +what you plan to make. If you have something that no competitor +does and that some subset of users urgently need, you have a +beachhead. +[11]The question then is whether that beachhead is big enough. Or more +importantly, who's in it: if the beachhead consists of people doing +something lots more people will be doing in the future, then it's +probably big enough no matter how small it is. For example, if +you're building something differentiated from competitors by the +fact that it works on phones, but it only works on the newest phones, +that's probably a big enough beachhead.Err on the side of doing things where you'll face competitors. +Inexperienced founders usually give competitors more credit than +they deserve. Whether you succeed depends far more on you than on +your competitors. So better a good idea with competitors than a +bad one without.You don't need to worry about entering a "crowded market" so long +as you have a thesis about what everyone else in it is overlooking. +In fact that's a very promising starting point. Google was that +type of idea. Your thesis has to be more precise than "we're going +to make an x that doesn't suck" though. You have to be able to +phrase it in terms of something the incumbents are overlooking. +Best of all is when you can say that they didn't have the courage +of their convictions, and that your plan is what they'd have done +if they'd followed through on their own insights. Google was that +type of idea too. The search engines that preceded them shied away +from the most radical implications of what they were doing — particularly +that the better a job they did, the faster users would +leave.A crowded market is actually a good sign, because it means both +that there's demand and that none of the existing solutions are +good enough. A startup can't hope to enter a market that's obviously +big and yet in which they have no competitors. So any startup that +succeeds is either going to be entering a market with existing +competitors, but armed with some secret weapon that will get them +all the users (like Google), or entering a market that looks small +but which will turn out to be big (like Microsoft). +[12] +FiltersThere are two more filters you'll need to turn off if you want to +notice startup ideas: the unsexy filter and the schlep filter.Most programmers wish they could start a startup by just writing +some brilliant code, pushing it to a server, and having users pay +them lots of money. They'd prefer not to deal with tedious problems +or get involved in messy ways with the real world. Which is a +reasonable preference, because such things slow you down. But this +preference is so widespread that the space of convenient startup +ideas has been stripped pretty clean. If you let your mind wander +a few blocks down the street to the messy, tedious ideas, you'll +find valuable ones just sitting there waiting to be implemented.The schlep filter is so dangerous that I wrote a separate essay +about the condition it induces, which I called +schlep blindness. +I gave Stripe as an example of a startup that benefited from turning +off this filter, and a pretty striking example it is. Thousands +of programmers were in a position to see this idea; thousands of +programmers knew how painful it was to process payments before +Stripe. But when they looked for startup ideas they didn't see +this one, because unconsciously they shrank from having to deal +with payments. And dealing with payments is a schlep for Stripe, +but not an intolerable one. In fact they might have had net less +pain; because the fear of dealing with payments kept most people +away from this idea, Stripe has had comparatively smooth sailing +in other areas that are sometimes painful, like user acquisition. +They didn't have to try very hard to make themselves heard by users, +because users were desperately waiting for what they were building.The unsexy filter is similar to the schlep filter, except it keeps +you from working on problems you despise rather than ones you fear. +We overcame this one to work on Viaweb. There were interesting +things about the architecture of our software, but we weren't +interested in ecommerce per se. We could see the problem was one +that needed to be solved though.Turning off the schlep filter is more important than turning off +the unsexy filter, because the schlep filter is more likely to be +an illusion. And even to the degree it isn't, it's a worse form +of self-indulgence. Starting a successful startup is going to be +fairly laborious no matter what. Even if the product doesn't entail +a lot of schleps, you'll still have plenty dealing with investors, +hiring and firing people, and so on. So if there's some idea you +think would be cool but you're kept away from by fear of the schleps +involved, don't worry: any sufficiently good idea will have as many.The unsexy filter, while still a source of error, is not as entirely +useless as the schlep filter. If you're at the leading edge of a +field that's changing rapidly, your ideas about what's sexy will +be somewhat correlated with what's valuable in practice. Particularly +as you get older and more experienced. Plus if you find an idea +sexy, you'll work on it more enthusiastically. +[13] +RecipesWhile the best way to discover startup ideas is to become the sort +of person who has them and then build whatever interests you, +sometimes you don't have that luxury. Sometimes you need an idea +now. For example, if you're working on a startup and your initial +idea turns out to be bad.For the rest of this essay I'll talk about tricks for coming up +with startup ideas on demand. Although empirically you're better +off using the organic strategy, you could succeed this way. You +just have to be more disciplined. When you use the organic method, +you don't even notice an idea unless it's evidence that something +is truly missing. But when you make a conscious effort to think +of startup ideas, you have to replace this natural constraint with +self-discipline. You'll see a lot more ideas, most of them bad, +so you need to be able to filter them.One of the biggest dangers of not using the organic method is the +example of the organic method. Organic ideas feel like inspirations. +There are a lot of stories about successful startups that began +when the founders had what seemed a crazy idea but "just knew" it +was promising. When you feel that about an idea you've had while +trying to come up with startup ideas, you're probably mistaken.When searching for ideas, look in areas where you have some expertise. +If you're a database expert, don't build a chat app for teenagers +(unless you're also a teenager). Maybe it's a good idea, but you +can't trust your judgment about that, so ignore it. There have to +be other ideas that involve databases, and whose quality you can +judge. Do you find it hard to come up with good ideas involving +databases? That's because your expertise raises your standards. +Your ideas about chat apps are just as bad, but you're giving +yourself a Dunning-Kruger pass in that domain.The place to start looking for ideas is things you need. There +must be things you need. +[14]One good trick is to ask yourself whether in your previous job you +ever found yourself saying "Why doesn't someone make x? If someone +made x we'd buy it in a second." If you can think of any x people +said that about, you probably have an idea. You know there's demand, +and people don't say that about things that are impossible to build.More generally, try asking yourself whether there's something unusual +about you that makes your needs different from most other people's. +You're probably not the only one. It's especially good if you're +different in a way people will increasingly be.If you're changing ideas, one unusual thing about you is the idea +you'd previously been working on. Did you discover any needs while +working on it? Several well-known startups began this way. Hotmail +began as something its founders wrote to talk about their previous +startup idea while they were working at their day jobs. +[15]A particularly promising way to be unusual is to be young. Some +of the most valuable new ideas take root first among people in their +teens and early twenties. And while young founders are at a +disadvantage in some respects, they're the only ones who really +understand their peers. It would have been very hard for someone +who wasn't a college student to start Facebook. So if you're a +young founder (under 23 say), are there things you and your friends +would like to do that current technology won't let you?The next best thing to an unmet need of your own is an unmet need +of someone else. Try talking to everyone you can about the gaps +they find in the world. What's missing? What would they like to +do that they can't? What's tedious or annoying, particularly in +their work? Let the conversation get general; don't be trying too +hard to find startup ideas. You're just looking for something to +spark a thought. Maybe you'll notice a problem they didn't consciously +realize they had, because you know how to solve it.When you find an unmet need that isn't your own, it may be somewhat +blurry at first. The person who needs something may not know exactly +what they need. In that case I often recommend that founders act +like consultants — that they do what they'd do if they'd been +retained to solve the problems of this one user. People's problems +are similar enough that nearly all the code you write this way will +be reusable, and whatever isn't will be a small price to start out +certain that you've reached the bottom of the well. +[16]One way to ensure you do a good job solving other people's problems +is to make them your own. When Rajat Suri of E la Carte decided +to write software for restaurants, he got a job as a waiter to learn +how restaurants worked. That may seem like taking things to extremes, +but startups are extreme. We love it when founders do such things.In fact, one strategy I recommend to people who need a new idea is +not merely to turn off their schlep and unsexy filters, but to seek +out ideas that are unsexy or involve schleps. Don't try to start +Twitter. Those ideas are so rare that you can't find them by looking +for them. Make something unsexy that people will pay you for.A good trick for bypassing the schlep and to some extent the unsexy +filter is to ask what you wish someone else would build, so that +you could use it. What would you pay for right now?Since startups often garbage-collect broken companies and industries, +it can be a good trick to look for those that are dying, or deserve +to, and try to imagine what kind of company would profit from their +demise. For example, journalism is in free fall at the moment. +But there may still be money to be made from something like journalism. +What sort of company might cause people in the future to say "this +replaced journalism" on some axis?But imagine asking that in the future, not now. When one company +or industry replaces another, it usually comes in from the side. +So don't look for a replacement for x; look for something that +people will later say turned out to be a replacement for x. And +be imaginative about the axis along which the replacement occurs. +Traditional journalism, for example, is a way for readers to get +information and to kill time, a way for writers to make money and +to get attention, and a vehicle for several different types of +advertising. It could be replaced on any of these axes (it has +already started to be on most).When startups consume incumbents, they usually start by serving +some small but important market that the big players ignore. It's +particularly good if there's an admixture of disdain in the big +players' attitude, because that often misleads them. For example, +after Steve Wozniak built the computer that became the Apple I, he +felt obliged to give his then-employer Hewlett-Packard the option +to produce it. Fortunately for him, they turned it down, and one +of the reasons they did was that it used a TV for a monitor, which +seemed intolerably déclassé to a high-end hardware company like HP +was at the time. +[17]Are there groups of +scruffy +but sophisticated users like the early +microcomputer "hobbyists" that are currently being ignored by the +big players? A startup with its sights set on bigger things can +often capture a small market easily by expending an effort that +wouldn't be justified by that market alone.Similarly, since the most successful startups generally ride some +wave bigger than themselves, it could be a good trick to look for +waves and ask how one could benefit from them. The prices of gene +sequencing and 3D printing are both experiencing Moore's Law-like +declines. What new things will we be able to do in the new world +we'll have in a few years? What are we unconsciously ruling out +as impossible that will soon be possible? +OrganicBut talking about looking explicitly for waves makes it clear that +such recipes are plan B for getting startup ideas. Looking for +waves is essentially a way to simulate the organic method. If +you're at the leading edge of some rapidly changing field, you don't +have to look for waves; you are the wave.Finding startup ideas is a subtle business, and that's why most +people who try fail so miserably. It doesn't work well simply to +try to think of startup ideas. If you do that, you get bad ones +that sound dangerously plausible. The best approach is more indirect: +if you have the right sort of background, good startup ideas will +seem obvious to you. But even then, not immediately. It takes +time to come across situations where you notice something missing. +And often these gaps won't seem to be ideas for companies, just +things that would be interesting to build. Which is why it's good +to have the time and the inclination to build things just because +they're interesting.Live in the future and build what seems interesting. Strange as +it sounds, that's the real recipe. +Notes[1] +This form of bad idea has been around as long as the web. It +was common in the 1990s, except then people who had it used to say +they were going to create a portal for x instead of a social network +for x. Structurally the idea is stone soup: you post a sign saying +"this is the place for people interested in x," and all those people +show up and you make money from them. What lures founders into +this sort of idea are statistics about the millions of people who +might be interested in each type of x. What they forget is that +any given person might have 20 affinities by this standard, and no +one is going to visit 20 different communities regularly.[2] +I'm not saying, incidentally, that I know for sure a social +network for pet owners is a bad idea. I know it's a bad idea the +way I know randomly generated DNA would not produce a viable organism. +The set of plausible sounding startup ideas is many times larger +than the set of good ones, and many of the good ones don't even +sound that plausible. So if all you know about a startup idea is +that it sounds plausible, you have to assume it's bad.[3] +More precisely, the users' need has to give them sufficient +activation energy to start using whatever you make, which can vary +a lot. For example, the activation energy for enterprise software +sold through traditional channels is very high, so you'd have to +be a lot better to get users to switch. Whereas the activation +energy required to switch to a new search engine is low. Which in +turn is why search engines are so much better than enterprise +software.[4] +This gets harder as you get older. While the space of ideas +doesn't have dangerous local maxima, the space of careers does. +There are fairly high walls between most of the paths people take +through life, and the older you get, the higher the walls become.[5] +It was also obvious to us that the web was going to be a big +deal. Few non-programmers grasped that in 1995, but the programmers +had seen what GUIs had done for desktop computers.[6] +Maybe it would work to have this second self keep a journal, +and each night to make a brief entry listing the gaps and anomalies +you'd noticed that day. Not startup ideas, just the raw gaps and +anomalies.[7] +Sam Altman points out that taking time to come up with an +idea is not merely a better strategy in an absolute sense, but also +like an undervalued stock in that so few founders do it.There's comparatively little competition for the best ideas, because +few founders are willing to put in the time required to notice them. +Whereas there is a great deal of competition for mediocre ideas, +because when people make up startup ideas, they tend to make up the +same ones.[8] +For the computer hardware and software companies, summer jobs +are the first phase of the recruiting funnel. But if you're good +you can skip the first phase. If you're good you'll have no trouble +getting hired by these companies when you graduate, regardless of +how you spent your summers.[9] +The empirical evidence suggests that if colleges want to help +their students start startups, the best thing they can do is leave +them alone in the right way.[10] +I'm speaking here of IT startups; in biotech things are different.[11] +This is an instance of a more general rule: focus on users, +not competitors. The most important information about competitors +is what you learn via users anyway.[12] +In practice most successful startups have elements of both. +And you can describe each strategy in terms of the other by adjusting +the boundaries of what you call the market. But it's useful to +consider these two ideas separately.[13] +I almost hesitate to raise that point though. Startups are +businesses; the point of a business is to make money; and with that +additional constraint, you can't expect you'll be able to spend all +your time working on what interests you most.[14] +The need has to be a strong one. You can retroactively +describe any made-up idea as something you need. But do you really +need that recipe site or local event aggregator as much as Drew +Houston needed Dropbox, or Brian Chesky and Joe Gebbia needed Airbnb?Quite often at YC I find myself asking founders "Would you use this +thing yourself, if you hadn't written it?" and you'd be surprised +how often the answer is no.[15] +Paul Buchheit points out that trying to sell something bad +can be a source of better ideas:"The best technique I've found for dealing with YC companies that +have bad ideas is to tell them to go sell the product ASAP (before +wasting time building it). Not only do they learn that nobody +wants what they are building, they very often come back with a +real idea that they discovered in the process of trying to sell +the bad idea."[16] +Here's a recipe that might produce the next Facebook, if +you're college students. If you have a connection to one of the +more powerful sororities at your school, approach the queen bees +thereof and offer to be their personal IT consultants, building +anything they could imagine needing in their social lives that +didn't already exist. Anything that got built this way would be +very promising, because such users are not just the most demanding +but also the perfect point to spread from.I have no idea whether this would work.[17] +And the reason it used a TV for a monitor is that Steve Wozniak +started out by solving his own problems. He, like most of his +peers, couldn't afford a monitor.Thanks to Sam Altman, Mike Arrington, Paul Buchheit, John Collison, +Patrick Collison, Garry Tan, and Harj Taggar for reading drafts of +this, and Marc Andreessen, Joe Gebbia, Reid Hoffman, Shel Kaphan, +Mike Moritz and Kevin Systrom for answering my questions about +startup history. \ No newline at end of file diff --git a/data/PaulGrahamEssayMedium/wealth.txt b/data/PaulGrahamEssayMedium/wealth.txt new file mode 100644 index 0000000..0858219 --- /dev/null +++ b/data/PaulGrahamEssayMedium/wealth.txt @@ -0,0 +1,874 @@ + + +Want to start a startup? Get funded by +Y Combinator. + + + + +May 2004 +(This essay was originally published in Hackers +& Painters.) +If you wanted to get rich, how would you do it? I think your best +bet would be to start or join a startup. That's been a +reliable way to get rich for hundreds of years. The word "startup" +dates from the 1960s, but what happens in one is +very similar to the venture-backed trading voyages of the +Middle Ages.Startups usually involve technology, so much so that the phrase +"high-tech startup" is almost redundant. A startup is a small +company that takes on a hard technical problem.Lots of people get rich knowing nothing more than that. +You don't have to know physics to be a good pitcher. But +I think it could give you an edge to understand the underlying principles. +Why do startups have to be small? +Will a startup inevitably stop being a startup as it +grows larger? +And why do they so often work on +developing new technology? Why are there so many startups +selling new drugs or computer software, and none selling corn oil +or laundry detergent?The PropositionEconomically, you can think of a startup as a way to +compress your whole working life into a few years. Instead +of working at a low intensity for forty years, you work as +hard as you possibly can for four. This pays especially well +in technology, where you earn a premium for working fast.Here is a brief sketch of the economic proposition. If you're +a good hacker in your mid twenties, you can +get a job paying about $80,000 per year. So on average +such a hacker must be +able to do at least $80,000 worth of work per year for the +company just to break even. You could probably +work twice as many hours as a corporate employee, and if +you focus you can probably get three times as much done in +an hour. +[1] +You should get another multiple of two, at +least, by eliminating the drag +of the pointy-haired middle +manager who would be your boss in a big company. +Then there is one more multiple: how much smarter are you +than your job description expects you to be? +Suppose another multiple of three. Combine all these multipliers, and I'm +claiming you could be 36 times more +productive than you're expected to be in a random corporate +job. +[2] + If a fairly good hacker is worth $80,000 a year at a +big company, then a smart +hacker working very hard without any corporate +bullshit to slow him down should be able to do work worth about +$3 million a year.Like all back-of-the-envelope calculations, this one +has a lot of wiggle room. I wouldn't try to +defend the actual numbers. But I stand by the +structure of the calculation. I'm not claiming +the multiplier is precisely 36, but it is certainly more +than 10, and probably rarely as high as 100.If $3 million a year seems +high, remember that we're talking about the limit case: +the case where you not only have zero leisure time +but indeed work so hard that you endanger your health.Startups are not magic. They don't change the laws of +wealth creation. They just represent a point at the far end of the curve. +There is a conservation law at work here: if +you want to make a million dollars, you have to endure a +million dollars' worth of pain. +For example, one way to +make a million dollars would be to work for the +Post Office your whole life, and save every penny of your +salary. Imagine the stress of working for the Post +Office for fifty years. In a startup you compress all +this stress into three or four years. You do tend to get a +certain +bulk discount if you buy the economy-size pain, +but you can't evade the fundamental conservation law. +If starting a startup were easy, everyone would do it.Millions, not BillionsIf $3 million a year seems high to some people, it will seem +low to others. Three million? +How do I get to be a billionaire, like Bill Gates?So let's get Bill Gates out of the way right now. It's not +a good idea to use famous rich people +as examples, because the press only +write about the very richest, and these tend to be outliers. +Bill Gates is a smart, determined, and hardworking man, +but you need more than +that to make as much money as he has. You also need to be +very lucky.There is a large random +factor in the success of any company. So the guys you end +up reading about in the papers are the ones who are very +smart, totally dedicated, and win the lottery. +Certainly Bill is smart and dedicated, but Microsoft also +happens to have been the beneficiary of one of the most spectacular +blunders in the history of business: the licensing deal for +DOS. No doubt Bill did +everything he could to steer IBM into making that blunder, +and he has done an excellent job of exploiting it, but if +there had been one person with a brain on IBM's side, +Microsoft's future would have been very different. +Microsoft at that stage had little leverage over IBM. +They were effectively a component supplier. If IBM had +required an exclusive license, as they should have, Microsoft +would still have signed the deal. It would still have +meant a lot of money for them, and IBM +could easily have gotten an operating system elsewhere.Instead IBM ended up using all its power in the market +to give Microsoft control of the PC standard. From +that point, all Microsoft had to do was execute. They +never had to bet the company on a bold decision. All they +had to do was play hardball with licensees and copy more +innovative products reasonably promptly.If IBM hadn't made this mistake, Microsoft would +still have been a successful company, but it +could not have grown so big so fast. +Bill Gates would be rich, but he'd be somewhere +near the bottom of the Forbes 400 with the other guys his age.There are a lot of ways to get +rich, and this essay is about only one of them. This +essay is about how to make money by creating wealth and +getting paid for it. There are plenty of other ways to +get money, including chance, speculation, marriage, inheritance, +theft, extortion, fraud, monopoly, +graft, lobbying, +counterfeiting, and prospecting. Most of the greatest fortunes +have probably involved several of these.The advantage of creating wealth, as a way to get rich, +is not just that it's more legitimate +(many of the other methods are now illegal) +but that it's more +straightforward. You just have to do something people want.Money Is Not WealthIf you want to create wealth, it will help to understand what it is. +Wealth is not the same thing as money. +[3] + Wealth is as old as +human history. Far older, in fact; ants have wealth. +Money is a comparatively recent invention.Wealth is the fundamental thing. Wealth is stuff we want: food, +clothes, houses, cars, gadgets, travel to interesting places, +and so on. You can have wealth without +having money. If you had a magic machine that +could on command make you a car or cook you dinner or do your +laundry, or do anything else you wanted, you wouldn't need money. +Whereas if you were in the middle of Antarctica, where there is +nothing to buy, it wouldn't matter how much money you had.Wealth is what you want, not money. But if wealth is the important +thing, why does everyone talk about making money? It is +a kind of shorthand: money is a way of moving wealth, and in practice +they are usually interchangeable. But they are not the same thing, +and unless you plan to get rich by counterfeiting, talking about +making money can make it harder to understand how to +make money.Money is a side effect of specialization. +In a specialized society, most of the +things you need, you can't make for yourself. If you want a potato +or a pencil or a place to live, you have to get it from someone +else.How do you get the person who grows the potatoes to give you some? +By giving him something he wants in return. But you can't get +very far by trading things directly with the people who +need them. If you make violins, and none of the local +farmers wants one, how will you eat?The solution societies find, as they get more specialized, is to +make the trade into a two-step process. Instead of trading violins +directly for potatoes, you trade violins for, say, silver, +which you can then trade again for anything else you need. The +intermediate stuff-- the medium of exchange-- can be anything that's +rare and portable. Historically metals have been the most common, +but recently we've been using a medium of exchange, called the dollar, +that doesn't physically exist. It works as a medium of exchange, +however, because its rarity +is guaranteed by the U.S. Government.The advantage of a medium of exchange is that it makes trade work. +The disadvantage is that it tends to obscure what trade really +means. People think that what a business does is make money. +But money is just the intermediate stage-- just +a shorthand-- for whatever people want. +What most businesses really do is make +wealth. They do something people want. +[4]The Pie FallacyA surprising number of people retain from childhood the idea +that there is a fixed amount of wealth in the world. +There is, in any normal family, a fixed amount of money at +any moment. But that's not the same thing.When wealth is talked about in this context, it is often +described as a pie. "You can't make the pie larger," +say politicians. +When you're +talking about the amount of money in one family's bank +account, or the amount available to a government from one +year's tax revenue, this is true. +If one person gets more, someone else has to get less.I can remember believing, as a child, that if a few +rich people had all the money, it left less for everyone else. +Many people seem to continue to believe something like this +well into adulthood. This fallacy is usually there in the +background when you hear someone talking about how x percent +of the population have y percent of the wealth. If you plan +to start a startup, then whether you realize it or not, you're +planning to disprove the Pie Fallacy.What leads people astray here is the abstraction of +money. Money is not wealth. It's +just something we use to move wealth around. +So although there may be, in certain specific moments (like +your family, this month) a fixed amount of money available to +trade with other people for things you want, +there is not a fixed amount of wealth in the world. +You can make more wealth. Wealth has been getting created and +destroyed (but on balance, created) for all of human history.Suppose you own a beat-up old car. +Instead of sitting on your butt next +summer, you could spend the time restoring your car to pristine condition. +In doing so you create wealth. The world is-- and +you specifically are-- one pristine old car the richer. And not +just in some metaphorical way. If you sell your car, +you'll get more for it.In restoring your old car you have made yourself +richer. You haven't made anyone else poorer. So there is +obviously not a fixed pie. And in fact, when you look at +it this way, you wonder why anyone would think there was. +[5]Kids know, without knowing they know, that they can create +wealth. If you need to give someone a present and don't +have any money, you make one. But kids are so bad at making +things that they consider home-made presents to be a distinct, +inferior, sort of thing to store-bought ones-- a mere expression +of the proverbial thought that counts. +And indeed, the lumpy ashtrays +we made for our parents did not have much of a resale market.CraftsmenThe people most likely to grasp that wealth can be +created are the ones who are good at making things, the craftsmen. +Their hand-made objects become store-bought ones. +But with the rise of industrialization there are fewer and +fewer craftsmen. One of the biggest remaining groups is +computer programmers.A programmer can sit down in front of a computer and +create wealth. A good piece of software is, in itself, +a valuable thing. +There is no manufacturing to confuse the issue. Those +characters you type +are a complete, finished product. +If someone sat down and wrote a web +browser that didn't suck (a fine idea, by the way), the world +would be that much richer. +[5b]Everyone in a company works together to create +wealth, in the sense of making more things people want. +Many of the employees (e.g. the people in the mailroom or +the personnel department) work at one remove from the +actual making of stuff. Not the programmers. They +literally think the product, one line at a time. +And so it's clearer to programmers that wealth is something +that's made, rather than being distributed, like slices of a +pie, by some imaginary Daddy.It's also obvious to programmers that there are huge variations +in the rate at which wealth is created. At Viaweb we had one +programmer who was a sort of monster of productivity. +I remember watching what he did one long day and estimating that +he had added several hundred thousand dollars +to the market value of the company. +A great programmer, on a roll, could +create a million dollars worth of wealth in a couple weeks. +A mediocre programmer over the same period will generate zero or +even negative wealth (e.g. by introducing bugs).This is +why so many of the best programmers are libertarians. +In our world, you sink or swim, and there are no excuses. +When those far removed from the creation of wealth-- undergraduates, +reporters, politicians-- hear +that the richest 5% of the people have +half the total wealth, they tend to think injustice! +An experienced programmer would be more likely to think +is that all? The top 5% of programmers +probably write 99% of the good software.Wealth can be created without being sold. Scientists, till +recently at least, effectively donated the wealth they +created. We are all richer for knowing about penicillin, +because we're less likely to die from infections. Wealth +is whatever people want, and not dying is certainly something +we want. Hackers often donate their work by +writing open source software that anyone can use for free. +I am much the richer for the operating system +FreeBSD, which I'm running on the computer I'm using now, +and so is Yahoo, which runs it on all their servers.What a Job IsIn industrialized countries, people belong to one institution or +another at least until their twenties. After all those years you get +used to the idea of belonging to a group of people who all get up +in the morning, go to some set of buildings, and do things that they +do not, ordinarily, enjoy doing. Belonging to such a group becomes +part of your identity: name, age, role, institution. +If you have to introduce yourself, or +someone else describes you, it will be as something like, John +Smith, age 10, a student at such and such elementary school, or +John Smith, age 20, a student at such and such college.When John Smith finishes school he is expected to get a job. And +what getting a job seems to mean is joining another institution. +Superficially it's a lot like college. You pick the companies you +want to work for and apply to join them. If one likes you, you +become a member of this new group. You get up in the morning and +go to a new set of buildings, and do things that you do not, ordinarily, +enjoy doing. There are a few differences: life is not as much fun, +and you get paid, instead of paying, as you did in college. But +the similarities feel greater than the differences. John Smith is +now John Smith, 22, a software developer at such and such corporation.In fact John Smith's +life has changed more than he realizes. Socially, a company +looks much like college, but the deeper you go into the +underlying reality, the more different it gets.What a company does, and has to do if it wants to continue to +exist, is earn money. And the way most companies make money +is by creating wealth. Companies can be so specialized that this +similarity is concealed, but it is not only manufacturing +companies that create wealth. A big component of wealth is +location. +Remember that magic machine that could +make you cars and cook you dinner and so on? It would not be +so useful if it delivered your dinner to a random location +in central Asia. +If wealth means what people want, companies that move +things also create wealth. Ditto for +many other kinds of companies that don't make anything +physical. Nearly all companies exist to do something people +want.And that's what you do, as well, when you go to work for a company. +But here there is another layer that tends to obscure the underlying +reality. In a company, the work you do is averaged together with +a lot of other people's. +You may not even be aware you're doing something people +want. Your contribution may be indirect. But the company as a +whole must be giving people something they want, or they won't make +any money. And if they are paying you x dollars a year, then on +average you must be contributing at least x dollars a year worth +of work, or the company will be spending more than it makes, +and will go out of business.Someone graduating from college thinks, and is told, that he needs +to get a job, as if the important thing were becoming a member of +an institution. A more direct way to put it would be: you need to +start doing something people want. You don't +need to +join a company to do that. All a company is is a group of people +working together to do something people want. It's doing something people +want that matters, not joining the group. +[6]For most people the +best plan probably is to go to work for some existing +company. But it is a good idea to understand what's happening +when you do this. A job means doing something people want, +averaged together with everyone else in that company.Working HarderThat averaging gets to be a problem. +I think the single biggest problem afflicting large companies is the +difficulty of assigning a value to each person's work. +For the most part they punt. In a +big company you get paid a fairly predictable salary for working +fairly hard. You're expected not to be obviously incompetent or +lazy, but you're not expected to devote your whole life to your +work.It turns out, though, that there are economies of scale in how much of your +life you devote to your work. In the right kind of business, +someone who really devoted himself to work could generate ten or +even a hundred times as much wealth as an average +employee. A programmer, for example, instead of chugging along +maintaining and updating an existing piece of software, could write +a whole new piece of software, and with it create a new source of +revenue.Companies are not set up to reward people who want to do this. +You can't go to your boss and say, I'd like to start working ten +times as hard, so will you please pay me ten times as much? For +one thing, the official fiction is that you are already working as +hard as you can. But a more serious problem is that the company +has no way of measuring the value of your work.Salesmen are an exception. It's easy +to measure how much revenue they generate, and they're +usually paid a percentage of it. If a salesman wants to work harder, +he can just start doing it, and he will automatically +get paid proportionally more.There is one other job besides sales where big companies can +hire first-rate people: in the top management jobs. +And for the same reason: their performance can +be measured. The top managers are +held responsible for the performance of the entire company. +Because an ordinary employee's performance can't usually +be measured, he is not expected to do +more than put in a solid effort. Whereas top management, like +salespeople, have to actually come up with the numbers. +The CEO of a company that tanks cannot plead that he put in +a solid effort. If the company does badly, he's done badly.A company that could pay all its employees so straightforwardly +would be enormously successful. Many employees would work harder +if they could get paid for it. More importantly, +such a company would attract people who wanted to work +especially hard. +It would crush its competitors.Unfortunately, companies can't pay everyone like salesmen. Salesmen +work alone. Most employees' work is tangled together. Suppose +a company makes some kind of consumer gadget. The +engineers build a reliable gadget with all kinds of new features; +the industrial designers design a beautiful case for it; and then +the marketing people convince everyone that +it's something they've got to have. How do you know how much of the +gadget's sales are due to each group's efforts? Or, for that +matter, how much is due to the creators of past gadgets that gave +the company a reputation for quality? There's no way to +untangle all their contributions. Even if you could read the minds +of the consumers, you'd find these factors were all blurred together.If you want to go faster, it's a problem to have your work +tangled together with a large number of other people's. In a +large group, your performance is not separately measurable-- and +the rest of the group slows you down.Measurement and LeverageTo get rich you need to get yourself in a situation with two +things, measurement and leverage. You need to be in a +position where your performance can be measured, or there is +no way to get paid more by doing more. And you have to +have leverage, in the sense that the decisions you make have +a big effect.Measurement alone is not enough. An example of a job with +measurement but not leverage is doing piecework in a +sweatshop. Your performance is measured and you get paid +accordingly, but you have no scope for decisions. The only +decision you get to make is how fast you work, and that +can probably only increase your earnings by a factor +of two or three.An example of a job with both measurement and leverage would +be lead actor in a movie. Your performance can be measured in the +gross of the movie. And you have leverage in the sense that your +performance can make or break it.CEOs also have both measurement and leverage. They're measured, +in that the performance of the company is their performance. +And they have leverage in that their decisions +set the whole company moving in one direction or another.I think everyone who gets rich by their own efforts will be +found to be in a situation with measurement and leverage. +Everyone I can think of does: CEOs, movie stars, +hedge fund managers, professional athletes. A good hint to the +presence of leverage is the possibility of failure. +Upside must be balanced by downside, so if there is +big potential for gain there must also be a terrifying +possibility of loss. CEOs, stars, fund managers, and athletes +all live with the sword hanging over their heads; +the moment they start to suck, they're out. If you're in +a job that feels safe, you are not going to get rich, +because if there is no danger there is almost certainly no leverage.But you don't have to become a CEO or a movie star to +be in a situation with measurement and leverage. All you +need to do is be part of a small group working on a +hard problem.Smallness = MeasurementIf you can't measure the value of the work done by individual +employees, you can get close. You can measure the value +of the work done by small groups.One level at which you can accurately measure the revenue +generated by employees is at the level of the whole company. +When the company is small, you are thereby fairly close to +measuring the contributions of individual employees. A viable +startup might only have ten employees, which puts you within a +factor of ten of measuring individual effort.Starting or joining a startup is thus as close as most +people can get to saying to one's boss, I want to work ten times +as hard, so please pay me ten times as much. There are two +differences: you're not saying it to your boss, but directly to the +customers (for whom your boss is only a proxy after all), and +you're not doing it individually, but along with a small group +of other ambitious people.It will, ordinarily, be a group. Except in a few unusual kinds +of work, like acting or writing books, you can't be a company +of one person. +And the people you work with had better be good, because it's their work that +yours is going to be averaged with.A big company is like a giant galley driven by a thousand rowers. +Two things keep the speed of the +galley down. One is that individual rowers don't see any +result from working harder. +The other is that, in a group of a +thousand people, the average rower is likely to be +pretty average.If you took ten people at random out of the big galley and +put them in a boat by themselves, they could probably go +faster. They would have both carrot and stick to motivate +them. An energetic rower would be encouraged by the thought +that he could have a visible effect on the speed of +the boat. And if someone was lazy, the others would be more likely +to notice and complain.But the real advantage of the ten-man boat shows when +you take the ten best rowers out of the big galley +and put them in a boat together. They will have all +the extra motivation that comes from being in a small group. +But more importantly, by selecting that small a group +you can get the best rowers. Each one will be in +the top 1%. It's a much better deal for them to average +their work together with a small group of their peers than to +average it with everyone.That's the real point of startups. Ideally, you are getting +together with a group of other people who also want to work +a lot harder, and get paid a lot more, than they would in +a big company. And because startups tend to get founded +by self-selecting groups of ambitious people who already +know one another (at least by reputation), the level of +measurement is more precise than you get from smallness alone. +A startup is not merely ten people, but ten people like you.Steve Jobs once said that the success or failure of a startup +depends on the first ten employees. I agree. If +anything, it's more like the first five. +Being small is not, in itself, what makes startups kick butt, +but rather that small groups can be select. +You don't want small in the sense of a +village, but small in the sense of an all-star team.The larger a group, the closer its average member will be to the average +for the population as a whole. So all other things being +equal, a very able person in a big company is probably +getting a bad deal, because his performance is dragged down by +the overall lower performance of the others. Of course, +all other things often are not equal: the able person may +not care about money, or may prefer the stability of a large +company. But a very able person who does care about money +will ordinarily do better to go off and work with a small +group of peers.Technology = LeverageStartups offer anyone a way to be in a situation with +measurement and leverage. +They allow measurement because they're small, +and they offer leverage because they +make money by inventing new technology.What is technology? It's technique. It's the way +we all do things. And when +you discover a new way to do things, its value is multiplied +by all the people who use it. It is the proverbial fishing +rod, rather than the fish. That's the difference between a +startup and a restaurant or a barber shop. You fry eggs or cut +hair one customer at a time. Whereas if +you solve a technical problem that a lot of people care about, +you help everyone who uses your solution. +That's leverage.If you look at history, it seems that most people +who got rich by creating wealth did it by developing +new technology. You just can't fry eggs or cut hair fast enough. +What made the Florentines rich in 1200 +was the discovery of new techniques for making the high-tech +product of the time, fine woven cloth. What made the +Dutch rich in 1600 was the discovery of shipbuilding and +navigation techniques that enabled them to dominate the seas +of the Far East.Fortunately there is a natural fit between smallness and +solving hard problems. The leading edge of technology moves +fast. Technology that's valuable today could be worthless +in a couple years. Small companies are more at home in this +world, because they don't have layers of bureaucracy to +slow them down. +Also, technical advances tend to come from unorthodox approaches, +and small companies are less constrained by convention.Big companies can develop technology. They just can't do it +quickly. Their size makes them slow and prevents +them from rewarding employees for the extraordinary +effort required. So in practice big companies only get to develop +technology in fields where large capital requirements prevent startups from +competing with them, like microprocessors, power plants, +or passenger aircraft. And even in those fields they depend heavily +on startups for components and ideas.It's obvious that biotech or software startups exist to solve +hard technical problems, but +I think it will also be found to be true +in businesses that don't seem to be about technology. McDonald's, +for example, grew big by designing a system, the McDonald's +franchise, that could then be reproduced at will all over the +face of the earth. A McDonald's franchise is controlled by rules +so precise that it is practically +a piece of software. Write once, run everywhere. +Ditto for Wal-Mart. Sam Walton got rich not by being a +retailer, but by designing a new kind of store.Use difficulty as a guide not just in selecting the overall +aim of your company, but also at decision points along the way. +At Viaweb one of our rules of thumb was run upstairs. +Suppose you are a little, nimble guy being chased by a big, +fat, bully. You open a door and find yourself in a +staircase. Do you go up or down? I say up. The +bully can probably run downstairs as fast as you can. +Going upstairs his bulk will be more of a disadvantage. +Running upstairs is hard for you but even harder for him.What this meant in practice was that we deliberately sought +hard problems. If there were two features we could add to our +software, both equally valuable in proportion to their difficulty, +we'd always take the harder one. Not just because it was +more valuable, but because it was harder. +We delighted in forcing bigger, slower competitors +to follow us over difficult ground. +Like guerillas, startups prefer the difficult terrain of the +mountains, where the troops of the central government +can't follow. I can remember times when we were just +exhausted after wrestling all day with some horrible technical +problem. And I'd be delighted, because something that was +hard for us would be impossible for our competitors.This is not just a good way to run a startup. It's what +a startup is. +Venture capitalists know about this and have a phrase for it: +barriers to entry. If you go to a VC with a new +idea and ask him to invest in it, one of the first things +he'll ask is, how hard would this be for someone else to +develop? That is, how much difficult ground +have you put between yourself and potential pursuers? +[7] +And you had better have a convincing explanation of why +your technology would be hard to duplicate. Otherwise as +soon as some big company becomes aware of it, they'll make +their own, and with their brand name, capital, and +distribution clout, they'll take away your market overnight. +You'd be like guerillas caught in the open field by regular +army forces.One way to put up barriers to entry is through patents. +But patents may not provide much protection. +Competitors commonly find ways to work around a patent. +And if they can't, they +may simply violate it and invite you to sue them. +A big company is not afraid to be sued; it's an everyday thing +for them. They'll make sure that suing them is expensive and +takes a long time. +Ever heard of Philo Farnsworth? He invented +television. The reason you've never +heard of him is that his company was not the one to make +money from it. +[8] +The company that did was RCA, and +Farnsworth's reward for his efforts was a decade of +patent litigation.Here, as so often, the best defense is a good offense. If +you can develop technology that's simply too hard for +competitors to duplicate, you don't need to rely on other +defenses. Start by picking a hard problem, and +then at every decision point, take the harder choice. +[9]The Catch(es)If it were simply a matter of working harder than +an ordinary employee and getting paid proportionately, it would +obviously be a good deal to start a startup. Up to a point it +would be more fun. I don't think many people +like the slow pace of big companies, the interminable meetings, +the water-cooler conversations, the clueless middle managers, +and so on.Unfortunately there are a couple catches. One is that you +can't choose the point on the curve that you want to inhabit. +You can't decide, for example, that you'd like to work just +two or three times as hard, and get paid that much more. When +you're running a startup, your competitors decide how +hard you work. And they pretty much all make the same decision: +as hard as you possibly can.The other catch is that the payoff is only on average proportionate +to your productivity. There is, as I said before, a large +random multiplier in the success of any company. So in +practice the deal is not that you're 30 times as productive and get +paid 30 times as much. It is that you're 30 times as productive, +and get paid between zero and a thousand times as much. +If the mean is 30x, the median is probably zero. +Most startups tank, and not just the dogfood +portals we all heard about during +the Internet Bubble. It's common for a startup +to be developing a genuinely good product, take slightly +too long to do it, run out of money, and have to shut down.A startup is like a mosquito. A bear can absorb a hit and a crab +is armored against one, but a mosquito is designed for one thing: +to score. No energy is wasted on defense. The defense of mosquitos, +as a species, is that there are a lot of them, but this is little +consolation to the individual mosquito.Startups, like mosquitos, tend to be an all-or-nothing proposition. +And you don't generally know which of the two you're going to +get till the last minute. +Viaweb came close to tanking several times. Our trajectory +was like a sine wave. Fortunately we got bought at +the top of the cycle, but it was damned close. While we were +visiting Yahoo in California to talk about selling the company +to them, we had to borrow a conference room to reassure +an investor who was about to back out of a new round of funding +that we needed to stay alive.The all-or-nothing aspect of startups was not something we wanted. +Viaweb's hackers were all extremely risk-averse. +If there had been some way just to work super hard and get +paid for it, without having a lottery mixed in, we would have +been delighted. We would have much preferred a 100% chance of +$1 million to a 20% chance of $10 million, even though +theoretically the second is worth twice as much. Unfortunately, +there is not currently any space in the business world where +you can get the first deal.The closest you can get is by +selling your startup in the early stages, giving up upside +(and risk) for a smaller but guaranteed payoff. We had a +chance to do this, and stupidly, as we then thought, let it slip by. +After that we became comically eager to sell. +For the next year or so, +if anyone expressed the slightest curiosity about Viaweb +we would try to sell them the company. But there were no takers, +so we had to keep going.It would have been a bargain to +buy us at an early stage, but companies doing acquisitions are not +looking for bargains. A company big enough to acquire +startups will be big enough to be fairly conservative, and +within the company the people in charge of acquisitions will +be among the more conservative, because they are likely to be +business school types who joined the company late. +They would rather overpay for a safe choice. So +it is easier to sell an established startup, even at a large +premium, than an early-stage one.Get UsersI think it's a good idea to get bought, if you can. Running a +business is different from growing one. +It is just as well to let a big company take over once you reach +cruising altitude. It's +also financially wiser, because selling allows you to diversify. +What would you think of a financial advisor who put all his +client's assets into one volatile stock?How do you get bought? Mostly by doing the same things +you'd do if you didn't intend to sell the company. Being +profitable, for example. But getting bought is also an art +in its own right, and one that we spent a lot of time trying +to master.Potential buyers will +always delay if they can. The hard part about getting +bought is getting them to act. For most people, the most powerful motivator +is not the hope of gain, but the fear of loss. For potential +acquirers, the most powerful motivator is the prospect that +one of their competitors will buy you. This, as we found, +causes CEOs to take red-eyes. +The second biggest is the worry that, if they don't buy you +now, you'll continue to grow rapidly and will cost more to +acquire later, or even become a competitor.In both cases, what it all comes down to is users. +You'd think that a company about to buy you would do a lot of +research and decide for themselves how valuable your technology +was. Not at all. What they go by is the number of users you +have.In effect, acquirers assume the customers know who has the +best technology. And this is not as stupid as it sounds. Users +are the only real proof that you've created wealth. Wealth is +what people want, and if people aren't using your software, +maybe it's not just because you're bad at marketing. Maybe it's +because you haven't made what they want.Venture capitalists have a list of danger signs to watch out for. +Near the top is the company run by techno-weenies who are +obsessed with solving interesting technical problems, instead +of making users happy. In a startup, you're not just trying to +solve problems. You're trying to solve problems that +users care about.So I think you should make users the test, just as +acquirers do. Treat a startup as an optimization problem +in which performance is measured by number of users. As anyone +who has tried to optimize software knows, the key is measurement. +When you try to guess where your program is slow, and what would +make it faster, you almost always guess wrong.Number of users may not be the perfect test, but it will +be very close. It's what acquirers care about. It's what +revenues depend on. +It's what makes competitors unhappy. +It's what impresses reporters, and potential +new users. Certainly it's a better test than your a priori +notions of what problems are important to solve, no matter how +technically adept you are.Among other things, treating a startup as an optimization +problem will help you avoid another +pitfall that VCs worry about, and rightly-- taking a long time +to develop a product. Now we can recognize this as something +hackers already know to avoid: premature optimization. Get a version +1.0 out there as soon as you can. Until you have some users to +measure, you're optimizing based on guesses.The ball you need to keep your eye on here is the underlying +principle that wealth is what people want. If you plan to get +rich by creating wealth, you have to know what people want. +So few businesses really pay attention to making customers happy. +How often do you walk into a store, or call a company on the +phone, with a feeling of dread in the back of your mind? +When you hear "your call is important to us, please stay on +the line," do you think, oh good, now everything will be all right?A restaurant can afford to serve the occasional burnt dinner. +But in technology, you cook one thing and that's what everyone +eats. So any difference between what people want and what +you deliver is multiplied. +You please or annoy +customers wholesale. The closer you can get to what they want, +the more wealth you generate.Wealth and PowerMaking wealth is not the only way to get rich. For most of +human history it has not even been the most common. Until +a few centuries ago, +the main sources of wealth were mines, slaves and serfs, +land, and cattle, +and the only ways to acquire these rapidly were by inheritance, +marriage, conquest, or confiscation. +Naturally wealth had a bad reputation.Two things changed. The first was the rule of law. For most of the world's +history, if you did somehow accumulate a fortune, the ruler or his +henchmen +would find a way to steal it. +But in medieval Europe something new happened. +A new class of merchants and manufacturers +began to collect in towns. +[10] +Together they were able to withstand the local feudal +lord. So +for the first time in our history, the bullies stopped stealing the +nerds' lunch money. +This was naturally a great incentive, +and possibly indeed the main cause of the second big change, +industrialization.A great deal has been written about the causes of the Industrial +Revolution. But surely a necessary, if not sufficient, condition +was that people who made fortunes be able to enjoy them in peace. +[11] +One piece of evidence is what happened to countries +that tried to return to the old model, like the Soviet +Union, and to a lesser extent Britain under the labor +governments of the 1960s and early 1970s. Take away the incentive +of wealth, and technical innovation grinds to a halt.Remember what a startup is, economically: +a way of saying, I want to work faster. Instead of accumulating +money slowly by being paid a regular wage for fifty years, I +want to get it over with as soon as possible. So governments +that forbid you to accumulate wealth are in effect decreeing +that you work slowly. They're willing to let you earn $3 million over +fifty years, but they're not willing to let you work so hard that +you can do it in two. They are like +the corporate boss that you can't go to and say, I want to work +ten times as hard, so please pay me ten times a much. +Except this is not a boss you can escape by starting your own +company.The problem with working slowly is not just that technical +innovation happens slowly. It's that it tends not to happen at all. +It's only when you're deliberately looking for hard problems, +as a way to use speed to the greatest advantage, that you take +on this kind of project. Developing new technology is a +pain in the ass. It is, as Edison said, one percent +inspiration and ninety-nine percent perspiration. +Without the incentive of wealth, no one wants to do it. +Engineers will work on sexy projects like fighter planes and moon +rockets for ordinary salaries, but more mundane technologies +like light bulbs or semiconductors have to be developed by entrepreneurs.Startups +are not just something that happened in Silicon Valley in +the last couple decades. Since it became possible to +get rich by creating wealth, everyone who has done it has +used essentially the same recipe: measurement and leverage, +where measurement comes from working with a small +group, and leverage from developing new techniques. +The recipe was the same in Florence in 1200 as it is +in Santa Clara today.Understanding this may help to answer an important question: +why Europe grew so powerful. +Was it something about the geography of +Europe? Was it that Europeans are somehow racially superior? +Was it their religion? The answer (or at least +the proximate cause) may be that the +Europeans +rode on the crest of a powerful new idea: allowing those who +made a lot of money to keep it.Once you're allowed to do that, +people who want to get rich can do it by generating +wealth instead of stealing it. +The resulting technological growth translates not only +into wealth but into military power. The theory that led to +the stealth plane was developed by a Soviet mathematician. +But because the Soviet Union didn't have a computer industry, +it remained for them a theory; +they didn't have hardware capable of executing the calculations +fast enough to design an actual airplane.In that respect the Cold War teaches the same lesson as +World War II and, for that matter, most wars in recent history. +Don't let a ruling +class of warriors and politicians squash the entrepreneurs. +The same recipe that makes individuals rich +makes countries powerful. Let the nerds keep their lunch +money, and you rule the world.Notes[1] +One valuable thing you tend to get only in startups is +uninterruptability. Different kinds of +work have different time quanta. Someone proofreading a +manuscript +could probably be interrupted every fifteen minutes +with little loss of productivity. But the time quantum for +hacking is very long: it might take an hour just to load +a problem into your head. So the +cost of having someone from personnel +call you about a form you forgot to fill out can be huge.This is why hackers give you such a baleful stare as they +turn from their screen to answer your question. Inside +their heads a giant house of cards is tottering.The mere possibility of being interrupted deters hackers +from starting hard projects. This is why they +tend to work late at night, and why it's next to impossible +to write great software in a cubicle (except late at night).One great advantage of startups is that they don't yet have +any of the people who interrupt you. There is no personnel +department, and thus no form nor anyone to call you about it.[2] +Faced with the idea that people working for startups might be +20 or 30 times as productive as those working for large companies, +executives at large companies will naturally wonder, how could +I get the people working for me to do that? The answer is +simple: pay them to.Internally most companies are run like Communist states. +If you believe in free markets, why not turn your company into one?Hypothesis: A company will be maximally profitable when each +employee is paid in proportion to the wealth they generate.[3] +Until recently even governments sometimes didn't grasp the +distinction between money and wealth. Adam +Smith (Wealth of Nations, v:i) mentions several +that tried to preserve their +"wealth" by forbidding the export of gold or silver. +But having more of the medium of exchange would not make +a country richer; if you have more money chasing the same +amount of material wealth, the only result is higher prices.[4] +There are many senses of the word "wealth," not all of +them material. I'm not trying to make a deep philosophical +point here about which +is the true kind. I'm writing about one specific, +rather technical sense of the word "wealth." What +people will give you money for. +This is an interesting sort of wealth to study, because +it is the kind that prevents you from starving. +And what people will give you money for depends on them, +not you.When you're starting a business, +it's easy to slide into thinking that customers +want what you do. During the Internet Bubble I talked +to a woman who, because she liked the outdoors, was +starting an "outdoor portal." You know what +kind of business you should start if you like +the outdoors? One to recover data from crashed hard disks.What's the connection? None at all. Which is precisely my point. +If you want +to create wealth (in the narrow technical sense of not +starving) then you should be especially skeptical about any +plan that centers on things you like doing. +That is where your idea of what's valuable is least +likely to coincide with other people's.[5] +In the average car restoration you probably do make everyone +else microscopically poorer, by doing a small amount of damage to +the environment. While environmental costs should be taken +into account, they don't +make wealth a zero-sum game. For example, if you repair +a machine that's broken because a part has come unscrewed, +you create wealth with no environmental cost.[5b] +This essay was written before Firefox.[6] +Many people feel confused and depressed in +their early twenties. Life seemed so much more fun in college. +Well, of course it was. Don't be fooled by the surface similarities. +You've gone from guest to servant. +It's possible to have fun in this new world. +Among other things, you now get to go behind the doors that say +"authorized personnel only." +But the change is a shock at first, and all the worse +if you're not consciously aware of it.[7] +When VCs asked us how long it would take another startup +to duplicate our software, we used to reply that they probably +wouldn't be able to at all. I think this made us seem naive, +or liars.[8] +Few technologies have one clear inventor. So as +a rule, if you know the "inventor" of something +(the telephone, the assembly line, the airplane, +the light bulb, the transistor) it is because their +company made money from it, and the company's PR people worked +hard to spread the story. If you don't know who invented +something (the automobile, the television, the computer, +the jet engine, the laser), it's because other companies +made all the money.[9] +This is a good plan for life in general. +If you have two choices, choose the harder. +If you're trying to decide whether to go out running or +sit home and watch TV, go running. +Probably the reason this trick works so well is that +when you have two choices and one is harder, the +only reason you're even considering the other is laziness. +You know in the back of your mind what's the right thing +to do, and this trick merely forces you to acknowledge it.[10] +It is probably no accident that the middle class +first appeared in northern Italy and the low countries, +where there were no strong central governments. These two +regions were the richest of their time and became the twin +centers from which Renaissance civilization radiated. +If they no longer play that role, it is because +other places, like the United States, have been truer to the +principles they discovered.[11] +It may indeed be a sufficient condition. But if so, why didn't +the Industrial Revolution happen earlier? Two possible (and +not incompatible) answers: (a) It did. +The Industrial Revolution was one in a series. +(b) Because in medieval towns, monopolies +and guild regulations initially slowed the development of new means +of production. + +Comment on this essay. \ No newline at end of file diff --git a/data/PaulGrahamEssayMedium/worked.txt b/data/PaulGrahamEssayMedium/worked.txt new file mode 100644 index 0000000..7c1c5c8 --- /dev/null +++ b/data/PaulGrahamEssayMedium/worked.txt @@ -0,0 +1,1093 @@ +February 2021Before college the two main things I worked on, outside of school, +were writing and programming. I didn't write essays. I wrote what +beginning writers were supposed to write then, and probably still +are: short stories. My stories were awful. They had hardly any plot, +just characters with strong feelings, which I imagined made them +deep.The first programs I tried writing were on the IBM 1401 that our +school district used for what was then called "data processing." +This was in 9th grade, so I was 13 or 14. The school district's +1401 happened to be in the basement of our junior high school, and +my friend Rich Draves and I got permission to use it. It was like +a mini Bond villain's lair down there, with all these alien-looking +machines — CPU, disk drives, printer, card reader — sitting up +on a raised floor under bright fluorescent lights.The language we used was an early version of Fortran. You had to +type programs on punch cards, then stack them in the card reader +and press a button to load the program into memory and run it. The +result would ordinarily be to print something on the spectacularly +loud printer.I was puzzled by the 1401. I couldn't figure out what to do with +it. And in retrospect there's not much I could have done with it. +The only form of input to programs was data stored on punched cards, +and I didn't have any data stored on punched cards. The only other +option was to do things that didn't rely on any input, like calculate +approximations of pi, but I didn't know enough math to do anything +interesting of that type. So I'm not surprised I can't remember any +programs I wrote, because they can't have done much. My clearest +memory is of the moment I learned it was possible for programs not +to terminate, when one of mine didn't. On a machine without +time-sharing, this was a social as well as a technical error, as +the data center manager's expression made clear.With microcomputers, everything changed. Now you could have a +computer sitting right in front of you, on a desk, that could respond +to your keystrokes as it was running instead of just churning through +a stack of punch cards and then stopping. +[1]The first of my friends to get a microcomputer built it himself. +It was sold as a kit by Heathkit. I remember vividly how impressed +and envious I felt watching him sitting in front of it, typing +programs right into the computer.Computers were expensive in those days and it took me years of +nagging before I convinced my father to buy one, a TRS-80, in about +1980. The gold standard then was the Apple II, but a TRS-80 was +good enough. This was when I really started programming. I wrote +simple games, a program to predict how high my model rockets would +fly, and a word processor that my father used to write at least one +book. There was only room in memory for about 2 pages of text, so +he'd write 2 pages at a time and then print them out, but it was a +lot better than a typewriter.Though I liked programming, I didn't plan to study it in college. +In college I was going to study philosophy, which sounded much more +powerful. It seemed, to my naive high school self, to be the study +of the ultimate truths, compared to which the things studied in +other fields would be mere domain knowledge. What I discovered when +I got to college was that the other fields took up so much of the +space of ideas that there wasn't much left for these supposed +ultimate truths. All that seemed left for philosophy were edge cases +that people in other fields felt could safely be ignored.I couldn't have put this into words when I was 18. All I knew at +the time was that I kept taking philosophy courses and they kept +being boring. So I decided to switch to AI.AI was in the air in the mid 1980s, but there were two things +especially that made me want to work on it: a novel by Heinlein +called The Moon is a Harsh Mistress, which featured an intelligent +computer called Mike, and a PBS documentary that showed Terry +Winograd using SHRDLU. I haven't tried rereading The Moon is a Harsh +Mistress, so I don't know how well it has aged, but when I read it +I was drawn entirely into its world. It seemed only a matter of +time before we'd have Mike, and when I saw Winograd using SHRDLU, +it seemed like that time would be a few years at most. All you had +to do was teach SHRDLU more words.There weren't any classes in AI at Cornell then, not even graduate +classes, so I started trying to teach myself. Which meant learning +Lisp, since in those days Lisp was regarded as the language of AI. +The commonly used programming languages then were pretty primitive, +and programmers' ideas correspondingly so. The default language at +Cornell was a Pascal-like language called PL/I, and the situation +was similar elsewhere. Learning Lisp expanded my concept of a program +so fast that it was years before I started to have a sense of where +the new limits were. This was more like it; this was what I had +expected college to do. It wasn't happening in a class, like it was +supposed to, but that was ok. For the next couple years I was on a +roll. I knew what I was going to do.For my undergraduate thesis, I reverse-engineered SHRDLU. My God +did I love working on that program. It was a pleasing bit of code, +but what made it even more exciting was my belief — hard to imagine +now, but not unique in 1985 — that it was already climbing the +lower slopes of intelligence.I had gotten into a program at Cornell that didn't make you choose +a major. You could take whatever classes you liked, and choose +whatever you liked to put on your degree. I of course chose "Artificial +Intelligence." When I got the actual physical diploma, I was dismayed +to find that the quotes had been included, which made them read as +scare-quotes. At the time this bothered me, but now it seems amusingly +accurate, for reasons I was about to discover.I applied to 3 grad schools: MIT and Yale, which were renowned for +AI at the time, and Harvard, which I'd visited because Rich Draves +went there, and was also home to Bill Woods, who'd invented the +type of parser I used in my SHRDLU clone. Only Harvard accepted me, +so that was where I went.I don't remember the moment it happened, or if there even was a +specific moment, but during the first year of grad school I realized +that AI, as practiced at the time, was a hoax. By which I mean the +sort of AI in which a program that's told "the dog is sitting on +the chair" translates this into some formal representation and adds +it to the list of things it knows.What these programs really showed was that there's a subset of +natural language that's a formal language. But a very proper subset. +It was clear that there was an unbridgeable gap between what they +could do and actually understanding natural language. It was not, +in fact, simply a matter of teaching SHRDLU more words. That whole +way of doing AI, with explicit data structures representing concepts, +was not going to work. Its brokenness did, as so often happens, +generate a lot of opportunities to write papers about various +band-aids that could be applied to it, but it was never going to +get us Mike.So I looked around to see what I could salvage from the wreckage +of my plans, and there was Lisp. I knew from experience that Lisp +was interesting for its own sake and not just for its association +with AI, even though that was the main reason people cared about +it at the time. So I decided to focus on Lisp. In fact, I decided +to write a book about Lisp hacking. It's scary to think how little +I knew about Lisp hacking when I started writing that book. But +there's nothing like writing a book about something to help you +learn it. The book, On Lisp, wasn't published till 1993, but I wrote +much of it in grad school.Computer Science is an uneasy alliance between two halves, theory +and systems. The theory people prove things, and the systems people +build things. I wanted to build things. I had plenty of respect for +theory — indeed, a sneaking suspicion that it was the more admirable +of the two halves — but building things seemed so much more exciting.The problem with systems work, though, was that it didn't last. +Any program you wrote today, no matter how good, would be obsolete +in a couple decades at best. People might mention your software in +footnotes, but no one would actually use it. And indeed, it would +seem very feeble work. Only people with a sense of the history of +the field would even realize that, in its time, it had been good.There were some surplus Xerox Dandelions floating around the computer +lab at one point. Anyone who wanted one to play around with could +have one. I was briefly tempted, but they were so slow by present +standards; what was the point? No one else wanted one either, so +off they went. That was what happened to systems work.I wanted not just to build things, but to build things that would +last.In this dissatisfied state I went in 1988 to visit Rich Draves at +CMU, where he was in grad school. One day I went to visit the +Carnegie Institute, where I'd spent a lot of time as a kid. While +looking at a painting there I realized something that might seem +obvious, but was a big surprise to me. There, right on the wall, +was something you could make that would last. Paintings didn't +become obsolete. Some of the best ones were hundreds of years old.And moreover this was something you could make a living doing. Not +as easily as you could by writing software, of course, but I thought +if you were really industrious and lived really cheaply, it had to +be possible to make enough to survive. And as an artist you could +be truly independent. You wouldn't have a boss, or even need to get +research funding.I had always liked looking at paintings. Could I make them? I had +no idea. I'd never imagined it was even possible. I knew intellectually +that people made art — that it didn't just appear spontaneously +— but it was as if the people who made it were a different species. +They either lived long ago or were mysterious geniuses doing strange +things in profiles in Life magazine. The idea of actually being +able to make art, to put that verb before that noun, seemed almost +miraculous.That fall I started taking art classes at Harvard. Grad students +could take classes in any department, and my advisor, Tom Cheatham, +was very easy going. If he even knew about the strange classes I +was taking, he never said anything.So now I was in a PhD program in computer science, yet planning to +be an artist, yet also genuinely in love with Lisp hacking and +working away at On Lisp. In other words, like many a grad student, +I was working energetically on multiple projects that were not my +thesis.I didn't see a way out of this situation. I didn't want to drop out +of grad school, but how else was I going to get out? I remember +when my friend Robert Morris got kicked out of Cornell for writing +the internet worm of 1988, I was envious that he'd found such a +spectacular way to get out of grad school.Then one day in April 1990 a crack appeared in the wall. I ran into +professor Cheatham and he asked if I was far enough along to graduate +that June. I didn't have a word of my dissertation written, but in +what must have been the quickest bit of thinking in my life, I +decided to take a shot at writing one in the 5 weeks or so that +remained before the deadline, reusing parts of On Lisp where I +could, and I was able to respond, with no perceptible delay "Yes, +I think so. I'll give you something to read in a few days."I picked applications of continuations as the topic. In retrospect +I should have written about macros and embedded languages. There's +a whole world there that's barely been explored. But all I wanted +was to get out of grad school, and my rapidly written dissertation +sufficed, just barely.Meanwhile I was applying to art schools. I applied to two: RISD in +the US, and the Accademia di Belli Arti in Florence, which, because +it was the oldest art school, I imagined would be good. RISD accepted +me, and I never heard back from the Accademia, so off to Providence +I went.I'd applied for the BFA program at RISD, which meant in effect that +I had to go to college again. This was not as strange as it sounds, +because I was only 25, and art schools are full of people of different +ages. RISD counted me as a transfer sophomore and said I had to do +the foundation that summer. The foundation means the classes that +everyone has to take in fundamental subjects like drawing, color, +and design.Toward the end of the summer I got a big surprise: a letter from +the Accademia, which had been delayed because they'd sent it to +Cambridge England instead of Cambridge Massachusetts, inviting me +to take the entrance exam in Florence that fall. This was now only +weeks away. My nice landlady let me leave my stuff in her attic. I +had some money saved from consulting work I'd done in grad school; +there was probably enough to last a year if I lived cheaply. Now +all I had to do was learn Italian.Only stranieri (foreigners) had to take this entrance exam. In +retrospect it may well have been a way of excluding them, because +there were so many stranieri attracted by the idea of studying +art in Florence that the Italian students would otherwise have been +outnumbered. I was in decent shape at painting and drawing from the +RISD foundation that summer, but I still don't know how I managed +to pass the written exam. I remember that I answered the essay +question by writing about Cezanne, and that I cranked up the +intellectual level as high as I could to make the most of my limited +vocabulary. +[2]I'm only up to age 25 and already there are such conspicuous patterns. +Here I was, yet again about to attend some august institution in +the hopes of learning about some prestigious subject, and yet again +about to be disappointed. The students and faculty in the painting +department at the Accademia were the nicest people you could imagine, +but they had long since arrived at an arrangement whereby the +students wouldn't require the faculty to teach anything, and in +return the faculty wouldn't require the students to learn anything. +And at the same time all involved would adhere outwardly to the +conventions of a 19th century atelier. We actually had one of those +little stoves, fed with kindling, that you see in 19th century +studio paintings, and a nude model sitting as close to it as possible +without getting burned. Except hardly anyone else painted her besides +me. The rest of the students spent their time chatting or occasionally +trying to imitate things they'd seen in American art magazines.Our model turned out to live just down the street from me. She made +a living from a combination of modelling and making fakes for a +local antique dealer. She'd copy an obscure old painting out of a +book, and then he'd take the copy and maltreat it to make it look +old. +[3]While I was a student at the Accademia I started painting still +lives in my bedroom at night. These paintings were tiny, because +the room was, and because I painted them on leftover scraps of +canvas, which was all I could afford at the time. Painting still +lives is different from painting people, because the subject, as +its name suggests, can't move. People can't sit for more than about +15 minutes at a time, and when they do they don't sit very still. +So the traditional m.o. for painting people is to know how to paint +a generic person, which you then modify to match the specific person +you're painting. Whereas a still life you can, if you want, copy +pixel by pixel from what you're seeing. You don't want to stop +there, of course, or you get merely photographic accuracy, and what +makes a still life interesting is that it's been through a head. +You want to emphasize the visual cues that tell you, for example, +that the reason the color changes suddenly at a certain point is +that it's the edge of an object. By subtly emphasizing such things +you can make paintings that are more realistic than photographs not +just in some metaphorical sense, but in the strict information-theoretic +sense. +[4]I liked painting still lives because I was curious about what I was +seeing. In everyday life, we aren't consciously aware of much we're +seeing. Most visual perception is handled by low-level processes +that merely tell your brain "that's a water droplet" without telling +you details like where the lightest and darkest points are, or +"that's a bush" without telling you the shape and position of every +leaf. This is a feature of brains, not a bug. In everyday life it +would be distracting to notice every leaf on every bush. But when +you have to paint something, you have to look more closely, and +when you do there's a lot to see. You can still be noticing new +things after days of trying to paint something people usually take +for granted, just as you can after +days of trying to write an essay about something people usually +take for granted.This is not the only way to paint. I'm not 100% sure it's even a +good way to paint. But it seemed a good enough bet to be worth +trying.Our teacher, professor Ulivi, was a nice guy. He could see I worked +hard, and gave me a good grade, which he wrote down in a sort of +passport each student had. But the Accademia wasn't teaching me +anything except Italian, and my money was running out, so at the +end of the first year I went back to the US.I wanted to go back to RISD, but I was now broke and RISD was very +expensive, so I decided to get a job for a year and then return to +RISD the next fall. I got one at a company called Interleaf, which +made software for creating documents. You mean like Microsoft Word? +Exactly. That was how I learned that low end software tends to eat +high end software. But Interleaf still had a few years to live yet. +[5]Interleaf had done something pretty bold. Inspired by Emacs, they'd +added a scripting language, and even made the scripting language a +dialect of Lisp. Now they wanted a Lisp hacker to write things in +it. This was the closest thing I've had to a normal job, and I +hereby apologize to my boss and coworkers, because I was a bad +employee. Their Lisp was the thinnest icing on a giant C cake, and +since I didn't know C and didn't want to learn it, I never understood +most of the software. Plus I was terribly irresponsible. This was +back when a programming job meant showing up every day during certain +working hours. That seemed unnatural to me, and on this point the +rest of the world is coming around to my way of thinking, but at +the time it caused a lot of friction. Toward the end of the year I +spent much of my time surreptitiously working on On Lisp, which I +had by this time gotten a contract to publish.The good part was that I got paid huge amounts of money, especially +by art student standards. In Florence, after paying my part of the +rent, my budget for everything else had been $7 a day. Now I was +getting paid more than 4 times that every hour, even when I was +just sitting in a meeting. By living cheaply I not only managed to +save enough to go back to RISD, but also paid off my college loans.I learned some useful things at Interleaf, though they were mostly +about what not to do. I learned that it's better for technology +companies to be run by product people than sales people (though +sales is a real skill and people who are good at it are really good +at it), that it leads to bugs when code is edited by too many people, +that cheap office space is no bargain if it's depressing, that +planned meetings are inferior to corridor conversations, that big, +bureaucratic customers are a dangerous source of money, and that +there's not much overlap between conventional office hours and the +optimal time for hacking, or conventional offices and the optimal +place for it.But the most important thing I learned, and which I used in both +Viaweb and Y Combinator, is that the low end eats the high end: +that it's good to be the "entry level" option, even though that +will be less prestigious, because if you're not, someone else will +be, and will squash you against the ceiling. Which in turn means +that prestige is a danger sign.When I left to go back to RISD the next fall, I arranged to do +freelance work for the group that did projects for customers, and +this was how I survived for the next several years. When I came +back to visit for a project later on, someone told me about a new +thing called HTML, which was, as he described it, a derivative of +SGML. Markup language enthusiasts were an occupational hazard at +Interleaf and I ignored him, but this HTML thing later became a big +part of my life.In the fall of 1992 I moved back to Providence to continue at RISD. +The foundation had merely been intro stuff, and the Accademia had +been a (very civilized) joke. Now I was going to see what real art +school was like. But alas it was more like the Accademia than not. +Better organized, certainly, and a lot more expensive, but it was +now becoming clear that art school did not bear the same relationship +to art that medical school bore to medicine. At least not the +painting department. The textile department, which my next door +neighbor belonged to, seemed to be pretty rigorous. No doubt +illustration and architecture were too. But painting was post-rigorous. +Painting students were supposed to express themselves, which to the +more worldly ones meant to try to cook up some sort of distinctive +signature style.A signature style is the visual equivalent of what in show business +is known as a "schtick": something that immediately identifies the +work as yours and no one else's. For example, when you see a painting +that looks like a certain kind of cartoon, you know it's by Roy +Lichtenstein. So if you see a big painting of this type hanging in +the apartment of a hedge fund manager, you know he paid millions +of dollars for it. That's not always why artists have a signature +style, but it's usually why buyers pay a lot for such work. +[6]There were plenty of earnest students too: kids who "could draw" +in high school, and now had come to what was supposed to be the +best art school in the country, to learn to draw even better. They +tended to be confused and demoralized by what they found at RISD, +but they kept going, because painting was what they did. I was not +one of the kids who could draw in high school, but at RISD I was +definitely closer to their tribe than the tribe of signature style +seekers.I learned a lot in the color class I took at RISD, but otherwise I +was basically teaching myself to paint, and I could do that for +free. So in 1993 I dropped out. I hung around Providence for a bit, +and then my college friend Nancy Parmet did me a big favor. A +rent-controlled apartment in a building her mother owned in New +York was becoming vacant. Did I want it? It wasn't much more than +my current place, and New York was supposed to be where the artists +were. So yes, I wanted it! +[7]Asterix comics begin by zooming in on a tiny corner of Roman Gaul +that turns out not to be controlled by the Romans. You can do +something similar on a map of New York City: if you zoom in on the +Upper East Side, there's a tiny corner that's not rich, or at least +wasn't in 1993. It's called Yorkville, and that was my new home. +Now I was a New York artist — in the strictly technical sense of +making paintings and living in New York.I was nervous about money, because I could sense that Interleaf was +on the way down. Freelance Lisp hacking work was very rare, and I +didn't want to have to program in another language, which in those +days would have meant C++ if I was lucky. So with my unerring nose +for financial opportunity, I decided to write another book on Lisp. +This would be a popular book, the sort of book that could be used +as a textbook. I imagined myself living frugally off the royalties +and spending all my time painting. (The painting on the cover of +this book, ANSI Common Lisp, is one that I painted around this +time.)The best thing about New York for me was the presence of Idelle and +Julian Weber. Idelle Weber was a painter, one of the early +photorealists, and I'd taken her painting class at Harvard. I've +never known a teacher more beloved by her students. Large numbers +of former students kept in touch with her, including me. After I +moved to New York I became her de facto studio assistant.She liked to paint on big, square canvases, 4 to 5 feet on a side. +One day in late 1994 as I was stretching one of these monsters there +was something on the radio about a famous fund manager. He wasn't +that much older than me, and was super rich. The thought suddenly +occurred to me: why don't I become rich? Then I'll be able to work +on whatever I want.Meanwhile I'd been hearing more and more about this new thing called +the World Wide Web. Robert Morris showed it to me when I visited +him in Cambridge, where he was now in grad school at Harvard. It +seemed to me that the web would be a big deal. I'd seen what graphical +user interfaces had done for the popularity of microcomputers. It +seemed like the web would do the same for the internet.If I wanted to get rich, here was the next train leaving the station. +I was right about that part. What I got wrong was the idea. I decided +we should start a company to put art galleries online. I can't +honestly say, after reading so many Y Combinator applications, that +this was the worst startup idea ever, but it was up there. Art +galleries didn't want to be online, and still don't, not the fancy +ones. That's not how they sell. I wrote some software to generate +web sites for galleries, and Robert wrote some to resize images and +set up an http server to serve the pages. Then we tried to sign up +galleries. To call this a difficult sale would be an understatement. +It was difficult to give away. A few galleries let us make sites +for them for free, but none paid us.Then some online stores started to appear, and I realized that +except for the order buttons they were identical to the sites we'd +been generating for galleries. This impressive-sounding thing called +an "internet storefront" was something we already knew how to build.So in the summer of 1995, after I submitted the camera-ready copy +of ANSI Common Lisp to the publishers, we started trying to write +software to build online stores. At first this was going to be +normal desktop software, which in those days meant Windows software. +That was an alarming prospect, because neither of us knew how to +write Windows software or wanted to learn. We lived in the Unix +world. But we decided we'd at least try writing a prototype store +builder on Unix. Robert wrote a shopping cart, and I wrote a new +site generator for stores — in Lisp, of course.We were working out of Robert's apartment in Cambridge. His roommate +was away for big chunks of time, during which I got to sleep in his +room. For some reason there was no bed frame or sheets, just a +mattress on the floor. One morning as I was lying on this mattress +I had an idea that made me sit up like a capital L. What if we ran +the software on the server, and let users control it by clicking +on links? Then we'd never have to write anything to run on users' +computers. We could generate the sites on the same server we'd serve +them from. Users wouldn't need anything more than a browser.This kind of software, known as a web app, is common now, but at +the time it wasn't clear that it was even possible. To find out, +we decided to try making a version of our store builder that you +could control through the browser. A couple days later, on August +12, we had one that worked. The UI was horrible, but it proved you +could build a whole store through the browser, without any client +software or typing anything into the command line on the server.Now we felt like we were really onto something. I had visions of a +whole new generation of software working this way. You wouldn't +need versions, or ports, or any of that crap. At Interleaf there +had been a whole group called Release Engineering that seemed to +be at least as big as the group that actually wrote the software. +Now you could just update the software right on the server.We started a new company we called Viaweb, after the fact that our +software worked via the web, and we got $10,000 in seed funding +from Idelle's husband Julian. In return for that and doing the +initial legal work and giving us business advice, we gave him 10% +of the company. Ten years later this deal became the model for Y +Combinator's. We knew founders needed something like this, because +we'd needed it ourselves.At this stage I had a negative net worth, because the thousand +dollars or so I had in the bank was more than counterbalanced by +what I owed the government in taxes. (Had I diligently set aside +the proper proportion of the money I'd made consulting for Interleaf? +No, I had not.) So although Robert had his graduate student stipend, +I needed that seed funding to live on.We originally hoped to launch in September, but we got more ambitious +about the software as we worked on it. Eventually we managed to +build a WYSIWYG site builder, in the sense that as you were creating +pages, they looked exactly like the static ones that would be +generated later, except that instead of leading to static pages, +the links all referred to closures stored in a hash table on the +server.It helped to have studied art, because the main goal of an online +store builder is to make users look legit, and the key to looking +legit is high production values. If you get page layouts and fonts +and colors right, you can make a guy running a store out of his +bedroom look more legit than a big company.(If you're curious why my site looks so old-fashioned, it's because +it's still made with this software. It may look clunky today, but +in 1996 it was the last word in slick.)In September, Robert rebelled. "We've been working on this for a +month," he said, "and it's still not done." This is funny in +retrospect, because he would still be working on it almost 3 years +later. But I decided it might be prudent to recruit more programmers, +and I asked Robert who else in grad school with him was really good. +He recommended Trevor Blackwell, which surprised me at first, because +at that point I knew Trevor mainly for his plan to reduce everything +in his life to a stack of notecards, which he carried around with +him. But Rtm was right, as usual. Trevor turned out to be a +frighteningly effective hacker.It was a lot of fun working with Robert and Trevor. They're the two +most independent-minded people +I know, and in completely different +ways. If you could see inside Rtm's brain it would look like a +colonial New England church, and if you could see inside Trevor's +it would look like the worst excesses of Austrian Rococo.We opened for business, with 6 stores, in January 1996. It was just +as well we waited a few months, because although we worried we were +late, we were actually almost fatally early. There was a lot of +talk in the press then about ecommerce, but not many people actually +wanted online stores. +[8]There were three main parts to the software: the editor, which +people used to build sites and which I wrote, the shopping cart, +which Robert wrote, and the manager, which kept track of orders and +statistics, and which Trevor wrote. In its time, the editor was one +of the best general-purpose site builders. I kept the code tight +and didn't have to integrate with any other software except Robert's +and Trevor's, so it was quite fun to work on. If all I'd had to do +was work on this software, the next 3 years would have been the +easiest of my life. Unfortunately I had to do a lot more, all of +it stuff I was worse at than programming, and the next 3 years were +instead the most stressful.There were a lot of startups making ecommerce software in the second +half of the 90s. We were determined to be the Microsoft Word, not +the Interleaf. Which meant being easy to use and inexpensive. It +was lucky for us that we were poor, because that caused us to make +Viaweb even more inexpensive than we realized. We charged $100 a +month for a small store and $300 a month for a big one. This low +price was a big attraction, and a constant thorn in the sides of +competitors, but it wasn't because of some clever insight that we +set the price low. We had no idea what businesses paid for things. +$300 a month seemed like a lot of money to us.We did a lot of things right by accident like that. For example, +we did what's now called "doing things that +don't scale," although +at the time we would have described it as "being so lame that we're +driven to the most desperate measures to get users." The most common +of which was building stores for them. This seemed particularly +humiliating, since the whole raison d'etre of our software was that +people could use it to make their own stores. But anything to get +users.We learned a lot more about retail than we wanted to know. For +example, that if you could only have a small image of a man's shirt +(and all images were small then by present standards), it was better +to have a closeup of the collar than a picture of the whole shirt. +The reason I remember learning this was that it meant I had to +rescan about 30 images of men's shirts. My first set of scans were +so beautiful too.Though this felt wrong, it was exactly the right thing to be doing. +Building stores for users taught us about retail, and about how it +felt to use our software. I was initially both mystified and repelled +by "business" and thought we needed a "business person" to be in +charge of it, but once we started to get users, I was converted, +in much the same way I was converted to +fatherhood once I had kids. +Whatever users wanted, I was all theirs. Maybe one day we'd have +so many users that I couldn't scan their images for them, but in +the meantime there was nothing more important to do.Another thing I didn't get at the time is that +growth rate is the +ultimate test of a startup. Our growth rate was fine. We had about +70 stores at the end of 1996 and about 500 at the end of 1997. I +mistakenly thought the thing that mattered was the absolute number +of users. And that is the thing that matters in the sense that +that's how much money you're making, and if you're not making enough, +you might go out of business. But in the long term the growth rate +takes care of the absolute number. If we'd been a startup I was +advising at Y Combinator, I would have said: Stop being so stressed +out, because you're doing fine. You're growing 7x a year. Just don't +hire too many more people and you'll soon be profitable, and then +you'll control your own destiny.Alas I hired lots more people, partly because our investors wanted +me to, and partly because that's what startups did during the +Internet Bubble. A company with just a handful of employees would +have seemed amateurish. So we didn't reach breakeven until about +when Yahoo bought us in the summer of 1998. Which in turn meant we +were at the mercy of investors for the entire life of the company. +And since both we and our investors were noobs at startups, the +result was a mess even by startup standards.It was a huge relief when Yahoo bought us. In principle our Viaweb +stock was valuable. It was a share in a business that was profitable +and growing rapidly. But it didn't feel very valuable to me; I had +no idea how to value a business, but I was all too keenly aware of +the near-death experiences we seemed to have every few months. Nor +had I changed my grad student lifestyle significantly since we +started. So when Yahoo bought us it felt like going from rags to +riches. Since we were going to California, I bought a car, a yellow +1998 VW GTI. I remember thinking that its leather seats alone were +by far the most luxurious thing I owned.The next year, from the summer of 1998 to the summer of 1999, must +have been the least productive of my life. I didn't realize it at +the time, but I was worn out from the effort and stress of running +Viaweb. For a while after I got to California I tried to continue +my usual m.o. of programming till 3 in the morning, but fatigue +combined with Yahoo's prematurely aged +culture and grim cube farm +in Santa Clara gradually dragged me down. After a few months it +felt disconcertingly like working at Interleaf.Yahoo had given us a lot of options when they bought us. At the +time I thought Yahoo was so overvalued that they'd never be worth +anything, but to my astonishment the stock went up 5x in the next +year. I hung on till the first chunk of options vested, then in the +summer of 1999 I left. It had been so long since I'd painted anything +that I'd half forgotten why I was doing this. My brain had been +entirely full of software and men's shirts for 4 years. But I had +done this to get rich so I could paint, I reminded myself, and now +I was rich, so I should go paint.When I said I was leaving, my boss at Yahoo had a long conversation +with me about my plans. I told him all about the kinds of pictures +I wanted to paint. At the time I was touched that he took such an +interest in me. Now I realize it was because he thought I was lying. +My options at that point were worth about $2 million a month. If I +was leaving that kind of money on the table, it could only be to +go and start some new startup, and if I did, I might take people +with me. This was the height of the Internet Bubble, and Yahoo was +ground zero of it. My boss was at that moment a billionaire. Leaving +then to start a new startup must have seemed to him an insanely, +and yet also plausibly, ambitious plan.But I really was quitting to paint, and I started immediately. +There was no time to lose. I'd already burned 4 years getting rich. +Now when I talk to founders who are leaving after selling their +companies, my advice is always the same: take a vacation. That's +what I should have done, just gone off somewhere and done nothing +for a month or two, but the idea never occurred to me.So I tried to paint, but I just didn't seem to have any energy or +ambition. Part of the problem was that I didn't know many people +in California. I'd compounded this problem by buying a house up in +the Santa Cruz Mountains, with a beautiful view but miles from +anywhere. I stuck it out for a few more months, then in desperation +I went back to New York, where unless you understand about rent +control you'll be surprised to hear I still had my apartment, sealed +up like a tomb of my old life. Idelle was in New York at least, and +there were other people trying to paint there, even though I didn't +know any of them.When I got back to New York I resumed my old life, except now I was +rich. It was as weird as it sounds. I resumed all my old patterns, +except now there were doors where there hadn't been. Now when I was +tired of walking, all I had to do was raise my hand, and (unless +it was raining) a taxi would stop to pick me up. Now when I walked +past charming little restaurants I could go in and order lunch. It +was exciting for a while. Painting started to go better. I experimented +with a new kind of still life where I'd paint one painting in the +old way, then photograph it and print it, blown up, on canvas, and +then use that as the underpainting for a second still life, painted +from the same objects (which hopefully hadn't rotted yet).Meanwhile I looked for an apartment to buy. Now I could actually +choose what neighborhood to live in. Where, I asked myself and +various real estate agents, is the Cambridge of New York? Aided by +occasional visits to actual Cambridge, I gradually realized there +wasn't one. Huh.Around this time, in the spring of 2000, I had an idea. It was clear +from our experience with Viaweb that web apps were the future. Why +not build a web app for making web apps? Why not let people edit +code on our server through the browser, and then host the resulting +applications for them? +[9] +You could run all sorts of services +on the servers that these applications could use just by making an +API call: making and receiving phone calls, manipulating images, +taking credit card payments, etc.I got so excited about this idea that I couldn't think about anything +else. It seemed obvious that this was the future. I didn't particularly +want to start another company, but it was clear that this idea would +have to be embodied as one, so I decided to move to Cambridge and +start it. I hoped to lure Robert into working on it with me, but +there I ran into a hitch. Robert was now a postdoc at MIT, and +though he'd made a lot of money the last time I'd lured him into +working on one of my schemes, it had also been a huge time sink. +So while he agreed that it sounded like a plausible idea, he firmly +refused to work on it.Hmph. Well, I'd do it myself then. I recruited Dan Giffin, who had +worked for Viaweb, and two undergrads who wanted summer jobs, and +we got to work trying to build what it's now clear is about twenty +companies and several open source projects worth of software. The +language for defining applications would of course be a dialect of +Lisp. But I wasn't so naive as to assume I could spring an overt +Lisp on a general audience; we'd hide the parentheses, like Dylan +did.By then there was a name for the kind of company Viaweb was, an +"application service provider," or ASP. This name didn't last long +before it was replaced by "software as a service," but it was current +for long enough that I named this new company after it: it was going +to be called Aspra.I started working on the application builder, Dan worked on network +infrastructure, and the two undergrads worked on the first two +services (images and phone calls). But about halfway through the +summer I realized I really didn't want to run a company — especially +not a big one, which it was looking like this would have to be. I'd +only started Viaweb because I needed the money. Now that I didn't +need money anymore, why was I doing this? If this vision had to be +realized as a company, then screw the vision. I'd build a subset +that could be done as an open source project.Much to my surprise, the time I spent working on this stuff was not +wasted after all. After we started Y Combinator, I would often +encounter startups working on parts of this new architecture, and +it was very useful to have spent so much time thinking about it and +even trying to write some of it.The subset I would build as an open source project was the new Lisp, +whose parentheses I now wouldn't even have to hide. A lot of Lisp +hackers dream of building a new Lisp, partly because one of the +distinctive features of the language is that it has dialects, and +partly, I think, because we have in our minds a Platonic form of +Lisp that all existing dialects fall short of. I certainly did. So +at the end of the summer Dan and I switched to working on this new +dialect of Lisp, which I called Arc, in a house I bought in Cambridge.The following spring, lightning struck. I was invited to give a +talk at a Lisp conference, so I gave one about how we'd used Lisp +at Viaweb. Afterward I put a postscript file of this talk online, +on paulgraham.com, which I'd created years before using Viaweb but +had never used for anything. In one day it got 30,000 page views. +What on earth had happened? The referring urls showed that someone +had posted it on Slashdot. +[10]Wow, I thought, there's an audience. If I write something and put +it on the web, anyone can read it. That may seem obvious now, but +it was surprising then. In the print era there was a narrow channel +to readers, guarded by fierce monsters known as editors. The only +way to get an audience for anything you wrote was to get it published +as a book, or in a newspaper or magazine. Now anyone could publish +anything.This had been possible in principle since 1993, but not many people +had realized it yet. I had been intimately involved with building +the infrastructure of the web for most of that time, and a writer +as well, and it had taken me 8 years to realize it. Even then it +took me several years to understand the implications. It meant there +would be a whole new generation of +essays. +[11]In the print era, the channel for publishing essays had been +vanishingly small. Except for a few officially anointed thinkers +who went to the right parties in New York, the only people allowed +to publish essays were specialists writing about their specialties. +There were so many essays that had never been written, because there +had been no way to publish them. Now they could be, and I was going +to write them. +[12]I've worked on several different things, but to the extent there +was a turning point where I figured out what to work on, it was +when I started publishing essays online. From then on I knew that +whatever else I did, I'd always write essays too.I knew that online essays would be a +marginal medium at first. +Socially they'd seem more like rants posted by nutjobs on their +GeoCities sites than the genteel and beautifully typeset compositions +published in The New Yorker. But by this point I knew enough to +find that encouraging instead of discouraging.One of the most conspicuous patterns I've noticed in my life is how +well it has worked, for me at least, to work on things that weren't +prestigious. Still life has always been the least prestigious form +of painting. Viaweb and Y Combinator both seemed lame when we started +them. I still get the glassy eye from strangers when they ask what +I'm writing, and I explain that it's an essay I'm going to publish +on my web site. Even Lisp, though prestigious intellectually in +something like the way Latin is, also seems about as hip.It's not that unprestigious types of work are good per se. But when +you find yourself drawn to some kind of work despite its current +lack of prestige, it's a sign both that there's something real to +be discovered there, and that you have the right kind of motives. +Impure motives are a big danger for the ambitious. If anything is +going to lead you astray, it will be the desire to impress people. +So while working on things that aren't prestigious doesn't guarantee +you're on the right track, it at least guarantees you're not on the +most common type of wrong one.Over the next several years I wrote lots of essays about all kinds +of different topics. O'Reilly reprinted a collection of them as a +book, called Hackers & Painters after one of the essays in it. I +also worked on spam filters, and did some more painting. I used to +have dinners for a group of friends every thursday night, which +taught me how to cook for groups. And I bought another building in +Cambridge, a former candy factory (and later, twas said, porn +studio), to use as an office.One night in October 2003 there was a big party at my house. It was +a clever idea of my friend Maria Daniels, who was one of the thursday +diners. Three separate hosts would all invite their friends to one +party. So for every guest, two thirds of the other guests would be +people they didn't know but would probably like. One of the guests +was someone I didn't know but would turn out to like a lot: a woman +called Jessica Livingston. A couple days later I asked her out.Jessica was in charge of marketing at a Boston investment bank. +This bank thought it understood startups, but over the next year, +as she met friends of mine from the startup world, she was surprised +how different reality was. And how colorful their stories were. So +she decided to compile a book of +interviews with startup founders.When the bank had financial problems and she had to fire half her +staff, she started looking for a new job. In early 2005 she interviewed +for a marketing job at a Boston VC firm. It took them weeks to make +up their minds, and during this time I started telling her about +all the things that needed to be fixed about venture capital. They +should make a larger number of smaller investments instead of a +handful of giant ones, they should be funding younger, more technical +founders instead of MBAs, they should let the founders remain as +CEO, and so on.One of my tricks for writing essays had always been to give talks. +The prospect of having to stand up in front of a group of people +and tell them something that won't waste their time is a great +spur to the imagination. When the Harvard Computer Society, the +undergrad computer club, asked me to give a talk, I decided I would +tell them how to start a startup. Maybe they'd be able to avoid the +worst of the mistakes we'd made.So I gave this talk, in the course of which I told them that the +best sources of seed funding were successful startup founders, +because then they'd be sources of advice too. Whereupon it seemed +they were all looking expectantly at me. Horrified at the prospect +of having my inbox flooded by business plans (if I'd only known), +I blurted out "But not me!" and went on with the talk. But afterward +it occurred to me that I should really stop procrastinating about +angel investing. I'd been meaning to since Yahoo bought us, and now +it was 7 years later and I still hadn't done one angel investment.Meanwhile I had been scheming with Robert and Trevor about projects +we could work on together. I missed working with them, and it seemed +like there had to be something we could collaborate on.As Jessica and I were walking home from dinner on March 11, at the +corner of Garden and Walker streets, these three threads converged. +Screw the VCs who were taking so long to make up their minds. We'd +start our own investment firm and actually implement the ideas we'd +been talking about. I'd fund it, and Jessica could quit her job and +work for it, and we'd get Robert and Trevor as partners too. +[13]Once again, ignorance worked in our favor. We had no idea how to +be angel investors, and in Boston in 2005 there were no Ron Conways +to learn from. So we just made what seemed like the obvious choices, +and some of the things we did turned out to be novel.There are multiple components to Y Combinator, and we didn't figure +them all out at once. The part we got first was to be an angel firm. +In those days, those two words didn't go together. There were VC +firms, which were organized companies with people whose job it was +to make investments, but they only did big, million dollar investments. +And there were angels, who did smaller investments, but these were +individuals who were usually focused on other things and made +investments on the side. And neither of them helped founders enough +in the beginning. We knew how helpless founders were in some respects, +because we remembered how helpless we'd been. For example, one thing +Julian had done for us that seemed to us like magic was to get us +set up as a company. We were fine writing fairly difficult software, +but actually getting incorporated, with bylaws and stock and all +that stuff, how on earth did you do that? Our plan was not only to +make seed investments, but to do for startups everything Julian had +done for us.YC was not organized as a fund. It was cheap enough to run that we +funded it with our own money. That went right by 99% of readers, +but professional investors are thinking "Wow, that means they got +all the returns." But once again, this was not due to any particular +insight on our part. We didn't know how VC firms were organized. +It never occurred to us to try to raise a fund, and if it had, we +wouldn't have known where to start. +[14]The most distinctive thing about YC is the batch model: to fund a +bunch of startups all at once, twice a year, and then to spend three +months focusing intensively on trying to help them. That part we +discovered by accident, not merely implicitly but explicitly due +to our ignorance about investing. We needed to get experience as +investors. What better way, we thought, than to fund a whole bunch +of startups at once? We knew undergrads got temporary jobs at tech +companies during the summer. Why not organize a summer program where +they'd start startups instead? We wouldn't feel guilty for being +in a sense fake investors, because they would in a similar sense +be fake founders. So while we probably wouldn't make much money out +of it, we'd at least get to practice being investors on them, and +they for their part would probably have a more interesting summer +than they would working at Microsoft.We'd use the building I owned in Cambridge as our headquarters. +We'd all have dinner there once a week — on tuesdays, since I was +already cooking for the thursday diners on thursdays — and after +dinner we'd bring in experts on startups to give talks.We knew undergrads were deciding then about summer jobs, so in a +matter of days we cooked up something we called the Summer Founders +Program, and I posted an +announcement +on my site, inviting undergrads +to apply. I had never imagined that writing essays would be a way +to get "deal flow," as investors call it, but it turned out to be +the perfect source. +[15] +We got 225 applications for the Summer +Founders Program, and we were surprised to find that a lot of them +were from people who'd already graduated, or were about to that +spring. Already this SFP thing was starting to feel more serious +than we'd intended.We invited about 20 of the 225 groups to interview in person, and +from those we picked 8 to fund. They were an impressive group. That +first batch included reddit, Justin Kan and Emmett Shear, who went +on to found Twitch, Aaron Swartz, who had already helped write the +RSS spec and would a few years later become a martyr for open access, +and Sam Altman, who would later become the second president of YC. +I don't think it was entirely luck that the first batch was so good. +You had to be pretty bold to sign up for a weird thing like the +Summer Founders Program instead of a summer job at a legit place +like Microsoft or Goldman Sachs.The deal for startups was based on a combination of the deal we did +with Julian ($10k for 10%) and what Robert said MIT grad students +got for the summer ($6k). We invested $6k per founder, which in the +typical two-founder case was $12k, in return for 6%. That had to +be fair, because it was twice as good as the deal we ourselves had +taken. Plus that first summer, which was really hot, Jessica brought +the founders free air conditioners. +[16]Fairly quickly I realized that we had stumbled upon the way to scale +startup funding. Funding startups in batches was more convenient +for us, because it meant we could do things for a lot of startups +at once, but being part of a batch was better for the startups too. +It solved one of the biggest problems faced by founders: the +isolation. Now you not only had colleagues, but colleagues who +understood the problems you were facing and could tell you how they +were solving them.As YC grew, we started to notice other advantages of scale. The +alumni became a tight community, dedicated to helping one another, +and especially the current batch, whose shoes they remembered being +in. We also noticed that the startups were becoming one another's +customers. We used to refer jokingly to the "YC GDP," but as YC +grows this becomes less and less of a joke. Now lots of startups +get their initial set of customers almost entirely from among their +batchmates.I had not originally intended YC to be a full-time job. I was going +to do three things: hack, write essays, and work on YC. As YC grew, +and I grew more excited about it, it started to take up a lot more +than a third of my attention. But for the first few years I was +still able to work on other things.In the summer of 2006, Robert and I started working on a new version +of Arc. This one was reasonably fast, because it was compiled into +Scheme. To test this new Arc, I wrote Hacker News in it. It was +originally meant to be a news aggregator for startup founders and +was called Startup News, but after a few months I got tired of +reading about nothing but startups. Plus it wasn't startup founders +we wanted to reach. It was future startup founders. So I changed +the name to Hacker News and the topic to whatever engaged one's +intellectual curiosity.HN was no doubt good for YC, but it was also by far the biggest +source of stress for me. If all I'd had to do was select and help +founders, life would have been so easy. And that implies that HN +was a mistake. Surely the biggest source of stress in one's work +should at least be something close to the core of the work. Whereas +I was like someone who was in pain while running a marathon not +from the exertion of running, but because I had a blister from an +ill-fitting shoe. When I was dealing with some urgent problem during +YC, there was about a 60% chance it had to do with HN, and a 40% +chance it had do with everything else combined. +[17]As well as HN, I wrote all of YC's internal software in Arc. But +while I continued to work a good deal in Arc, I gradually stopped +working on Arc, partly because I didn't have time to, and partly +because it was a lot less attractive to mess around with the language +now that we had all this infrastructure depending on it. So now my +three projects were reduced to two: writing essays and working on +YC.YC was different from other kinds of work I've done. Instead of +deciding for myself what to work on, the problems came to me. Every +6 months there was a new batch of startups, and their problems, +whatever they were, became our problems. It was very engaging work, +because their problems were quite varied, and the good founders +were very effective. If you were trying to learn the most you could +about startups in the shortest possible time, you couldn't have +picked a better way to do it.There were parts of the job I didn't like. Disputes between cofounders, +figuring out when people were lying to us, fighting with people who +maltreated the startups, and so on. But I worked hard even at the +parts I didn't like. I was haunted by something Kevin Hale once +said about companies: "No one works harder than the boss." He meant +it both descriptively and prescriptively, and it was the second +part that scared me. I wanted YC to be good, so if how hard I worked +set the upper bound on how hard everyone else worked, I'd better +work very hard.One day in 2010, when he was visiting California for interviews, +Robert Morris did something astonishing: he offered me unsolicited +advice. I can only remember him doing that once before. One day at +Viaweb, when I was bent over double from a kidney stone, he suggested +that it would be a good idea for him to take me to the hospital. +That was what it took for Rtm to offer unsolicited advice. So I +remember his exact words very clearly. "You know," he said, "you +should make sure Y Combinator isn't the last cool thing you do."At the time I didn't understand what he meant, but gradually it +dawned on me that he was saying I should quit. This seemed strange +advice, because YC was doing great. But if there was one thing rarer +than Rtm offering advice, it was Rtm being wrong. So this set me +thinking. It was true that on my current trajectory, YC would be +the last thing I did, because it was only taking up more of my +attention. It had already eaten Arc, and was in the process of +eating essays too. Either YC was my life's work or I'd have to leave +eventually. And it wasn't, so I would.In the summer of 2012 my mother had a stroke, and the cause turned +out to be a blood clot caused by colon cancer. The stroke destroyed +her balance, and she was put in a nursing home, but she really +wanted to get out of it and back to her house, and my sister and I +were determined to help her do it. I used to fly up to Oregon to +visit her regularly, and I had a lot of time to think on those +flights. On one of them I realized I was ready to hand YC over to +someone else.I asked Jessica if she wanted to be president, but she didn't, so +we decided we'd try to recruit Sam Altman. We talked to Robert and +Trevor and we agreed to make it a complete changing of the guard. +Up till that point YC had been controlled by the original LLC we +four had started. But we wanted YC to last for a long time, and to +do that it couldn't be controlled by the founders. So if Sam said +yes, we'd let him reorganize YC. Robert and I would retire, and +Jessica and Trevor would become ordinary partners.When we asked Sam if he wanted to be president of YC, initially he +said no. He wanted to start a startup to make nuclear reactors. +But I kept at it, and in October 2013 he finally agreed. We decided +he'd take over starting with the winter 2014 batch. For the rest +of 2013 I left running YC more and more to Sam, partly so he could +learn the job, and partly because I was focused on my mother, whose +cancer had returned.She died on January 15, 2014. We knew this was coming, but it was +still hard when it did.I kept working on YC till March, to help get that batch of startups +through Demo Day, then I checked out pretty completely. (I still +talk to alumni and to new startups working on things I'm interested +in, but that only takes a few hours a week.)What should I do next? Rtm's advice hadn't included anything about +that. I wanted to do something completely different, so I decided +I'd paint. I wanted to see how good I could get if I really focused +on it. So the day after I stopped working on YC, I started painting. +I was rusty and it took a while to get back into shape, but it was +at least completely engaging. +[18]I spent most of the rest of 2014 painting. I'd never been able to +work so uninterruptedly before, and I got to be better than I had +been. Not good enough, but better. Then in November, right in the +middle of a painting, I ran out of steam. Up till that point I'd +always been curious to see how the painting I was working on would +turn out, but suddenly finishing this one seemed like a chore. So +I stopped working on it and cleaned my brushes and haven't painted +since. So far anyway.I realize that sounds rather wimpy. But attention is a zero sum +game. If you can choose what to work on, and you choose a project +that's not the best one (or at least a good one) for you, then it's +getting in the way of another project that is. And at 50 there was +some opportunity cost to screwing around.I started writing essays again, and wrote a bunch of new ones over +the next few months. I even wrote a couple that +weren't about +startups. Then in March 2015 I started working on Lisp again.The distinctive thing about Lisp is that its core is a language +defined by writing an interpreter in itself. It wasn't originally +intended as a programming language in the ordinary sense. It was +meant to be a formal model of computation, an alternative to the +Turing machine. If you want to write an interpreter for a language +in itself, what's the minimum set of predefined operators you need? +The Lisp that John McCarthy invented, or more accurately discovered, +is an answer to that question. +[19]McCarthy didn't realize this Lisp could even be used to program +computers till his grad student Steve Russell suggested it. Russell +translated McCarthy's interpreter into IBM 704 machine language, +and from that point Lisp started also to be a programming language +in the ordinary sense. But its origins as a model of computation +gave it a power and elegance that other languages couldn't match. +It was this that attracted me in college, though I didn't understand +why at the time.McCarthy's 1960 Lisp did nothing more than interpret Lisp expressions. +It was missing a lot of things you'd want in a programming language. +So these had to be added, and when they were, they weren't defined +using McCarthy's original axiomatic approach. That wouldn't have +been feasible at the time. McCarthy tested his interpreter by +hand-simulating the execution of programs. But it was already getting +close to the limit of interpreters you could test that way — indeed, +there was a bug in it that McCarthy had overlooked. To test a more +complicated interpreter, you'd have had to run it, and computers +then weren't powerful enough.Now they are, though. Now you could continue using McCarthy's +axiomatic approach till you'd defined a complete programming language. +And as long as every change you made to McCarthy's Lisp was a +discoveredness-preserving transformation, you could, in principle, +end up with a complete language that had this quality. Harder to +do than to talk about, of course, but if it was possible in principle, +why not try? So I decided to take a shot at it. It took 4 years, +from March 26, 2015 to October 12, 2019. It was fortunate that I +had a precisely defined goal, or it would have been hard to keep +at it for so long.I wrote this new Lisp, called Bel, +in itself in Arc. That may sound +like a contradiction, but it's an indication of the sort of trickery +I had to engage in to make this work. By means of an egregious +collection of hacks I managed to make something close enough to an +interpreter written in itself that could actually run. Not fast, +but fast enough to test.I had to ban myself from writing essays during most of this time, +or I'd never have finished. In late 2015 I spent 3 months writing +essays, and when I went back to working on Bel I could barely +understand the code. Not so much because it was badly written as +because the problem is so convoluted. When you're working on an +interpreter written in itself, it's hard to keep track of what's +happening at what level, and errors can be practically encrypted +by the time you get them.So I said no more essays till Bel was done. But I told few people +about Bel while I was working on it. So for years it must have +seemed that I was doing nothing, when in fact I was working harder +than I'd ever worked on anything. Occasionally after wrestling for +hours with some gruesome bug I'd check Twitter or HN and see someone +asking "Does Paul Graham still code?"Working on Bel was hard but satisfying. I worked on it so intensively +that at any given time I had a decent chunk of the code in my head +and could write more there. I remember taking the boys to the +coast on a sunny day in 2015 and figuring out how to deal with some +problem involving continuations while I watched them play in the +tide pools. It felt like I was doing life right. I remember that +because I was slightly dismayed at how novel it felt. The good news +is that I had more moments like this over the next few years.In the summer of 2016 we moved to England. We wanted our kids to +see what it was like living in another country, and since I was a +British citizen by birth, that seemed the obvious choice. We only +meant to stay for a year, but we liked it so much that we still +live there. So most of Bel was written in England.In the fall of 2019, Bel was finally finished. Like McCarthy's +original Lisp, it's a spec rather than an implementation, although +like McCarthy's Lisp it's a spec expressed as code.Now that I could write essays again, I wrote a bunch about topics +I'd had stacked up. I kept writing essays through 2020, but I also +started to think about other things I could work on. How should I +choose what to do? Well, how had I chosen what to work on in the +past? I wrote an essay for myself to answer that question, and I +was surprised how long and messy the answer turned out to be. If +this surprised me, who'd lived it, then I thought perhaps it would +be interesting to other people, and encouraging to those with +similarly messy lives. So I wrote a more detailed version for others +to read, and this is the last sentence of it. +Notes[1] +My experience skipped a step in the evolution of computers: +time-sharing machines with interactive OSes. I went straight from +batch processing to microcomputers, which made microcomputers seem +all the more exciting.[2] +Italian words for abstract concepts can nearly always be +predicted from their English cognates (except for occasional traps +like polluzione). It's the everyday words that differ. So if you +string together a lot of abstract concepts with a few simple verbs, +you can make a little Italian go a long way.[3] +I lived at Piazza San Felice 4, so my walk to the Accademia +went straight down the spine of old Florence: past the Pitti, across +the bridge, past Orsanmichele, between the Duomo and the Baptistery, +and then up Via Ricasoli to Piazza San Marco. I saw Florence at +street level in every possible condition, from empty dark winter +evenings to sweltering summer days when the streets were packed with +tourists.[4] +You can of course paint people like still lives if you want +to, and they're willing. That sort of portrait is arguably the apex +of still life painting, though the long sitting does tend to produce +pained expressions in the sitters.[5] +Interleaf was one of many companies that had smart people and +built impressive technology, and yet got crushed by Moore's Law. +In the 1990s the exponential growth in the power of commodity (i.e. +Intel) processors rolled up high-end, special-purpose hardware and +software companies like a bulldozer.[6] +The signature style seekers at RISD weren't specifically +mercenary. In the art world, money and coolness are tightly coupled. +Anything expensive comes to be seen as cool, and anything seen as +cool will soon become equally expensive.[7] +Technically the apartment wasn't rent-controlled but +rent-stabilized, but this is a refinement only New Yorkers would +know or care about. The point is that it was really cheap, less +than half market price.[8] +Most software you can launch as soon as it's done. But when +the software is an online store builder and you're hosting the +stores, if you don't have any users yet, that fact will be painfully +obvious. So before we could launch publicly we had to launch +privately, in the sense of recruiting an initial set of users and +making sure they had decent-looking stores.[9] +We'd had a code editor in Viaweb for users to define their +own page styles. They didn't know it, but they were editing Lisp +expressions underneath. But this wasn't an app editor, because the +code ran when the merchants' sites were generated, not when shoppers +visited them.[10] +This was the first instance of what is now a familiar experience, +and so was what happened next, when I read the comments and found +they were full of angry people. How could I claim that Lisp was +better than other languages? Weren't they all Turing complete? +People who see the responses to essays I write sometimes tell me +how sorry they feel for me, but I'm not exaggerating when I reply +that it has always been like this, since the very beginning. It +comes with the territory. An essay must tell readers things they +don't already know, and some +people dislike being told such things.[11] +People put plenty of stuff on the internet in the 90s of +course, but putting something online is not the same as publishing +it online. Publishing online means you treat the online version as +the (or at least a) primary version.[12] +There is a general lesson here that our experience with Y +Combinator also teaches: Customs continue to constrain you long +after the restrictions that caused them have disappeared. Customary +VC practice had once, like the customs about publishing essays, +been based on real constraints. Startups had once been much more +expensive to start, and proportionally rare. Now they could be cheap +and common, but the VCs' customs still reflected the old world, +just as customs about writing essays still reflected the constraints +of the print era.Which in turn implies that people who are independent-minded (i.e. +less influenced by custom) will have an advantage in fields affected +by rapid change (where customs are more likely to be obsolete).Here's an interesting point, though: you can't always predict which +fields will be affected by rapid change. Obviously software and +venture capital will be, but who would have predicted that essay +writing would be?[13] +Y Combinator was not the original name. At first we were +called Cambridge Seed. But we didn't want a regional name, in case +someone copied us in Silicon Valley, so we renamed ourselves after +one of the coolest tricks in the lambda calculus, the Y combinator.I picked orange as our color partly because it's the warmest, and +partly because no VC used it. In 2005 all the VCs used staid colors +like maroon, navy blue, and forest green, because they were trying +to appeal to LPs, not founders. The YC logo itself is an inside +joke: the Viaweb logo had been a white V on a red circle, so I made +the YC logo a white Y on an orange square.[14] +YC did become a fund for a couple years starting in 2009, +because it was getting so big I could no longer afford to fund it +personally. But after Heroku got bought we had enough money to go +back to being self-funded.[15] +I've never liked the term "deal flow," because it implies +that the number of new startups at any given time is fixed. This +is not only false, but it's the purpose of YC to falsify it, by +causing startups to be founded that would not otherwise have existed.[16] +She reports that they were all different shapes and sizes, +because there was a run on air conditioners and she had to get +whatever she could, but that they were all heavier than she could +carry now.[17] +Another problem with HN was a bizarre edge case that occurs +when you both write essays and run a forum. When you run a forum, +you're assumed to see if not every conversation, at least every +conversation involving you. And when you write essays, people post +highly imaginative misinterpretations of them on forums. Individually +these two phenomena are tedious but bearable, but the combination +is disastrous. You actually have to respond to the misinterpretations, +because the assumption that you're present in the conversation means +that not responding to any sufficiently upvoted misinterpretation +reads as a tacit admission that it's correct. But that in turn +encourages more; anyone who wants to pick a fight with you senses +that now is their chance.[18] +The worst thing about leaving YC was not working with Jessica +anymore. We'd been working on YC almost the whole time we'd known +each other, and we'd neither tried nor wanted to separate it from +our personal lives, so leaving was like pulling up a deeply rooted +tree.[19] +One way to get more precise about the concept of invented vs +discovered is to talk about space aliens. Any sufficiently advanced +alien civilization would certainly know about the Pythagorean +theorem, for example. I believe, though with less certainty, that +they would also know about the Lisp in McCarthy's 1960 paper.But if so there's no reason to suppose that this is the limit of +the language that might be known to them. Presumably aliens need +numbers and errors and I/O too. So it seems likely there exists at +least one path out of McCarthy's Lisp along which discoveredness +is preserved.Thanks to Trevor Blackwell, John Collison, Patrick Collison, Daniel +Gackle, Ralph Hazell, Jessica Livingston, Robert Morris, and Harj +Taggar for reading drafts of this. \ No newline at end of file diff --git a/data_generation/chroma_logs.log b/data_generation/chroma_logs.log index 089cb1e..b6c01d0 100644 --- a/data_generation/chroma_logs.log +++ b/data_generation/chroma_logs.log @@ -36,3 +36,18 @@ DEBUG:Chroma:time to pre process our knn query: 2.1457672119140625e-06 DEBUG:Chroma:time to run knn query: 0.00036215782165527344 DEBUG:Chroma:time to pre process our knn query: 3.0994415283203125e-06 DEBUG:Chroma:time to run knn query: 0.007834672927856445 +DEBUG:Chroma:Logger created +DEBUG:Chroma:Index not found +DEBUG:Chroma:Index saved to {self._save_folder}/index.bin +DEBUG:Chroma:Index saved to {self._save_folder}/index.bin +DEBUG:Chroma:time to pre process our knn query: 5.0067901611328125e-06 +DEBUG:Chroma:time to run knn query: 0.0006079673767089844 +DEBUG:Chroma:Index not found +DEBUG:Chroma:Index saved to {self._save_folder}/index.bin +DEBUG:Chroma:Index saved to {self._save_folder}/index.bin +DEBUG:Chroma:time to pre process our knn query: 7.867813110351562e-06 +DEBUG:Chroma:time to run knn query: 0.0008041858673095703 +DEBUG:Chroma:time to pre process our knn query: 5.0067901611328125e-06 +DEBUG:Chroma:time to run knn query: 0.0008640289306640625 +DEBUG:Chroma:time to pre process our knn query: 4.0531158447265625e-06 +DEBUG:Chroma:time to run knn query: 0.0007679462432861328 diff --git a/loaders/.ipynb_checkpoints/YouTube Loader-checkpoint.ipynb b/loaders/.ipynb_checkpoints/YouTube Loader-checkpoint.ipynb new file mode 100644 index 0000000..def8593 --- /dev/null +++ b/loaders/.ipynb_checkpoints/YouTube Loader-checkpoint.ipynb @@ -0,0 +1,417 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 6, + "id": "dd186bb6", + "metadata": {}, + "outputs": [], + "source": [ + "from langchain.document_loaders import YoutubeLoader\n", + "from langchain.llms import OpenAI\n", + "from langchain.chains.summarize import load_summarize_chain" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "2ba51e36", + "metadata": { + "hide_input": false + }, + "outputs": [], + "source": [ + "OPENAI_API_KEY = '...'" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e567d2ef", + "metadata": {}, + "outputs": [], + "source": [ + "# pip install youtube-transcript-api\n", + "# pip install pytube" + ] + }, + { + "cell_type": "markdown", + "id": "0b913708", + "metadata": {}, + "source": [ + "### 1. Simple Videos" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "e30060ab", + "metadata": {}, + "outputs": [], + "source": [ + "loader = YoutubeLoader.from_youtube_url(\"https://www.youtube.com/watch?v=QsYGlZkevEg\", add_video_info=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "ba6e2832", + "metadata": {}, + "outputs": [], + "source": [ + "result = loader.load()" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "52a99b6d", + "metadata": { + "collapsed": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Found video from Saturday Night Live that is 224 seconds long\n", + "\n", + "[Document(page_content='LADIES AND GENTLEMEN, PEDRO PASCAL! [ CHEERS AND APPLAUSE ] >> THANK YOU, THANK YOU. THANK YOU VERY MUCH. I\\'M SO EXCITED TO BE HERE. THANK YOU. I SPENT THE LAST YEAR SHOOTING A SHOW CALLED \"THE LAST OF US\" ON HBO. FOR SOME HBO SHOES, YOU GET TO SHOOT IN A FIVE STAR ITALIAN RESORT SURROUNDED BY BEAUTIFUL PEOPLE, BUT I SAID, NO, THAT\\'S TOO EASY. I WANT TO SHOOT IN A FREEZING CANADIAN FOREST WHILE BEING CHASED AROUND BY A GUY WHOSE HEAD LOOKS LIKE A GENITAL WART. IT IS AN HONOR BEING A PART OF THESE HUGE FRANCHISEs LIKE \"GAME OF THRONES\" AND \"STAR WARS,\" BUT I\\'M STILL GETTING USED TO PEOPLE RECOGNIZING ME. THE OTHER DAY, A GUY STOPPED ME ON THE STREET AND SAYS, MY SON LOVES \"THE MANDALORIAN\" AND THE NEXT THING I KNOW, I\\'M FACE TIMING WITH A 6-YEAR-OLD WHO HAS NO IDEA WHO I AM BECAUSE MY CHARACTER WEARS A MASK THE ENTIRE SHOW. THE GUY IS LIKE, DO THE MANDO VOICE, BUT IT\\'S LIKE A BEDROOM VOICE. WITHOUT THE MASK, IT JUST SOUNDS PORNY. PEOPLE WALKING BY ON THE STREET SEE ME WHISPERING TO A 6-YEAR-OLD KID. I CAN BRING YOU IN WARM, OR I CAN BRING YOU IN COLD. EVEN THOUGH I CAME TO THE U.S. WHEN I WAS LITTLE, I WAS BORN IN CHILE, AND I HAVE 34 FIRST COUSINS WHO ARE STILL THERE. THEY\\'RE VERY PROUD OF ME. I KNOW THEY\\'RE PROUD BECAUSE THEY GIVE MY PHONE NUMBER TO EVERY PERSON THEY MEET, WHICH MEANS EVERY DAY, SOMEONE IN SANTIAGO WILL TEXT ME STUFF LIKE, CAN YOU COME TO MY WEDDING, OR CAN YOU SING MY PRIEST HAPPY BIRTHDAY, OR IS BABY YODA MEAN IN REAL LIFE. SO I HAVE TO BE LIKE NO, NO, AND HIS NAME IS GROGU. BUT MY COUSINS WEREN\\'T ALWAYS SO PROUD. EARLY IN MY CAREER, I PLAYED SMALL PARTS IN EVERY CRIME SHOW. I EVEN PLAYED TWO DIFFERENT CHARACTERS ON \"LAW AND ORDER.\" TITO CABASSA WHO LOOKED LIKE THIS. AND ONE YEAR LATER, I PLAYED REGGIE LUCKMAN WHO LOOKS LIKE THIS. AND THAT, MY FRIENDS, IS CALLED RANGE. BUT IT IS AMAZING TO BE HERE, LIKE I SAID. I WAS BORN IN CHILE, AND NINE MONTHS LATER, MY PARENTS FLED AND BROUGHT ME AND MY SISTER TO THE U.S. THEY WERE SO BRAVE, AND WITHOUT THEM, I WOULDN\\'T BE HERE IN THIS WONDERFUL COUNTRY, AND I CERTAINLY WOULDN\\'T BE STANDING HERE WITH YOU ALL TONIGHT. SO TO ALL MY FAMILY WATCHING IN CHILE, I WANT TO SAY [ SPEAKING NON-ENGLISH ] WHICH MEANS, I LOVE YOU, I MISS YOU, AND STOP GIVING OUT MY PHONE NUMBER. WE\\'VE GOT AN AMAZING SHOW FOR YOU TONIGHT. COLDPLAY IS HERE, SO STICK', lookup_str='', metadata={'source': 'QsYGlZkevEg', 'title': 'Pedro Pascal Monologue - SNL', 'description': 'First-time host Pedro Pascal talks about filming The Last of Us and being recognized by fans.\\n\\nSaturday Night Live. Stream now on Peacock: https://pck.tv/3uQxh4q\\n\\nSubscribe to SNL: https://goo.gl/tUsXwM\\nStream Current Full Episodes: http://www.nbc.com/saturday-night-live\\n\\nWATCH PAST SNL SEASONS\\nGoogle Play - http://bit.ly/SNLGooglePlay\\niTunes - http://bit.ly/SNLiTunes\\n\\nSNL ON SOCIAL\\nSNL Instagram: http://instagram.com/nbcsnl\\nSNL Facebook: https://www.facebook.com/snl\\nSNL Twitter: https://twitter.com/nbcsnl\\nSNL TikTok: https://www.tiktok.com/@nbcsnl\\n\\nGET MORE NBC\\nLike NBC: http://Facebook.com/NBC\\nFollow NBC: http://Twitter.com/NBC\\nNBC Tumblr: http://NBCtv.tumblr.com/\\nYouTube: http://www.youtube.com/nbc\\nNBC Instagram: http://instagram.com/nbc\\n\\n#SNL #PedroPascal #SNL48 #Coldplay', 'view_count': 1433225, 'thumbnail_url': 'https://i.ytimg.com/vi/QsYGlZkevEg/sddefault.jpg', 'publish_date': datetime.datetime(2023, 2, 4, 0, 0), 'length': 224, 'author': 'Saturday Night Live'}, lookup_index=0)]\n" + ] + } + ], + "source": [ + "print (type(result))\n", + "print (f\"Found video from {result[0].metadata['author']} that is {result[0].metadata['length']} seconds long\")\n", + "print (\"\")\n", + "print (result)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "0a675091", + "metadata": {}, + "outputs": [], + "source": [ + "llm = OpenAI(temperature=0, openai_api_key=OPENAI_API_KEY)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "580bceb8", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "' Pedro Pascal shared his experience shooting for HBO\\'s \"The Last of Us\" and his journey to becoming a recognizable actor. He also spoke about his Chilean family, who were initially not proud of his acting career, but are now supportive. He concluded his speech by introducing Coldplay, who will be performing at the show.'" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "chain = load_summarize_chain(llm, chain_type=\"stuff\", verbose=False)\n", + "chain.run(result)" + ] + }, + { + "cell_type": "markdown", + "id": "f47acaa5", + "metadata": {}, + "source": [ + "### 2. Long Videos" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "985523d3", + "metadata": {}, + "outputs": [], + "source": [ + "loader = YoutubeLoader.from_youtube_url(\"https://www.youtube.com/watch?v=6Ub7Z1AGIuk\", add_video_info=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "d2c95abe", + "metadata": {}, + "outputs": [], + "source": [ + "result = loader.load()" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "f7454d1c", + "metadata": { + "collapsed": true + }, + "outputs": [ + { + "ename": "InvalidRequestError", + "evalue": "This model's maximum context length is 4097 tokens, however you requested 14199 tokens (13943 in your prompt; 256 for the completion). Please reduce your prompt; or completion length.", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mInvalidRequestError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m/var/folders/5c/csjfqsk97xz704h7v3fzjqph0000gn/T/ipykernel_10827/3887462961.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mchain\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mload_summarize_chain\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mllm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mchain_type\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"stuff\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mFalse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mchain\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/base.py\u001b[0m in \u001b[0;36mrun\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 237\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 238\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"`run` supports only one positional argument.\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 239\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0moutput_keys\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 240\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 241\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mkwargs\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/base.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, inputs, return_only_outputs)\u001b[0m\n\u001b[1;32m 140\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 141\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_chain_error\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 142\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 143\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_chain_end\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0moutputs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 144\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprep_outputs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moutputs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mreturn_only_outputs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/base.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, inputs, return_only_outputs)\u001b[0m\n\u001b[1;32m 137\u001b[0m )\n\u001b[1;32m 138\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 139\u001b[0;31m \u001b[0moutputs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 140\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 141\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_chain_error\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/combine_documents/base.py\u001b[0m in \u001b[0;36m_call\u001b[0;34m(self, inputs)\u001b[0m\n\u001b[1;32m 54\u001b[0m \u001b[0;31m# Other keys are assumed to be needed for LLM prediction\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 55\u001b[0m \u001b[0mother_keys\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mv\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mk\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mv\u001b[0m \u001b[0;32min\u001b[0m \u001b[0minputs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitems\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mk\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minput_key\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 56\u001b[0;31m \u001b[0moutput\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mextra_return_dict\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcombine_docs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdocs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mother_keys\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 57\u001b[0m \u001b[0mextra_return_dict\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0moutput_key\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0moutput\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 58\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mextra_return_dict\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/combine_documents/stuff.py\u001b[0m in \u001b[0;36mcombine_docs\u001b[0;34m(self, docs, **kwargs)\u001b[0m\n\u001b[1;32m 87\u001b[0m \u001b[0minputs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_inputs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdocs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 88\u001b[0m \u001b[0;31m# Call predict on the LLM.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 89\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mllm_chain\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpredict\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 90\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 91\u001b[0m async def acombine_docs(\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/llm.py\u001b[0m in \u001b[0;36mpredict\u001b[0;34m(self, **kwargs)\u001b[0m\n\u001b[1;32m 151\u001b[0m \u001b[0mcompletion\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mllm\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpredict\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0madjective\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"funny\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 152\u001b[0m \"\"\"\n\u001b[0;32m--> 153\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0moutput_key\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 154\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 155\u001b[0m \u001b[0;32masync\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mapredict\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/base.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, inputs, return_only_outputs)\u001b[0m\n\u001b[1;32m 140\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 141\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_chain_error\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 142\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 143\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_chain_end\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0moutputs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 144\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprep_outputs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moutputs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mreturn_only_outputs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/base.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, inputs, return_only_outputs)\u001b[0m\n\u001b[1;32m 137\u001b[0m )\n\u001b[1;32m 138\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 139\u001b[0;31m \u001b[0moutputs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 140\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 141\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_chain_error\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/llm.py\u001b[0m in \u001b[0;36m_call\u001b[0;34m(self, inputs)\u001b[0m\n\u001b[1;32m 132\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 133\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minputs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mDict\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mDict\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 134\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 135\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 136\u001b[0m \u001b[0;32masync\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_acall\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minputs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mDict\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mDict\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/llm.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self, input_list)\u001b[0m\n\u001b[1;32m 115\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minput_list\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mList\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mDict\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mList\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mDict\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 116\u001b[0m \u001b[0;34m\"\"\"Utilize the LLM generate method for speed gains.\"\"\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 117\u001b[0;31m \u001b[0mresponse\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgenerate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 118\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreate_outputs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresponse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 119\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/llm.py\u001b[0m in \u001b[0;36mgenerate\u001b[0;34m(self, input_list)\u001b[0m\n\u001b[1;32m 57\u001b[0m \u001b[0;34m\"\"\"Generate LLM result from inputs.\"\"\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 58\u001b[0m \u001b[0mprompts\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstop\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprep_prompts\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 59\u001b[0;31m \u001b[0mresponse\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mllm\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgenerate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprompts\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstop\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mstop\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 60\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mresponse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 61\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/llms/base.py\u001b[0m in \u001b[0;36mgenerate\u001b[0;34m(self, prompts, stop)\u001b[0m\n\u001b[1;32m 126\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 127\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_llm_error\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 128\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 129\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_llm_end\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0moutput\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 130\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0moutput\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/llms/base.py\u001b[0m in \u001b[0;36mgenerate\u001b[0;34m(self, prompts, stop)\u001b[0m\n\u001b[1;32m 123\u001b[0m )\n\u001b[1;32m 124\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 125\u001b[0;31m \u001b[0moutput\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_generate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprompts\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstop\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mstop\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 126\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 127\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_llm_error\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/llms/openai.py\u001b[0m in \u001b[0;36m_generate\u001b[0;34m(self, prompts, stop)\u001b[0m\n\u001b[1;32m 257\u001b[0m \u001b[0mchoices\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mextend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresponse\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"choices\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 258\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 259\u001b[0;31m \u001b[0mresponse\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcompletion_with_retry\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprompt\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0m_prompts\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mparams\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 260\u001b[0m \u001b[0mchoices\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mextend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresponse\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"choices\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 261\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstreaming\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/llms/openai.py\u001b[0m in \u001b[0;36mcompletion_with_retry\u001b[0;34m(self, **kwargs)\u001b[0m\n\u001b[1;32m 204\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclient\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 205\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 206\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0m_completion_with_retry\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 207\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 208\u001b[0m \u001b[0;32masync\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0macompletion_with_retry\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/tenacity/__init__.py\u001b[0m in \u001b[0;36mwrapped_f\u001b[0;34m(*args, **kw)\u001b[0m\n\u001b[1;32m 287\u001b[0m \u001b[0;34m@\u001b[0m\u001b[0mfunctools\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mwraps\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 288\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mwrapped_f\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAny\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAny\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAny\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 289\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 290\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 291\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mretry_with\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAny\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAny\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mWrappedFn\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/tenacity/__init__.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, fn, *args, **kwargs)\u001b[0m\n\u001b[1;32m 377\u001b[0m \u001b[0mretry_state\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mRetryCallState\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mretry_object\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mfn\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 378\u001b[0m \u001b[0;32mwhile\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 379\u001b[0;31m \u001b[0mdo\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0miter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mretry_state\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mretry_state\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 380\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdo\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mDoAttempt\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 381\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/tenacity/__init__.py\u001b[0m in \u001b[0;36miter\u001b[0;34m(self, retry_state)\u001b[0m\n\u001b[1;32m 312\u001b[0m \u001b[0mis_explicit_retry\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfut\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfailed\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfut\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTryAgain\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 313\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mis_explicit_retry\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mretry\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mretry_state\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 314\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfut\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 315\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 316\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mafter\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/concurrent/futures/_base.py\u001b[0m in \u001b[0;36mresult\u001b[0;34m(self, timeout)\u001b[0m\n\u001b[1;32m 437\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mCancelledError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 438\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_state\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mFINISHED\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 439\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__get_result\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 440\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 441\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_condition\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mwait\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtimeout\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/concurrent/futures/_base.py\u001b[0m in \u001b[0;36m__get_result\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 389\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_exception\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 390\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 391\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_exception\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 392\u001b[0m \u001b[0;32mfinally\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 393\u001b[0m \u001b[0;31m# Break a reference cycle with the exception in self._exception\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/tenacity/__init__.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, fn, *args, **kwargs)\u001b[0m\n\u001b[1;32m 380\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdo\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mDoAttempt\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 381\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 382\u001b[0;31m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 383\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mBaseException\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;31m# noqa: B902\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 384\u001b[0m \u001b[0mretry_state\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_exception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msys\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexc_info\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# type: ignore[arg-type]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/llms/openai.py\u001b[0m in \u001b[0;36m_completion_with_retry\u001b[0;34m(**kwargs)\u001b[0m\n\u001b[1;32m 202\u001b[0m \u001b[0;34m@\u001b[0m\u001b[0mretry_decorator\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 203\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_completion_with_retry\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 204\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclient\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 205\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 206\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0m_completion_with_retry\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/openai/api_resources/completion.py\u001b[0m in \u001b[0;36mcreate\u001b[0;34m(cls, *args, **kwargs)\u001b[0m\n\u001b[1;32m 23\u001b[0m \u001b[0;32mwhile\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 25\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0msuper\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 26\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mTryAgain\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 27\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mtimeout\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtime\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0mstart\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mtimeout\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py\u001b[0m in \u001b[0;36mcreate\u001b[0;34m(cls, api_key, api_base, api_type, request_id, api_version, organization, **params)\u001b[0m\n\u001b[1;32m 151\u001b[0m )\n\u001b[1;32m 152\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 153\u001b[0;31m response, _, api_key = requestor.request(\n\u001b[0m\u001b[1;32m 154\u001b[0m \u001b[0;34m\"post\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 155\u001b[0m \u001b[0murl\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/openai/api_requestor.py\u001b[0m in \u001b[0;36mrequest\u001b[0;34m(self, method, url, params, headers, files, stream, request_id, request_timeout)\u001b[0m\n\u001b[1;32m 225\u001b[0m \u001b[0mrequest_timeout\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mrequest_timeout\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 226\u001b[0m )\n\u001b[0;32m--> 227\u001b[0;31m \u001b[0mresp\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgot_stream\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_interpret_response\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstream\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 228\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mresp\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgot_stream\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapi_key\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 229\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/openai/api_requestor.py\u001b[0m in \u001b[0;36m_interpret_response\u001b[0;34m(self, result, stream)\u001b[0m\n\u001b[1;32m 618\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 619\u001b[0m return (\n\u001b[0;32m--> 620\u001b[0;31m self._interpret_response_line(\n\u001b[0m\u001b[1;32m 621\u001b[0m \u001b[0mresult\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcontent\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdecode\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"utf-8\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 622\u001b[0m \u001b[0mresult\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstatus_code\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/openai/api_requestor.py\u001b[0m in \u001b[0;36m_interpret_response_line\u001b[0;34m(self, rbody, rcode, rheaders, stream)\u001b[0m\n\u001b[1;32m 678\u001b[0m \u001b[0mstream_error\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mstream\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;34m\"error\"\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mresp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 679\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mstream_error\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;36m200\u001b[0m \u001b[0;34m<=\u001b[0m \u001b[0mrcode\u001b[0m \u001b[0;34m<\u001b[0m \u001b[0;36m300\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 680\u001b[0;31m raise self.handle_error_response(\n\u001b[0m\u001b[1;32m 681\u001b[0m \u001b[0mrbody\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrcode\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrheaders\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstream_error\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mstream_error\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 682\u001b[0m )\n", + "\u001b[0;31mInvalidRequestError\u001b[0m: This model's maximum context length is 4097 tokens, however you requested 14199 tokens (13943 in your prompt; 256 for the completion). Please reduce your prompt; or completion length." + ] + } + ], + "source": [ + "chain = load_summarize_chain(llm, chain_type=\"stuff\", verbose=False)\n", + "chain.run(result)" + ] + }, + { + "cell_type": "markdown", + "id": "92a9de4b", + "metadata": {}, + "source": [ + "Problem, your transcript/document is too long" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "6d071a07", + "metadata": {}, + "outputs": [], + "source": [ + "from langchain.text_splitter import RecursiveCharacterTextSplitter" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "36968fb9", + "metadata": {}, + "outputs": [], + "source": [ + "text_splitter = RecursiveCharacterTextSplitter(chunk_size=2000, chunk_overlap=0)" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "cb6beb06", + "metadata": {}, + "outputs": [], + "source": [ + "texts = text_splitter.split_documents(result)" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "id": "b7889046", + "metadata": { + "collapsed": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\n", + "\u001b[1m> Entering new MapReduceDocumentsChain chain...\u001b[0m\n", + "Prompt after formatting:\n", + "\u001b[32;1m\u001b[1;3mWrite a concise summary of the following:\n", + "\n", + "\n", + "\"somehow five years later covet hits and you know what they decide to do they're like you know what let's go all in on creating like safety safety stuff for covert like masks respirators um gloves things like that and they become one of the like core providers right at the start of covet they shifted all their production manufacturing stuff they're like forget the vodka bottles forget the LED screens we need n95 masks and we need respirators and we need you know these testing kits and we need and they started producing this stuff and they started just winning all these contracts [Music] we're live Sean uh we have a bunch of stuff you you have a you have a a full menu over here and so do I yeah all right I want you to look at my menu here and I want you to just pick something off the menu go ahead and I'll Riff Off it we don't prefer people who they don't they don't know we only write like one or two words so you get like a teaser you're like man what the hell is this about but you don't know what it actually is but I have I put all my stuff in here an accident I have this new researcher who's crushing it he just gives me all the content like five minutes ahead of time but uh Rich neighbor how did I know you'd pick a rich neighbor so there's somebody in my neighborhood who I bumped into and I've just I'm you know I sort of get out there and I collect signals is this you know where where do I place this person on the uh the Billy scale like are they you know are they on their way up are they are they have they made it in life are they really balling out of control where where is this person these people have been balling out of control like when Christmas time came up there was just like the wife went outside and it was just pointing at windows and all of a sudden the house was lit up like a Christmas tree they had like so they had almost like decked out things and they go hey hey um invite your kids over uh this Thursday we have a snow machine they're we're building a Snow Hill in our driveway like uh you you want to do sledding without going to Tahoe what's that like a big snow cone is that what that no it's like a giant truck that comes that creates snow and it piles it up so that your like their house looked like it was in you know Michigan or something like that yeah but it's just like like it's like an ice machine or something yeah it's like yeah something like that yeah like a big snow cone like a big shaved ice thing yeah yeah you were right from the\"\n", + "\n", + "\n", + "CONCISE SUMMARY:\u001b[0m\n", + "Prompt after formatting:\n", + "\u001b[32;1m\u001b[1;3mWrite a concise summary of the following:\n", + "\n", + "\n", + "\"from the beginning you're right so they did this and they had a fake Santa there and I was like man this is a lot for a Thursday afternoon but okay uh this is cool like these people's style they seem really nice and I didn't know what they did so I kind of I hit it with the Google the other day and I was like let's see who these people are and they have a crazy story so they created a company that back in 2014 did this thing it basically it lets you take a vodka bottle they had a vodka bottle that had an LED sign going around it so you could give somebody a vodka bottle that would say happy birthday Sam or like you could program any message I could be like you know uh whatever I could be like you're getting an old [ __ ] whatever I could write any message on it it would go on your your vodka bottle all right seems kind of gimmicky I don't really you know not a bad idea but but balling out of control from that didn't didn't 100 make sense but that was it sounds like a Drop Shipping like joke sounds like my first idea out of college it's like this is like me in college would have been like bro next next Google I got it what if we took you know this Jager bomb and we put an LED screen on it wouldn't that be incredible and so so they had this thing and they were like licensing this out or something like that somehow like Shaq became an advisor to their company it was really crazy it makes sense yeah as you would five years later covet hits and you know what they decide to do they're like you know what [ __ ] this vodka thing let's go all in on creating like safety safety stuff for cover like masks respirators um gloves things like that and they become one of the like core providers right at the start of covert they shifted all their production manufacturing stuff they're like forget the vodka bottles forget the LED screens we need n95 masks and we need respirators and we need you know these testing kits and we need and they started producing this stuff and they started just winning all these contracts and so now like if you go look at their website it's one of those I know your Rich websites because there's like not a lot of information on it but if you go to like the P they have like a press release section and it's like PR Newswire company gets 113 million dollar contract with the government for safety equipment oh my God local East Bay success story where they uh they're now the the sole testing provider for you know with the Lakers Stadium\"\n", + "\n", + "\n", + "CONCISE SUMMARY:\u001b[0m\n", + "Prompt after formatting:\n", + "\u001b[32;1m\u001b[1;3mWrite a concise summary of the following:\n", + "\n", + "\n", + "\"Levi's Stadium like all these different places and so these guys are getting 100 million dollar plus contracts for their stuff now I think probably it's like you know probably only like 10 margin when you buy you think it's that selling masks I think for things like that probably it's like 10 15 is my guess maybe maybe during coven everyone was completely price insensitive and they could just charge whatever they wanted I'm not sure I would have thought that but um but wow dude what a what a pivot and uh you know that isn't that just kind of crazy and that was an opportunity kind of available to a lot of people right dude I know a bunch of people who did that and like I had a friend that did it and he's like dude check this out and he sends me a picture of a Shopify store and it's doing like 2 million a month I know a lot of people who did that and I've only followed up with one or two of them and uh I have a feeling that like of the eight people I know who did it like three of them it worked out and then the rest it was like a really quick cash grab but then they over bought inventory and it and it's like nothing do you know people who did that yes we there was a guy in um I had started this Mastermind group that's actually where I found Ben uh but like one of the other guys in The Mastermind group he like every time we came to the testimony does he live in Texas no he's in Canada every time he came to the Mastermind group I feel like he had a different business which is like not what you want in a mastermind group but he was a good dude and he would always be like oh I have this other business that's like oh you know for auto repair blah blah we do their SEO and I was like okay but then what about that thing you told me last time and then one time you came dude we're doing mobile covet testing trucks that will drive up to places and we can just do rapid testing for covet and we were like all right I mean that sounds cool but like are you like do you know anything about covet testing like does anybody in the world know about this like what he's like oh I got the scientist that's going to be great and then he came back and he was like hey um really excited to be here I need you guys help um like three months later he was like I really need you guys help about going public and I was like and he's like yeah we're gonna do like 85 million this year in revenue and I was like what and he's like yeah we're getting all these contracts with the state of uh with like the you\"\n", + "\n", + "\n", + "CONCISE SUMMARY:\u001b[0m\n", + "Prompt after formatting:\n", + "\u001b[32;1m\u001b[1;3mWrite a concise summary of the following:\n", + "\n", + "\n", + "\"know the [ __ ] in Canada like these country Country-Wide contracts and um you know yeah we think maybe we should take this public next year and I was like oh my God so how did it end I I don't even know because I that that guy my head was just spinning every time uh you know he would talk because I'm like this is either too good to be true or I'm too dumb and this is amazing and I can't tell which one it is it's probably some mix of both but you're right I know several people that went all in on covid right when it happened and like low-key got like an absurd amount of traction very very fast yeah like a ton my dad had actually called me one day and he goes my friend works at this hospital they need extra equipment they need extra masks I talked to somebody in India and they could produce these masks and like I think we could do like a two or three million dollar contract and I was like fantastic um should do it and he's like yeah I wanna but my dad has this problem where my dad is addicted to meetings like he thinks winning is like this important person met with me and then he'll tell me the duration of the meeting to show me the value he's like only scheduled for one hour but we sat there for 90 minutes and I'd be like okay so what like everybody so you know he was really interested two hours right and he was just like he just like always just obsessed with that so he was he just had a bunch of meetings and I was like Dad you're gonna it's all about that action boss you're gonna take some action here what what's gonna happen like go go for it do it and he's like well no I want he's like I want everybody to like sign off on it and de-risk it completely pay me up front and I was just like dude this is this is like the cheap way to do business like you got to take a little risk here you're throwing shade on your dad right now I hope he doesn't listen to this and you called him boss if I said Cosby boss he's getting in the headlock yeah my dad yeah we make fun of each other like we call it like it is I do a bunch of dumb things and I say when I do dumb things this is his dumb thing he is high planning low action on these things and he says it all the time like um we went I went I took him to Tony Robbins and Tony Robbins is all about like taking massive action on like the things you want and he's like I was like what's your big takeaway he's like oh man I need to take Massive Action and I was like that yeah that's that you did it you learned the right lesson from this thing he\"\n", + "\n", + "\n", + "CONCISE SUMMARY:\u001b[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\n", + "\u001b[1m> Entering new LLMChain chain...\u001b[0m\n", + "Prompt after formatting:\n", + "\u001b[32;1m\u001b[1;3mWrite a concise summary of the following:\n", + "\n", + "\n", + "\"\n", + "\n", + "Covet shifted their production from vodka bottles and LED screens to safety equipment such as masks, respirators, and gloves when the pandemic hit. They won contracts and became one of the core providers. They also created a snow machine to create a snow hill in their driveway for sledding without going to Tahoe.\n", + "\n", + " A company created in 2014 developed a vodka bottle with an LED sign that could be programmed with any message. When the COVID-19 pandemic hit, they shifted their production to safety equipment such as masks, respirators, gloves, and testing kits. They have since become a successful provider of safety equipment, winning contracts with the government and becoming the sole testing provider for the Lakers Stadium.\n", + "\n", + "\n", + "Levi's Stadium and other places are offering contracts worth over $100 million for products such as masks. During the COVID-19 pandemic, people were able to take advantage of this opportunity and make a lot of money. A friend of the speaker had a Shopify store that was making $2 million a month. Another person in the speaker's Mastermind group had a business doing mobile COVID testing trucks, and eventually went public with 85 million in revenue.\n", + "\n", + " A person's father was interested in a two or three million dollar contract, but was hesitant to take action due to wanting to de-risk it completely and get everyone to sign off on it. The person encouraged their father to take a risk and take action, and they both joked about it. The father attended a Tony Robbins event and learned the lesson to take massive action on the things he wants.\"\n", + "\n", + "\n", + "CONCISE SUMMARY:\u001b[0m\n", + "\n", + "\u001b[1m> Finished chain.\u001b[0m\n", + "\n", + "\u001b[1m> Finished chain.\u001b[0m\n" + ] + }, + { + "data": { + "text/plain": [ + "'\\n\\nCovet shifted their production from vodka bottles and LED screens to safety equipment such as masks, respirators, and gloves when the pandemic hit, winning contracts and becoming one of the core providers. They also created a snow machine to create a snow hill in their driveway for sledding. During the pandemic, people were able to take advantage of the opportunity to make a lot of money, with one friend making $2 million a month and another going public with 85 million in revenue. The speaker encouraged their father to take a risk and take action, which he learned from a Tony Robbins event.'" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "chain = load_summarize_chain(llm, chain_type=\"map_reduce\", verbose=True)\n", + "chain.run(texts[:4])" + ] + }, + { + "cell_type": "markdown", + "id": "7d5cf285", + "metadata": {}, + "source": [ + "### 3. Multiple Videos" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "id": "2dad798e", + "metadata": {}, + "outputs": [], + "source": [ + "youtube_url_list = [\"https://www.youtube.com/watch?v=AXq0QHUwmh8\", \"https://www.youtube.com/watch?v=EwHrjZxAT7g\"]\n", + "\n", + "texts = []\n", + "\n", + "text_splitter = RecursiveCharacterTextSplitter(chunk_size=2000, chunk_overlap=0)\n", + "\n", + "for url in youtube_url_list:\n", + " loader = YoutubeLoader.from_youtube_url(url, add_video_info=True)\n", + " result = loader.load()\n", + " \n", + " texts.extend(text_splitter.split_documents(result))" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "id": "862af735", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "' This article discusses the process of building a backyard golf green, including the cost of materials and the steps involved. Bella Ramsey and Pedro Pascal also discuss their experiences on the set of Game of Thrones and The Last of Us, including their first impressions of each other, what they took from set, and what item from the Game of Thrones world they would bring to The Last of Us. Bella talks about her most prized possession, a tear stick, and her best attribute in a survival scenario. Finally, they discuss their first jobs.'" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "chain = load_summarize_chain(llm, chain_type=\"map_reduce\", verbose=False)\n", + "chain.run(texts)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9bd0b571", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/loaders/YouTube Loader.ipynb b/loaders/YouTube Loader.ipynb new file mode 100644 index 0000000..def8593 --- /dev/null +++ b/loaders/YouTube Loader.ipynb @@ -0,0 +1,417 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 6, + "id": "dd186bb6", + "metadata": {}, + "outputs": [], + "source": [ + "from langchain.document_loaders import YoutubeLoader\n", + "from langchain.llms import OpenAI\n", + "from langchain.chains.summarize import load_summarize_chain" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "2ba51e36", + "metadata": { + "hide_input": false + }, + "outputs": [], + "source": [ + "OPENAI_API_KEY = '...'" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e567d2ef", + "metadata": {}, + "outputs": [], + "source": [ + "# pip install youtube-transcript-api\n", + "# pip install pytube" + ] + }, + { + "cell_type": "markdown", + "id": "0b913708", + "metadata": {}, + "source": [ + "### 1. Simple Videos" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "e30060ab", + "metadata": {}, + "outputs": [], + "source": [ + "loader = YoutubeLoader.from_youtube_url(\"https://www.youtube.com/watch?v=QsYGlZkevEg\", add_video_info=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "ba6e2832", + "metadata": {}, + "outputs": [], + "source": [ + "result = loader.load()" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "52a99b6d", + "metadata": { + "collapsed": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Found video from Saturday Night Live that is 224 seconds long\n", + "\n", + "[Document(page_content='LADIES AND GENTLEMEN, PEDRO PASCAL! [ CHEERS AND APPLAUSE ] >> THANK YOU, THANK YOU. THANK YOU VERY MUCH. I\\'M SO EXCITED TO BE HERE. THANK YOU. I SPENT THE LAST YEAR SHOOTING A SHOW CALLED \"THE LAST OF US\" ON HBO. FOR SOME HBO SHOES, YOU GET TO SHOOT IN A FIVE STAR ITALIAN RESORT SURROUNDED BY BEAUTIFUL PEOPLE, BUT I SAID, NO, THAT\\'S TOO EASY. I WANT TO SHOOT IN A FREEZING CANADIAN FOREST WHILE BEING CHASED AROUND BY A GUY WHOSE HEAD LOOKS LIKE A GENITAL WART. IT IS AN HONOR BEING A PART OF THESE HUGE FRANCHISEs LIKE \"GAME OF THRONES\" AND \"STAR WARS,\" BUT I\\'M STILL GETTING USED TO PEOPLE RECOGNIZING ME. THE OTHER DAY, A GUY STOPPED ME ON THE STREET AND SAYS, MY SON LOVES \"THE MANDALORIAN\" AND THE NEXT THING I KNOW, I\\'M FACE TIMING WITH A 6-YEAR-OLD WHO HAS NO IDEA WHO I AM BECAUSE MY CHARACTER WEARS A MASK THE ENTIRE SHOW. THE GUY IS LIKE, DO THE MANDO VOICE, BUT IT\\'S LIKE A BEDROOM VOICE. WITHOUT THE MASK, IT JUST SOUNDS PORNY. PEOPLE WALKING BY ON THE STREET SEE ME WHISPERING TO A 6-YEAR-OLD KID. I CAN BRING YOU IN WARM, OR I CAN BRING YOU IN COLD. EVEN THOUGH I CAME TO THE U.S. WHEN I WAS LITTLE, I WAS BORN IN CHILE, AND I HAVE 34 FIRST COUSINS WHO ARE STILL THERE. THEY\\'RE VERY PROUD OF ME. I KNOW THEY\\'RE PROUD BECAUSE THEY GIVE MY PHONE NUMBER TO EVERY PERSON THEY MEET, WHICH MEANS EVERY DAY, SOMEONE IN SANTIAGO WILL TEXT ME STUFF LIKE, CAN YOU COME TO MY WEDDING, OR CAN YOU SING MY PRIEST HAPPY BIRTHDAY, OR IS BABY YODA MEAN IN REAL LIFE. SO I HAVE TO BE LIKE NO, NO, AND HIS NAME IS GROGU. BUT MY COUSINS WEREN\\'T ALWAYS SO PROUD. EARLY IN MY CAREER, I PLAYED SMALL PARTS IN EVERY CRIME SHOW. I EVEN PLAYED TWO DIFFERENT CHARACTERS ON \"LAW AND ORDER.\" TITO CABASSA WHO LOOKED LIKE THIS. AND ONE YEAR LATER, I PLAYED REGGIE LUCKMAN WHO LOOKS LIKE THIS. AND THAT, MY FRIENDS, IS CALLED RANGE. BUT IT IS AMAZING TO BE HERE, LIKE I SAID. I WAS BORN IN CHILE, AND NINE MONTHS LATER, MY PARENTS FLED AND BROUGHT ME AND MY SISTER TO THE U.S. THEY WERE SO BRAVE, AND WITHOUT THEM, I WOULDN\\'T BE HERE IN THIS WONDERFUL COUNTRY, AND I CERTAINLY WOULDN\\'T BE STANDING HERE WITH YOU ALL TONIGHT. SO TO ALL MY FAMILY WATCHING IN CHILE, I WANT TO SAY [ SPEAKING NON-ENGLISH ] WHICH MEANS, I LOVE YOU, I MISS YOU, AND STOP GIVING OUT MY PHONE NUMBER. WE\\'VE GOT AN AMAZING SHOW FOR YOU TONIGHT. COLDPLAY IS HERE, SO STICK', lookup_str='', metadata={'source': 'QsYGlZkevEg', 'title': 'Pedro Pascal Monologue - SNL', 'description': 'First-time host Pedro Pascal talks about filming The Last of Us and being recognized by fans.\\n\\nSaturday Night Live. Stream now on Peacock: https://pck.tv/3uQxh4q\\n\\nSubscribe to SNL: https://goo.gl/tUsXwM\\nStream Current Full Episodes: http://www.nbc.com/saturday-night-live\\n\\nWATCH PAST SNL SEASONS\\nGoogle Play - http://bit.ly/SNLGooglePlay\\niTunes - http://bit.ly/SNLiTunes\\n\\nSNL ON SOCIAL\\nSNL Instagram: http://instagram.com/nbcsnl\\nSNL Facebook: https://www.facebook.com/snl\\nSNL Twitter: https://twitter.com/nbcsnl\\nSNL TikTok: https://www.tiktok.com/@nbcsnl\\n\\nGET MORE NBC\\nLike NBC: http://Facebook.com/NBC\\nFollow NBC: http://Twitter.com/NBC\\nNBC Tumblr: http://NBCtv.tumblr.com/\\nYouTube: http://www.youtube.com/nbc\\nNBC Instagram: http://instagram.com/nbc\\n\\n#SNL #PedroPascal #SNL48 #Coldplay', 'view_count': 1433225, 'thumbnail_url': 'https://i.ytimg.com/vi/QsYGlZkevEg/sddefault.jpg', 'publish_date': datetime.datetime(2023, 2, 4, 0, 0), 'length': 224, 'author': 'Saturday Night Live'}, lookup_index=0)]\n" + ] + } + ], + "source": [ + "print (type(result))\n", + "print (f\"Found video from {result[0].metadata['author']} that is {result[0].metadata['length']} seconds long\")\n", + "print (\"\")\n", + "print (result)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "0a675091", + "metadata": {}, + "outputs": [], + "source": [ + "llm = OpenAI(temperature=0, openai_api_key=OPENAI_API_KEY)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "580bceb8", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "' Pedro Pascal shared his experience shooting for HBO\\'s \"The Last of Us\" and his journey to becoming a recognizable actor. He also spoke about his Chilean family, who were initially not proud of his acting career, but are now supportive. He concluded his speech by introducing Coldplay, who will be performing at the show.'" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "chain = load_summarize_chain(llm, chain_type=\"stuff\", verbose=False)\n", + "chain.run(result)" + ] + }, + { + "cell_type": "markdown", + "id": "f47acaa5", + "metadata": {}, + "source": [ + "### 2. Long Videos" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "985523d3", + "metadata": {}, + "outputs": [], + "source": [ + "loader = YoutubeLoader.from_youtube_url(\"https://www.youtube.com/watch?v=6Ub7Z1AGIuk\", add_video_info=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "d2c95abe", + "metadata": {}, + "outputs": [], + "source": [ + "result = loader.load()" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "f7454d1c", + "metadata": { + "collapsed": true + }, + "outputs": [ + { + "ename": "InvalidRequestError", + "evalue": "This model's maximum context length is 4097 tokens, however you requested 14199 tokens (13943 in your prompt; 256 for the completion). Please reduce your prompt; or completion length.", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mInvalidRequestError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m/var/folders/5c/csjfqsk97xz704h7v3fzjqph0000gn/T/ipykernel_10827/3887462961.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mchain\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mload_summarize_chain\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mllm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mchain_type\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"stuff\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mFalse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mchain\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/base.py\u001b[0m in \u001b[0;36mrun\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 237\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 238\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"`run` supports only one positional argument.\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 239\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0moutput_keys\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 240\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 241\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mkwargs\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/base.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, inputs, return_only_outputs)\u001b[0m\n\u001b[1;32m 140\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 141\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_chain_error\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 142\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 143\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_chain_end\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0moutputs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 144\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprep_outputs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moutputs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mreturn_only_outputs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/base.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, inputs, return_only_outputs)\u001b[0m\n\u001b[1;32m 137\u001b[0m )\n\u001b[1;32m 138\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 139\u001b[0;31m \u001b[0moutputs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 140\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 141\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_chain_error\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/combine_documents/base.py\u001b[0m in \u001b[0;36m_call\u001b[0;34m(self, inputs)\u001b[0m\n\u001b[1;32m 54\u001b[0m \u001b[0;31m# Other keys are assumed to be needed for LLM prediction\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 55\u001b[0m \u001b[0mother_keys\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mv\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mk\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mv\u001b[0m \u001b[0;32min\u001b[0m \u001b[0minputs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitems\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mk\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minput_key\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 56\u001b[0;31m \u001b[0moutput\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mextra_return_dict\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcombine_docs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdocs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mother_keys\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 57\u001b[0m \u001b[0mextra_return_dict\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0moutput_key\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0moutput\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 58\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mextra_return_dict\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/combine_documents/stuff.py\u001b[0m in \u001b[0;36mcombine_docs\u001b[0;34m(self, docs, **kwargs)\u001b[0m\n\u001b[1;32m 87\u001b[0m \u001b[0minputs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_inputs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdocs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 88\u001b[0m \u001b[0;31m# Call predict on the LLM.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 89\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mllm_chain\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpredict\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 90\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 91\u001b[0m async def acombine_docs(\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/llm.py\u001b[0m in \u001b[0;36mpredict\u001b[0;34m(self, **kwargs)\u001b[0m\n\u001b[1;32m 151\u001b[0m \u001b[0mcompletion\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mllm\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpredict\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0madjective\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"funny\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 152\u001b[0m \"\"\"\n\u001b[0;32m--> 153\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0moutput_key\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 154\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 155\u001b[0m \u001b[0;32masync\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mapredict\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/base.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, inputs, return_only_outputs)\u001b[0m\n\u001b[1;32m 140\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 141\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_chain_error\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 142\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 143\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_chain_end\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0moutputs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 144\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprep_outputs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moutputs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mreturn_only_outputs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/base.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, inputs, return_only_outputs)\u001b[0m\n\u001b[1;32m 137\u001b[0m )\n\u001b[1;32m 138\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 139\u001b[0;31m \u001b[0moutputs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 140\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 141\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_chain_error\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/llm.py\u001b[0m in \u001b[0;36m_call\u001b[0;34m(self, inputs)\u001b[0m\n\u001b[1;32m 132\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 133\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minputs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mDict\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mDict\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 134\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0minputs\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 135\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 136\u001b[0m \u001b[0;32masync\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_acall\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minputs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mDict\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mDict\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/llm.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self, input_list)\u001b[0m\n\u001b[1;32m 115\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minput_list\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mList\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mDict\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mList\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mDict\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 116\u001b[0m \u001b[0;34m\"\"\"Utilize the LLM generate method for speed gains.\"\"\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 117\u001b[0;31m \u001b[0mresponse\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgenerate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 118\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreate_outputs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresponse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 119\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/chains/llm.py\u001b[0m in \u001b[0;36mgenerate\u001b[0;34m(self, input_list)\u001b[0m\n\u001b[1;32m 57\u001b[0m \u001b[0;34m\"\"\"Generate LLM result from inputs.\"\"\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 58\u001b[0m \u001b[0mprompts\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstop\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprep_prompts\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 59\u001b[0;31m \u001b[0mresponse\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mllm\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgenerate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprompts\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstop\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mstop\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 60\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mresponse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 61\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/llms/base.py\u001b[0m in \u001b[0;36mgenerate\u001b[0;34m(self, prompts, stop)\u001b[0m\n\u001b[1;32m 126\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 127\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_llm_error\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 128\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 129\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_llm_end\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0moutput\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 130\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0moutput\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/llms/base.py\u001b[0m in \u001b[0;36mgenerate\u001b[0;34m(self, prompts, stop)\u001b[0m\n\u001b[1;32m 123\u001b[0m )\n\u001b[1;32m 124\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 125\u001b[0;31m \u001b[0moutput\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_generate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprompts\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstop\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mstop\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 126\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mKeyboardInterrupt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 127\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcallback_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_llm_error\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mverbose\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/llms/openai.py\u001b[0m in \u001b[0;36m_generate\u001b[0;34m(self, prompts, stop)\u001b[0m\n\u001b[1;32m 257\u001b[0m \u001b[0mchoices\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mextend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresponse\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"choices\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 258\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 259\u001b[0;31m \u001b[0mresponse\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcompletion_with_retry\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprompt\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0m_prompts\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mparams\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 260\u001b[0m \u001b[0mchoices\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mextend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresponse\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"choices\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 261\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstreaming\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/llms/openai.py\u001b[0m in \u001b[0;36mcompletion_with_retry\u001b[0;34m(self, **kwargs)\u001b[0m\n\u001b[1;32m 204\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclient\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 205\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 206\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0m_completion_with_retry\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 207\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 208\u001b[0m \u001b[0;32masync\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0macompletion_with_retry\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/tenacity/__init__.py\u001b[0m in \u001b[0;36mwrapped_f\u001b[0;34m(*args, **kw)\u001b[0m\n\u001b[1;32m 287\u001b[0m \u001b[0;34m@\u001b[0m\u001b[0mfunctools\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mwraps\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 288\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mwrapped_f\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAny\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAny\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAny\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 289\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 290\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 291\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mretry_with\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAny\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAny\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mWrappedFn\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/tenacity/__init__.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, fn, *args, **kwargs)\u001b[0m\n\u001b[1;32m 377\u001b[0m \u001b[0mretry_state\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mRetryCallState\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mretry_object\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mfn\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 378\u001b[0m \u001b[0;32mwhile\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 379\u001b[0;31m \u001b[0mdo\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0miter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mretry_state\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mretry_state\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 380\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdo\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mDoAttempt\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 381\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/tenacity/__init__.py\u001b[0m in \u001b[0;36miter\u001b[0;34m(self, retry_state)\u001b[0m\n\u001b[1;32m 312\u001b[0m \u001b[0mis_explicit_retry\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfut\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfailed\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfut\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTryAgain\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 313\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mis_explicit_retry\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mretry\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mretry_state\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 314\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfut\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 315\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 316\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mafter\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/concurrent/futures/_base.py\u001b[0m in \u001b[0;36mresult\u001b[0;34m(self, timeout)\u001b[0m\n\u001b[1;32m 437\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mCancelledError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 438\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_state\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mFINISHED\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 439\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__get_result\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 440\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 441\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_condition\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mwait\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtimeout\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/concurrent/futures/_base.py\u001b[0m in \u001b[0;36m__get_result\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 389\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_exception\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 390\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 391\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_exception\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 392\u001b[0m \u001b[0;32mfinally\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 393\u001b[0m \u001b[0;31m# Break a reference cycle with the exception in self._exception\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/tenacity/__init__.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, fn, *args, **kwargs)\u001b[0m\n\u001b[1;32m 380\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdo\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mDoAttempt\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 381\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 382\u001b[0;31m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 383\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mBaseException\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;31m# noqa: B902\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 384\u001b[0m \u001b[0mretry_state\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_exception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msys\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexc_info\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# type: ignore[arg-type]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/langchain/llms/openai.py\u001b[0m in \u001b[0;36m_completion_with_retry\u001b[0;34m(**kwargs)\u001b[0m\n\u001b[1;32m 202\u001b[0m \u001b[0;34m@\u001b[0m\u001b[0mretry_decorator\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 203\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_completion_with_retry\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 204\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclient\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 205\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 206\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0m_completion_with_retry\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/openai/api_resources/completion.py\u001b[0m in \u001b[0;36mcreate\u001b[0;34m(cls, *args, **kwargs)\u001b[0m\n\u001b[1;32m 23\u001b[0m \u001b[0;32mwhile\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 25\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0msuper\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 26\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mTryAgain\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 27\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mtimeout\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtime\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0mstart\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mtimeout\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py\u001b[0m in \u001b[0;36mcreate\u001b[0;34m(cls, api_key, api_base, api_type, request_id, api_version, organization, **params)\u001b[0m\n\u001b[1;32m 151\u001b[0m )\n\u001b[1;32m 152\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 153\u001b[0;31m response, _, api_key = requestor.request(\n\u001b[0m\u001b[1;32m 154\u001b[0m \u001b[0;34m\"post\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 155\u001b[0m \u001b[0murl\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/openai/api_requestor.py\u001b[0m in \u001b[0;36mrequest\u001b[0;34m(self, method, url, params, headers, files, stream, request_id, request_timeout)\u001b[0m\n\u001b[1;32m 225\u001b[0m \u001b[0mrequest_timeout\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mrequest_timeout\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 226\u001b[0m )\n\u001b[0;32m--> 227\u001b[0;31m \u001b[0mresp\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgot_stream\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_interpret_response\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstream\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 228\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mresp\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgot_stream\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapi_key\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 229\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/openai/api_requestor.py\u001b[0m in \u001b[0;36m_interpret_response\u001b[0;34m(self, result, stream)\u001b[0m\n\u001b[1;32m 618\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 619\u001b[0m return (\n\u001b[0;32m--> 620\u001b[0;31m self._interpret_response_line(\n\u001b[0m\u001b[1;32m 621\u001b[0m \u001b[0mresult\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcontent\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdecode\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"utf-8\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 622\u001b[0m \u001b[0mresult\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstatus_code\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/openai/api_requestor.py\u001b[0m in \u001b[0;36m_interpret_response_line\u001b[0;34m(self, rbody, rcode, rheaders, stream)\u001b[0m\n\u001b[1;32m 678\u001b[0m \u001b[0mstream_error\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mstream\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;34m\"error\"\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mresp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 679\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mstream_error\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;36m200\u001b[0m \u001b[0;34m<=\u001b[0m \u001b[0mrcode\u001b[0m \u001b[0;34m<\u001b[0m \u001b[0;36m300\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 680\u001b[0;31m raise self.handle_error_response(\n\u001b[0m\u001b[1;32m 681\u001b[0m \u001b[0mrbody\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrcode\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrheaders\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstream_error\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mstream_error\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 682\u001b[0m )\n", + "\u001b[0;31mInvalidRequestError\u001b[0m: This model's maximum context length is 4097 tokens, however you requested 14199 tokens (13943 in your prompt; 256 for the completion). Please reduce your prompt; or completion length." + ] + } + ], + "source": [ + "chain = load_summarize_chain(llm, chain_type=\"stuff\", verbose=False)\n", + "chain.run(result)" + ] + }, + { + "cell_type": "markdown", + "id": "92a9de4b", + "metadata": {}, + "source": [ + "Problem, your transcript/document is too long" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "6d071a07", + "metadata": {}, + "outputs": [], + "source": [ + "from langchain.text_splitter import RecursiveCharacterTextSplitter" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "36968fb9", + "metadata": {}, + "outputs": [], + "source": [ + "text_splitter = RecursiveCharacterTextSplitter(chunk_size=2000, chunk_overlap=0)" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "cb6beb06", + "metadata": {}, + "outputs": [], + "source": [ + "texts = text_splitter.split_documents(result)" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "id": "b7889046", + "metadata": { + "collapsed": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\n", + "\u001b[1m> Entering new MapReduceDocumentsChain chain...\u001b[0m\n", + "Prompt after formatting:\n", + "\u001b[32;1m\u001b[1;3mWrite a concise summary of the following:\n", + "\n", + "\n", + "\"somehow five years later covet hits and you know what they decide to do they're like you know what let's go all in on creating like safety safety stuff for covert like masks respirators um gloves things like that and they become one of the like core providers right at the start of covet they shifted all their production manufacturing stuff they're like forget the vodka bottles forget the LED screens we need n95 masks and we need respirators and we need you know these testing kits and we need and they started producing this stuff and they started just winning all these contracts [Music] we're live Sean uh we have a bunch of stuff you you have a you have a a full menu over here and so do I yeah all right I want you to look at my menu here and I want you to just pick something off the menu go ahead and I'll Riff Off it we don't prefer people who they don't they don't know we only write like one or two words so you get like a teaser you're like man what the hell is this about but you don't know what it actually is but I have I put all my stuff in here an accident I have this new researcher who's crushing it he just gives me all the content like five minutes ahead of time but uh Rich neighbor how did I know you'd pick a rich neighbor so there's somebody in my neighborhood who I bumped into and I've just I'm you know I sort of get out there and I collect signals is this you know where where do I place this person on the uh the Billy scale like are they you know are they on their way up are they are they have they made it in life are they really balling out of control where where is this person these people have been balling out of control like when Christmas time came up there was just like the wife went outside and it was just pointing at windows and all of a sudden the house was lit up like a Christmas tree they had like so they had almost like decked out things and they go hey hey um invite your kids over uh this Thursday we have a snow machine they're we're building a Snow Hill in our driveway like uh you you want to do sledding without going to Tahoe what's that like a big snow cone is that what that no it's like a giant truck that comes that creates snow and it piles it up so that your like their house looked like it was in you know Michigan or something like that yeah but it's just like like it's like an ice machine or something yeah it's like yeah something like that yeah like a big snow cone like a big shaved ice thing yeah yeah you were right from the\"\n", + "\n", + "\n", + "CONCISE SUMMARY:\u001b[0m\n", + "Prompt after formatting:\n", + "\u001b[32;1m\u001b[1;3mWrite a concise summary of the following:\n", + "\n", + "\n", + "\"from the beginning you're right so they did this and they had a fake Santa there and I was like man this is a lot for a Thursday afternoon but okay uh this is cool like these people's style they seem really nice and I didn't know what they did so I kind of I hit it with the Google the other day and I was like let's see who these people are and they have a crazy story so they created a company that back in 2014 did this thing it basically it lets you take a vodka bottle they had a vodka bottle that had an LED sign going around it so you could give somebody a vodka bottle that would say happy birthday Sam or like you could program any message I could be like you know uh whatever I could be like you're getting an old [ __ ] whatever I could write any message on it it would go on your your vodka bottle all right seems kind of gimmicky I don't really you know not a bad idea but but balling out of control from that didn't didn't 100 make sense but that was it sounds like a Drop Shipping like joke sounds like my first idea out of college it's like this is like me in college would have been like bro next next Google I got it what if we took you know this Jager bomb and we put an LED screen on it wouldn't that be incredible and so so they had this thing and they were like licensing this out or something like that somehow like Shaq became an advisor to their company it was really crazy it makes sense yeah as you would five years later covet hits and you know what they decide to do they're like you know what [ __ ] this vodka thing let's go all in on creating like safety safety stuff for cover like masks respirators um gloves things like that and they become one of the like core providers right at the start of covert they shifted all their production manufacturing stuff they're like forget the vodka bottles forget the LED screens we need n95 masks and we need respirators and we need you know these testing kits and we need and they started producing this stuff and they started just winning all these contracts and so now like if you go look at their website it's one of those I know your Rich websites because there's like not a lot of information on it but if you go to like the P they have like a press release section and it's like PR Newswire company gets 113 million dollar contract with the government for safety equipment oh my God local East Bay success story where they uh they're now the the sole testing provider for you know with the Lakers Stadium\"\n", + "\n", + "\n", + "CONCISE SUMMARY:\u001b[0m\n", + "Prompt after formatting:\n", + "\u001b[32;1m\u001b[1;3mWrite a concise summary of the following:\n", + "\n", + "\n", + "\"Levi's Stadium like all these different places and so these guys are getting 100 million dollar plus contracts for their stuff now I think probably it's like you know probably only like 10 margin when you buy you think it's that selling masks I think for things like that probably it's like 10 15 is my guess maybe maybe during coven everyone was completely price insensitive and they could just charge whatever they wanted I'm not sure I would have thought that but um but wow dude what a what a pivot and uh you know that isn't that just kind of crazy and that was an opportunity kind of available to a lot of people right dude I know a bunch of people who did that and like I had a friend that did it and he's like dude check this out and he sends me a picture of a Shopify store and it's doing like 2 million a month I know a lot of people who did that and I've only followed up with one or two of them and uh I have a feeling that like of the eight people I know who did it like three of them it worked out and then the rest it was like a really quick cash grab but then they over bought inventory and it and it's like nothing do you know people who did that yes we there was a guy in um I had started this Mastermind group that's actually where I found Ben uh but like one of the other guys in The Mastermind group he like every time we came to the testimony does he live in Texas no he's in Canada every time he came to the Mastermind group I feel like he had a different business which is like not what you want in a mastermind group but he was a good dude and he would always be like oh I have this other business that's like oh you know for auto repair blah blah we do their SEO and I was like okay but then what about that thing you told me last time and then one time you came dude we're doing mobile covet testing trucks that will drive up to places and we can just do rapid testing for covet and we were like all right I mean that sounds cool but like are you like do you know anything about covet testing like does anybody in the world know about this like what he's like oh I got the scientist that's going to be great and then he came back and he was like hey um really excited to be here I need you guys help um like three months later he was like I really need you guys help about going public and I was like and he's like yeah we're gonna do like 85 million this year in revenue and I was like what and he's like yeah we're getting all these contracts with the state of uh with like the you\"\n", + "\n", + "\n", + "CONCISE SUMMARY:\u001b[0m\n", + "Prompt after formatting:\n", + "\u001b[32;1m\u001b[1;3mWrite a concise summary of the following:\n", + "\n", + "\n", + "\"know the [ __ ] in Canada like these country Country-Wide contracts and um you know yeah we think maybe we should take this public next year and I was like oh my God so how did it end I I don't even know because I that that guy my head was just spinning every time uh you know he would talk because I'm like this is either too good to be true or I'm too dumb and this is amazing and I can't tell which one it is it's probably some mix of both but you're right I know several people that went all in on covid right when it happened and like low-key got like an absurd amount of traction very very fast yeah like a ton my dad had actually called me one day and he goes my friend works at this hospital they need extra equipment they need extra masks I talked to somebody in India and they could produce these masks and like I think we could do like a two or three million dollar contract and I was like fantastic um should do it and he's like yeah I wanna but my dad has this problem where my dad is addicted to meetings like he thinks winning is like this important person met with me and then he'll tell me the duration of the meeting to show me the value he's like only scheduled for one hour but we sat there for 90 minutes and I'd be like okay so what like everybody so you know he was really interested two hours right and he was just like he just like always just obsessed with that so he was he just had a bunch of meetings and I was like Dad you're gonna it's all about that action boss you're gonna take some action here what what's gonna happen like go go for it do it and he's like well no I want he's like I want everybody to like sign off on it and de-risk it completely pay me up front and I was just like dude this is this is like the cheap way to do business like you got to take a little risk here you're throwing shade on your dad right now I hope he doesn't listen to this and you called him boss if I said Cosby boss he's getting in the headlock yeah my dad yeah we make fun of each other like we call it like it is I do a bunch of dumb things and I say when I do dumb things this is his dumb thing he is high planning low action on these things and he says it all the time like um we went I went I took him to Tony Robbins and Tony Robbins is all about like taking massive action on like the things you want and he's like I was like what's your big takeaway he's like oh man I need to take Massive Action and I was like that yeah that's that you did it you learned the right lesson from this thing he\"\n", + "\n", + "\n", + "CONCISE SUMMARY:\u001b[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\n", + "\u001b[1m> Entering new LLMChain chain...\u001b[0m\n", + "Prompt after formatting:\n", + "\u001b[32;1m\u001b[1;3mWrite a concise summary of the following:\n", + "\n", + "\n", + "\"\n", + "\n", + "Covet shifted their production from vodka bottles and LED screens to safety equipment such as masks, respirators, and gloves when the pandemic hit. They won contracts and became one of the core providers. They also created a snow machine to create a snow hill in their driveway for sledding without going to Tahoe.\n", + "\n", + " A company created in 2014 developed a vodka bottle with an LED sign that could be programmed with any message. When the COVID-19 pandemic hit, they shifted their production to safety equipment such as masks, respirators, gloves, and testing kits. They have since become a successful provider of safety equipment, winning contracts with the government and becoming the sole testing provider for the Lakers Stadium.\n", + "\n", + "\n", + "Levi's Stadium and other places are offering contracts worth over $100 million for products such as masks. During the COVID-19 pandemic, people were able to take advantage of this opportunity and make a lot of money. A friend of the speaker had a Shopify store that was making $2 million a month. Another person in the speaker's Mastermind group had a business doing mobile COVID testing trucks, and eventually went public with 85 million in revenue.\n", + "\n", + " A person's father was interested in a two or three million dollar contract, but was hesitant to take action due to wanting to de-risk it completely and get everyone to sign off on it. The person encouraged their father to take a risk and take action, and they both joked about it. The father attended a Tony Robbins event and learned the lesson to take massive action on the things he wants.\"\n", + "\n", + "\n", + "CONCISE SUMMARY:\u001b[0m\n", + "\n", + "\u001b[1m> Finished chain.\u001b[0m\n", + "\n", + "\u001b[1m> Finished chain.\u001b[0m\n" + ] + }, + { + "data": { + "text/plain": [ + "'\\n\\nCovet shifted their production from vodka bottles and LED screens to safety equipment such as masks, respirators, and gloves when the pandemic hit, winning contracts and becoming one of the core providers. They also created a snow machine to create a snow hill in their driveway for sledding. During the pandemic, people were able to take advantage of the opportunity to make a lot of money, with one friend making $2 million a month and another going public with 85 million in revenue. The speaker encouraged their father to take a risk and take action, which he learned from a Tony Robbins event.'" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "chain = load_summarize_chain(llm, chain_type=\"map_reduce\", verbose=True)\n", + "chain.run(texts[:4])" + ] + }, + { + "cell_type": "markdown", + "id": "7d5cf285", + "metadata": {}, + "source": [ + "### 3. Multiple Videos" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "id": "2dad798e", + "metadata": {}, + "outputs": [], + "source": [ + "youtube_url_list = [\"https://www.youtube.com/watch?v=AXq0QHUwmh8\", \"https://www.youtube.com/watch?v=EwHrjZxAT7g\"]\n", + "\n", + "texts = []\n", + "\n", + "text_splitter = RecursiveCharacterTextSplitter(chunk_size=2000, chunk_overlap=0)\n", + "\n", + "for url in youtube_url_list:\n", + " loader = YoutubeLoader.from_youtube_url(url, add_video_info=True)\n", + " result = loader.load()\n", + " \n", + " texts.extend(text_splitter.split_documents(result))" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "id": "862af735", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "' This article discusses the process of building a backyard golf green, including the cost of materials and the steps involved. Bella Ramsey and Pedro Pascal also discuss their experiences on the set of Game of Thrones and The Last of Us, including their first impressions of each other, what they took from set, and what item from the Game of Thrones world they would bring to The Last of Us. Bella talks about her most prized possession, a tear stick, and her best attribute in a survival scenario. Finally, they discuss their first jobs.'" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "chain = load_summarize_chain(llm, chain_type=\"map_reduce\", verbose=False)\n", + "chain.run(texts)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9bd0b571", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}