How to transition from “startup code” to “stable production code”?
Definition: A startup is an organization formed to search for a repeatable and scalable business model.<p>Early in a startup, you&#x27;re heavily focused on research, not development.<p>Stage 0: Make sure there&#x27;s a market for your &quot;code&quot;<p>You should optimize for maximum pivoting speed early on. That means your code is horrible, it is disposable, and it will break. You might even want to think outside the box for this - your stack might not be React&#x2F;MongoDB, and so on. It might be HTML + Google Sheets + some $5&#x2F;month thing that converts Google Sheets into an API.<p>Disposable is key for speed. Expect to do hundreds of prototypes before you hit something good.<p>At some point, you&#x27;ll jump from a trickle of 4 users&#x2F;month to 200 users&#x2F;week. I would say that it&#x27;s not startup worthy until there are people who are lining up to pay for what you&#x27;re doing.<p>Stage 1: Start selling<p>Now you&#x27;ve got people lining up to pay. You have to prove the next risk: payment. Calculate how much money you need to actually build a self-sustaining business where everyone can quit their jobs. What&#x27;s the simplest thing you need for this? 1000 customers paying $10&#x2F;month?<p>Aim for that. If you want to be a little more ambitious, go for 10x, about 10,000 active users&#x2F;month.<p>This depends a lot on what you&#x27;re doing. Let&#x27;s say you&#x27;re doing a sales management tool for used car salesmen and need to track the condition, repairs, costs on a used car, complaints, etc. You can probably repurpose an existing CRM&#x27;s API, or use some open source code. There will be issues with flexibility and scaling, but you just want to hit 1k-10k paying users.<p>Or if you&#x27;re doing debt collection for babysitters, you can use some debt collection software, link it to a quick and dirty database, and give it a suitable UI for babysitters.<p>Once you can secure a stable cash flow, you&#x27;ll be in a good negotiation position for investors. It&#x27;s easier to say, &quot;I have 1k customers and need funds to get it up to a million,&quot; rather than say, &quot;I want to build something for a million customers and the estimated market size is <i>this</i> big.&quot;<p>Stage 2: Start growing and scaling<p>So by now, you should have a loyal customer base that throws money at you, and some funds to improve your software.<p>Next, look for the bottleneck to getting 7% more revenue next week. It could be more users. It could be existing users wanting to pay more for another feature, or requiring that feature before they pick you over the competition. It&#x27;s rare that people leave because of a few bugs.<p>Under that growth target, you can expect to scale about 10x per 8 months. So, you don&#x27;t have to build something that supports a million active users right away, but it should be on your roadmap for the next 16 months.<p>Build a good pipeline. You&#x27;ll see cracks in yours - maybe compiling takes a long time. Maybe there&#x27;s a lot of null pointer errors. Maybe juniors are pushing breaking code to production. Find what it is, and patch a solution for that. Every team is different.<p>Don&#x27;t build the best pipeline, not yet. Overengineering is much harder to fix than underengineering.<p>Stage 3: Start stabilizing<p>At some point, the sales&#x2F;marketing team will no longer be tightly coupled with the product&#x2F;engineering team. Users are no longer looking for new features. They just want it to do what it does, better and more reliably.<p>By now, you probably have a monolithic mess. You&#x27;ll have spaghetti code from juniors and freelancers, that feature that you put in but nobody wanted, tech cofounders who ragequit, hacky fake code written by cheap people you hired because you couldn&#x27;t afford anyone else.<p>Start documenting and writing automated tests. I know this is controversial to start this late, but too early, and you run the risk of documenting&#x2F;testing something that gets thrown away. Documentation tends to be hard to read, and people are going to ask anyway.<p>&quot;But what about if an early stage programmer leaves and won&#x27;t communicate with the team?&quot; Then it&#x27;s likely that the code <i>doesn&#x27;t work as documented</i>, especially if you haven&#x27;t had automated tests yet. It&#x27;s also quite common that code was intended to run one way and does an entirely different thing later and someone forgot to update the documentation.<p>You might want to hire&#x2F;promote a system analyst at this stage. This is a person who knows all the hacks that were used at some point and whose full time job is to provide support and say, &quot;Oh that thing doesn&#x27;t actually work that way,&quot; or &quot;We did that because of a rare use case or limitation in the technology.&quot; If you make a programmer or manager do this part-time, they tend to bury problems or blame someone for not RTFM. System analysts also help to fix the process - if they&#x27;re getting a lot of complaints and confusion for one thing, they&#x27;ll know that something in the pipeline is flawed.<p>So in short, the code itself isn&#x27;t too tough. As long as it runs well, sells well, and doesn&#x27;t fall apart, it should be fine. In a startup, you end up engineering your processes and your team more than the code.<p>Also don&#x27;t forget to engineer the cycle between customer &gt; product &gt; UI&#x2F;UX &gt; development &gt; QA&#x2F;testing.