terça-feira, 21 de janeiro de 2014

ADICIONANDO UM DROP BOX (COMBO LIST) COM INFORMAÇÕES DE BANCO DE DADOS NO CHRONO FORM PARA JOOMLA.

 ADICIONANDO UM DROP
BOX (COMBO LIST) COM INFORMAÇÕES DE BANCO DE DADOS NO CHRONO FORM PARA JOOMLA.

Demostrar como preencher um drop box com informações que já
constam em seu banco de dados do joomla, utilizando o CHRONO FORM.

Estou considerando que o seu Joomla já está devidamente
instalado e o componente CHRONO FROM também está instalado. Caso não seja este
o seu ambiente, por favor configurar este ambiente. Existe inúmeros tutorial na
internet cobrindo este procedimento.
Na área de administração do joomla acessar Components>ChronoForms,
clicar no botão novo.
Iremos criar um novo formulário em branco para o nosso
exemplo. Basta adicionar um nome em Form name, ter certeza que o mesmo está com
a opção Published:Yes. Clicar aba Code e em Form Type selecionar “Wizard”.

Com isso teremos nosso formulário de teste criado, agora
basta acessá-lo. Localize ele na lista de formulários que ira ser exibida e
clique em Wizard edit.

A tela de edição estará aberta. Vamos clicar na aba Events.
Iremos adicionar a ação “Show html” na área On Load(para isto, basta arrastar
do lado esquerdo para a área no centro da tela
Adicionamos a ação DB Muti Recod Loader como feito acima.
Clica no ícone configuração, que fica no botão superior direito da ação que
está em OnLoad.

Na nova janela aberta, no item Table, basta selecionar a
tabela que você quer os dados do Joomla, no meu caso eu estou utilizando contente.

Em Model Id, precisamos dar um nome para o array que  será carregado, vou utilizar “Multi” mas pode
ser qualquer nome e salve.

Agora clique na aba Preview lá iremos adicionar um DropBox,
basta arrasta do lado esquerdo para o centro da tela.

Clique no botão confirgure no canto superior direito. Na
nova janela aberta, clique na aba Dynamic Data configure assim:
Enable:Yes
DataPath:
Multi
ValueKey:
id
Text Key:
title



E salve. Pronto
agora estamos carregando os títulos de todos os artigos do banco de dados do
Joomla. O objetivo desse exemplo foi uma demonstração, no entanto você vai mudar o banco e os campos ValueKey e TextKey para o seu caso

sexta-feira, 27 de setembro de 2013

Repair all database in mysql - cPanel Forums

Boa tarde,

Tive um problema recente com um site JOOMLA, os logs cresceram de uma forma não experada e isso encheu a partição do dico /var. Lembrando que meu ambiente é um CentOS com apache e JOOMLA 1.5.  O serviço do mysql acabou parando por a partição está cheia e o site ficou indisponível.  Claro que o primeiro passo foi apagar a partição de log para o site voltar a funcionar normalmente, no entanto após eu apagar os arquivos de logs o site Joomla apresente o seguinte erro:

jtablesession::Store Failed, DB function failed error 1062



Após pesquisas percebi que era necessário repara o banco mysql para que o erro fosse solucionado, e os passos necessários foram os seguintes:

Repair all database in mysql - cPanel Forums:

Parar o mysql
 "/etc/rc.d/init.d/mysql stop

2) Repair all SQL databases:
myisamchk -r /var/lib/mysql/*/*.MYI

Iniciar o mysql
3) Start mysql again:
/etc/rc.d/init.d/mysql start"

'via Blog this'

Espero que tenha ajudado. Abraços

domingo, 22 de setembro de 2013

Como fazer print screens no Mac OS X


O print screen (impressão ou captura de tela) é um recurso utilizado para “fotografar” a tela do seu computador em um certo momento. Ele gera uma imagem de tudo que está na tela, exatamente como está. Mas se você chegou até aqui, certamente já sabe o que é um print screen, só não sabe como fazê-lo no Mac.

Deixe-me adivinhar, você está procurando a tecla “Print Screen” desesperadamente e não acha mas você tinha certeza que já tinha visto esta tecla? Então eu tenho uma boa notícia: você não está louco e nem cego. Realmente esta tecla não existe no Mac, só nos PCs comuns. Foi lá que você viu.

Uma coisa boa do print screen do Mac é que você não precisa de nenhum programa além do próprio Mac OS para fazê-lo. Como sabemos, no Windows você teria que apertar a tecla “Print Screen” e depois colar a foto em algum programa (Paintbrush, Photoshop, Word, etc) para depois salvá-la. Parece bom o suficiente, mas no Mac, as coisas são bem mais legais (pra variar). Ele pode salvar a imagem direto para você sem precisar de programa algum, sem contar que você pode capturar uma tela inteira, um pedaço dela, ou somente uma janela… E se você quiser mandar para o clipboard (área de transferência) para colar no programa que quiser, também pode. Funciona assim:

command+shift+3: Captura a tela inteira e salva numa imagem no seu Desktop (Mesa), em formato PNG.

command+shift+4: Captura uma parte da tela que você escolher, e salva no seu Desktop. Ao usar esta combinação, o cursor do mouse vira um alvo e você seleciona a área que quer capturar. Você arrasta e quando soltar ele automaticamente captura a tela.

command+shift+4 e depois barra de espaço: Se você usar a combinação anterior (command+shift+4) e em seguida apertar a barra de espaço, o ponteiro do mouse que era um alvo vira uma câmera, e você pode clicar com ela em cima da janela que você quer para capturar somente ela e salvar a imagem no seu Desktop.

qualquer combinação+ctrl: Ao invés de salvar a imagem no Desktop, a imagem fica no clipboard e você pode colar no programa que desejar, sem gerar uma imagem automática.

alterar o formato do arquivo: É possível escolher o formato do arquivo que o print screen gera, pode ser PDF ou PNG. Para alterar esta opção, abra o Terminal e digite o comando “defaults write com.apple.screencapture type pdf” e pressione enter. Desta forma você altera o formato do arquivo para PDF. Para alterar para PNG, basta substituir no comando o pdf por png. Você deve fazer logout ou reiniciar o Mac para que esta alteração passe a valer.
E então? É fácil ou não é?

E não para por aí! Em todas as capturas de tela feitas através destes comandos, as imagens são armazenadas em formato PNG (Potable Network Graphics) que como o próprio nome já indica é um formato de imagem compactado, ou então em PDF que também não fica com a qualidade muito boa. Se você precisar de print screens com maior qualidade, você pode utilizar o programa Grab, que vem com o Mac OS e fica na pasta Utilities (Utilitários). Ele salva as imagens em formato TIFF com alta resolução. Ele é bem simples de usar e dispensa maiores explicações.


'via Blog this'


Fonte: http://gc.blog.br/2007/07/14/como-fazer-print-screens-no-mac-os-x/

sexta-feira, 16 de agosto de 2013

Utilizar SSH dentro de uma rede com proxy e bloqueios de portas

Bom dia a todos,

Essa história que vou compartilhar me ajudou bastante, recentemente eu precisei utilizar o SSH para realizar uma conexão com um servidor na internet e tive dificuldades, porque estava em uma rede corporativa que tinha um proxy e muitas regras de bloqueio de portas. Somente a porta 80 e 443 tinha o acesso liberado, o que quer dizer que qualquer conexão na porta SSH 22 padrão, não iria funcionar. Mesmo após eu realizar a mudança de porta no servidor para escutar na porta 443 em vez da porta padrão 22, não funcionou,  pois, os firewalls/proxy mais modernos conseguem identificar os pacotes SSH e bloqueiam de qualquer forma.
Foi quando encontrei uma ferramenta que solucionou o meu problema o Corkscrew.  O Corkscrew é uma ferramenta faz um túnel SSH através de proxies HTTP.
Ele pode ser compilado em:
  • AIX
  • HPUX
  • Solaris
  • FreeBSD
  • OpenBSD
  • NetBSD
  • Linux
  • Win32 (Cygwin)
  • Mac OS X
Ele já foi testado com alguns proxies HTTP conforme o desenvolvedor:
  • Gauntlet
  • CacheFlow
  • JunkBuster
  • Squid
  • Apache's mod_proxy

Em primeiro lugar, você deve instalar o corkscrew, como estou usando o Ubuntu, instalei via apt-get:
apt-get install corkscrew
Depois disso, você precisa configurar o SSH, para isso vá ao terminal e digite:
$ cd ~
$ mkdir .ssh (somente se a pasta não existir ainda)
$ vim
~/.ssh/config
adicione as seguintes linhas:

Host *
ProxyCommand corkscrew seuproxyhttp  portadoproxy %h %p
·         Meu proxy requer autenticacao: Entao voce precisa alterar o arquivo para que fique como:

Host *
ProxyCommand corkscrew seuproxyhttp  portadoproxy %h %p ~/.ssh/proxyauth
Crie o arquivo ~/.ssh/proxyauth com o seguinte conteudo:

usuario:senha


Depois de criar esse arquivo que você vai precisar se assegurar ninguém mais pode obter o seu nome de usuário e senha ao ler este arquivo. Então faça o seguinte:


chmod 600 MyAuth

Agora basta executar o comando  SSH:
ssh user@serverip

se a porta que você configurou no seu servidor SSH for outra pasta adicionar  o –p. Ex.
ssh user@serverip  -p 443


Fontes:

quinta-feira, 15 de agosto de 2013

Como configurar o bash (linux – Ubuntu) para utilizar um proxy.

Como configurar o bash (linux – Ubuntu) para utilizar um proxy.

Precisei realizar o download  de alguns repositório no bash (Interpretador de Comandos) do Ubuntu – Linux e como eu estava em um rede corporativa que utilizava proxy web  não funcionou, porque o bash estava sem comunicação com a WEB. Para isso precisamos configurar o proxy no bash, não sendo suficiente a configuração no navegador web.

Tentei realizar o seguinte comando:
·         Apt-get install algo
E foi apresentado o seguinte erro: 407 Proxy Authentication Required ou Requer autenticação de proxy.
Para fazer isso funcionar precisamos editar nosso arquivio de configuração apt, desta forma:
sudo gedit /etc/apt/apt.conf

e adicionar as informações do proxy:
Acquire::http::Proxy "http://username:password@proxyhost:port/";
Você pode adicionar esta configurações para outro protocolo como https e ftp.





terça-feira, 25 de junho de 2013

Excelente artigo sobre StartUps

September 2012

A startup is a company designed to grow fast. Being newly founded does not in itself make a company a startup. Nor is it necessary for a startup to work on technology, or take venture funding, or have some sort of "exit." The only essential thing is growth. Everything else we associate with startups follows from growth.

If you want to start one it's important to understand that. Startups are so hard that you can't be pointed off to the side and hope to succeed. You have to know that growth is what you're after. The good news is, if you get growth, everything else tends to fall into place. Which means you can use growth like a compass to make almost every decision you face.

Redwoods

Let's start with a distinction that should be obvious but is often overlooked: not every newly founded company is a startup. Millions of companies are started every year in the US. Only a tiny fraction are startups. Most are service businesses—restaurants, barbershops, plumbers, and so on. These are not startups, except in a few unusual cases. A barbershop isn't designed to grow fast. Whereas a search engine, for example, is.

When I say startups are designed to grow fast, I mean it in two senses. Partly I mean designed in the sense of intended, because most startups fail. But I also mean startups are different by nature, in the same way a redwood seedling has a different destiny from a bean sprout.

That difference is why there's a distinct word, "startup," for companies designed to grow fast. If all companies were essentially similar, but some through luck or the efforts of their founders ended up growing very fast, we wouldn't need a separate word. We could just talk about super-successful companies and less successful ones. But in fact startups do have a different sort of DNA from other businesses. Google is not just a barbershop whose founders were unusually lucky and hard-working. Google was different from the beginning.

To grow rapidly, you need to make something you can sell to a big market. That's the difference between Google and a barbershop. A barbershop doesn't scale.

For a company to grow really big, it must (a) make something lots of people want, and (b) reach and serve all those people. Barbershops are doing fine in the (a) department. Almost everyone needs their hair cut. The problem for a barbershop, as for any retail establishment, is (b). A barbershop serves customers in person, and few will travel far for a haircut. And even if they did the barbershop couldn't accomodate them. [1]

Writing software is a great way to solve (b), but you can still end up constrained in (a). If you write software to teach Tibetan to Hungarian speakers, you'll be able to reach most of the people who want it, but there won't be many of them. If you make software to teach English to Chinese speakers, however, you're in startup territory.

Most businesses are tightly constrained in (a) or (b). The distinctive feature of successful startups is that they're not.

Ideas

It might seem that it would always be better to start a startup than an ordinary business. If you're going to start a company, why not start the type with the most potential? The catch is that this is a (fairly) efficient market. If you write software to teach Tibetan to Hungarians, you won't have much competition. If you write software to teach English to Chinese speakers, you'll face ferocious competition, precisely because that's such a larger prize. [2]

The constraints that limit ordinary companies also protect them. That's the tradeoff. If you start a barbershop, you only have to compete with other local barbers. If you start a search engine you have to compete with the whole world.

The most important thing that the constraints on a normal business protect it from is not competition, however, but the difficulty of coming up with new ideas. If you open a bar in a particular neighborhood, as well as limiting your potential and protecting you from competitors, that geographic constraint also helps define your company. Bar + neighborhood is a sufficient idea for a small business. Similarly for companies constrained in (a). Your niche both protects and defines you.

Whereas if you want to start a startup, you're probably going to have to think of something fairly novel. A startup has to make something it can deliver to a large market, and ideas of that type are so valuable that all the obvious ones are already taken.

That space of ideas has been so thoroughly picked over that a startup generally has to work on something everyone else has overlooked. I was going to write that one has to make a conscious effort to find ideas everyone else has overlooked. But that's not how most startups get started. Usually successful startups happen because the founders are sufficiently different from other people that ideas few others can see seem obvious to them. Perhaps later they step back and notice they've found an idea in everyone else's blind spot, and from that point make a deliberate effort to stay there. [3]But at the moment when successful startups get started, much of the innovation is unconscious.

What's different about successful founders is that they can see different problems. It's a particularly good combination both to be good at technology and to face problems that can be solved by it, because technology changes so rapidly that formerly bad ideas often become good without anyone noticing. Steve Wozniak's problem was that he wanted his own computer. That was an unusual problem to have in 1975. But technological change was about to make it a much more common one. Because he not only wanted a computer but knew how to build them, Wozniak was able to make himself one. And the problem he solved for himself became one that Apple solved for millions of people in the coming years. But by the time it was obvious to ordinary people that this was a big market, Apple was already established.

Google has similar origins. Larry Page and Sergey Brin wanted to search the web. But unlike most people they had the technical expertise both to notice that existing search engines were not as good as they could be, and to know how to improve them. Over the next few years their problem became everyone's problem, as the web grew to a size where you didn't have to be a picky search expert to notice the old algorithms weren't good enough. But as happened with Apple, by the time everyone else realized how important search was, Google was entrenched.

That's one connection between startup ideas and technology. Rapid change in one area uncovers big, soluble problems in other areas. Sometimes the changes are advances, and what they change is solubility. That was the kind of change that yielded Apple; advances in chip technology finally let Steve Wozniak design a computer he could afford. But in Google's case the most important change was the growth of the web. What changed there was not solubility but bigness.

The other connection between startups and technology is that startups create new ways of doing things, and new ways of doing things are, in the broader sense of the word, new technology. When a startup both begins with an idea exposed by technological change and makes a product consisting of technology in the narrower sense (what used to be called "high technology"), it's easy to conflate the two. But the two connections are distinct and in principle one could start a startup that was neither driven by technological change, nor whose product consisted of technology except in the broader sense.[4]

Rate

How fast does a company have to grow to be considered a startup? There's no precise answer to that. "Startup" is a pole, not a threshold. Starting one is at first no more than a declaration of one's ambitions. You're committing not just to starting a company, but to starting a fast growing one, and you're thus committing to search for one of the rare ideas of that type. But at first you have no more than commitment. Starting a startup is like being an actor in that respect. "Actor" too is a pole rather than a threshold. At the beginning of his career, an actor is a waiter who goes to auditions. Getting work makes him a successful actor, but he doesn't only become an actor when he's successful.

So the real question is not what growth rate makes a company a startup, but what growth rate successful startups tend to have. For founders that's more than a theoretical question, because it's equivalent to asking if they're on the right path.

The growth of a successful startup usually has three phases:

  1. There's an initial period of slow or no growth while the startup tries to figure out what it's doing.
  2. As the startup figures out how to make something lots of people want and how to reach those people, there's a period of rapid growth.
  3. Eventually a successful startup will grow into a big company. Growth will slow, partly due to internal limits and partly because the company is starting to bump up against the limits of the markets it serves. [5]
Together these three phases produce an S-curve. The phase whose growth defines the startup is the second one, the ascent. Its length and slope determine how big the company will be.

The slope is the company's growth rate. If there's one number every founder should always know, it's the company's growth rate. That's the measure of a startup. If you don't know that number, you don't even know if you're doing well or badly.

When I first meet founders and ask what their growth rate is, sometimes they tell me "we get about a hundred new customers a month." That's not a rate. What matters is not the absolute number of new customers, but the ratio of new customers to existing ones. If you're really getting a constant number of new customers every month, you're in trouble, because that means your growth rate is decreasing.

During Y Combinator we measure growth rate per week, partly because there is so little time before Demo Day, and partly because startups early on need frequent feedback from their users to tweak what they're doing. [6]

A good growth rate during YC is 5-7% a week. If you can hit 10% a week you're doing exceptionally well. If you can only manage 1%, it's a sign you haven't yet figured out what you're doing.

The best thing to measure the growth rate of is revenue. The next best, for startups that aren't charging initially, is active users. That's a reasonable proxy for revenue growth because whenever the startup does start trying to make money, their revenues will probably be a constant multiple of active users. [7]

Compass

We usually advise startups to pick a growth rate they think they can hit, and then just try to hit it every week. The key word here is "just." If they decide to grow at 7% a week and they hit that number, they're successful for that week. There's nothing more they need to do. But if they don't hit it, they've failed in the only thing that mattered, and should be correspondingly alarmed.

Programmers will recognize what we're doing here. We're turning starting a startup into an optimization problem. And anyone who has tried optimizing code knows how wonderfully effective that sort of narrow focus can be. Optimizing code means taking an existing program and changing it to use less of something, usually time or memory. You don't have to think about what the program should do, just make it faster. For most programmers this is very satisfying work. The narrow focus makes it a sort of puzzle, and you're generally surprised how fast you can solve it.

Focusing on hitting a growth rate reduces the otherwise bewilderingly multifarious problem of starting a startup to a single problem. You can use that target growth rate to make all your decisions for you; anything that gets you the growth you need is ipso facto right. Should you spend two days at a conference? Should you hire another programmer? Should you focus more on marketing? Should you spend time courting some big customer? Should you add x feature? Whatever gets you your target growth rate. [8]

Judging yourself by weekly growth doesn't mean you can look no more than a week ahead. Once you experience the pain of missing your target one week (it was the only thing that mattered, and you failed at it), you become interested in anything that could spare you such pain in the future. So you'll be willing for example to hire another programmer, who won't contribute to this week's growth but perhaps in a month will have implemented some new feature that will get you more users. But only if (a) the distraction of hiring someone won't make you miss your numbers in the short term, and (b) you're sufficiently worried about whether you can keep hitting your numbers without hiring someone new.

It's not that you don't think about the future, just that you think about it no more than necessary.

In theory this sort of hill-climbing could get a startup into trouble. They could end up on a local maximum. But in practice that never happens. Having to hit a growth number every week forces founders to act, and acting versus not acting is the high bit of succeeding. Nine times out of ten, sitting around strategizing is just a form of procrastination. Whereas founders' intuitions about which hill to climb are usually better than they realize. Plus the maxima in the space of startup ideas are not spiky and isolated. Most fairly good ideas are adjacent to even better ones.

The fascinating thing about optimizing for growth is that it can actually discover startup ideas. You can use the need for growth as a form of evolutionary pressure. If you start out with some initial plan and modify it as necessary to keep hitting, say, 10% weekly growth, you may end up with a quite different company than you meant to start. But anything that grows consistently at 10% a week is almost certainly a better idea than you started with.

There's a parallel here to small businesses. Just as the constraint of being located in a particular neighborhood helps define a bar, the constraint of growing at a certain rate can help define a startup.

You'll generally do best to follow that constraint wherever it leads rather than being influenced by some initial vision, just as a scientist is better off following the truth wherever it leads rather than being influenced by what he wishes were the case. When Richard Feynman said that the imagination of nature was greater than the imagination of man, he meant that if you just keep following the truth you'll discover cooler things than you could ever have made up. For startups, growth is a constraint much like truth. Every successful startup is at least partly a product of the imagination of growth. [9]

Value

It's hard to find something that grows consistently at several percent a week, but if you do you may have found something surprisingly valuable. If we project forward we see why.

weeklyyearly
1%1.7x
2%2.8x
5%12.6x
7%33.7x
10%142.0x

A company that grows at 1% a week will grow 1.7x a year, whereas a company that grows at 5% a week will grow 12.6x. A company making $1000 a month (a typical number early in YC) and growing at 1% a week will 4 years later be making $7900 a month, which is less than a good programmer makes in salary in Silicon Valley. A startup that grows at 5% a week will in 4 years be making $25 million a month. [10]

Our ancestors must rarely have encountered cases of exponential growth, because our intutitions are no guide here. What happens to fast growing startups tends to surprise even the founders.

Small variations in growth rate produce qualitatively different outcomes. That's why there's a separate word for startups, and why startups do things that ordinary companies don't, like raising money and getting acquired. And, strangely enough, it's also why they fail so frequently.

Considering how valuable a successful startup can become, anyone familiar with the concept of expected value would be surprised if the failure rate weren't high. If a successful startup could make a founder $100 million, then even if the chance of succeeding were only 1%, the expected value of starting one would be $1 million. And the probability of a group of sufficiently smart and determined founders succeeding on that scale might be significantly over 1%. For the right people—e.g. the young Bill Gates—the probability might be 20% or even 50%. So it's not surprising that so many want to take a shot at it. In an efficient market, the number of failed startups should be proportionate to the size of the successes. And since the latter is huge the former should be too. [11]

What this means is that at any given time, the great majority of startups will be working on something that's never going to go anywhere, and yet glorifying their doomed efforts with the grandiose title of "startup."

This doesn't bother me. It's the same with other high-beta vocations, like being an actor or a novelist. I've long since gotten used to it. But it seems to bother a lot of people, particularly those who've started ordinary businesses. Many are annoyed that these so-called startups get all the attention, when hardly any of them will amount to anything.

If they stepped back and looked at the whole picture they might be less indignant. The mistake they're making is that by basing their opinions on anecdotal evidence they're implicitly judging by the median rather than the average. If you judge by the median startup, the whole concept of a startup seems like a fraud. You have to invent a bubble to explain why founders want to start them or investors want to fund them. But it's a mistake to use the median in a domain with so much variation. If you look at the average outcome rather than the median, you can understand why investors like them, and why, if they aren't median people, it's a rational choice for founders to start them.

Deals

Why do investors like startups so much? Why are they so hot to invest in photo-sharing apps, rather than solid money-making businesses? Not only for the obvious reason.

The test of any investment is the ratio of return to risk. Startups pass that test because although they're appallingly risky, the returns when they do succeed are so high. But that's not the only reason investors like startups. An ordinary slower-growing business might have just as good a ratio of return to risk, if both were lower. So why are VCs interested only in high-growth companies? The reason is that they get paid by getting their capital back, ideally after the startup IPOs, or failing that when it's acquired.

The other way to get returns from an investment is in the form of dividends. Why isn't there a parallel VC industry that invests in ordinary companies in return for a percentage of their profits? Because it's too easy for people who control a private company to funnel its revenues to themselves (e.g. by buying overpriced components from a supplier they control) while making it look like the company is making little profit. Anyone who invested in private companies in return for dividends would have to pay close attention to their books.

The reason VCs like to invest in startups is not simply the returns, but also because such investments are so easy to oversee. The founders can't enrich themselves without also enriching the investors. [12]

Why do founders want to take the VCs' money? Growth, again. The constraint between good ideas and growth operates in both directions. It's not merely that you need a scalable idea to grow. If you have such an idea and don't grow fast enough, competitors will. Growing too slowly is particularly dangerous in a business with network effects, which the best startups usually have to some degree.

Almost every company needs some amount of funding to get started. But startups often raise money even when they are or could be profitable. It might seem foolish to sell stock in a profitable company for less than you think it will later be worth, but it's no more foolish than buying insurance. Fundamentally that's how the most successful startups view fundraising. They could grow the company on its own revenues, but the extra money and help supplied by VCs will let them grow even faster. Raising money lets you choose your growth rate.

Money to grow faster is always at the command of the most successful startups, because the VCs need them more than they need the VCs. A profitable startup could if it wanted just grow on its own revenues. Growing slower might be slightly dangerous, but chances are it wouldn't kill them. Whereas VCs need to invest in startups, and in particular the most successful startups, or they'll be out of business. Which means that any sufficiently promising startup will be offered money on terms they'd be crazy to refuse. And yet because of the scale of the successes in the startup business, VCs can still make money from such investments. You'd have to be crazy to believe your company was going to become as valuable as a high growth rate can make it, but some do.

Pretty much every successful startup will get acquisition offers too. Why? What is it about startups that makes other companies want to buy them? [13]

Fundamentally the same thing that makes everyone else want the stock of successful startups: a rapidly growing company is valuable. It's a good thing eBay bought Paypal, for example, because Paypal is now responsible for 43% of their sales and probably more of their growth.

But acquirers have an additional reason to want startups. A rapidly growing company is not merely valuable, but dangerous. If it keeps expanding, it might expand into the acquirer's own territory. Most product acquisitions have some component of fear. Even if an acquirer isn't threatened by the startup itself, they might be alarmed at the thought of what a competitor could do with it. And because startups are in this sense doubly valuable to acquirers, acquirers will often pay more than an ordinary investor would. [14]

Understand

The combination of founders, investors, and acquirers forms a natural ecosystem. It works so well that those who don't understand it are driven to invent conspiracy theories to explain how neatly things sometimes turn out. Just as our ancestors did to explain the apparently too neat workings of the natural world. But there is no secret cabal making it all work.

If you start from the mistaken assumption that Instagram was worthless, you have to invent a secret boss to force Mark Zuckerberg to buy it. To anyone who knows Mark Zuckerberg that is the reductio ad absurdum of the initial assumption. The reason he bought Instagram was that it was valuable and dangerous, and what made it so was growth.

If you want to understand startups, understand growth. Growth drives everything in this world. Growth is why startups usually work on technology—because ideas for fast growing companies are so rare that the best way to find new ones is to discover those recently made viable by change, and technology is the best source of rapid change. Growth is why it's a rational choice economically for so many founders to try starting a startup: growth makes the successful companies so valuable that the expected value is high even though the risk is too. Growth is why VCs want to invest in startups: not just because the returns are high but also because generating returns from capital gains is easier to manage than generating returns from dividends. Growth explains why the most successful startups take VC money even if they don't need to: it lets them choose their growth rate. And growth explains why successful startups almost invariably get acquisition offers. To acquirers a fast-growing company is not merely valuable but dangerous too.

It's not just that if you want to succeed in some domain, you have to understand the forces driving it. Understanding growth is what starting a startup consists of. What you're really doing (and to the dismay of some observers, all you're really doing) when you start a startup is committing to solve a harder type of problem than ordinary businesses do. You're committing to search for one of the rare ideas that generates rapid growth. Because these ideas are so valuable, finding one is hard. The startup is the embodiment of your discoveries so far. Starting a startup is thus very much like deciding to be a research scientist: you're not committing to solve any specific problem; you don't know for sure which problems are soluble; but you're committing to try to discover something no one knew before. A startup founder is in effect an economic research scientist. Most don't discover anything that remarkable, but some discover relativity.









Notes

[1] Strictly speaking it's not lots of customers you need but a big market, meaning a high product of number of customers times how much they'll pay. But it's dangerous to have too few customers even if they pay a lot, or the power that individual customers have over you could turn you into a de facto consulting firm. So whatever market you're in, you'll usually do best to err on the side of making the broadest type of product for it.

[2] One year at Startup School David Heinemeier Hansson encouraged programmers who wanted to start businesses to use a restaurant as a model. What he meant, I believe, is that it's fine to start software companies constrained in (a) in the same way a restaurant is constrained in (b). I agree. Most people should not try to start startups.

[3] That sort of stepping back is one of the things we focus on at Y Combinator. It's common for founders to have discovered something intuitively without understanding all its implications. That's probably true of the biggest discoveries in any field.

[4] I got it wrong in "How to Make Wealth" when I said that a startup was a small company that takes on a hard technical problem. That is the most common recipe but not the only one.

[5] In principle companies aren't limited by the size of the markets they serve, because they could just expand into new markets. But there seem to be limits on the ability of big companies to do that. Which means the slowdown that comes from bumping up against the limits of one's markets is ultimately just another way in which internal limits are expressed.

It may be that some of these limits could be overcome by changing the shape of the organization—specifically by sharding it.

[6] This is, obviously, only for startups that have already launched or can launch during YC. A startup building a new database will probably not do that. On the other hand, launching something small and then using growth rate as evolutionary pressure is such a valuable technique that any company that could start this way probably should.

[7] If the startup is taking the Facebook/Twitter route and building something they hope will be very popular but from which they don't yet have a definite plan to make money, the growth rate has to be higher, even though it's a proxy for revenue growth, because such companies need huge numbers of users to succeed at all.

Beware too of the edge case where something spreads rapidly but the churn is high as well, so that you have good net growth till you run through all the potential users, at which point it suddenly stops.

[8] Within YC when we say it's ipso facto right to do whatever gets you growth, it's implicit that this excludes trickery like buying users for more than their lifetime value, counting users as active when they're really not, bleeding out invites at a regularly increasing rate to manufacture a perfect growth curve, etc. Even if you were able to fool investors with such tricks, you'd ultimately be hurting yourself, because you're throwing off your own compass.

[9] Which is why it's such a dangerous mistake to believe that successful startups are simply the embodiment of some brilliant initial idea. What you're looking for initially is not so much a great idea as an idea that could evolve into a great one. The danger is that promising ideas are not merely blurry versions of great ones. They're often different in kind, because the early adopters you evolve the idea upon have different needs from the rest of the market. For example, the idea that evolves into Facebook isn't merely a subset of Facebook; the idea that evolves into Facebook is a site for Harvard undergrads.

[10] What if a company grew at 1.7x a year for a really long time? Could it not grow just as big as any successful startup? In principle yes, of course. If our hypothetical company making $1000 a month grew at 1% a week for 19 years, it would grow as big as a company growing at 5% a week for 4 years. But while such trajectories may be common in, say, real estate development, you don't see them much in the technology business. In technology, companies that grow slowly tend not to grow as big.

[11] Any expected value calculation varies from person to person depending on their utility function for money. I.e. the first million is worth more to most people than subsequent millions. How much more depends on the person. For founders who are younger or more ambitious the utility function is flatter. Which is probably part of the reason the founders of the most successful startups of all tend to be on the young side.

[12] More precisely, this is the case in the biggest winners, which is where all the returns come from. A startup founder could pull the same trick of enriching himself at the company's expense by selling them overpriced components. But it wouldn't be worth it for the founders of Google to do that. Only founders of failing startups would even be tempted, but those are writeoffs from the VCs' point of view anyway.

[13] Acquisitions fall into two categories: those where the acquirer wants the business, and those where the acquirer just wants the employees. The latter type is sometimes called an HR acquisition. Though nominally acquisitions and sometimes on a scale that has a significant effect on the expected value calculation for potential founders, HR acquisitions are viewed by acquirers as more akin to hiring bonuses.

[14] I once explained this to some founders who had recently arrived from Russia. They found it novel that if you threatened a company they'd pay a premium for you. "In Russia they just kill you," they said, and they were only partly joking. Economically, the fact that established companies can't simply eliminate new competitors may be one of the most valuable aspects of the rule of law. And so to the extent we see incumbents suppressing competitors via regulations or patent suits, we should worry, not because it's a departure from the rule of law per se but from what the rule of law is aiming at.

Thanks to Sam Altman, Marc Andreessen, Paul Buchheit, Patrick Collison, Jessica Livingston, Geoff Ralston, and Harj Taggar for reading drafts of this.

http://www.paulgraham.com/growth.html