3 ms·
In some environments (like yours) it may make sense. In the vast majority of the cases however, you can get away with writing un-optimized code and it generall
by Aeolun 12y ago
In some environments (like yours) it may make sense.
In the vast majority of the cases however, you can get away with writing un-optimized code and it generally makes no difference. Considering the egg problem, any computer would not care two shits about running through all 100 floors to drop the egg every single time.
Unless this particular piece of code is a bottleneck for your organisation, there is very little reason to check for/think of an optimal solution to this problem (if you don't know it yet).
That does not make you a bad programmer, just an economical one.