About Creating State-of-the-Art Software

Android phones are receiving more RAM with each passing year, but guess what? It’s never enough! Android itself consumes it voraciously. The same holds true for Google Chrome. It seems that despite having better hardware, software quality is deteriorating each year. How did we go from the software that sent men to the moon with just 4 KBs of RAM to phones with 4 GBs of RAM just to send messages? Software disenchantment is about the decline in software quality over time.

I believe the most significant reason behind this trend is that we, as software developers, often build our work on top of not so good base layers. This, in turn, makes the situation worse. I recall my high school math teachers telling us that if you spent more than 4 hours on a potential solution for a problem, you should step back and start from scratch. Homework problems are not typically so difficult that they cannot be solved within 4 hours if you have the correct approach. However, if you persist with a flawed direction and foundation, you may end up with nothing. Today, software engineers are making the same mistake. If the Android kernel is inadequate, we should focus on fixing the kernel rather than introducing new apps. To find the solution, we should go back to the foundational layers rather than working at the surface. Read this Joel Spolsky’s excellent article about how delving into the basic layers can be beneficial.

The nginx story is intriguing. Its author tackled the C10K Problem from scratch, leaving behind all previous work on webservers to start anew.

When Igor Sysoev began developing nginx, most of the software that enabled the Internet already existed, and the architecture of such software typically followed legacy server and network hardware definitions, operating systems, and outdated Internet architecture in general. However, this did not deter Igor from believing he could improve things in the realm of web servers. The first lesson that might seem obvious is this: there is always room for improvement. With the idea of creating superior web software in mind, Igor devoted a significant amount of time to developing the initial code structure and exploring various ways to optimize the code for different operating systems. Ten years later, he is working on a prototype of nginx version 2.0, considering the years of active development on version 1. It is evident that the initial prototype of a new architecture and the code structure are crucial for the future of a software product.

The Architecture of Open Source Applications (Volume 2)
nginx – Andrew Alexeev

Also,

Jonathan Blow has a language he alone develops for his game that can compile 500k lines per second on his laptop. That’s cold compile, no intermediate caching, no incremental builds. You don’t have to be a genius to write fast programs. There’s no magic trick. The only thing required is not building on top of a huge pile of crap that modern toolchain is.

Niki Tonsky

State-of-the-art software is bug-free, fast, well-coded, and features a clean API. When you build something on top of a layer about which you have limited understanding, you risk losing any of these properties, but most importantly, performance can suffer. This is why it’s often a good idea to minimize the use of fancy libraries.