The Lazy Programmer
"If you have a difficult task, give it to a lazy person - they will find an easier way to do it." -Hlade's Law
Whenever I am asked why something should be done "a certain way," the answer at the front of my mind usually begins, "Laziness. This is the easiest way." Then I spend a minute recomposing the answer in terms of "efficiency" or "best practises." But enough. It is time to stop villifying laziness and start recognising the virtue of the true key to successful programming.
The "lazy" way I describe is not necessarily the easiest path in the short-term. Instead it is the easiest in the long run to understand, reuse, maintain, extend, and often, to explain. Long range laziness. When the history of software is pondered, the lazy, efficient paths will have wasted the least amount of people's time, money and energy.
In the long run, the truly lazy will always seek the most efficient solution. As you begin to see problems the lazy way, it becomes clear that all the great approaches to software development are in fact predicated on laziness. Prime examples include the Gang of Four's Design Patterns, Boyce-Codd Normalization, and Fowler's Refactoring. Reduce, reuse, recyle.
This Blog Story explores the principles of Lazy Programming in terms of 1st through 4th Order Lazy Forms (1LF, 2LF, 3LF and 4LF) as appliedĀ in defence against SQL Script Injection attacks. Read on, the lazy promised land is but a click away...