Let’s say you want to start a FLOSS project.
How many people did that up to now? Many.
But there is a problem, or better, a conflict of goals.
In one hand, you have the need of making your code fast enough. Which task is even more complex if you are using an interpreted language (for reasons out of the scope of this blog post). On the other hand (:D) there is the very important requirement of keeping your code human readable.
Languages, in general, have several “syntax levels” basing on developer’s skills. Newbies tend to stick to what is the standard way of writing, say, a for loop, while more skilled people are able to exploit all the potential of the language by using very exotic “code constructs”. Again, I don’t want to get into any particular language here, I just want to explain the trade-off that a developer, especially a FLOSS one has to accept when writing software.
It’s obvious that the two things, performance and readability, don’t play nice together. And the former, causes wannabe-developers to have hard times understanding how a particular function works. The worst case here is that the same developers will give up ahead of time. This is one of the reasons why the faster and more complex a codebase is, the harder is to start contributing to it.
There are two reasons that bring developer to choose performance over readability anyway: the former brings them an orgasming sensation of owning the whole World. And writing obfuscated code is just another way to tell the world how c00l someone is (l33t). Unfortunately, most of the times people doing that are right. Because it’s the only way to get applications working without annoying users with high wait times.
“In a perfect world, there wouldn’t be no need for caching”. Myself.
Yes, caching is a perfect example of the trade off between readability and performance. Caching a particular data retrieval code, increases its complexity, by the need of validating, tainting, generating, removing, (etc), cached data.