Aug242005

I Want to be a lazy coder

Published by rocjoe at 8:25 PM under Sofware Development

At the core of the laziest of coders is a tendency to produce ego-free code. Symptoms of coding with ego usually look like larger programs that 'do everything'. A coder's ego pushes them to include more features or solve more problems because they believe others will view them as hard-working and more capable because the product of their labor is greater than the next coder. But, there's a lot more work to get done when starting a program that 'does everything', becoming much harder to sustain quality on the whole. That is, quality is spread out among many more features. The net result is the coder's product is more difficult to complete and often abandoned (or worse, is presented as complete but appears abandoned).

Ego-less programming would likely appear as smaller programs. The coder's focus can be much narrower on a smaller program that does precisely what its expected to do and no more. Focusing on attainable results provides the opportunity to raise the quality of the code without increasing the quantity of the code.

Ego-oriented programming often appears using longer methods and functions containing many more decision points (i.e. "IF" statements) specific to the problems needed to solve. Often what is lost when focusing on the specifics of a problem is we forget to look for the general-purpose solution that can produce the result we want for the condition (i.e. parameters) we want, and for many of the conditions that we didn't expect. To put it another way, focusing on the specifics for too long produces a solution that works for too few cases, meaning the coder will have to return to the code and "expand" the solution set by coding in even more specific activities. Since the original scope of the ego-oriented code is so big, the solution it provides rarely reaches completion because there's always "one more thing" it needs to do.

It is when the lazy coder tries to avoid solving a handful of specifics in favor of answering broader domain-wide questions that they actually produce a solution that accomplishes just as much, if not more, than the ego-oriented code would with a fraction of the effort required to build and maintain it.


[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses