Tuesday, January 15, 2019

Get It Right Before You Make It Faster

Slow and complete is better than fast and not finished.

It is far easier to adapt a working program to make it run faster than to adapt a fast program to make it work. Don't worry about optimization when doing your initial coding. On the other hand, don't use a ridiculously inefficient algorithm or set of data structures.
    Every software project has tough schedule pressures. Some may not be very pressured during their early phases, but even they step up the pace later. Given this situation, anytime a component is produced on, or ahead of, time and it works reliably, it is cause for celebration. Try to be the reason for celebration rather than desperation. If you get your program working (however slowly it runs), everybody on your team will appreciate it.


Reference:
Kernighan, B., and Plauger, P., The Elements of Programming Style, New York: McGraw-Hill, 1978.