There are a lot of things to consider before starting to write code: Which software libraries to choose? Use SQL or NoSQL? How would the database schema look like? Would we need a caching system to handle heavy traffic? How should the code be structured? And so on…

These questions are certainly important, but we live in an era of fast-changing and often ill defined user requirements. The conventional software development model of plan > code > test can more often than not fail to produce software that meets user requirements in a reasonable amount of time. One alternative is a three-stage process that allows us to iteratively learn what the users really want, and if all goes well develop better software faster.

Stage 1: Make it Work

This is similar to Stephen King’s approach to writing the first draft of a new book. King tries to finish the first draft as quickly as possible, with little concern for sentence structure or vocabulary. The important thing is to create a draft that, though rough around the edges, can be refined and polished later. Similarly, in software development the aim is to produce a prototype that can be shared with users without worrying about code quality or technical architecture very much. It’s acceptable for some parts to be flawed, and performance may not be optimal at this stage – these concerns can be addressed later.

There’s a saying that the best code is no code. Depending on user feedback, we may find that we don’t need to work on features we initially thought would be challenging, or we may uncover new areas to work on that we haven’t anticipated earlier.

Stage 2: Make It Right

After the first stage is complete, it’s time to fix all the important bugs and address any shortcomings of the product. During this stage, we should make the user interface easier to use, ensure that there are automated tests to check all features work as expected, display proper error messages (no more “unknown errors” please), and address all security concerns. This is usually the stage where the majority of development time is spent. Good luck!

Stage 3: Make It Fast

This is the stage I personally find the most fun. At this stage, we should have a software product that has been shaped by user feedback and is functioning correctly. However, we may start encountering or have already encountered performance issues. So, it’s finally time to optimize.

A lot of software developers have a tendency to do performance optimizations early in development, but there’s a good reason to delay optimizations until the final stage: predicting what would be slow within a complex software system before it reaches a certain level of maturity and is tested by actual users is hard even for experienced software developers. Also, a relatively mature software product is essential for establishing a baseline for performance before making any changes to the code.

In my experience, it’s more efficient to achieve perfection step by step, rather than trying to write beautiful and performant code from day one. So, please try to ignore the perfectionist voice in the back of your head, at least early on.