Scaling From Day One
There is a saying in software development, you write it first and then you optimize as needed. This is a very general rule and works much of the time. However, when you need your solutions to scale from day one, you can throw this rule out the window. Well, you aren’t really throwing the rule out, you are modifying it. The new rule is to write it optimally first when the solution needs to scale.
Going to the supermarket is a solution the needs to scale from day one. Let say we have two scenarios: you need to pick up two items and you need to pick up twenty items. I see two real approaches to the problem. The first would be to go to the store every time, and the second is to go only once. Going once is more optimal and it scales. Think of how much time and resources I burn up going to the store each time. You can argue that going to the store twenty times is not that bad, but what about 100 times. My point should be apparent now. Going to the store one time for every one item is inefficient
Let’s replace the supermarket drive with a database call. When you need to retrieve thousands of records, going to the database for each record can be costly. This is a common pitfall in development, the solution to retrieve information one item at a time is probably plaguing your world as we speak. You ever wonder why things take so long, the code in use may suffer from inefficient retrieval.
